Koozali.org: home of the SME Server

inserting X-Delivered-to

stephen noble

inserting X-Delivered-to
« on: September 10, 2000, 04:57:18 PM »
mail can be sent to my domain as me@noble.twu.net or stephen@.. or anyone@...
but..

when it is forwarded from my subdomain to my isp noble@myisp.com
then downloaded to e-smith all i have left to sort it is noble

how do i get the X-delivered-to inserted into the mail header
ask the sysadmin yeah, but he is using sendmail and doesn't know how either

stephen

Charlie Brady

RE: inserting X-Delivered-to
« Reply #1 on: September 10, 2000, 11:02:47 PM »
stephen noble wrote:

> how do i get the X-delivered-to inserted into the mail header
> ask the sysadmin yeah, but he is using sendmail and doesn't
> know how either

There's nothing you can do at your end to reinsert lost information into email messages. You either need to change your mail delivery method so that the information is not lost (by using direct SMTP delivery), or store the envelope recipient in the messages, using e.g. X-delivered-to headers. Either way you depend on the competence of your ISP.

Your only other option is to find some other competent service provider who can host your virtual domain, insert a suitable header, and then forward the messages to your mailbox at your ISP.

Regards

Charlie

Gordon Rowell

RE: inserting X-Delivered-to
« Reply #2 on: September 11, 2000, 09:01:11 AM »
stephen noble wrote:

> mail can be sent to my domain as me@noble.twu.net or stephen@..
> or anyone@... but..
>
> when it is forwarded from my subdomain to my isp
> noble@myisp.com then downloaded to e-smith all i have left to
> sort it is noble
>
> how do i get the X-delivered-to inserted into the mail header
> ask the sysadmin yeah, but he is using sendmail and doesn't
> know how either

It's worse than that - you _cannot_ do this with sendmail unless
you also change your mailer to do single-threaded delivery.  The magic
incantation is the "for" clause in sendmail.cf which is part of this
bit of sendmail line noise^H^H^H^H^H^H^H configuration:

HReceived: $?sfrom $s $.$?_($?s$|from $.$_)
        $.by $j ($v/$Z)$?r with $r$. id $i$?u
        for $u; $|;
        $.$b

(your line noise may vary).  The "for $u"  is all you need to make
fetchmail work. However, sendmail will not add a "$u" clause if there
are multiple recipients.

So, you also need to change the mailer definition for the Mlocal
mailer to not do multiple deliveries in one mail. The sendmail
"Bat" book will provide details for this (I think it's add/remove the
'm' flag, but I haven't done sendmail for quite a while now).

So, ask your ISP to disable multiple recipient local deliveries and
then you should get a "for" clause which fetchmail can use in the
"standard" configuration.

Gordon

stephen noble

RE: inserting X-Delivered-to
« Reply #3 on: September 11, 2000, 08:14:23 PM »
thanks for the suggestions

my providor is a freebie, and i think i just reached the limit of what he'll do

Gordon Rowell

RE: inserting X-Delivered-to
« Reply #4 on: September 11, 2000, 10:37:55 PM »
stephen noble wrote:

> thanks for the suggestions
>
> my providor is a freebie, and i think i just reached the limit
> of what he'll do

Sure, although changing local delivery to single recipient should have
very little effect on my ISP type sites as the bulk of the traffic will
already be single-recipient (as opposed to corporate sites which may
have a lot of mailing lists). The performance impact is pretty
minimal these days anyway - qmail always does it this way.

Gordon