cancel
Showing results for 
Search instead for 
Did you mean: 

SMTP mail - relay.plus.net - mail header re-written?

N/A

SMTP mail - relay.plus.net - mail header re-written?

hi

(background)a friend of mine runs his own mail servers, and a mailing list i subscribe to. He recently changed the mail server(and tweaked the mail program at the same time) so that it only acepted email addys in the <name>@lists.beezly.org.uk format; in the past it would also accept <name>@ankrat.beezly.org.uk (ankrat was the hostname of the old mail server)

anyway..my problem is this. when i sent an email to sucsis@lists.beezly.org.uk it was always rejected by the mail server; after a quick look at the headers the 'to' header was being changed to sucsis@ankrat.beezly.org.uk, and therefore the mail was subsequently rejected by the mail server(cos ankrat aint there no more). i thought this was odd..so set out to try sending a mail to sucsis@lists.beezly.org.uk from a diff mail client; same problem. then i tried a different OS, and two other mail clients. again, same problem

somwhere along the line sucsis@lists.beezly.org.uk was being changed to sucsis@ankrat.beezly.org.uk

i can only guess that this was being done at plusnets smtp server?? when i did a dns lookup, lists.beezly.org.uk resolved to ankrat.beezly.org.uk ,so my guess is u have some anti-spam/flood filters on hte smtp server?? or am i completely wrong and the problem really is at my end?

the problem has now been fixed by changing the dns entry so that lists.beezly.org.uk points to tershal.beezly.org.uk (the new mail server, so it shud accept the modded header). but i still dont get why the mail headers were being re-written by plusnets smtp server(if at all)

can someone cofirm that i am right/wrong about this?

the mail clients and OS's used were:

Windows XP SP1a: Mozilla Thunderbird 0.4, MS Outlook (part of office XP)
Debian/Linux: Mozilla Thunderbird 0.4, Ximian Evolution 1.4

thanks

amran
15 REPLIES
N/A

SMTP mail - relay.plus.net - mail header re-written?

After looking, niether tershal.beezly.org.uk or lists.beezly.org.uk have an MX record.

As such, all e-mail should fail point blank.

ankrat.beezly.org.uk doesn't have a MX record either.

lists.beezly.org.uk is a CNAME to tershal.beezly.org.uk, otherwise, lists.beezly.org.uk does not have any other record.

beezly.org.uk has MX records though, are you sure they shouldn't be addressed to @beezly.org.uk?
csogilvie
Grafter
Posts: 5,852
Registered: 04-04-2007

SMTP mail - relay.plus.net - mail header re-written?

Hmm, I just tested that with my email server and PlusNet's server, and my one gets there (going straight from my laptop to the mail server) but the one from PlusNet fails.


Oddly, I can email colin @ home . colinogilvie . co . uk , through the PlusNet server, and it will reach me, but home.colinogilvie.co.uk does not have an MX record.
N/A

SMTP mail - relay.plus.net - mail header re-written?

Quote
After looking, niether tershal.beezly.org.uk or lists.beezly.org.uk have an MX record.

As such, all e-mail should fail point blank.

ankrat.beezly.org.uk doesn't have a MX record either.

lists.beezly.org.uk is a CNAME to tershal.beezly.org.uk, otherwise, lists.beezly.org.uk does not have any other record.

beezly.org.uk has MX records though, are you sure they shouldn't be addressed to @beezly.org.uk?


the changes in the dns are still filtering down i think. sorry, should've mentioned it at the time..he literally changed the DNS records at the time i posted.

as for lists.beezly.org.uk, i think it eventually be pointed to beezly.org.uk, and the mail server there will resolve/process it further. the mail server then checks the mail headers, which is where the prob lies cos something is changing the headers...
N/A

SMTP mail - relay.plus.net - mail header re-written?

just read RFC2821. if the mail server dont find an MX, it will check for a CNAME record and if thats found(in this case it is) it will be processed 'as if it were the initial name'

i guess plusnets smtp server is a bit broken somewhere. ive rasied a ticket. see wat happens
N/A

SMTP mail - relay.plus.net - mail header re-written?

I have just checked up on RFC2821 myself, somthing which I havn't needed to touch in a long long time.

It looks as if everything is working correctly, and it is your friends DNS records that need fixing.

Quote

The lookup first attempts to locate an MX record associated with the name. If a CNAME record is found instead, the resulting name is processed as if it were the initial name.


