שגיאות Unexplained Email::Receiver::InvalidPost

Similar to Mirrored mailing list is rejecting registered forum users

It doesn’t appear to be. The referenced topic seems to be a permission problem brought on by incorrect configuration.

לייק 1

My bad, apologies for the disruption.

I have proposed a fix for the problem I found, but from everything I’ve found so far the component that was performing the mangling only affects the saved record and doesn’t affect the incoming mail during processing.

I’m reasonably confident the source of the trouble must be something else, but I don’t yet know what it might be.

לייק 1

Seeing that this change was merged, I upgraded our Discourse instance today and will keep an eye on the email rejected logs in the upcoming days.

לייק 1

Already since the upgrade, three new InvalidPost errors were logged, but the rejection details are different: all three errors show the correct message body (where before the mailing list signature was shown) and the rejection reason is now Access Denied.

That’s some improvement at least.

Does the reason for the error stick with the user?

Are you sure the error is incorrect? Does the user have permission to post in the category? Is the user active?

Offhand, the reason doesn’t seem to stick: the account is active, not suspended nor silenced. However I noticed the account is not “staged”, which is the case for most of the accounts whose mailing list posts do end up in Discourse. All of the posts from non-staged users are from members of the moderation team.

Our mailing list mirror category was initially set up using this guide: Mirroring a read-only mailing list in Discourse

However, I just reviewed the configured permissions on the category and it seems like our moderators group was added, and `everyone` was given `reply` permissions.

I’ve removed these extra permissions and left only `everyone` with the `see` permission. Perhaps these “extra” permissions are interfering with the way Discourse handles these special “mailing list mirror” categories?

The fact that the user is not staged might be the problem. Staged users are not checked to see if they have permission to post in the category, but registered users are. So, if the user is not in a group that has permission to reply to topics in the category, their reply will be rejected because they do not have permission. The same applies to new topics and the ‘create’ permission.

There is a topic about this problem here: Category not accepting "anonymous email" from known users

לייק 1

However, I just reviewed the configured permissions on the category and it seems like our moderators group was added, and `everyone` was given `reply` permissions.

I’ve removed these extra permissions and left only `everyone` with the `see` permission. Perhaps these “extra” permissions are interfering with the way Discourse handles these special “mailing list mirror” categories?

Actually, scratch that, I must have been looking at another category, because the permissions for the mailing list mirror category are as expected: only `everyone` has the `see` permission. That said, my observation that posts from non-moderator, non-staged users seem to consistently get rejected.

This explanation definitely makes sense based on what I’m seeing, but if it’s the case this is definitely unexpected and confusing behavior: senders who post to the mirrored mailing list but happen to already have an account on Discourse with the associated email address should definitely be allowed to post to categories where the “This category mirrors a mailing list” setting is enabled.

לייק 1