After reading this mail, I don't think that I have understood the setup. How are the mails then picked up from the above Maildir?

Firstly thanks for your patience.
Let me try to explain my setup. Sorry if its long winded..

We have six tld domains.
each domain has about 12 sub domains. i.e. branch1.tld1.com, branch1.tld2.com, branch2.tld1.com, branch2.tld2.com and so on till branch12.tld6.com The users belong to branches i.e. us...@branch1.tld1.com. But some users also belong to multiple domains. Like us...@branch1.tld1.com, us...@branch1.tld2.com etc.

There is a central server at Head Office on which all the domains, sub domains and users are configured. All domains and subdomains are virtual. There are no system users for email on the central server.

On the central server all domains, subdomains and users are handled by vpopmail.

Each branch has a mail server. On these branch servers each user is a local system account. So mails for us...@branch1.tld1.com and us...@branch1.tld2.com all end up in the same users $HOME/Maildir. There is no vpopmail on the branch servers.

As all branch servers are configured to handle all tld's it is necessary for interbranch messages to be routed to the central server by means of maildirsmtp. This is done by having
| forward alias-ppp-"$LOCAL"@"$HOST"
in the .qmail-default of all branch servers. We also have
./pppdir/
in the file /var/qmail/alias/.qmail-ppp-default
This causes interbranch messages ( for users not present in /etc/passwd but belonging to tld's configured in qmail) to be dropped in alias/pppdir. From there the messages are picked up by maildirsmtp and delivered to the central server. On the central server the message is put in users /home/vpopmail/domains/branch#.tld#.com/user#/Maildir by vdelivermail by having
| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox
in the .qmail-default for each tld on the central server.

All incoming messages from all world are thus deposited in the central server 
as it holds all MX.
Form the central server all branch servers download the mails for respective local users by fetchmail. Interbranch messages also are thusly transfered to the other branch.

Now suppose a us...@branch1.tld1.com wants to send a message to us...@branch2.tld1.com the message is accepted by qmail and dumped in alias/pppdir. This puts in two Delivered-To: headers
1) Delivered-To: us...@branch2.tld1.com ( when delivering to the catchall ?)
2) Delivered-To: alias-ppp-us...@branch2.tld1.com ( when delivering to 
alias-ppp ?)
The 2nd Delivered-To: alias-ppp-rc...@branch2.domain1.com is properly stripped off by maildirsmtp but the 1st one remains in messages being delivered to the central server by maildirsmtp. This is what must be causing the trouble. As on the central server if we put vpopmail 5.4.27 the message bounces with "mail is looping" but if we use vpopmail 5.4.9 with everything else remaining exactly same the message is delivered to /home/vpopmail/domains/branch#.tld#.com/user#/Maildir perfectly. And as you said in your earlier mail the "mail is looping" bounce message is from vdelivermail not from qmail.

Question is why it causes "mail is looping" bounces with vdelivermail 5.4.27 and why not in 5.4.9 when both are receiving exactly the same headers? And what can I do to get it working in 5.4.27? ( The setup has been running past few years perfectly and still does with everything upgraded except vpopmail )

Also yourself and anybody else with experience in running a similar setup please share how you would set things up to overcome this difficulty I am having.


Regards
Koustubha Kale


!DSPAM:49f1ba9032681500963724!

Reply via email to