procmail
[Top] [All Lists]

Re: {URGENT][Help needed][Mail Spliting Problem]

2003-02-10 11:29:16
At 11:46 2003-02-10 +0530, Ganeshh wrote:

at the time when the mail is pulled, i use PROCMAIL to split the mails of common_pop to individual mailboxes based to To field....

if the To field = regina(_at_)remotehost(_dot_)com
the mail will go to regina mailbox locally (/var/spool/mail/regina)

if the To field = vpai(_at_)remotehost(_dot_)com
the mail will go to vpai mailbox locally (/var/spool/mail/vpai)

The above scenarios work properly...

It won't when people are BCC'd (as on mailing lists) or multiple users are copied on a message. Our mantra: "Procmail is not an MTA." By the time that the message has been delivered in the POP mailbox, the envelope information has been discarded.

but when a mail in the common_pop account has to be To headers , e.g. regina(_at_)remotedomain(_dot_)com,vpai(_at_)remotedomain(_dot_)com,sysadmin(_at_)remotedomain(_dot_)com
the mail goes to the first maibox with 3 copies of the same mail.
in my case....

This is to be expected. Search the list archives for references to "X-Envelope". Your upline ISP (where the mail first gets deposited by a real MTA config into the POP mailbox) needs to implement it.

my .procmailrc file has the following entry

0:
* ^To regina(_at_)remotehost(_dot_)com

! regina(_at_)localserver(_dot_)linuxlocal(_dot_)com

IMO, that's _hosed_.

Colon _before_ zero (and for forwarding, no colon is needed afterwards, which is for locking file writes). Without that LEADING colon, the above won't even be recognized as a recipe.

You really should use '^TO_' instead of '^To' (see manpages). In fact, '^To address' isn't going to match, since the HEADERS of the message don't have spaces within them (and how can you guarantee that the address will immediatley follow the header, without a comment?). Perhaps you meant:

* ^To:[         ]*address

Even that isn't appropriate, but it is more common.  Stick with ^TO_address.

Dots which are intended to be interpreted as literal dots should be escaped:

        user(_at_)host\(_dot_)domain\(_dot_)tld

The blank line is going to eventually lead to woes for you - I don't know anybody here who puts a separator between the conditions and the actions.

when are the to many To header , all mails goes to regina mailbox in localserver.linuxlocal.com.

Here's another one: Regina could be cleartext addressed (in a To:, or even a Cc:), and the other recipient could be BCC'd, or cleartext addressed at another account which _forwards_ to the mailbox at your ISP.

Procmail is not an MTA. You will have no end of grief trying to do what you are doing. There are loads of examples of kludges in the list archives.

You might also want to follow some of threads from recent days here, as they spoke to some of the issues directly.

[big-a** snip - entire previous message]

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.


_______________________________________________
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>