email auto-responder

Sheila King usenet at thinkspot.net
Wed Aug 7 05:58:38 CEST 2002


[posted and emailed]

On 5 Aug 2002 01:00:40 -0700, haribeau at gmx.de (Clemens Hermann) wrote in
comp.lang.python in article
<6c492956.0208050000.73df72e8 at posting.google.com>:

> Hi Sheila 
> 
> > > On the ISP machine there is running qmail but I only get the mails
> > > _after_  getmail has fetched them via pop3.
> > 
> > If you have access to your .qmail files on the ISP, and are able to
> > install and run scripts on their machine, it would be very easy to
> > invoke the Python scripts (if they have Python installed). I have done
> > this on my webhost and can give tips on how to do it.
> 
> this would be quite isteresting. My initial intention was to write
> somthing that could be used only with a pop3 accesss because it seemd
> to me as if there is no solution around for this and many many people
> will only have pop3 available.

For those who do not have access to a mail server, and the ability to
install scripts, yes...pop3 is probably more widely available.

> but nevertheless I would be quite isterested in how you are doing the
> autoresponding via .qmail.

Autoresponders (and other mail scripts) that can be invoked by .qmail files
can probably also be invoked by .forward files, or by procmail, and
possibly via other methods. It depends on how the administrator has
configured the mail server. But the three I have mentioned are the most
common (on *nix servers), I believe. The advantage of having the scripts
installed on the server, is that the script is run, essentially, in "real
time". That is, when the incoming email is received, the script is
immediately invoked. As opposed to using pop3, which means the end user
would have to be retrieving his mail in order to do this. I suppose he
could set up a program on his home computer that was automatically
retrieving the email anyhow, even if he were not there. In which case, I
suppose the advantage isn't so much.

To run a script by using .qmail files, essentially...
there is a .qmail-default file for the domain and then for each individual
mailbox there is a .qmail-user file (or can be...that is optional,
actually). It does get more complicated than that. This is a simplified
overview.

The .qmail-default and .qmail-user files are usually stored in the end
users home directory (unless the admin has configured Qmail differently for
some reason).

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

Making sure that the script was executable and permissions were set so that
the mail server would be able to execute it.

For more information on using .qmail files, here are some links:
http://www.qmail.org/man/man5/dot-qmail.html
http://www.qmail.org/man/man8/qmail-command.html
http://www.qmail.org/man/

Hope this helps,

Sheila


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



More information about the Python-list mailing list