On Mon, Sep 09, 2019 at 07:48:16PM +0300, Reio Remma wrote: > On 09.09.2019 18:13, Martijn van Duren wrote: > On 9/9/19 3:37 PM, Reio Remma wrote: >> Hello! >> >> Slowly digging into filters. >> >> Now I'm curious if it's possible to modify the recipient after say spam >> check in data-line? I get the impression that rewriting rcpt-to at that >> stage is impossible, but my goal would be to redirect/quarantine high >> scoring spam to a special e-mail address. >> >> Would it be doable somehow? >> >> Thanks! >> Reio >> > It is not. > > What you might be able to do is add an additional header and somehow let > an lmtp server make the decision based on the header. > > I haven't used lmtp myself, no clue if this actually works, but it's > worth investigating :-) > > Please reply to the threat if you managed to make it work. > > Thanks Martijn and Gilles for the confirmation! > > I'm currently using amavisd-new with the quarantine feature, but I'm itching > to switch to Rspamd (greylisting here I come!).
Rspamd can let you interface Amavis. I did for someone I'm managing mail for so that you don't have to plug a ton of different tools directly to OpenSMTPD but let Rspamd broker these different filters and produce a result. > I'm using the quarantine to keep an eye on mails with a medium spam score so > we won't lose the occasional legit mail with a higher than normal spam > score. Additionally I can train these borderline mails correctly as > ham/spam. I will soon extend the filter-rspamd to include symbols it matched. With this, you'll be able to do delivery-time classification and move to a quarantine folder if you find the proper symbol. > I now see Rspamd has a metadata exporter feature I could probably use to > copy spammy mails to the quarantine mail address. Dunno about that > There are also Dovecot's sieve scripts. I'll have to see which work better. I'm not a big fan of Sieve, it is far more complex than it should be. I use it for Inbox -> SPAM, Spam -> Inbox training but quite franly if a classification can happen at delivery time through MDA, I'd rather let a fdm ruleset classify. -- Gilles Chehade @poolpOrg https://www.poolp.org patreon: https://www.patreon.com/gilles