procmail
[Top] [All Lists]

Re: my .procmailrc

1999-08-06 11:30:38
On Fri, 6 Aug 1999 18:45:06 +0200, "Ruud H.G. van Tol"
<rvtol(_at_)isolution(_dot_)nl> wrote:
Hey, I just met procmail and sendmail 3 days ago ...

(Pretty impressive :-)

YYYYMMDD=`date +%Y%m%d`
(As noted on this list many a time, you can get a reasonable time
stamp cheaply from the From_ line of the incoming message, although
transforming that into a string of numbers is not entirely trivial.)
Would a cron-job that once-a-day updates a YYYYMMDD-includerc-file
be much cheaper?

Yes, good thinking.

Please come up with a version that includes
the uptime-output in the stored copy of the message.

Uhm, then we're back to filtering.

:0
* (common conditions)
{
    :0fbw
    | cat - ; echo ; echo "$HOST" ; uptime

    :0c     # you did have X-Loop: checking on the common condition above?
    | formail -rtk -A "Precedence: junk" -A "X-Loop: whatever" \
      | $SENDMAIL $SENDMAILFLAGS -t

    :0:
    folder
}

Or do you also want the headers from the response, rather than the
original headers, in the folder? (I would guess not.)

#===========================================
# Add X-Envelope-To: -header
#-------------------------------------------

Your upstream should be doing this, or your sendmail, that's the only
way to do this reliably. (Or does your local Sendmail get the envelope
address? If yes then you can change your Mlocal setting, or whatever
invokes Procmail, to include it as $1.)

Hope this helps,

/* era */

-- 
 Too much to say to fit into this .signature anyway: <http://www.iki.fi/era/>
  Fight spam in Europe: <http://www.euro.cauce.org/> * Sign the EU petition

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