Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

BCC Delivery Failure In 2.2 - Courier-MTA

Quote Reply
BCC Delivery Failure In 2.2 - Courier-MTA
Hi,

A BCC mail to GM account in 2.2 fails to get delivered (it is inserted for bouncing back though the user exists). This user exists and the login and sending mail from this account is true. A Non BCC messages is recd fine. THE BCC Message however gives the following:

GMail (4531): Bouncing message, no user found in message. at ./incoming.pl line 646.

.......

GT::Mail::POP3 (4531): --> RETR 1 at .......

GT::Mail::POP3 (4531): <-- +OK 1149 octets follow. at .......

GT::Mail::POP3 (4531): Message 1 retrieved. at ......

GT::Mail::Parse (4531): Type is 'text/plain' ([unnamed]) at ......

GT::Mail::Parse (4531): Decoding part using: 7bit at .......

GT::Mail::POP3 (4531): --> DELE 1 at .......

GMail (4531): sample.com: 1 message(s) were bounced. at ./incoming.pl line 357

Message sent from HM in all cases (To/CC/BCC) in different cobinations.

Could this be resolved as this BCC failure in my case Courier V0.28 had also been there in my original install where it took quite a bit of time to actually get it working

Thnx

Anup
Quote Reply
Re: [anup123] BCC Delivery Failure In 2.2 - Courier-MTA In reply to
http://www.gossamer-threads.com/...orum.cgi?post=248780

If your mail server is not adding the headers aren't adding the header, then there's nothing incoming.pl can do to figure out who it was delivered to. If your mail server IS adding the appropriate header to the email then let me know what header it is using and I'll add it to the list of headers incoming.pl checks.

Adrian
Quote Reply
Re: [brewt] BCC Delivery Failure In 2.2 - Courier-MTA In reply to
Hi Adrian,

Let me begin by saying that the BCC deliver to a GM account works fine in 2.1.0 (which had taken quite a bit of effort from GT) and this primarily was one of the reason why i did not really upgrade to 2.1.1.

On the Header Issue, the header of bcc'd message intercepted at catchall stage is reproduced below (actual email address etc replaced with a sample):

Delivered-To: mail.domain.com-user@server1.fqdn.com <-- BCC
Return-Path: <hm_user@hotmail.com>
Received: from hotmail.com (bay9-f42.bay9.hotmail.com [64.4.47.42]) by server1.sample.com with esmtp; Fri, 24 Oct 2003 08:02:38 +0530
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 23 Oct 2003 19:37:18 -0700
Received: from xxx.xx.xxx.xx by by9fd.bay9.hotmail.msn.com with HTTP; Fri, 24 Oct 2003 02:37:18 GMT
X-Originating-Ip: [xxx.xx.xxx.xx]
X-Originating-Email: [hm_user@hotmail.com]
From: "hm user" <hm_user@hotmail.com>
To: user@sample1.com <-- The GMail To Account

Subject: BCC 2nd test 2.1.0
Date: Fri, 24 Oct 2003 02:37:18 +0000
Mime-Version: 1.0
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <BAY9-F42NcPs6wzO0RR0004d3f0@hotmail.com>
X-Originalarrivaltime: 24 Oct 2003 02:37:18.0820 (UTC) FILETIME=[BE6AE240:01C399D7]

The first line of the header of the mail To: Addressee looks like this:

Delivered-To: mail.sample1.com-user@server1.fqdn.com

To: user@sample1.com in this case.

Delivered-To: mail.domain.com-user@server1.fqdn.com <-- BCC in fact this mail should have been delivered to: user@domain.com

If this could help resolve this in 2.2 as 2.1.0 is working fine wrt bcc'd GM account mail.

Thnx

Anup

Last edited by:

anup123: Oct 23, 2003, 9:10 PM
Quote Reply
Re: [anup123] BCC Delivery Failure In 2.2 - Courier-MTA In reply to
Sorry, but this is an extremely weird case that I can't implement directly into incoming.pl as it may break other people's installations. For future reference, all you need to change in incoming.pl is on line ~625:
Code:
# qmail setup with vpopmail may put domain.com-user@domain.com into the Delivered-To field - strip the domain out.
# Depending on how your mail server is setup, you might want to change this.
$pop_user =~ s/^\Q$domain\E-//i;
You need to change that regular expression to reflect your server's format. If you look at your 2.1.0's incoming.pl, it's probably already done for you. Just copy it. It's not quite as simple as the default regex, since you have to strip off your server's domain name, and replace that with the domain name at the beginning, but without the 'mail.'

Adrian
Quote Reply
Re: [brewt] BCC Delivery Failure In 2.2 - Courier-MTA In reply to
Hi Adrian,

The relevant portion of 2.1.0 and 2.2 incoming.pl are as noted below:

2.1.0:

# qmail setup with vpopmail may put domain.com-user@domain.com into the Delivered-To field; strip it out.
# Depending on how you setup qmail, you might want to change this.
$pop_user =~ s/^\Q$domain\E-//i;
$users{$pop_user} = 1;
}
}



2.2

# qmail setup with vpopmail may put domain.com-user@domain.com into the Delivered-To field - strip the domain out.
# Depending on how your mail server is setup, you might want to change this.
$pop_user =~ s/^\Q$domain\E-//i;
$users{$pop_user} = 1;
}
}

So there is no diff on this section. What else needs tpo be checked?

Thnx

Anup
Quote Reply
Re: [anup123] BCC Delivery Failure In 2.2 - Courier-MTA In reply to
Send me your incoming.pl and I can see what was changed to make it work.

Adrian
Quote Reply
Re: [brewt] BCC Delivery Failure In 2.2 - Courier-MTA In reply to
As dsired I have pm'd the incoming.pl of v2.1.0 where the bcc'd mail to GM account is working fine. I am still on 2.2RC1.

Thnx

Anup
Quote Reply
Re: [brewt] BCC Delivery Failure In 2.2 - Courier-MTA In reply to
The change was made on ~line 532 of your incoming.pl:
Code:
for my $domain (@{$account->{domains}}) {
if (m/$VALID_CHARACTERS\@\Q$domain\E/i) {
push @tos, $_;
}
elsif (m/$domain-($VALID_CHARACTERS)\@/) {
push @tos, "$1\@$domain";
}

}
}
IIRC, that portion of the code hasn't changed. You should be able to do the same thing for 2.2 and future versions of the code (the red parts being what was added).

Adrian
Quote Reply
Re: [brewt] BCC Delivery Failure In 2.2 - Courier-MTA In reply to
Hi Adrian.

Thnx it fixed the problem. Could this be added in the resources section so that the same is available for reference.

Thnx

Anup