On 18 November 1998, Jim Reese <jimreese(_at_)ns1(_dot_)acun(_dot_)com> wrote:
I hope someone can help this raging newbie.
It's a long story which I will not bore you with. The short version
is that I inhertited a Linux (v4.2) box with procmail v3.2 and I know
absolutely nothing about this operating system.
Now, I find myself in the position of having to get several
autoresponders up and running in a hurry. The only information I
have been able to get locally is "Procmail can do that."
[...]
I will need to set up at least two: info@ and support@ Each will send
out a different response.
Is anyone willing to lead me by the hand?
(1) Get procmail 3.11pre7 from
ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/ ,
and install it (this should work just out of the box).
(2) Add a new user, say "support", for your autoresponders. AFAIK
RedHat is rather peculiar, it doesn't have an adduser script like
other systems, so you'll have to do it from X, with usercfg. Use
/bin/sh as the user's shell. Put this user in the group "nogroup",
and make it nologin (edit both /etc/passwd and /etc/shadow and
change the password field to "*").
(3) Make the home of the "support" user owned by root.nogroup and with
permissions 0555. Add a Mail directory owned by support.nogroup
with permissions 0700. Add an empty file .rhosts owned by
root.nogroup, with permissions 0400.
(4) If your sendmail is not configured to use procmail as local MDA (I
don't know the RedHat defaults), also add a .forward file owned by
support.nogroup, with permissions 0600 and containing something like
|/usr/bin/procmail
(5) Add aliases to "support" for the other addresses of the
autoresponders. For "info" f.i., edit /etc/aliases, add a line
info: support
then run newaliases (assuming you are using sendmail).
(6) Set up the procmail part of the autoresponder. This means adding a
file ~support/.procmailrc owned by support.nogroup, with permissions
0600, which looks something like this:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
PATH=/usr/local/bin:/bin:/usr/bin
MAILDIR=$HOME/Mail
DEFAULT=$MAILDIR/mbox
LOGFILE=$MAILDIR/log
COMSAT=no
USER=support
:0 h
* ^TO_support\>
* ! ^X-loop: support(_at_)your(_dot_)domain
* ! ^FROM_DAEMON
| (formail -rt -A "X-loop: support(_at_)your(_dot_)domain" -A "Precedence:
junk"; \
cat /path/to/support/answer) | $SENDMAIL -oi -t
:0 h
* ^TO_info\>
* ! ^X-loop: support(_at_)your(_dot_)domain
* ! ^FROM_DAEMON
| (formail -rt -A "X-loop: support(_at_)your(_dot_)domain" -A "Precedence:
junk"; \
cat /path/to/info/answer) | $SENDMAIL -oi -t
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
(7) RTFM procmail(1), procmailrc(5), procmailex(5), formail(1) and
procmailsc(5), then look at the various FAQs available on the net to
find out how to improve the above recipes.
Write me in private if you still can't figure out how to make it
work.
Regards,
Liviu Daia
--
Dr. Liviu Daia e-mail: daia(_at_)stoilow(_dot_)imar(_dot_)ro
Institute of Mathematics web page: http://www.imar.ro/~daia
of the Romanian Academy PGP key: http://www.imar.ro/~daia/daia.asc