Content warning: Somewhat long post, question of interest only to Linux server admins
Attention Linux server admins familiar with local mail handling, please boost for reach. I have a situation where I have an Email address that several people know, and I want all of them to get all Email sent to that address automatically. However, because of the possibility that this address might fall into the hands of spammers through no fault of my own, I don't want to just automatically forward everything that address receives. So far, I've been manually reviewing everything that comes to this address and then forwarding it to another address, which only I know, which does auto-forward to the desired recipients.
I'm familiar with the .forward file in a user's home directory to automatically forward incoming Email, but as far as I know, that just forwards everything it gets indiscriminately. I'm looking for something similar, but with a whitelist of known trusted Email addresses from which any incoming Email will be auto-forwarded, while everything else waits for me to review it. Does such a thing exist? If so, how do I set it up?
A better approach may be some kind of spam filter on the server. I have a web panel that controls everything, and it uses spamassassin at the back end and pipes incoming mail through it during the SMTP dialogue. I hear though that rspamd may work better and use less RAM on the server. Even if you're doing all this manually, you should be able to stick rspamd into the process between when the message comes in and when it gets forwarded, making your manual review process much easier, assuming you still feel the need to manually review messages before forwarding them. I'm guessing you probably still will want to manually review, but rspamd and spamassassin both tend to learn over time, so your manual review process will get easier.
@kyle I assume this was supposed to be a reply to my earlier post. Anyway, that's not really what I'm going for. There are several addresses that I trust completely. I'd love to automatically forward any Email from these specific addresses. I mean I know in theory a spammer could spoof one of those addresses, but spammers aren't likely to get hold of that address, and even if they did, they'd still have to hit upon one of the few magical trusted addresses.
@Jayson Smith OK you should be able to whitelist those addresses in your forwarder. I don't run anything like this here, so I'm a bit fuzzy on the details, but I'm fairly certain it's possible. It's still serverside filtering, just not exactly what I mistakenly thought you needed.
@kyle Yeah I'm just using .forward in the home directory of the secret forwarder account I manually forward to. What I'm looking for to use in this and a few other situations is what you might call a smart .forward replacement that can actually look at factors such as who the Email is coming from, etc. and decide whether to forward it or not.