Open michaelcadilhac opened 1 year ago
You can do that with delivery mda /path/to/my-script
. The script reads the mail, optionally transforms it in some way, and then puts it into a maildir or mbox file (or uses a program such as procmail
to do that last step).
Aah, of course! Thanks Martin. This is not exactly the same, since I have to rewire the maildir/mbox/exchange with a different tool rather than just use mpop, but this does work indeed. Feel free to close this feature request if you think that it'd be redundant.
I agree that it would be nice to have a transform
or process
command that filters the mail before it goes to the delivery stage. I'll keep this issue open as a reminder for later.
It would be nice if mpop could, on the fly, transform (headers of) emails. Something like a
transform prog
option that runsprog
with the email on stdin, and uses the stdout as the transformed email.Rationale: I'm fetching emails from an Outlook server, and storing them on a private server (maildir). Gmail is then accessing my private server and fetching these. Problematically, Outlook adds "Received" headers, and Gmail complains that Outlook is not a permitted sender for whichever address the email originated from. I'd like to "sanitize" the email by flushing the "Received" headers from Outlook.