Greetings,
I'm running Procmail on a Sendmail gateway that handles multiple domains.
The gateways also run MailScanner and act as a frontend to several paging
gateways. In the case of one paging service that chokes on any HTML in the
message, I use Procmail to call stripmime to convert it to plain text. It
then passes the message to MailScanner and it's friends for spam checking,
and then the clean message is then sent to the paging gateway based on the
sendmail mailertable entry for that domain. The gateways have no list of
valid users and simply accept mail for a domain, scan it, and send it to the
paging gateways for delivery or rejection. Procmail is only used for the one
domain based on my sendmail configuration.
This is my current /etc/mail/procmailrc file which works fine:
# procmail rules to filter mail on a gateway
#
LOGFILE=/var/log/procmail.log
VERBOSE=on
LOGABSTRACT=all
SENDER = "<$1>"
SHIFT= 1
:0 fw
* ^Content-type:.*(multipart/.*;|text/html;)
|/usr/local/bin/stripmime.pl
:0 w
! -oi -f "$SENDER" "$@"
Messages coming into the gateway for <number>@domain1.com are checked and
converted to plain text if necessary and then sent on to that paging
gateway.
Now, due to some issues I won't attempt to explain, I need to enhance this
procmailrc so that the above continues to work for all messages sent to
domain1.com, but also if the message Subject contains a certain keyword,
that the message will also get sent to another paging gateway with the same
number in the To field:
To: <number>@domain.com >> Hand off to Procmail >> Procmail checks
Content-type and converts to text if necessary >> Procmail checks for
Subject line keyword >> Subject line keyword found and message is sent to
<number>@domain1.com & <samenumber>@domain2.com >> If Subject line keyword
is not found, send just to <number>@domain1.com
Is this possible to do in Procmail ? So far, I haven't seen any recipes for
something like this on a mail gateway. I'd appreciates any ideas.
Thanks,
Greg
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail