The actual problem I'm having:
My email server (exim, but it hardly matters for this), which I've been running for years, forwards email via /etc/aliases (i.e. [email protected] points to ~5 people) and individual user's .forward files (i.e. my .forward has "[email protected]"). This has been problematic off and on for years, with various services refusing to accept mail for various periods, but recently gmail has gotten very serious about just refusing these mails.
I have DKIM, SPF and DMARC setup, but DMARC doesn't apply for these forwarded emails. The only thing I'm doing against best practices is that my IP's reverse DNS points to 50-250-232-19-static.hfc.comcastbusiness.net.
, which is certainly not great. I'm skeptical that just fixing that would solve this, though.
I've started passing the mail from the actual domains I control though a service (smtp2go
, but again I don't think it matters), but they will only accept mail that is actually from my domains.
I think at this point, forwarding in the traditional MTA sense just isn't really workable in the modern anti-spam landscape.
I could try moving all my mail handling to an external service (a friend uses purelyemail, for example), but the disruption to my users, some of whom use local maildir with like alpine and mutt, would be substantial, and I think I'd just be kicking the can down the road: maybe MTA-style forwarding via such a service would work for now, but some day it'd fail, I bet.
What I'm trying to figure out is what is the minimum I can do to get mail flowing without having to make huge changes to my entire setup.
These are the options I can think of:
Use a mail syncing tool (there seem to be several of them; OfflineIMAP, isync, imapsync, others; if anyone has one they prefer that would be extremely helpful) to just shove the mails from a local maildir directly into the user's IMAP account. This is what I plan to do instead of my own .forward file, but that's not going to work for random board members, especially since as far as I know IMAP creds are all-or-nothing.
Have the MTA forward the mail but rewrite the sender to an address in my domain, so that DMARC works and so on. In other words, forward like an MUA instead of an MTA, but at the MTA level. Weirdly, I'm not seeing much info online on how to do this; I'm sure I could roll my own with procmail and formail, but I kind of expected this to be well solved. There's some definite detail work there, like making the Reply-To correct and so on. I know that mailman will do the correct kind of rewriting here, as I've configured it to do that for a mailing list, but that's about all I've found.
I would love to here about other possible solutions. Failing that, I'm looking for specific advice on how to do either #1 or #2, as I expect to do a mixture of both.