procmail
[Top] [All Lists]

Re: Maildir and "Date Received"

2009-03-03 14:26:03
On 2-Mar-2009, at 05:13, Professional Software Engineering wrote:
At 05:43 2009-03-02 +0100, Michelle Konzack wrote:
Am 2009-03-01 20:17:42, schrieb Professional Software Engineering:
> What of the From_ line? or is this not present in the maildir- stored
> messages?

No it is not...  Good morning Sean.  ;-)

I had thought that LuKreme was planning to move mbox-to-maildir, therefore, the original message source _should_ have From_ lines. It seems that I must has misread the intention.

No, that is right. I mean, I already moved the majority of the mail (mostly mine) and I don't care about the "Date Received" being wrong since I use "Date Sent" which is pulled from the Date: header. But I had one user who wanted the "Date Received" preserved.

So I piped all the mail through a slightly modified version of my datefix.prc file and delivered it to his new Maildir. If the process had been easy and straightforward, I would probably have redone my own list mail just because, but it was too lengthy a process for me to bother.

Plus, if he was going from origiunl reception (procmail as LDA, not as separatley invoked post-processor, which he'd not, but if he was), then the From_ line should be present then.

I processed on the Received header for my mailserver:

WEEKDAYS = '(S(un|at)|Mon|T(ue|hu)|Wed|Fri)'
MONTHS = '(J(an|u[ln])|Feb|Ma[ry]|A(pr|ug)|Sep|Oct|Nov|Dec)'
WHICHRECVD = 'by [^     ]*(mail.)?covisp.net'
YEARS = '(199[0-9]|20[0-9][0-9])'
TIMESTAMP = '([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]'
RCVD_STAMP = "$WEEKDAYS, [0-9]+ $MONTHS $YEARS $TIMESTAMP"

:0
* $ ^Received:.*$WHICHRECVD.*\/$RCVD_STAMP
{ xDATE = "$MATCH" }

...etc


--
It's like looking for the farmer's daughter in a haystack, and
        finding the needle.

____________________________________________________________
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

<Prev in Thread] Current Thread [Next in Thread>