email auto-responder

Sheila King usenet at thinkspot.net
Fri Aug 9 04:57:09 EDT 2002


On Wed, 07 Aug 2002 00:59:37 -0400, Peter Hansen <peter at engcorp.com> wrote
in comp.lang.python in article <3D50A939.D1C441CC at engcorp.com>:

> Sheila King wrote:
> > 
> > To invoke a script for a particular mailbox, say, joeuser at example.com, you
> > would edit the file
> > 
> > .qmail-joeuser
> > 
> > and in that file you would put something like this:
> > 
> > /path/to/script/scriptname.py
> 
> Although the docs Sheila pointed to cover the actual details,
> in case anyone tries to do it without RTFM the line usually
> looks something like this example from TMDA:
> 
> |preline /usr/bin/tmda/bin/tmda-filter
> 
> The pipe | character tells Qmail to pass the email to the program,
> and 'preline' is some preprocessing program included with Qmail
> whose purpose I forget (but which takes the name of another program
> to run, like the tmda-filter script above, which is really Python
> code).

Geez, it's been so long since I worked with actual .qmail files, that I had
forgotten some of the details.

The pipe symbol is definitely required.

|/path/to/script/scriptname.py

like the above.

"preline" adds a Unix From line to the message, above the headers. Some
programs require this and some do not. I never used it for any of the
Python mail scripts that I wrote.

--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org/






More information about the Python-list mailing list