procmail
[Top] [All Lists]

Re: Mail Forwarding Snags...

1996-09-28 12:17:27
Sean B. Straw wrote:

At 12:53 AM 9/28/96 -0700, Charley Jones wrote:

[snip]

If I send mail to charley(_at_)ilv(_dot_)com and cc: to 
oldjim(_at_)ilv(_dot_)com, I get two
messages 
at crjones.  I can follow why that happens.  The first recipe gets caught and
nothing else processes.

If I change the first three  rules to :o c
I get two copies of the mail at each mailbox (crjones & oldjim) because the
mailer processes two distinct mail messages (am I correct?)  and since I'm
using the c command, I always get a default copy at crjones.

Yep, you're right about the cause-effect.

Envelope-To: is what you need, and I never did find an answer as to what
needs to change in the sendmail.cf (or whatever) to add this.  Once you have
an envelope field added, you can then nix using the TO:, and instead use the
envelope address, which identifies who the message was ACTUALLY mailed to
(including when something arrives with a TO: address like a listserv
remailed message).

Actually he doesn't need the envelope for this.  Duplicate messages can
be disposed of by inserting:

        :0 Wh: msgid.lock
        | formail -D 8192 msgid.cache

at the top of the .procmailrc (this keeps an 8K cache of Message-ID's).
See the procmailex man pages for this exact example (about page 5).
Then only a single copy will go through the :0 c recipes.  He will
need to do a bit more work for the "anything that slips through the
cracks" recipe at the end, such as set a variable when anyone
gets a copy, and test it at the end.

The envelope *is* needed for mailing lists (as you mentioned) and for
Bcc: mail.  Actually, you don't need the entire envelope (and it would
be impolite of sendmail to give it to you, because then you'd see the
entire Bcc: list); you just need the intended recipient of this one copy.
I've seen this show up as "Apparently-To:" but only, I believe, when
there is no "To:" header at all, and possibly only when there is
one recipient in the envelope.

Cheers,
Stan Ryckman (stanr(_at_)tiac(_dot_)net)

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