[Dovecot] Mail history function?
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@y.z): 2010-11-15 17:34:56 Info: msgid=AANLkTikoRgUiEg2KgUW2gLmULD4TX-bPst4yhUbuHoEH@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@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@y.z): 2010-11-15 17:34:56 Info: msgid=AANLkTikoRgUiEg2KgUW2gLmULD4TX-bPst4yhUbuHoEH@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@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@y.z): 2010-11-15 17:34:56 Info: msgid=AANLkTikoRgUiEg2KgUW2gLmULD4TX-bPst4yhUbuHoEH@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@y.z): 2010-11-15 17:34:56 Info: msgid=AANLkTikoRgUiEg2KgUW2gLmULD4TX-bPst4yhUbuHoEH@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@y.z): 2010-11-15 17:34:56 Info: msgid=AANLkTikoRgUiEg2KgUW2gLmULD4TX-bPst4yhUbuHoEH@a.b". I'm not sure if this is the right approach. Does anyone know a better solution with Configure 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
participants (5)
-
Alex Baule
-
Frank Elsner
-
Jakob Curdes
-
Odhiambo Washington
-
Oliver Berse