Jason Cook <jasonc(_at_)dsgtech(_dot_)com> writes:
Is it possible to use procmail on a mail relay. I'm currently using exim
on
the mail relay. I would do this on the main mail server, but as its
running
exchange, this isn't possible. Any suggestions or pointers will be
greatly
appreciated.
& Philip said:
If you can configure exim to pass all messages through a given program,
passing the envelope sender and recipient(s) as arguments and can come
up with a way to recognize which messages have already been filtered,
then it should be doable. When this is done with sendmail, the process
is something like:
Yes, you can configure exim this way.
For exim 3.x, define a transport for procmail something like this:
procmail_pipe:
driver = pipe
command = "/usr/local/bin/procmail -t -m
VIPUSER=${local_part}(_at_)${domain} /usr/local
/etc/vip_procmailrc"
from_hack
user = mlbox
..obviously with your own procmail paths & user.
and, if you want it to deal with ALL local mail, add a new director just
after the system_aliases director like this:
procmail:
driver = smartuser
transport = procmail_pipe
One thing to remember is that if your relay re-writes the address and sends
the mail on, it ends up dealing with TWICE the amount of mail it was before.
If all you want to do is re-write addresses, consider using exim's built-in
filter language, which is pretty powerful. You should also consider dumping
Exchange, IMHO :-)
Cheers
John