Re: [exim] Maildir Naming Format

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Mike Cardwell
Date:  
À: exim-users
Sujet: Re: [exim] Maildir Naming Format
* on the Sun, Apr 01, 2007 at 01:55:15PM -0500, Matt wrote:

> We are using Directadmin which uses Exim and Dovecot with Maildir format.
> When messages are saved to the users Maildir folders some are saved to
> "Maildir/new" while others tagged as spam are saved to
> "Maildir/.INBOX.spam/new". Then whenever email is checked by IMAP or POP3
> via Dovecot the ones viewed in one way or another are moved from "/new/" to
> "/cur?".
>
> I basically have scripts that look at these SPAM messages and send daily
> reports. I also move SPAM messages over 2 weeks old to a quarantine folder.
> Problem is that I must look inside the messages to get an accurate date.
> The date they are saved to disk can also be the date they moved from new to
> cur directories.
>
> Is there anyway to get Exim to save Maildir messages in a format like so:
>
> year_month_day_time_random_string
>
> That way I could get the accurate date and time without looking inside the
> file. Save many CPU cycles.


Exim should be storing the messages with filenames like:

1175366500.H734988P23649.rabies.grepular.com:2,ST
1175431496.H491924P28528.rabies.grepular.com:2,ST
1175440040.H546623P28963.rabies.grepular.com:2,ST

That's from one of my Maildir's that I just checked. The part before the
first fullstop is the unix timestamp. Eg I can get the date/time from
the, the first file in the list above with:

mike@rabies:~$ perl -e 'print localtime(1175366500)."\n";'
Sat Mar 31 19:41:40 2007

Hope that helps.

Mike