[Dovecot] redelivered mail results in mail-forwarding-loop
linux at blinkeye.ch
Mon Feb 9 22:32:43 EET 2009
I try to redeliver mail for the following reason:
Once in a while a user receives a mail which isn't correctly recognised as
SPAM/HAM. He'll move the mail into a specific folder (say:
retrain-as-spam/retrain-as-ham) and a script will retrain the mail. What I'd
like to do is to redeliver the mail in order for correct (re)delivery (e.g.
sieve scripts). Using sendmail to redeliver the mail I'm able to re-run the spam
tests which will add it's SPAM headers and dovecot/sieve will be able to
correctly file the message.
I tried to just resend the mail:
# /usr/sbin/sendmail -f foo at bar -v -oi foo at bar < mail
but this results in a
Diagnostic-Code: X-Postfix; delivery via dovecot: mail forwarding loop for foo at bar
The problem is that the mail already has a "Delivered-To: foo at bar" line.
The above is working when the "Delivered-To" line is being removed, and my
question is if this can't be done automatically?
More information about the dovecot