The 03.09.08 at 15:23, Andreas Winkelmann wrote:
Ok, a few lines from fetchmail's manpage:
... Return codes which fetchmail treats as antispam responses and discards the message can be set with the `antispam' option. This is one of the only three circumstance under which fetchmail ever discards mail (the others are the 552 and 553 errors described below, and the suppression of multidropped messages with a message-ID already seen). ...
In short, only errors 552 and 553 without the antispam-option lets fetchmail delete the mail from the server. And of course double msg-ids.
In your case the best choice will be "antispam 550" so the mail will be deleted directly from the server, and if you want to supress bounce-mails set "spambounce" to no.
Notice that the 550 response also causes mail to be deleted from the server (verified by experiment); in theory, it has ben downloaded and bounced back, so it can be deleted. That works. What it happens is that if I set the nobounce option, the bounce mail goes instead to me (good), but it also means that the original mail is not deleted from the server. What I'm saying is that the behaviour of deleting or not deleting changes if I use the nobouncemail option, and that is not documented.
But maybe i had misunderstood you.
I could treat it as spam - which it is, in this case - but it could be a legitimate mail containing an atachement which I reject automatically. I don't think that treating all rejects as spam is correct.
Which leaves me with another problem: how to tell postfix NOT to send emails comming from fetchmail-daemon,
Aparently this could be done with:
/^From:.*fetchmail-daemon\@nimrodel\.valinor HOLD
There was a missing "/" at the end (valinor/). It is working now.
in the /etc/postfix/header_checks file. But it doesn't work.
Is HOLD really what you want?
Not really. I want it redirected for manual inspection and deletion. I'm
thinking of using "reject", which probably would send them back to the
user "fetchmail-daemon", which is the postmaster... I will try that right
away [...] No, it is worse:
Sep 8 16:50:46 nimrodel postfix/cleanup[8423]: DBF2ACAF86: reject: header
From: FETCHMAIL-DAEMON@nimrodel.valinor from localhost[127.0.0.1];
from=
Turn on verbose logging in Postfix (master.cf) and view the logs.
It is an idea... -- Cheers, Carlos Robinson