著者: Mike Cardwell 日付: To: exim-users 題目: 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:
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