I have fetchmail collecting from yahoo and passing the mails to the local postfix server. If I have a 4xx Error , because for example the sender domain does not exist, fetchmail will try to pas this email forever to postfix and postfix will reject it forever with
NOQUEUE: reject: RCPT from localhost.localdomain[127.0.0.1]: 450 4.1.8 <[email protected]>: Sender address rejected: Domain not found; from=<[email protected]>
first question:
how do I have to setup fetchmail to fist of all act from a local host I have set-up
fetchmail.localdomain[127.0.0.7]
in order that the logfile looks like this:
NOQUEUE: reject: RCPT from fetchmail.localdomain[127.0.0.7]: 450 4.1.8 <[email protected]>: Sender address rejected: Domain not found; from=<[email protected]>
for this I have setup /etc/hosts
127.0.0.1 localhost.localdomain localhost
127.0.0.7 fetchmail.localdomain fetchmail
second question:
how can I setup fetchmail to try a limited nr of times to pass the mail to postfix and after this to skip it?
Personally I avoid the whole local mailserver and have fetchmail running from my crontab and deliver straight to old-school procmail which in turn calls SpamAssassin, anti-virus and before filtering and dropping my mail in the correct Maildir: