procmail
[Top] [All Lists]

Re: Regenerate From_ with Date in formail

2003-02-27 17:31:35
BTW, if you wanted a reference copy of your message as sent, you didn't need to resent it to the list too...

At 15:46 2003-02-27 -0800, Steve Huntsberry did say:
I would like to ask formail to delete the current From_ field
and regenerate it using the date in the Date: field, but using
the format of the From_ field, which differs from Date: field.

There were some aging scripts posted within the past five months or so which used 'date' to normalize a Date: field. You _could_ extract Date: to a variable, normalize it (and retain the original in its own variable too) to the same format as From_ uses, use Formail to set the Date: to the normalized date, purge the From_, regenerate From_ from that normalized date, then replace Date: with the original date.

Might require a couple of passes through formail with a 'f' flag, though depending on the order of commandline operation processing, it just might be doable with a single run.

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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