EMail Monitoring in Linux

Jeff jam at quark.emich.edu
Wed Jun 21 01:22:48 EDT 2000


On Wed, Jun 21, 2000 at 04:40:58AM +0000, buttnerw at my-deja.com wrote:
> Good Day
> 
> I need to know the easiest way to do the following.  Whenever the
> mailing program (sendmail) on a mail server (linux) receives a mail for
> a user, a "program" needs to be notified about the incoming mail and a
> UDP message has to be send with the user's information and the amount
> of mails in his inbox.  All I need is the "program" which will listen
> to incoming mails, and send the UDP packet.
> 
> Kind Regards
> 

greetings,

I haven't tried this personally, but couldn't you just hold a path to the
user's mailbox file, and check it's modification time? if it differs from
the last sample, you could then open it up and scan it to get the count of
messages. you have to consider locking issues, so I'd probably still check
out an implementation of 'biff' or something similar first just to be sure,
but without thinking about it further, it *seems* like it would work. once
you have *that* part figured out, you can build the network stuff on top.

you can check 'http://freshmeat.net/' (or, for example,
'http://freshmeat.net/search.php3?query=biff') for existing biff-ish
programs.

hope that helps..

regards,
J
-- 
|| visit gfd <http://quark.emich.edu/>
|| psa member -- <http://www.python.org/psa/> 




More information about the Python-list mailing list