procmail
[Top] [All Lists]

Re: .forward and parameter passing

1997-10-14 13:49:02
W. Welsey Groleau asked,

| In fact, I don't understand why just setting TZ doesn't work.  But I'd set
| it in the .procmailrc rather than the .forward
| 
| I just had to work on a script (not procmail) that had
| 
| export TZ=GMT
| <do something with 'date'>
| export TZ=EST5

The goal is to get the From_ timestamp written according to a user-specified
timezone instead of the ISP's timezone so that procmail recipes can see the
arrival time *without* forking another command to find it out.

If you set TZ in .procmailrc it's too late for that, and you have to get the
current time for the user's timezone (after setting TZ) by running another
process, such as date or formail (and, if you reprocess a message, it will
tell you the current time, not the original arrival time).

BTW, once a variable is exported, you don't have to re-export it when you
change its value (unless your shell is badly broken).

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