getmail and amavisd

Jakob Curdes jc at
Thu Apr 28 17:37:34 CEST 2016

Hello, I just try to fetch an external pop3 account with getmail and 
feed it to postfix/amavisd in a pre-queue-setup.
Legitimate mail gets delivered correctly, but spam that is blocked by 
amavisd leads to a "delivery error" in getmail, resulting in the mail 
being left on the POP3 account.

"Apr 28 17:21:00 comm2 amavis[24129]: (24129-05) Blocked SPAM, MYNETS 
LOCAL [] <getmail at comm2> -> <obfuscated at>, 
Message-ID: 1234 at>, mail_id: OAdOMsGZWpQK, Hits: 
18.489, size: 4019, Subject: "Design-Handyuhr, liebt jeder", From: 
"Sabrina_Lange"_<sabrinacsgasa7lange at>, Tests: 
(....) autolearn=spam autolearn_force=no, 10505 ms
Apr 28 17:21:00 comm2 sendmail[26898]: u3SFKnen026898: 
to=obfuscated at, ctladdr=getmail (5001/5001), delay=00:00:11, 
xdelay=00:00:11, mailer=relay, pri=33619, relay=[] [], 
dsn=5.0.0, stat=Service unavailable"

which in turn yields

"Delivery error (command sendmail 28799 error (69, ))"
in getmail.

So I have to tell amavisd to accept all spam for this address and 
quarantine it somewhere or throw it away (instead of blocking it at 
ingress); however as the mail comes from the localhost sendmail it ends 
up in the "mynets" policy bank. Any idea how i coud differentiate this 
case from a mail actually originating at localhost!?

Jakob Curdes

More information about the amavis-users mailing list