Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Name resolution and maybe more

Name resolution and maybe more

Name resolution and maybe more

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 []

   ----- 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:


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 with SMTP id p16mr797337nfg;
       Tue, 11 Apr 2006 20:14:27 -0700 (PDT)
Received: by 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;

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


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

RE: Name resolution and maybe more

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

RE: Name resolution and maybe more

Hi, thanks for your response. Our /etc/resolv.conf reads (made  more anonymously):

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).

RE: Name resolution and maybe more

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.

RE: Name resolution and maybe more

When you specified the IP did you use brackets?

i.e. DS[]

RE: Name resolution and maybe more

Thanks so much, that was it.

Everything is working great now!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close