Discussion:
custom spam transport?
Diego M. Vadell
2018-07-24 14:00:07 UTC
Permalink
Hello everybody,

I was wondering if I can configure different transports for spam and clean
emails. I want to forward spam to another postfix instance. Is it possible?

I tried

$spam_quarantine_method = 'smtp:[127.0.0.1]:10030';

but I'm getting all the spam to a single user, and not the original sender. I
don't know if I can set $spam_quarantine_to to the original sender.

Thanks in advance (and thanks for making amavisd)
-- Diego
A. Schulze
2018-07-24 19:08:13 UTC
Permalink
Post by Diego M. Vadell
Hello everybody,
I was wondering if I can configure different transports for spam and clean
emails. I want to forward spam to another postfix instance. Is it possible?
I tried
$spam_quarantine_method = 'smtp:[127.0.0.1]:10030';
but I'm getting all the spam to a single user, and not the original sender. I
don't know if I can set $spam_quarantine_to to the original sender.
Thanks in advance (and thanks for making amavisd)
-- Diego
if you could add a header to any spam message you could let postfix filter for that header
and let postfix send such messages to an other destination.

master.cf
# this is where amavis sent ham and spam back to postfix
127.0.0.1:4242 inet n - - - - smtpd
-o cleanup_service_name=amavis-cleanup
-o syslog_name=postfix/amvais-reinset-messages-here

amavis-cleanup unix n - n - 0 cleanup
-o syslog_name=postfix/amavis
-o header_checks=pcre:${config_directory}/filter_spam.pcre

filter_spam.pcre
# spam.goes.here is your next postfix instance handling spam only
/^X-Spam-foo:/ FILTER smtp:spam.goes.here:25

... completely untested ...

Andreas

Loading...