procmail
[Top] [All Lists]

Re: Help? Forwarding strangeness - sendmail sends too much

2000-09-25 11:53:20
"Jesse Ferrell (CASI)" wrote:
Collin Park wrote:
Jesse Ferrell (CASI) <news(_at_)weatherwatchers(_dot_)org> wrote:
The second adressee (i.e. me) never gets the message.

Any ideas what's going on here, or how I can fix it?

Let me see if I understand this correctly.

    If a mail is addressed to xxxx(_at_)weatherwatchers(_dot_)org you
    want it to go to your wife.  If it's addressed to anything
    other than xxxx, you want it to come to you.  Correct?

Yes, except in my example it is going to both... 

To be clearer, perhaps I should have said

    ... and if it's addressed to both xxxx(_at_)weatherwatchers(_dot_)org
    and SomethingElse(_at_)weatherwatchers(_dot_)org, you want it to go to
    both you and your wife.


                                                 which I assume (perhaps
wrongly) will result in two emails hitting the weatherwatchers.org
server.

I had not thought so, but if it's true it explains why 2 copies of the
test message (the one addressed to both of you) get forwarded to her
(according to the procmail log anyway).  So let's suppose that you're
right, that there are 2 emails.  Copy #1 arrives; its headers contain:

     To: xxxx(_at_)weatherwatchers(_dot_)org
     cc: j(_at_)weatherwatchers(_dot_)org

The original script (which you posted) looks at the header and says
"It's addressed to wife; ship it to her and stop."

Soon afterwards, copy#2 of the message arrives.  It's an exact copy of
the first one; its header contains the exact same addressees:

     To: xxxx(_at_)weatherwatchers(_dot_)org
     cc: j(_at_)weatherwatchers(_dot_)org

The script, seeing this 2nd copy, will say the exact same thing --
"It's addressed to wife; ship it to her and stop."  So the procmail
script sends 2 copies to her, and you don't get any.  (Perhaps
home.com detects and tosses duplicate messages?)

* * *

I just re-read your original posting, and I see that a message sent
from somebody else results in a single copy regardless of whether it's
addressed to both of you or just one of you.  Sean B Straw explained
why this might be.  

Exactly why there are two messages if you send one with multiple
addresses from your own server I'm not sure (I don't know your server
configuration in enough detail).

...
That's fine, I don't want it to get forwarded to me, I want the second
version that is addressed to me, to come to me, see above.

How would your script know that it was seeing the 2nd copy?

In order to handle the general case, i.e., when somebody outside is
sending a single message with multiple recipients, I think the method
of my previous posting is worth a try.  This would also handle the
case where it's you sending the message from your own server -- you
could eliminate duplicate messages by one of the recipes in the
procmailex(1) manpage.

hth
-- 
Neither I nor my employer will accept any liability for any problems
or consequential loss caused by relying on this information.  Sorry.
Collin Park                         Not a statement of my employer.

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Help? Forwarding strangeness - sendmail sends too much, Collin Park <=