On Tue, Oct 26, 1999 at 06:14:05PM +0200, Alexander Jernejcic wrote:

> we just started an isp bussines and are running qmail with virtual domains
> and multidrop pop3 (one Maildir for the whole domain). mails are received
> and localy delivered as expected - so far everything is running fine.
> now i am getting into troubles with a customer running two M$'s exchange
> server synchronizing via internet. they send their sync-mails to each other
> and we tried to receive the mails on the exchange boxes via pop3 with
> pullmail and popweasel - with no success. IMHO we lost the original SMTP-To
> information somewhere. we tried "pullmail ... /r:To" and we tried
> popweasel's feature to get the rcpt out from "Delivered-To" and extracting
> the virtual-domain addon. most of the user-mail goes ok but the snyc-msg's
> are bounced with "rcpt unknown".

You are doing the correct thing. qmail stores the envelope recipient in
the Delievered-To: line, along with a prefix showing the controlling
user. Stripping that prefix yields the SMTP envelope. Any errors beyond
that would in all likelihood come from popweasel or Exchange. A lot of
our customers use MDaemon (another windows MTA), and they rely on
extracting info out of Delivered-To, and they have no problems.

> meanwhile i am rather confused. i am not able to figure out, how to get the
> original SMTP-To information out of a virtual-domain mail.
> should i try to insert a "Recieved For:" (read that somewhere) line into the
> envelope or is there anything else i can do?

It might be easier to get qmail to add an X-Envelope-To: header to all
mails for that customer. Then get pullmail to use that header to extract
the address. It's worked very well for us in the past. Something like
the following should do the trick:

If you have in control/virtualdomains:

customer.com:user

Then,

touch ~user/.qmail-finaldelivery

Then put the following in ~user/.qmail-default

|(echo X-Envelope-To: "$DEFAULT@$HOST"; cat) | qmail-inject -f "$SENDER" -- 
|user-finaldelivery

Then ask pullmail/popweasel to use the X-Envelope-To header.

-- 
See complete headers for more info

Reply via email to