Re: Two copies of E-Mail (Re: I wish to advocate linux)
On Sun 10 Mar 2013 at 15:00:29 +1100, Zenaan Harkness wrote:
> Would it be possible to also pipe outgoing mail through procmail or
> similar, on its way to the MTA/SMTP server?
When I initially looked at this I thought "maybe", but it did not seem
particularly friendly to do. More to the point, I wasn't prepared to
change anything in my MTA's configuration to get it working. After all,
I became interested in this complaint about list mails plus CCs, not
because they are an annoyance to me, but as an intriguing problem.
A solution is possible if thinking is in terms of formail rather than
procmail.
There is a Debian package of proxsmtp. This program can proxy mail to a
local or remote MTA. More to the point, it can run a script which can
process the mail before passing it on. This one, for example:
#!/bin/bash
MID="$(date +"%Y%m%d%H%M%S"NoCcsPlease@example.com)
TO="$(formail -zx"To":)
if [ "$TO" = "something which identifies debian-user" ] ; then
formail -I "Message-ID: ${MID}"
fi
There we are! A Message-ID generator which can be used with MUAs other
than Mutti to mark list mails. Thank you very much for the nudge.
Reply to: