Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Name resolution and maybe more 1

Status
Not open for further replies.

baldar538

MIS
Apr 12, 2006
8
US
Hi,
We changed our e-mail configuration yesterday, and have been having problems ever since. We are running sendmail as our company e-mail server, and up until yesterday had no 'gateway', the server was on the DMZ and was the outgoing server and where all the mailboxes are stored.

When we put in our mail gateway, we gave it the outside IP address of the mail server, and forward all the e-mail from there over to the e-mail server. This works fine.

However, outgoing mail no longer comes from the old mailserver IP address (lets call it .35), it comes from a new one we assigned (.39).

This causes a problem for some of our customers who do lookups on incoming mail, as we don't have anything setup for .39.

So, our new gateway appliance does have the ability to scan outbound mail, so we decided to use that to solve the outgoing mail problem.

In sendmail, we added DSmailgw to our sendmail.cf file. mailgw is both in DNS and the hosts file, and nslookups work fine in both directions, with and without domain names.

However, with this setup all outgoing mail gets bounced with errors like:

The original message was received at Tue, 11 Apr 2006 21:27:59 -0600 from [10.201.1.11]

----- The following addresses had permanent fatal errors ----- <xxxxx@yyyyyy.com>

----- Transcript of session follows ----- 550 5.1.2 <xxxxxx@yyyyyyy.com>... Host unknown (Name server: mailgw : host not found)
: host not found)


All incoming mail works fine though.

So, as a test, I took dns out of service.switch, so it is only relying on the hosts file. At this point, outgoing mail works great, but incoming messages get bounced with something like:

This is an automatically generated Delivery Status Notification

Delivery to the following recipient failed permanently:

recipient@ourdomain.com

Technical details of permanent failure:
PERM_FAILURE: SMTP Error (state 8): 501 5.1.8 <sender@sendingdomain.com>... Domain of sender address sender@sendingdomain.com does not exist

----- Original message -----

Received: by 10.48.217.16 with SMTP id p16mr797337nfg;
Tue, 11 Apr 2006 20:14:27 -0700 (PDT)
Received: by 10.48.230.14 with HTTP; Tue, 11 Apr 2006 20:14:27 -0700 (PDT)
Message-ID: <30cd8b630604112014h45b6f0c1oded443d3d4bd0c6@mail.gmail.com>
Date: Tue, 11 Apr 2006 22:14:27 -0500
From: "The Sender" <sender@sendingdomain.com>
To: recipient@receivingdomain.com
Subject: Where is it
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_Part_16617_13985589.1144811667027"

------=_Part_16617_13985589.1144811667027
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Here

------=_Part_16617_13985589.1144811667027
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

----- Message truncated -----


Any ideas how we can get sendmail to use our new appliance as a smart host, without breaking incoming e-mail?

Thanks in advance
 
What does /etc/resolv.conf look like on the sendmail machine?

My guess here is that your search path does not default to the local domain, and so you are looking for a qualified hostname of "mailgw." Try changing the DS line to point at a fully qualified domain name, i.e. DSmailgw.example.com
 
Hi, thanks for your response. Our /etc/resolv.conf reads (made more anonymously):

nameserver 1.1.1.1
nameserver 2.2.2.2
domain mydomain.com

Also, the e-mail I grabbed as an example just had mailgw. We have also tried mailgw.mydomain.com, and gotten replies with mailgw.mydomain.com listed. I also have some where we tried to go straight to IP that say x.x.x.x

I thought putting in a mailertable might help, but haven't been able to get that to work either (although I've never setup a mailertable before, just trying my best with it).
 
Ok, something new.

Now, in my /var/log/mail, I get the following:

Apr 12 09:11:34 mail sendmail[7072]: k3CFBYZ07070: to=<recipent@receivingdomain.com>, ctladdr=<sender@sendingdomain.com> (555/100), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=122080, relay=mailgw.sendingdomain.com, dsn=4.0.0, stat=Deferred: Name server: mailgw.sendingdomain.com: host name lookup failure

But, on my sendmail box, if I do an nslookup on mailgw.sendingdomain.com, mailgw, or a reverse on it's IP address it all works.
 
When you specified the IP did you use brackets?

i.e. DS[1.2.3.4]
 
Thanks so much, that was it.

Everything is working great now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top