Brock Rozen <brozen(_at_)torah(_dot_)org> writes:
I figured that the best way to run an auto-reply system, at least once you
get many many addresses, is from the aliases file and not from a dedicated
account on the system.
Why? well, let's say I have numerous domains on my system, two of them
want an auto-response on info(_at_)domain(_dot_)com and a third wants that
forwarded
to somebody. So, using virtual user tables in sendmail, I can do it --
and I can filter for domains in procmail. But wouldn't it just be easier,
and actually hit more of the messages, if I just did it in the aliases?
Of course it would be, because via procmail I can still lose out if
info(_at_)domain(_dot_)com doesn't appear in the TO or CC headers of the
message.
My question, how do I do it? What do I place in the aliases file to run
procmail with the designated recipe file and what's essential in that
recipe file? (I could stick any global variables in /etc/procmailrc, so
that's not so bad, and otherwise I could just include a standard
configuration file)
I just replied to a message from Jerry Preeper <preeper(_at_)cts(_dot_)com> in
which I described how to forwarded messages from the virtuser table to
a single account and then forward them from there. The purpose for him
would be to do spam filtering (found in /etc/procmailrc) on virtuser
addresses before they get forwarded off-site. However, the same basic
idea could be applied here with a more complicated rcfile on the
'generic' account, say:
ARG = $1
# handle auto replies
:0
* ARG ?? ^^autoreply-domain1^^
{
INCLUDERC = /etc/mail/autoreply-domain1.rc
}
:0
* ARG ?? ^^autoreply-domain2^^
{
INCLUDERC = /etc/mail/autoreply-domain2.rc
}
# forward others
:0
! $ARG
(The autoreply rcfiles probably shouldn't be placed in
/etc/procmailrcs/ as that has special meaning to procmail.)
Philip Guenther