[Dovecot] Log file name too with mail_log
Hi!
Is there a way to log the file that have been copied when a person move it from a folder to another using mail_log?
Actualy this is what I get in logfile: dovecot: 2007-09-27 15:15:33 Info: IMAP(user@mydomain.com): copy -> Spam: uid=101, msgid=46FBC6C9.1060301@somedomain.com, box=Dovecot
What I would like to have is something like: dovecot: 2007-09-27 15:15:33 Info: IMAP(catunda@mydomain.com): copy -> Spam: uid=101, file=/cur/1190916950.P15981Q38M976125.mydomain.com:2,S, box=Dovecot
I believe that its a pretty simple thing to do, but my C skills are null!
Any help would be great.
Thankz!
!DSPAM:46fc21ce213771244520847!
On Thu, 2007-09-27 at 18:35 -0300, "Fábio M. Catunda" wrote:
Hi!
Is there a way to log the file that have been copied when a person move it from a folder to another using mail_log?
Actualy this is what I get in logfile: dovecot: 2007-09-27 15:15:33 Info: IMAP(user@mydomain.com): copy -> Spam: uid=101, msgid=46FBC6C9.1060301@somedomain.com, box=Dovecot
What I would like to have is something like: dovecot: 2007-09-27 15:15:33 Info: IMAP(catunda@mydomain.com): copy -> Spam: uid=101, file=/cur/1190916950.P15981Q38M976125.mydomain.com:2,S, box=Dovecot
Having file=1190916950.P15981Q38M976125.mydomain.com logged would be possible, but I don't really like adding maildir-specific features there..
Why do you even want it? The filename is going to be different in the destination mailbox anyway (unless maildir_copy_preserve_filename=yes) and it's pretty easy to find out in the source mailbox with the UID:
grep '^101\b' dovecot-uidlist
Timo Sirainen escreveu:
Having file=1190916950.P15981Q38M976125.mydomain.com logged would be possible, but I don't really like adding maildir-specific features there..
Why do you even want it? The filename is going to be different in the destination mailbox anyway (unless maildir_copy_preserve_filename=yes) and it's pretty easy to find out in the source mailbox with the UID:
grep '^101\b' dovecot-uidlist
Ok, I give up.
That's right, filenames will change all the time. Johannes warned me about flags in filenames too, so, it looks like a waist of time to log filenames.
I think I'm done with my copy-log job, it already log only when a message is copied with FROM folder, TO folder and UID, thats enough to start writing a external app that read the log and process everything.
Thanks for the help everybody!
[]'s, FMC!
participants (2)
-
"Fábio M. Catunda"
-
Timo Sirainen