This sheds a lot of light on the situation if you note the bolded part.

Because there is no MX record, a CNAME is returned instead. As noted above, the initial name should then be used in its place. AKA, lists.beezly.org.uk physicaly cvhanges to tershal.beezly.org.uk

There is no MX or CNAME records associated with tershal.beezly.org.uk, so a A record is used if any is available and treated as priority 0
N/A

SMTP mail - relay.plus.net - mail header re-written?

yes, very true. but my friends dns was working fine,even before we introduced the work around; the mail server was rejecting the mail because the 'to' mail header had been changed to one it didn't like, and one i didnt specify

the mail server can further resolve the domain name, eg CNAME in this example, but that doesnt mean it should change the 'to' mail header? just redirect the mail accordingly..?
N/A

SMTP mail - relay.plus.net - mail header re-written?

HMM - It doesn't say much about re-writing the address, unless it is a designated MX server, though there is nothing about the fact it can't.

Can you post the headers you ahve reaceived back. That way we can understand the situation further.
N/A

as requested

From - Sun Dec 28 17:31:39 2003
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <>
Delivered-To: am_plusn-amran-amran@amran.org.uk
Received: (qmail 96132 invoked from network); 28 Dec 2003 16:36:20 -0000
Received: from unknown (HELO ptb-mxcore02.plus.net) (212.159.14.216)
by ptb-mailstore02.plus.net with SMTP; 28 Dec 2003 16:36:20 -0000
Received: from ptb-relay03.plus.net ([212.159.14.214])
by ptb-mxcore02.plus.net with esmtp (Exim) id 1Aadts-00042o-AO
for amran@amran.org.uk; Sun, 28 Dec 2003 16:36:20 +0000
Received: by ptb-relay03.plus.net with local (Exim) id 1Aadts-000B1N-1g
for amran@amran.org.uk; Sun, 28 Dec 2003 16:36:20 +0000
X-Failed-Recipients: sucsis@ankrat.beezly.org.uk
Auto-Submitted: auto-generated
From: Mail Delivery System <Mailer-Daemon@ptb-relay03.plus.net>
To: amran@amran.org.uk
Subject: Mail delivery failed: returning message to sender
Message-Id: <E1Aadts-000B1N-1g@ptb-relay03.plus.net>
Date: Sun, 28 Dec 2003 16:36:20 +0000

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

sucsis@ankrat.beezly.org.uk
(generated from sucsis@lists.beezly.org.uk)
SMTP error from remote mailer after RCPT TO:<sucsis@ankrat.beezly.org.uk>:
host ankrat.beezly.org.uk [217.79.104.247]: 550 relay not permitted

------ This is a copy of the message, including all the headers. ------

Return-path: <amran@amran.org.uk>
Received: from [195.166.151.170] (helo=6-allhosts)
by ptb-relay03.plus.net with esmtp (Exim) id 1AadtN-000A1W-5k
for sucsis@lists.beezly.org.uk; Sun, 28 Dec 2003 16:35:49 +0000
Subject: Re: [SUCSIS] Barton or Thoroughbred
From: Amran Anjum <amran@amran.org.uk>
To: SUCSIS Mailing List <sucsis@ankrat.beezly.org.uk>
In-Reply-To: <1072606741.2732.0.camel@monkey>
References: <000601c3cca2$465faf30$6502a8c0@codemonkey>
<1072606741.2732.0.camel@monkey>
Content-Type: text/plain
Message-Id: <1072629355.1007.0.camel@amranLinux>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5
Date: Sun, 28 Dec 2003 16:35:55 +0000
Content-Transfer-Encoding: 7bit


notice that in the returned message the fields that should have been sucsis@lists.beezly.org.uk have become sucsis@ankrat.beezly.org.uk, even in the original message
N/A

SMTP mail - relay.plus.net - mail header re-written?

Are you sure you don't have an address book entry lablled sucsis@lists.beezly.org.uk with a to address of sucsis@ankrat.beezly.org.uk ?

Otherwise, I can see no reason at this time why this happens.

Possible wait 24 hours for the chached DNS entries to expire, then attempt again. There is no data statingt hat the address should be rewritten (even by accident) at this time.

That may be due to the DNS changes, but you will ahve to wait for them to fully propergate,
N/A

SMTP mail - relay.plus.net - mail header re-written?

yes im v.sure Wink

