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 f...@bar -v -oi f...@bar < mail

but this results in a

Diagnostic-Code: X-Postfix; delivery via dovecot: mail forwarding loop for 
f...@bar

The problem is that the mail already has a "Delivered-To: f...@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?

Reply via email to