[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Fetchmail problem : e-mails sent to Mailing list subscriber are coming to Admin



Asif Shaikh wrote:

>  I'm facing a problem with Fetchmail on my Qube3.

Actually, fetchmail is working properly.

> However, for users
> subscribed to mailing lists do not receive mail sent to them but go to the
> Admin's inbox. In this mail received by admin message source shows the To:
> header contains the mailing list address. wheras the Delivered to : header
> has the address of the intended recipient of the mail.

This is also "proper", or at least as "proper" as you're going to see
from qmail.  Truly "proper" would be to use a header called
"X-Delivered-To:"; according to an RFC somewhere mailserver specific
headers should start with "X-" if I recall correctly.

The problem is the way most mailing lists deliver mail; they do not
rewrite the original "To:" header in the email itself (in fact there's
an RFC somewhere that says they shouldn't, so this is "proper" behavior
as well).  Instead they address the "envelope" with the address of the
recipient.

And it's also "proper" that the envelope address is discarded when the
mail reaches your server; after all the envelope address isn't really a
field, it's part of the SMTP protocol.  Qmail adds (sendmail doesn't, as
I recall, so perhaps it's lucky your ISP is using qmail; at least it
gives you something to filter on) the "Delivered-To:" header, with the
contents of the envelope recipient address.

So how do deliver based on "Delivered-To:"?  You use procmail.

When you're writing your procmail filters, please keep this info in mind
(copied out of the book "The qmail handbook", by Dave Sill, published by
Apress:

"A message may be delivered more than once before it reaches its final
destination. Each of these intermediate deliveries _may_ result in a
separate Delivered-To field. If multiple Delivered-To fields appear in a
header, they're listed in chronological order with the most recent
delivery being recorded in the last Delivered-To field."

Good luck <smile>.

Jeff
-- 
Jeff Lasman, nobaloney.net, P. O. Box 52672, Riverside, CA  92517 US
Internet & Unix/Linux/Sun/Cobalt Consulting +1 909 778-9980
Our jblists address used on lists is for list email only
To contact us offlist: "http://www.nobaloney.net/contactus.html";