Allow email in for moderators, staff, and admins

The option “Custom incoming email address” is not available for automatic groups. That is fine for everyone and the trust_level groups, but I’m not sure it makes sense for staff/admins/moderators.

I’ve had to make a separate “support” group for ours, containing the moderators. This is fine as a workaround but has a small but annoying admin burden.

Is there a strong reason for this (or IMAP for that matter) being disabled for these groups?

3 Likes

What would happen if I just inserted an email address into groups.incoming_email for @moderators on my forum? It is a little tricky to safely test it without a whole new instance.

Well, since nobody told me that was completely stupid, I’ve gone and tested this rails command on a little used instance.

And it seems to work (so far)!

:bangbang: Use at your own risk and backup first

To add an email-in address

Group.where(name: "=groups.name=").update(incoming_email: "=groups.name=@=domain=")

To remove an email-in address

Group.where(name: "=groups.name=").update(incoming_email: NIL)
2 Likes

I’m not sure this is ready to be a guide @nathank? It seems fairly untested.

Ok Ok, I’ll test it more and then move it to the guide bit once it is proven. So far it is absolutely fine.

I’m still unsure why it is disabled in the UI - while I can see that there are hazards for having email-in for automatic groups which are large (especially for high profile sites like meta.discourse.org), it seems odd to completely remove the ability of admins to do it.

I do wonder if it is a historic thing and should be reconsidered - especially for admin / moderators / staff.

1 Like

I’ll see what I can find out. :+1:

1 Like

Looks to me like it should work. I’m not sure it’s a great idea, but I don’t think it can hurt anything.

Because those groups are sort of special, as they are really aliases and it makes more sense to just create a “normal” group for people who are “admins” or “staff” in your organization.

1 Like

I think my hesitancy is around whether it’s advisable enough to be added as a recommendation or not. I’m not sure why it’s blocked normally, but I have a tendency to trust the UI. :slight_smile: Though if it turns out to be okay we can always slide it back. :+1:

2 Likes

I was just looking into creating email addresses for staff on my neighborhood forum, and bumped up against this issue. There is an admins inbox so it seems sensible to me that it should be possible to give that inbox an email address so people can write to it. Same thing for moderators, who it makes sense to allow be written to by email to ask for help with account logins and such.

For a private, invite only community run informally like my neighborhood forum, there is otherwise no way to reach the owners of the site unless the owners put an email address in the description, which now shows up on the login page. I’d prefer to provide an email address reaching mods there than my personal gmail.

I will try this hack, but also think it might be interesting to talk about making this possible via the UI and even encouraging it for private sites.

3 Likes

I think a plugin that would accept username@hostname should be possible.

2 Likes

Exactly my thoughts! After using it for 6 months on two large private sites, I haven’t noticed any problems at all. And despite having it prominently on the login page, we’ve had very few emails and even less spam.

So it has been a raging success thusfar, and I’d really encourage it to be put in the UI.

That is a whole different thing - but potentially very helpful Jay. It would work very nicely if it could be configured to apply to all the individuals of a specified group(s).

3 Likes

For those who want to manage accounts (e.g. Mailgun, AWS, Digital Ocean) from their admin account, the auto_generated_allowlist site setting is super useful.

It permits ‘no-reply’ and other auto-generated emails to squeak in through the usually tough filters. This allows invoices and account confirmation emails to be managed within your instance, by your team.

4 Likes