EMail Monitoring in Linux

Erno Kuusela erno at iki.fi
Sat Jun 24 14:11:11 EDT 2000


>>>>> "buttnerw" == buttnerw  <buttnerw at my-deja.com> writes:

    buttnerw> I need to know the easiest way to do the
    buttnerw> following.  Whenever the mailing program (sendmail) on a
    buttnerw> mail server (linux) receives a mail for a user, a
    buttnerw> "program" needs to be notified about the incoming mail
    buttnerw> and a UDP message has to be send with the user's
    buttnerw> information and the amount of mails in his inbox.  All I
    buttnerw> need is the "program" which will listen to incoming
    buttnerw> mails, and send the UDP packet.

chances are you already have such a program on your system, namely
comsat(8) (or in.comsat). it writes some information to the users
terminal about incoming mails if the user so wishes (see biff(1)).

you can easily write a replacement for the comsat deamon if you want
something else to happen. briefly, a udp message of the format
username at offset is sent to the biff udp port, and then comsat seeks to
that offset in the users mailbox and writes some information to the
users terminal.

the udp packets are sent by the mail delivery program (procmail is
used for this on many systems), not sendmail.  (this detail is
probably irrelevant to you...)

  -- erno



More information about the Python-list mailing list