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.,,, and so on till The users belong to branches i.e. But some users also belong to multiple domains. Like, 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 and 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
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/ 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 wants to send a message to the message is accepted by qmail and dumped in alias/pppdir. This puts in two Delivered-To: headers
1) Delivered-To: ( when delivering to the catchall ?)
2) Delivered-To: ( when delivering to 
alias-ppp ?)
The 2nd Delivered-To: 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/ 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.

Koustubha Kale


Reply via email to