Am 2009-03-01 11:46:06, schrieb LuKreme:
1) use fomail to get the Date: (or the most recent Received: header)
2) date --date="${RECV_TIME_RFC}" +%s
This seems trickier than I would have thought. even with a formail -x
Date: the resulting datestamp is not really usable by date as it is. Or
do you have a newer/better date command? Extracting from Received I can
do, I even have a procmail 'fix date' that does just that, but that
option is slow.
There is only one option here, use TRAP and the and do a
TIME=`date +%s.%N`
formail -I "X-Local-Received-Time: ${TIME}"
this mean, the serial UNIX time with Nanoseconds and stick them into the
header of the message. Then you will have forever the right received
time.
1235796458.94846_2.mail.covisp.net\:2\,S seems to be the pattern used,
though I expect that's completely flexible as long as the epoch time is
followed by a period and file names don't collide.
It is up to you. how you build the number...
4) rename the original file in the mailfolder to the new filename
5) touch --date="${RECV_TIME_RFC}" ${NEWFILE}
Ah, so the received time is the actual file name.
;-)
Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
24V Electronic Engineer
Tamay Dogan Network
Debian GNU/Linux Consultant
--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
<http://www.tamay-dogan.net/> <http://www.can4linux.org/>
Michelle Konzack Apt. 917 ICQ #328449886
+49/177/9351947 50, rue de Soultz MSN LinuxMichi
+33/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com)
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail