Lee Howard <faxguy(_at_)server(_dot_)deanox(_dot_)com> writes:
Hi. I have a number of clients that have dial-up internet connections that
have server-assigned (non-fixed) IP addresses. So, I have a ip-up.local
script that e-mails a special account on my server the ifconfig results.
(So that I always have the current IP address for maintenance purposes.) I
check the mail with pine. However, I have to routinely flush out dozens of
mails, because the only relevant one is the most recent. The mails all
have the same subject line and the same sender. I'm sure that procmail can
help me here...
I'd like a recipe that overwrites the old mail with the new for each mail
that has the same subject line (different clients' subjects differ slightly).
Hmm, I'd suggest you save each client mail in a separate file
differentiating on the Subject:, of course. You can then just overwrite
each file as you go using an action (you need to supply the recipe and
conditions!) that looks something like:
| cat >$filename
You would set the filename variable based on the Subject: header field,
probably by using the procmail's regexp extraction operator, \/ and the
MATCH variable to build the filename. The exact regexp depends on what
Subject: header field of these message exactly look like.
procmail mailing list