procmail
[Top] [All Lists]

Re: NEWBIE: Try to use autoresponse

1999-02-26 12:51:59
Neil Aggarwal <neil(_at_)JAMMConsulting(_dot_)com> writes:
I am new to procmail, so I would appreciate any advice that you
can give me.

I am trying to get procmail to send a reply to all messages
that come to my neil(_at_)JAMMSoftware(_dot_)com address notifying them that
my email address has changed.

I read the docs and the examples and came up with the following
.procmailrc file:

PATH=/bin:/user/bin:/user/local/bin

The above is almost certainly both unneeded and incorrect: every UNIX
system I've seen has program in /usr/bin, not /user/bin, and
/usr/local/bin, not /user/local/bin.  (I have been on a system where
user home directories were under /user, but system programs weren't put
there.)


MAILDIR=$HOME/Procmail
LOGFILE=$MAILDIR/procmail.log
SENDMAIL=mailx

Do you have a specific reason for overriding procmail's default value
of the SENDMAIL variable.  mailx may or may not work correctly as the
value of $SENDMAIL.


...
:0 h c
* ^TOneil(_at_)jammsoftware(_dot_)com
| (formail -r   -A"Precedence: junk" \
       -A"X-Loop: neil(_at_)JAMMConsulting(_dot_)com"     ; \
       echo "Please note that my email address has changed."; \
       echo "The new email address is neil(_at_)JAMMConsulting(_dot_)com";\
       echo "";\
       echo "Thank you,";\
       echo "     Neil Aggarwal") | $SENDMAIL  -t          

If you're using procmail 3.11pre4 or later then you should use ^TO_
instead of ^TO: the ^TO_ token will avoid bogus matches on addresses
that end in neil(_at_)JAMMConsulting(_dot_)com, but that have more 'words' in
front of the 'neil', like "call-me-neil(_at_)JAMMConsulting(_dot_)com".  This 
may
seem unlikely, but it's a good habit to get into using ^TO_ over ^TO
when you can.

Also, you almost always want to use formail -rt instead of formail -r.


This looks correct to me and anthing that I have tried to debug it
has not worked.

Here is the contents of the log file:
From neil(_at_)customer(_dot_)DenverOnline(_dot_)com  Fri Feb 26 09:43:35 1999
 Folder:
/var/mail/neil                                                    395
stty: : No such device or address
auth_check: From:  not found
auth_check[2]: syntax error at line 2 : `(' unexpected          

The "stty:" error message is because you have the stty command in
either your .cshrc, .tcshrc, or .bashrc file.  Commands that affect
your terminal belong in your .login file instead.

I'm not sure what the auth_check errors are about, but you may be able
to solve them by putting the line

        SHELL=/bin/sh

at the top of your .procmailrc.  That's a good line to put there anyway,
as /bin/sh is _much_ better at scripting than csh/tcsh.


Philip Guenther

<Prev in Thread] Current Thread [Next in Thread>