procmail
[Top] [All Lists]

Re: Autoresponder

1995-12-18 01:50:32
On Sun, 17 Dec 1995, Massimo Fuchs wrote:

Thank you for your generous help. I installed as you suggested, but have some
bugs, etc., you might be able to help me with.

Sincerely,
Massimo Fuchs


On Dec 17, 10:54pm, Mark Mathis wrote:
Subject: Re: Autoresponder
On Sun, 17 Dec 1995, Massimo Fuchs wrote:

1.        Is there a sample/readme.file somewhere which explains how to 
set-up
procmail as an autoresponder?

A. Set up a user account like "info" or whatever.

B. Add the ".forward" file exactly as it is in the notes section of the
man page for procmail.  If you have trouble with the "^H" character just
cut and paste the line from the man page or from this email, leave all
quotes as they are.

"|IFS=' '&&p=/usr/local/bin/procmail&&test -f $p&&exec $p -Yf-||exit 75
##info"



I wrote the .forward exactly as above, changing "##info" to "#autoresp". When
using, I'm getting the error message "procmail: Unrecognised options: yf-". I
used "Mail -v autoresp(_at_)netfone(_dot_)com" to test.


You need two # characters with a control H inbetween
the name change is fine

Also, what is the "&&test" for. I noted that your syntax is different from the
procmail example forward file:

"|IFS=' ' && exec /usr/local/bin/procmail -f- || exit 75 #YOUR_LOGIN_NAME"



C. Add the following file, edited for your system and user name, the file
needs the name ".procmailrc", make sure the paths in the first five lines
match your system.  The first recipe is overkill but saves a copy of all
incoming mail into a folder called backup in the mail directory.  Unless
you are running BSDI your sendmail will most likely be in a different
directory.  The file that is sent for the response is info.txt in the
home directory.


For whatever reason, in my case, all incoming mail is stored in
"DEFAULT=$MAILDIR/inbox" and not in backup.

if the .forward does not invoke procmail the procmailrc file does not 
come into play


The second recipe is the one that does the responce.
It will respond even if the subject and body are blank.  You could
customize it by adding an additional condition line
"* Subject: <some.condition>" and then change the cat line so that
different files are returned depending on the subject the sender puts in.
the last recipe saves the address that the request came from in a file
called autobot.log.  I don't know if it was nessary but before I ran my
test I used the command "cp /dev/null autobot.log" to create an empty
file so that there would be something to append to.

MAILDIR=$HOME/mail
DEFAULT=$MAILDIR/inbox
LOGFILE=$MAILDIR/from
LOCKFILE=$HOME/.lockmail
SENDMAIL=/usr/sbin/sendmail

:0 c
backup

:0 h c
*!^FROM_DEAMON

Is this a correct, or a typo? Should it read "FROM_DAEMON"?

it's correct



*!^X-Loop: info(_at_)earth(_dot_)mat(_dot_)net
|(formail -r -A "Precedence: junk"\
-I"From: Auto Reply from Mat.Net <info(_at_)earth(_dot_)mat(_dot_)net>" \
-I"Subject: Information Request" \
-A "X-Loop: info(_at_)earth(_dot_)mat(_dot_)net";\
cat /usr/home/info/info.txt )|$SENDMAIL -t


:0 c:
* ^TOinfo(_at_)earth(_dot_)mat(_dot_)net
| formail -rtzxTo: >> /usr/home/info/autobot.log



2.        Is procmail a preferred way to set up an autoresponder under
UNIX/Silicon Graphics IRIX5.3, or does anybody recommend differently?

I don't know about that system but it works great on BSDI 2.0.1.


Massimo Fuchs
Discovery Telecom

--
mfuchs(_at_)netfone(_dot_)com



******************************************************************************
  /\        Mark Mathis     Micro Access Technologies  "Behind every 
successful
 /\/\       Mark(_at_)Mat(_dot_)Net PO Box 92224               cat is an 
obedient owner"
/\/\/\      202/529-5001    Washington, DC  20090
******************************************************************************
-- End of excerpt from Mark Mathis



-- 
mfuchs(_at_)netfone(_dot_)com



******************************************************************************
  /\    Mark Mathis     Micro Access Technologies  "Behind every successful
 /\/\   Mark(_at_)Mat(_dot_)Net PO Box 92224               cat is an obedient 
owner"
/\/\/\  202/529-5001    Washington, DC  20090
******************************************************************************

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