Greylisting in postfix with postgrey

Instalation

Configuration

/etc/default/postgrey:
POSTGREY_OPTS=“–delay=60 –inet=127.0.0.1:60000”

# the –greylist-text commandline argument can not be easily passed through
# POSTGREY_OPTS when it contains spaces. So, insert your text here:
POSTGREY_TEXT=“Greylisted for %s seconds [see http://postgrey.schweikert.ch/help/%r.html ]“

If you did not add “permit_mynetworks and permit_sasl_authenticated” you should add “localhost and 127.0.0.1”:

/etc/postgrey/whitelist_clients.local:
/^smtp[0-9].sbb.rs$/
/^mta-[0-9].siol.net$/
/^mta-[0-9][0-9].siol.net$/
/^out-[0-9].mail.amis.net$/
/^avs[0-9].arnes.si$/
/^mail-[a-z][a-z][0-9]-[a-z][0-9][0-9][0-9].google.com$/
/^[a-z][a-z]-out-*.google.com$/


/etc/postgrey/whitelist_recipients:
postmaster@
abuse@
double-bounce@

Report generation

zcat /var/log/maillog.0.gz | ./postgreyreport [options] > postgreyreport.log

or

 zcat /var/log/maillog.0.gz | \
 ./postgreyreport --nosingle_line --check_sender=mx,a \       
 --separate_by_subnet=":==================\n"
postfix/postgrey.txt · Last modified: 2015/08/25 11:26 by zagi
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 ipv6 ready