Re: [vchkpw] Mails delivered by maildirsmtp bounce with looping error after upgrade from 5.4.9 to 5.4.27

2009-04-24 Thread Manvendra Bhangui
On Fri, Apr 24, 2009 at 11:25 AM, Koustubha Kale kmk...@gmail.com wrote:

 here it is. I have obfuscated user, domain names  IP's.

 - Original Message - From: mailer-dae...@hub.domain1.com
 To: sen...@branch1.domain2.com
 Sent: Wednesday, April 22, 2009 10:42 AM
 Subject: failure notice


  Hi. This is the qmail-send program at hub.domain1.com.
  I'm afraid I wasn't able to deliver your message to the following
 addresses.
  This is a permanent error; I've given up. Sorry it didn't work out.
 
  rc...@branch2.domain1.com:
  mail is looping

You have given a sample of a mail which has bounced. Can you send an headers
from the email from the Maildir on the central server? This is before it is
picked up by maildirsmtp.

Also the error message is from qmail-smtpd. There is a maximum limit of no
of headers
in qmail-smtpd (defined by MAXHOPS). Are you reaching that limit. You can
create a control file /var/qmail/control/maxhops in case you want to
increase that


!DSPAM:49f16d8932688643591450!


Re: [vchkpw] Mails delivered by maildirsmtp bounce with looping error after upgrade from 5.4.9 to 5.4.27

2009-04-24 Thread Koustubha Kale

 You have given a sample of a mail which has bounced. Can you send an headers
 from the email from the Maildir on the central server? This is before it is
 picked up by maildirsmtp.

The maildir is on the BRANCH server. maildirsmtp picks the mail from
there and delivers to central server. The vpopmail is running on
central server. Where if I use 5.4.27 the mail bounces back with
looping error. If I use vpopmail 5.4.9 it does not bounce.
Here is a header from a mail in the maildir before it is picked up by
maildirsmtp..


Delivered-To: alias-ppp-rc...@branch2.domain1.com
Delivered-To: rc...@branch2.domain1.com
From: sender sen...@branch2.domain1.com
To: x...@xyz.com,
rcpt1 rc...@branch2.domain1.com
Cc: a...@xyz.com
Subject: Re: some subject
Date: Fri, 24 Apr 2009 13:23:40 +0530
X-Priority: 1
X-MSMail-Priority: High
X-Mailer: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579

REMINDER.


 Also the error message is from qmail-smtpd. There is a maximum limit of no
 of headers
 in qmail-smtpd (defined by MAXHOPS). Are you reaching that limit. You can
 create a control file /var/qmail/control/maxhops in case you want to
 increase that

How do I know if I am reaching the header limit?
I dont have a  control/MAXHOPS Never had.
If that is the problem how does reverting back to vpopmail 5.4.9
resolves the issue?


-- 
Regards
Koustubha Kale

!DSPAM:49f176c532682142341579!



Re: [vchkpw] Mails delivered by maildirsmtp bounce with looping error after upgrade from 5.4.9 to 5.4.27

2009-04-24 Thread Koustubha Kale


1. On the central server you are using vdelivermail to deliver it to a 
Maildir

 Check your .qmail-default file on the central server.
vdelivermail adds a Delivered-To: header


My .qmail-default on central server is

| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox





2. On the final branch server, you are again using vdelivermail to 
deliver the mail to the
   user's maildir. vdelivermail has a code is_looping() which checks if 
