I'm a newbie at Dovecot. For a company groupware I need a kind of a history function for mails to see which user sent which mail to whom / got which mail from whom. So I have to get the message ID of in- and outgoing mails (and write related data to a mysql database). My first idea was to monitor the log file with a daemon and search for strings like "deliver(x at y.z): 2010-11-15 17:34:56 Info: msgid=<AANLkTikoRgUiEg2KgUW2gLmULD4TX-bPst4yhUbuHoEH at a.b>". I'm not sure if this is the right approach. Does anyone know a better solution with Dovecot? thanks, Oliver
Dovecot have a plugin, called notify You can use as a base and develop your plugin to write the itens that you want in the database. in dovecot source, see in src/plugins/notify 2010/11/17 Oliver Berse <mail at oliver-berse.de>> I'm a newbie at Dovecot. For a company groupware I need a kind of a > history function for mails to see which user sent which mail to whom / got > which mail from whom. So I have to get the message ID of in- and outgoing > mails (and write related data to a mysql database). My first idea was to > monitor the log file with a daemon and search for strings like > "deliver(x at y.z): 2010-11-15 17:34:56 Info: > msgid=<AANLkTikoRgUiEg2KgUW2gLmULD4TX-bPst4yhUbuHoEH at a.b>". I'm not sure > if this is the right approach. Does anyone know a better solution with > Dovecot? > > thanks, > Oliver >
On Wed, Nov 17, 2010 at 2:48 PM, Oliver Berse <mail at oliver-berse.de> wrote:> I'm a newbie at Dovecot. For a company groupware I need a kind of a > history function for mails to see which user sent which mail to whom / got > which mail from whom. So I have to get the message ID of in- and outgoing > mails (and write related data to a mysql database). My first idea was to > monitor the log file with a daemon and search for strings like > "deliver(x at y.z): 2010-11-15 17:34:56 Info: > msgid=<AANLkTikoRgUiEg2KgUW2gLmULD4TX-bPst4yhUbuHoEH at a.b>". I'm not sure > if this is the right approach. Does anyone know a better solution with > Dovecot? > > thanks, > Oliver >It's really nothing to do with Dovecot, but more to do with any available tools used to analyse your SMTP server logs. -- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254733744121/+254722743223 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Damn!!
On Wed, 17 Nov 2010 12:48:16 +0100 Oliver Berse wrote:> I'm a newbie at Dovecot. For a company groupware I need a kind of a > history function for mails to see which user sent which mail to whom / got > which mail from whom. So I have to get the message ID of in- and outgoing > mails (and write related data to a mysql database). My first idea was to > monitor the log file with a daemon and search for strings like > "deliver(x at y.z): 2010-11-15 17:34:56 Info: > msgid=<AANLkTikoRgUiEg2KgUW2gLmULD4TX-bPst4yhUbuHoEH at a.b>". I'm not sure > if this is the right approach. Does anyone know a better solution with > Dovecot?I guess it should be done by the MTA. --Frank Elsner
> My first idea was to > monitor the log file with a daemon and search for strings like > "deliver(x at y.z): 2010-11-15 17:34:56 Info: > msgid=<AANLkTikoRgUiEg2KgUW2gLmULD4TX-bPst4yhUbuHoEH at a.b>". I'm not sure > if this is the right approach. Does anyone know a better solution withConfigure your MTA to log into an SQL database. Then you can pull everything you want from there The IMAP server is the wrong place for that as you would exclude mails that get discarded by the MTA, e.g. due to ingress or spam detection rules or because of a misconfigured alias. HTH, Jakob Curdes
Please keep replies to the list so that others can participate.> I sugest the notify, because the admin can know if a user open a > email, copy to another folder, delete the email....etc. > > but using the MTA it can be a solution too. >At least in Germany, doing this is quite risky as this gives lots of information about the person. German law limits the use of profiles like these quite strictly; in general an employer has no business to log all these actions generally. This does not mean it can be helpful for diagnosing problems, but I would not recommend to do so as a general procedure. On the other hands, it is a de-facto requirement today that you can trace every communiction that has entered the company. The only place where you can do this without potentiall missing some messages is the MTA. This is why all the archival tools want to couple to the MTA... JC
Sorry, i send a "reply" not a "reply to all" 2010/11/17 Jakob Curdes <jc at info-systems.de>> Please keep replies to the list so that others can participate. > > > > I sugest the notify, because the admin can know if a user open a email, >> copy to another folder, delete the email....etc. >> >> but using the MTA it can be a solution too. >> >> At least in Germany, doing this is quite risky as this gives lots of > information about the person. > German law limits the use of profiles like these quite strictly; in general > an employer has no business to log all these actions generally. > This does not mean it can be helpful for diagnosing problems, but I would > not recommend to do so as a general procedure. > On the other hands, it is a de-facto requirement today that you can trace > every communiction that has entered the company. > The only place where you can do this without potentiall missing some > messages is the MTA. This is why all the archival tools want to couple to > the MTA... > > JC >