procmail
[Top] [All Lists]

Re: Splitting mail on receipt to the right users

2001-11-28 15:33:51
At 20:59 2001-11-28 +0100, Cliff Sarginson did say:

I have several sources from which I receive email and have just
managed to have all these sources redirected by my ISP to a single
queue where I can receive them using SMTP.

Why doesn't the ISP just redirect the messages to your mail host?

I don't know the postfix config, but in sendmail, you'd use the user database (see section 33.5 of the Bat book). One must wonder what sort of rewriting they're doing now.

All of the mail in the queue is now adressed to a user called "mail"
so consquently all mail coming in goes to whoever I alias "mail"

They're delivering it to a user "mail" on THEIR host, or YOURS?

other people (a small number) will be receiving mail through me,
and there will be other special purpose mail accounts.

Better to investigate setting up the mail config properly now before you get locked into a goofy kludge.

It seems to me that I could use procmail to handle all the mail addressed to "mail", examine the real "To:" address line and deliver it to the right mailbox.

Problem: not all messages are being received by the person in the To: line. To wit, this message, where the To: is the procmail list, not you. When you have multiple addressees, you'll be similarly screwed.

What will you do when a friend/associate/client uses their mailbox on your server to subscribe to a mailing list? Excepting for a handful of outbound-only notification type lists (and even many of them still send To: the list address), most lists will retain whatever the original sender addressed the message as - typically the list itself (if the list wasn't BCC'd, or perhaps CC'd on an offlist reply To: some other user) -- your user recipient will not be identified on the cleartext recipients, and if your ISP is rewriting the recipient, they won't show in the envelope headers either.

Then there's the really big can 'o worms when MULTIPLE local recipients receive the same message.

If your ISP inserts an X-Envelope-To: header to reflect the original recipient, you MIGHT be able to circumvent the limitation, but even so, it'd be a kludge (and generally won't work when there are multiple local recipients).

I use Postfix, and it occurs to me if I make Postfix pass all
mail to procmail for processing via a system wide procmailrc
I should be able to do this. Any hints ?

As I've advised others with similar queries, you're much better off looking to set up a mail exchanger wherein your ISP is a backup MX (you don't fetch mail via POP, but rather have it sent to you via SMTP). In such a case, you retain the actual envelope recipient because the message arrives at your server intact, the only difference being an additional received line injected by your ISP when they received the message from the sending server/user.

Your own domain registration and a dedicated IP connection would simplify the process for you, but are not strictly required.

Procmail is good for a lot of things, but acting as an MTA (versus an LDA) isn't one of them -- when intermediate delivery steps strip addressing data from the message you're left playing guessing games to figure out who the real addressee is.

See also: <http://www.professional.org/procmail/smtp.html>

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