[Mailman-Users] Stupid question:

Jon Carnes jonc at haht.com
Wed Feb 6 23:48:46 CET 2002

First off, this is not a mailman question... but there are a lot of savvy
folks on the list, so you just might find what your looking for.

Second, I do a lot of things via email-triggers.  It is very simple to do,
but then of course I use one of the greatest MTA's ever: Sendmail!  <I know,
but I just had to put that dig in... after all the bad press Sendmail gets>.

Normally I send the email directly to a specific address on the server and
use the aliases file to parse the mail via a script.  Something like this:
  restart_vpn:  |"/usr/local/sbin/mail_restart_vpn"

when mail comes into my server addressed to "restart_vpn" it sends the mail
to the script /usr/local/sbin/mail_restart_vpn.  The script parses the
subject line looking for the proper password (and its just as easy to parse
the body of the email) and then reacts as I've instructed it.

Take a look at "man bash" and spend the night in front of your monitor

If you want to kick off scripts based on email that comes directly to your
account, then you might want to use a preprocessor like Procmail.  Your
system may already use procmail, in which case you can have it redirect mail
based on many different criteria, or even have it kick off scripts for you.

Failing all that, you might want to simply use "grep" and "cut" to isolate
data out of your mailbox and then feed that isolated data into your

Good luck, and have fun learning -

Jon Carnes
----- Original Message -----
From: "SA products" <super.aorta at ntlworld.com>
To: <mailman-users at python.org>
Sent: Wednesday, February 06, 2002 4:03 PM
Subject: [Mailman-Users] Stupid question:

> I would like to write a program to capture mail (on a system using
> IMAP and Exim) and
> parse the email to administer a database- I have so far got my mail
> parsing etc working fine
> and I am reading the email using the c-client  library.  This has not
> proved great as the c-client
> library is throwing "unknown" errors "at random" (ie I can say when or
> why it does this and it
> does not seem to be related to the input).
> So I am looking for another way to read the email from my IMAP inbox so
> I can parse it, act on it,
> save it somewhere and then delete it.
> Any hints?- where would you start looking in mailman to extract these
> features
> Thanks matt
> ------------------------------------------------------
> Mailman-Users maillist  -  Mailman-Users at python.org
> http://mail.python.org/mailman/listinfo/mailman-users

More information about the Mailman-Users mailing list