thats what i originally thought was happening, and after deleteing the addressbook entries, typing in by hand, and then trying other mail clients+OS's i was sure it wasnt at my end

the changed dns entries should fix the problem yes, but i still stick by the idea that PlusNet's SMTP server, relay.plus.net, is unduely modifying the outgoing RCPT TO header.

btw lists.beezly.org.uk, ankrat.beezly.org.uk, and tershal.beezly.org.uk all point(ed) to the same IP, and therefore the same mailserver.

its the changing of the 'to' header thats causing all the problems.
Dunk
Newbie
Posts: 8
Registered: 13-06-2007

SMTP mail - relay.plus.net - mail header re-written?

acarr wrote:
Quote
The lookup first attempts to locate an MX record associated with the name. If a CNAME record is found instead, the resulting name is processed as if it were the initial name.


This sheds a lot of light on the situation if you note the bolded part.

Because there is no MX record, a CNAME is returned instead. As noted above, the initial name should then be used in its place. AKA, lists.beezly.org.uk physicaly changes to tershal.beezly.org.uk


This is exactly the problem, only because this post was answered a day after the problem occurred then the cached CNAME record had already changed. Originally lists.beezly.org.uk pointed to ankrat.beezly.org.uk as a CNAME, hence the email was physically sent to sucsis@ankrat.beezly.org.uk, which bounced from the destination mail server.

This can be clearly
Quote
sucsis@ankrat.beezly.org.uk
(generated from sucsis@lists.beezly.org.uk)
SMTP error from remote mailer after RCPT TO:<sucsis@ankrat.beezly.org.uk>:
host ankrat.beezly.org.uk [217.79.104.247]: 550 relay not permitted



The problem is that the mail server was set to reject messages to ankrat.beezly.org.uk immediately after the DNS change instead of allowing the 24 hours for cached answers to update. This coupled with the expected behaviour of the mail being sent to the resolved answer from the CNAME record has confused the issue.
N/A

SMTP mail - relay.plus.net - mail header re-written?

plusnet's mail server shouldn't have been changing any of the destination e-mail addresses. It should only use MX and CNAME's to decide what machine it is going to connect to next to pass on the mail for delivery.
N/A

SMTP mail - relay.plus.net - mail header re-written?

i instigated the change of the DNS cname; beezly.org.uk runs its own DNS (ns.beezly.org.uk).. ankrat.beezly.org.uk or lists.beezly.org.uk would still have been correctly routed to the right mailserver. changing it to tershal only benefited me, and plusnet's mail server Wink

i know this, because other people had just posted messages to this list, and i found out i couldnt reply...and all this before the DNS changes. the reason it was rejecting the mails was not the way in which it was routed, but because the RCPT TO header had been changed.

in the RFC, it does not specifically state that the RCPT TO header should be changed...just the way in which the mail should be routed

Quote
Received: from [195.166.151.170] (helo=6-allhosts)
by ptb-relay03.plus.net with esmtp (Exim) id 1AadtN-000A1W-5k
for sucsis@lists.beezly.org.uk; Sun, 28 Dec 2003 16:35:49 +0000
Subject: Re: [SUCSIS] Barton or Thoroughbred
From: Amran Anjum <amran@amran.org.uk>
To: SUCSIS Mailing List <sucsis@ankrat.beezly.org.uk>


this is part of the header i posted, from the original message i sent - notice the Recieved from section; when it gets to your relays/smtp server its still 'for' sucsis@lists.beezly.org.uk, but the 'To' field now says sucsis@ankrat.beezly.org.uk - this is what has been modified

amran
N/A

SMTP mail - relay.plus.net - mail header re-written?

rfc1123:

5.2.2 Canonicalization: RFC-821 Section 3.1

The domain names that a Sender-SMTP sends in MAIL and RCPT
commands MUST have been "canonicalized," i.e., they must be
fully-qualified principal names or domain literals, not
nicknames or domain abbreviations. A canonicalized name either
identifies a host directly or is an MX name; it cannot be a
CNAME.


Your MUA would of issued a RCPT to the CNAME 'lists.beezly.co.uk' this is against the RFC: "it cannot be a CNAME". The MTA is then doing what your MUA should of done and replaced that with the canonical name of 'ankrat.beezly.co.uk' (now a different name). This is expected behavior for Exim. Using CNAMEs to route mail instead of MX's is fraught with dangers when you don't know how it works.