the header Delivered-To is present. The message mail is looping is in 
the vdelivermail code. SMTP has the message
message is looping (#5.4.6) which is totally different from the message 
shown in the bounce.


The message never reaches the final branch server. Its bounced by the central 
server.

As I had mentioned in my first mail, branch server has all users as local system accounts. There is 
no vpopmail installed on branch servers. So delivery is made direct to users $HOME/Maildir.


As the message is bounced by the central server it means the error code mail is looping is coming 
from the central servers vdelivermail.





3. Delivered-To is removed by maildirsmtp. Which again leads to the 
suspicion that
   there are more than one delivered-To header in the mail on the 
central server


I would request you again to go to your central server (not the branch 
server and not the bounce message which you gave earlier). On the 
central server go do the Maildir of the catch-all alias. Just look for 
Delivered-To header in the mail.


There is no catch all alias. There never was. Earlier we used to operate under catch all delete. Now 
it is catch all bounce. Changing it to catch all delete has no effect. Under vpopmail 5.4.9 there 
are no looping error bounces but under 5.4.27 there are, be it delete or bounce in the .qmail-default


I am also replying to your other mail in here..


 There are two Delivered-To headers and that's the problem.
 The first line is
 Delivered-To: alias-ppp-rc...@branch2.domain1.com
 mailto:alias-ppp-rc...@branch2.domain1.com
 The second is
 Delivered-To: rc...@branch2.domain.com mailto:rc...@branch2.domain.com

 Which of these two dissapear when you replace with the older vdelivermail?

When the mail reaches the central server, Delivered-To: alias-ppp-rc...@branch2.domain1.com 
disappears as it is stripped by maildirsmtp. The message is never delivered by the central server to 
anybody but is bounced with the looping error, hence in the bounce message we see only one 
Delivered-To: header which must be the remaining on from here (i.e. the one sent by the branch 
server ) and it must be the one causing the trouble. Its put in by branch server qmail first 
accepting the message as its for a local domain but later putting it in alias/pppdir as per 
.qmail-default when a matching user is not found on local server. Question is why was vpopmail on 
central server accepting this in version 5.4.9 and why is it now bouncing the same kind of messages 
in version 5.4.27?



 What is your .qmail-default file for branch2.domain1.com
 http://branch2.domain1.com?

| forward alias-ppp-$LOCAL@$HOST

Remember all branch users are local system accounts. There is no vpopmail on 
branch server.


Regards
Koustubha Kale




!DSPAM:49f1972032681019979745!



Re: [vchkpw] Mails delivered by maildirsmtp bounce with looping error after upgrade from 5.4.9 to 5.4.27

2009-04-24 Thread Koustubha Kale

I have a horrible feeling that Read Rcpt was on when I sent the last reply!!

If so my please accept my apology. I was playing with getting gmail on my desktop thunderbird 
client. So very sorry about it..


:(

regards
koustubha Kale

!DSPAM:49f193f732684239652057!



Re: [vchkpw] Mails delivered by maildirsmtp bounce with looping error after upgrade from 5.4.9 to 5.4.27

2009-04-24 Thread Manvendra Bhangui
On Fri, Apr 24, 2009 at 3:39 PM, Koustubha Kale kmk...@gmail.com wrote:


  1. On the central server you are using vdelivermail to deliver it to a
 Maildir
 Check your .qmail-default file on the central server.
vdelivermail adds a Delivered-To: header


 My .qmail-default on central server is

 | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox


How does it get delivered to a Maildir. Are you using an alias?



 2. On the final branch server, you are again using vdelivermail to deliver
 the mail to the
   user's maildir. vdelivermail has a code is_looping() which checks if the
 header Delivered-To is present. The message mail is looping is in the
 vdelivermail code. SMTP has the message
 message is looping (#5.4.6) which is totally different from the message
 shown in the bounce.


 The message never reaches the final branch server. Its bounced by the
 central server.

 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?

Just to explain
I also use similar setup for banks who have branches with intermittent
connectivity. Typically, I don't use vdelivermail on the central server.
Just the maildir in the .qmail-default
i.e.
/mail1//autoturn/Maildir/
The delivered-To is inserted by the qmail-local program

On the branch servers I have fetchmail which uses ODMR (atrn) to pull the
mails from the central server and deliver it locally. ODMR causes
maildirsmtp to run on /mail1//autoturn/Maildir/ and strips of the
Delivered-To header when submitting it to the local SMTP on the branch
server. There is no issue with delivering as the Delivered-To is stripped
off.
But in your case you have to figure out the reason for the two Delivered-To:
headers. There should be only one.


!DSPAM:49f19f2a32686867214321!


Re: [vchkpw] Mails delivered by maildirsmtp bounce with looping error after upgrade from 5.4.9 to 5.4.27

2009-04-24 Thread Manvendra Bhangui
On Fri, Apr 24, 2009 at 1:52 PM, Koustubha Kale kmk...@gmail.com wrote:


 Delivered-To: alias-ppp-rc...@branch2.domain1.com
 Delivered-To: rc...@branch2.domain1.com
 From: sender sen...@branch2.domain1.com
 To: x...@xyz.com,
 rcpt1 rc...@branch2.domain1.com
 Cc: a...@xyz.com
 Subject: Re: some subject
 Date: Fri, 24 Apr 2009 13:23:40 +0530
 X-Priority: 1
 X-MSMail-Priority: High
 X-Mailer: Microsoft Outlook Express 6.00.2900.5512
 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579


There are two Delivered-To headers and that's the problem.
The first line is
Delivered-To: alias-ppp-rc...@branch2.domain1.com
The second is
Delivered-To: rc...@branch2.domain.com

Which of these two dissapear when you replace with the older vdelivermail?

What is your .qmail-default file for branch2.domain1.com?

What if you put just the maildir path in .qmail-default file?
/maildirpath/Maildir/


!DSPAM:49f1868932681366116692!


Re: [vchkpw] Mails delivered by maildirsmtp bounce with looping error after upgrade from 5.4.9 to 5.4.27

2009-04-24 Thread Koustubha Kale




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!



Re: [vchkpw] Mails delivered by maildirsmtp bounce with looping error after upgrade from 5.4.9 to 5.4.27

2009-04-24 Thread Matt Brookings
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Koustubha Kale wrote:
 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.

This is what is happening.  Your primary server accepts, adds a Delivered-To
header, and saves.  Your 'branch' server picks it up and qmail-smtpd sees
the Delivered-To header and rejects the message because it thinks the message
is looping.  This is what it's supposed to do.  In a normal delivery situation,
this would protect your system from poorly configured delivery paths that could
cause a loop.

The solution is to make sure there is no Delivered-To header.  Whether or
not your method of getting the message from the primary MX to the 'branch'
servers removes this header is what's in question.

Fix that, and you'll fix the problem.
- --
/*
Matt Brookings m...@inter7.com   GnuPG Key D9414F70
Software developer Systems technician
Inter7 Internet Technologies, Inc. (815)776-9465
*/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknxvbEACgkQ6QgvSNlBT3DmwQCgox04vSWpVgMx1o6OCFCsr+c3
cYYAn0PVzI+Dzz498mYpXyRRWwXfLP1X
=sgSa
-END PGP SIGNATURE-


Re: [vchkpw] Mails delivered by maildirsmtp bounce with looping error after upgrade from 5.4.9 to 5.4.27

2009-04-24 Thread Manvendra Bhangui
On Fri, 2009-04-24 at 18:41 +0530, Koustubha Kale wrote:
 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 )
 
The difference is because of call to is_looping() in main() in vpopmail
5.4.27. The check earlier was only in deliver_mail().

You can use the vdelivermail.c.gz attached in this mail and see if it
solves the problem. The loopcheck behaviour can now be turned on by
setting the env variable LOOPCHECK


!DSPAM:49f1d05732687819611964!


vdelivermail.c.gz
Description: GNU Zip compressed data


Re: [vchkpw] Mails delivered by maildirsmtp bounce with looping error after upgrade from 5.4.9 to 5.4.27

2009-04-23 Thread Matt Brookings
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Koustubha Kale wrote:
 We are running a setup in which a central server receives and sends
 mails for users sitting at multiple branches. Branches each have a
 server which downloads mails by fetchmail and uploads mails for users
 within our domains but sitting at other branches with maildirsmtp. Among
 different business units we have 6 domains configured on the central
 server.

First, I have to say, this is one of the more... creative... ways I've
seen a cluster built.

 Now we can receive all mail from outside world ok, but any mail
 delivered to the central server with maildirsmtp from the branches
 bounces with mail is looping error. This must be because of the
 Delivered-To: header present in the message which was inserted by the
 branch server qmail while delivering the message to alias for onward
 delivery to the central server by means of maildirsmtp.

Well, as I indicated above, your system is in no way a normal cluster.
Because of this, and because of the sparse information provided, it's
very difficult to determine what the problem might be.

 What I would like to know is what changed between 5.4.9 to 5.4.27 to
 cause this. And how can I get this working in 5.4.27?

Well, technically you can look at the ChangeLog, but I'm not sure that
will help your particular situation.

If you put back the vdelivermail binary from 5.4.9, does it seem to
'work' again?  More than likely, there was a bug fixed in the older
version that allowed your odd system of clustering to work, whereas now,
it's doing the correct checks and balances.

Again, this is really only guess.  I'd try putting your old vdelivermail
binary in place and see if that resolves your issue.

- --
/*
Matt Brookings m...@inter7.com   GnuPG Key D9414F70
Software developer Systems technician
Inter7 Internet Technologies, Inc. (815)776-9465
*/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknwdicACgkQ6QgvSNlBT3C3KACgn92Emt0YAKH0cykPxIJchc5s
CAUAn31DJjFbT6vb9zHMJg37EJ3T5yZk
=psqx
-END PGP SIGNATURE-


Re: [vchkpw] Mails delivered by maildirsmtp bounce with looping error after upgrade from 5.4.9 to 5.4.27

2009-04-23 Thread Tren Blackburn
Sorry to top post, but what options did you configure 5.4.9 with and what did 
you configure 5.4.27 with? How do you determine what messages go to which 
branch? Via smtproutes? Forwards? Mx records? IP over Avian Carrier (IPoAC) ;)

Regards,

Tren

- Original Message -
From: Koustubha Kale kmk...@gmail.com
To: vchkpw@inter7.com vchkpw@inter7.com
Sent: Thu Apr 23 22:22:18 2009
Subject: Re: [vchkpw] Mails delivered by maildirsmtp bounce with looping error  
after upgrade  from 5.4.9 to 5.4.27


 Koustubha Kale wrote:
 The setup has been running well with vpopmail 5.4.9 for past few years.
 Due to very heavy load on qmail-scanner we decided to implement John
 Simpson's validrcptto.cdb to filter out invalid recipients before
 messages hit qmail-scanner. As part of this we upgraded vpopmail to
 5.4.27 in order to get the onchange functionality. The validrcptto
 mechanism now works perfectly.
 
 After re-reading this, it may not be vpopmail's vdelivermail process
 rejecting the message.  It may be a qmail process.  Just something
 to think about.


No, because just reverting back to vpopmail 5.4.9 solves the issue without 
touching qmail in any 
way. Its the combination of maildirsmtp and vpopmail 5.4.27 thats causing the 
trouble. Everything 
else is working fine.

regards
Koustubha Kale






!DSPAM:49f14dc732688149620407!


Re: [vchkpw] Mails delivered by maildirsmtp bounce with looping error after upgrade from 5.4.9 to 5.4.27

2009-04-23 Thread Koustubha Kale

Manvendra Bhangui wrote:

On Thu, 2009-04-23 at 17:41 +0530, Koustubha Kale wrote:
Now we can receive all mail from outside world ok, but any mail delivered to the central server with 
maildirsmtp from the branches bounces with mail is looping error. This must be because of the 
Delivered-To: header present in the message which was inserted by the branch server qmail while 
delivering the message to alias for onward delivery to the central server by means of maildirsmtp.


What I would like to know is what changed between 5.4.9 to 5.4.27 to cause this. And how can I get 
this working in 5.4.27?



Can you show the full headers from one mail from the Maildir on the
central server.
maildirsmtp removes the Delivered-To header from the mail before sending
it to the destination host by SMTP.
By any chance are there two Delivered-To: headers in your mail?



here it is. I have obfuscated user, domain names  IP's.



- Original Message - From: mailer-dae...@hub.domain1.com
To: sen...@branch1.domain2.com
Sent: Wednesday, April 22, 2009 10:42 AM
Subject: failure notice


 Hi. This is the qmail-send program at hub.domain1.com.
 I'm afraid I wasn't able to deliver your message to the following addresses.
 This is a permanent error; I've given up. Sorry it didn't work out.

 rc...@branch2.domain1.com:
 mail is looping

 --- Below this line is a copy of the message.

 Return-Path: sen...@branch1.domain2.com
 Received: (qmail 25030 invoked by uid 511); 22 Apr 2009 10:42:33 +0530
 Received: from (branch1 ip) by hub.domain1.com (envelope-from sen...@branch1.domain2.com, uid 
502) with qmail-scanner-1.25-st-qms

 (spamassassin: 3.2.5. perlscan: 1.25-st-qms.
 Clear:RC:0(59.163.33.110):SA:0(3.2/6.2):.
 Processed in 5.374153 secs); 22 Apr 2009 05:12:33 -
 X-Spam-Status: No, hits=3.2 required=6.2
 X-Spam-Level: +++
 X-Spam-Report: SA TESTS
  1.0 EXTRA_MPART_TYPE   Header has extraneous Content-type:...type= entry
  0.0 HTML_MESSAGE   BODY: HTML included in message
  0.0 T_TVD_FW_GRAPHIC_ID1   BODY: T_TVD_FW_GRAPHIC_ID1
  0.8 HTML_TITLE_SUBJ_DIFF   HTML_TITLE_SUBJ_DIFF
  1.3 MISSING_SUBJECTMissing Subject: header
  0.1 RDNS_NONE  Delivered to trusted network by a host with no 
rDNS
 X-Antivirus-MYDOMAIN-Mail-From: sen...@branch1.domain2.com via hub.domain1.com
 X-Antivirus-MYDOMAIN: 1.25-st-qms (Clear:RC:0(59.163.33.110):SA:0(3.2/6.2):. Processed in 
5.374153 secs Process 24978)

 Received: from unknown (HELO branch1.domain2.com) ((branch1 ip))
  by hub.domain1.com with SMTP; 22 Apr 2009 10:42:28 +0530
 Received-SPF: none (hub.domain1.com: domain at branch1.domain2.com does not designate permitted 
sender hosts)

 Received: (qmail 13562 invoked by alias); 22 Apr 2009 10:39:01 +0530
 Delivered-To: rc...@branch2.domain1.com
 Received: (qmail 13558 invoked by uid 507); 22 Apr 2009 10:39:01 +0530
 Received: from unknown (HELO DESKTOP-11) (192.168.4.158)
  by branch1.domain2.com with SMTP; 22 Apr 2009 10:39:01 +0530
 Message-ID: 00df01c9c308$5b102830$9e04a...@skyworldair.com
 From: sender sen...@branch1.domain2.com
 To: rcpt1 rc...@branch2.domain1.com,
 rc...@branch2.domain1.com
 Subject:
 Date: Wed, 22 Apr 2009 10:38:21 +0530
 MIME-Version: 1.0
 Content-Type: multipart/related;
 boundary==_NextPart_000_00DB_01C9C336.74B55160;
 type=multipart/alternative
 X-Priority: 3
 X-MSMail-Priority: Normal
 X-Mailer: Microsoft Outlook Express 6.00.2900.2180
 Disposition-Notification-To: sender sen...@branch1.domain2.com
 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180

 This is a multi-part message in MIME format.

 --=_NextPart_000_00DB_01C9C336.74B55160
 Content-Type: multipart/alternative;
 boundary==_NextPart_001_00DC_01C9C336.74B55160


 --=_NextPart_001_00DC_01C9C336.74B55160
 Content-Type: text/plain;
 charset=Windows-1252
 Content-Transfer-Encoding: quoted-printable

 Nature
snip---

!DSPAM:49f1546132687830311231!