July 21, 2009

Maildrop & .mailfilter resending

WORDS BY   Gregor Pipan

POSTED IN   programming | internet | tutorial | misc

Spending long unnecessary time on the web searching for solution, how to resend or forward an email by maildrop in delivery mode, I finally found a solution, which is now shared with you ...

if(/^To: blue@bla.com/)

  xfilter "/usr/bin/reformail -I'Reply-To: blu@bla.com'"
  cc '!test@bla.com'
  to "$HOME/Maildir"

This sample will do the following: for each mail send to blue@bla.com it will first rewrite the Reply-To field with blu@bla.com, send it to test@bla.com and deliver to local Maildir.

Hope this helps ...