[Dovecot] Are Mail files in /Maildir/cur & /Maildir/.Sent read-only ?
Hi ALL...
I want to know if the files in /Maildir/cur & /Maildir/.Sent are modified by dovecot. I have a script which calculates the age of the mail files. I think that if they are continuously modified by dovecot I won't be able to calculate the age of the files.
Can Anyone plz advise on this....
Thanks CoolAtt
Windows Live: Make it easier for your friends to see what you’re up to on Facebook. http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/soc...
Hi, this is a snip from the original http://wiki.dovecot.org/MailboxFormat/Maildir
"....with maildir the filename changes every time the message's flags change...."
Only if you "do" something with a mail (like deleting) the filename and modified date will change. If you want to delete mails of a certain age you can you use either the Dovecot Xxpunge plugin or a cronjob with a command like:
find /home -mtime +30 -name *,ST -exec rm {} \;
Am 26.01.2010 12:58, schrieb CoolAtt NNA:
Hi ALL...
I want to know if the files in /Maildir/cur& /Maildir/.Sent are modified by dovecot. I have a script which calculates the age of the mail files. I think that if they are continuously modified by dovecot I won't be able to calculate the age of the files.
Can Anyone plz advise on this....
Thanks CoolAtt
Windows Live: Make it easier for your friends to see what you’re up to on Facebook. http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/soc...
On Tue, 2010-01-26 at 13:36 +0100, Johannes Grimm wrote:
Hi, this is a snip from the original http://wiki.dovecot.org/MailboxFormat/Maildir
"....with maildir the filename changes every time the message's flags change...."
Only if you "do" something with a mail (like deleting) the filename and modified date will change.
No, file's ctime changes when you change flags. mtime never changes. But mtime can't really be trusted. An IMAP client can save a new messages with INTERNALDATE set to 10 years ago, and the file's mtime will be from 10 years ago. Or just copying a message to another mailbox preserves the mtime.
If you want to delete mails of a certain age you can you use either the Dovecot Xxpunge plugin or a cronjob with a command like:
find /home -mtime +30 -name *,ST -exec rm {} \;
I'd use -ctime.
On Tue, 2010-01-26 at 14:47 +0200, Timo Sirainen wrote:
No, file's ctime changes when you change flags. mtime never changes. But mtime can't really be trusted. An IMAP client can save a new messages with INTERNALDATE set to 10 years ago, and the file's mtime will be from 10 years ago. Or just copying a message to another mailbox preserves the mtime.
If you want to delete mails of a certain age you can you use either the Dovecot Xxpunge plugin or a cronjob with a command like:
find /home -mtime +30 -name *,ST -exec rm {} \;
I'd use -ctime.
and I'd go a little further by replacing -exec rm ... with -print | /usr/bin/perl -nle 'unlink;'
-- Kind Regards, SSA Noel Butler L.C.P No. 251002
This Email, including any attachments, may contain legally privileged information, therefore remains confidential and subject to copyright protected under international law. You may not disseminate or reveal any part to anyone without the authors express written authority to do so. If you are not the intended recipient, please notify the sender and delete all relevance of this message including any attachments, immediately. Confidentiality, copyright, and legal privilege are not waived or lost by reason of the mistaken delivery of this message. Only PDF and ODF documents are accepted, do not send Microsoft proprietary formatted documents.
participants (4)
-
CoolAtt NNA
-
Johannes Grimm
-
Noel Butler
-
Timo Sirainen