4 Jan 2006 12:26
Re: adding an Expires: header...
Dallman Ross <dman <at> nomotek.com>
2006-01-04 11:26:56 GMT
2006-01-04 11:26:56 GMT
On Tue, Jan 03, 2006 at 11:11:16PM -0800, Don Russell wrote:
> It works fine, but my question is: is there a better way?
>
> :0
> * ^From:.*notifier <at> fbo\.gov
> {
> EXPIRE = `date --utc -R --date="+7 days"`
> :0 wfc
> | formail -I "Expires: $EXPIRE"
>
> :0 :
> MailingLists/fbo
> }
Except for what seems to me to be an extraneous c-flag on your
nested recipe, it looks okay to me at a quick glance. (You don't
need to copy a message in order to filter it with the f-flag.) You
could add the h-flag to the first nested recipe, since formail is
only writing to the header.
If you define EXPIRE earlier on, you could remove the
nested recipe. The trade-off is, you'd now be using up
env space, and, worse, running date, on every single message.
Hmm. How about:
:0 fw h
* ^From:.*notifier <at> fbo\.gov
| formail -I "Expires: `date --utc -R --date='+7 days'`"
(Continue reading)
But, why would you use X-<user>-Expires: ? I don't see an advantage of
including the user id in the header...
Thanks,
Don
But, I also prefer to adhere to standards wherever possible...
> But, I also prefer to adhere to standards wherever possible...
You should use a REALY unique Expires: header for internal use.
> Don
RSS Feed