Operating System - HP-UX
1829749 Members
1881 Online
109992 Solutions
New Discussion

sendmail going to internal but not internet addresses

 
Garrett J. Gross
New Member

sendmail going to internal but not internet addresses

I have sendmail (version 8.9.3)working fine. It has been working great for a long time. We finally decised to start sending mail to outside addresses (internet addresses). What appears to happen is that internet addresses do not get routed to the smtp server. Have tried multiple configurations of the sendmail.cf. The first sample is a success to a local user to the company that routes to the smtp server. Notice it actually says "relay=stmtpserver.myserver.mydomain.com."The second sample is the failure that gets queued. It never mentions the relay server.

Sample 1
Nov 25 17:28:24 myserver sendmail[26265]: RAA26265: from=root, size=194, class=0, pri=30194, nrcpts=1, msgid=<200311260128.RAA26265@myserver.mydomain.com>, rela
y=root@localhost
Nov 25 17:28:24 myserver sendmail[26267]: RAA26265: to=garrett.gross@uboc.com, ctladdr=root (0/3), delay=00:00:00, xdelay=00:00:00, mailer=relay, relay=stmpserver.mydomain.com. [10.150.169.230], stat=Sent (Message accepted for delivery)

Sample 2
ov 25 17:03:03 myserver sendmail[23890]: starting daemon (8.9.3 (PHNE_18546)): SMTP+queueing@00:30:00
Nov 25 17:03:14 myserver sendmail[23933]: RAA23933: from=root, size=197, class=0, pri=30197, nrcpts=1, msgid=<200311260103.RAA23933@myserver.myserver.uboc.CO
M>, relay=root@localhost
Nov 25 17:03:14 myserver sendmail[23933]: RAA23933: to=garrett.gross@netzero.com, delay=00:00:00, mailer=uucp, stat=queued
12 REPLIES 12
James A. Donovan
Honored Contributor

Re: sendmail going to internal but not internet addresses

E-mail set to netzero.com appears to be getting routed through the uucp mailer. Do you have a file called mailertable in your /etc/mail directory? This file can tell sendmail which type of mailer to use for specific domains.

A brief description of the different mailers...
http://www.sendmail.org/m4/mailers.html
Remember, wherever you go, there you are...
Elmar P. Kolkman
Honored Contributor

Re: sendmail going to internal but not internet addresses

What is the result of a nslookup of netzero.com on your machine running sendmail? And of the MX record of netzero.com? (nslookup, set type=MX, netzero.com)
Sendmail needs to get an address even when it won't connect directly to the receiver but use the relay.
Every problem has at least one solution. Only some solutions are harder to find.
sparky_2
Frequent Advisor

Re: sendmail going to internal but not internet addresses

Hi,
Have your checked your sendmail configuration settings (ie. your /etc/mail/sendmail.cf file)?
Keith Bevan_1
Trusted Contributor

Re: sendmail going to internal but not internet addresses

Garret,

An obvious question, but have you checked the log file /var/adm/syslog/mail.log

This is a good place to start given that you may have made cheanges to your mail config files and restarted your sendmail daemon/process.

Keith
You are either part of the solution or part of the problem
Garrett J. Gross
New Member

Re: sendmail going to internal but not internet addresses

Jim, I will looking to setting up the file you mention. That makes some sense and I don't have that file.
I know I can get to netzero.com through the smtp server because the sendmail -bv works. # sendmail -bv garrett.gross@netzero.com
garrett.gross@netzero.com... deliverable: mailer relay, host smtpserver.mydomain.com, user garrett.gross@netzero.com
#

I have modified the /etc/mail/sendmail.cf file a number of different ways and nothing has helped.

The samples I included were from the /var/adm/mail/mail.log. I just changed the server name and domain name for this thread.

I'll let everyone know if Jim's idea works.
Garrett J. Gross
New Member

Re: sendmail going to internal but not internet addresses

Not having luck understatnding the mailtable setup. have never used hash before. Getting the following error.

> hash /etc/mail/mailertable
/sbin/sh: /etc/mail/mailertable: This is not an identifier.

I modified the sendmail.cf to to use the /etc/mail/mailertable:

# Mailer table (overriding domains)
Kmailertable dbm /etc/mail/mailertable


????
James A. Donovan
Honored Contributor

Re: sendmail going to internal but not internet addresses

First, do you really want to be using a UUCP mailer? If not, then you probably don't even need the mailertable, so if you don't have one now, you're fine.

Second, check your sendmail.cf file. Are either the DX or DW variables set? If yes, try unsetting them.
Remember, wherever you go, there you are...
James A. Donovan
Honored Contributor

Re: sendmail going to internal but not internet addresses

...forget one other thing...do you have a /etc/mail/uucp-hosts file? If yes, are the problem e-mail domains listed in there?

The default sendmail.cf file will have the following entry...

# class U: known direct UUCP connections
FU-o /etc/mail/uucp-hosts
Remember, wherever you go, there you are...
Garrett J. Gross
New Member

Re: sendmail going to internal but not internet addresses

Thanks for the tips Jim, but still no solution yet. Since I don't have the mailertable set up, I stopped trying to use it as you suggested.

I did have both the DX and DW uncommented. I unset those (one each and both together) and it didn't make a difference.

I don' have any /etc/mail/uucp-hosts file and do have the DU option set.

I might as well try to open an HP ticket and see if they have any ideas. I'm sure it's just one little thing I don't have right.
Seth Parker
Trusted Contributor

Re: sendmail going to internal but not internet addresses

Have you made many customizations to you sendmail.cf file? If not, why don't you run the gen_cf script to make a new one. It's located in /usr/newconfig/etc/mail/cf/cf and makes an HP approved sendmail.cf file.

I'd make a backup of all the sendmail config files first, but this will get you a clean .cf file to mess with.

Good luck!
Seth
Garrett J. Gross
New Member

Re: sendmail going to internal but not internet addresses

Well, I can now mail out to an internet address. The issue now is I can no longer do nslookup to my DNS. I really never needed the DNS excpet for looking up my smtp/relay server.

I opened a tick with HP and spent an hour going through configurations. It seems like the determining factor was having dns as an option in my nsswitch.conf. If I remove dns (i.e. hosts: files), it works. If I have both dns and files (i.e. hosts: files [NOTFOUND=continue] dns [NOTFOUND=return] files) in any order it doesn't work. The /etc/mail/services.switch is set to not even use dns (i.e. hosts files) which makes it really strange. I may have to call them back. I thought I had DNS lookup working before I got off the phone with them, but now I see it doesn't work. I just proved my theory on another server. It works like that (no dns in nsswitch.conf) as long as I have the relay server in my host file. ???? Whats up with that?
Kasper Haitsma
Trusted Contributor

Re: sendmail going to internal but not internet addresses

Hello Garrett,

It is very well possible, to use both DNS and /etc/hosts together on your hp-ux box(es).
/etc/mail/service.switch was only used with sendmail 8.7.x. Now, it is there just for backward compatibility. The file used for host lookup is, /etc/nsswitch.conf.
Next to that,
A) is this for one single hp-ux box, or for a small 'forrest';
B) what are the mailing needs for the hp-ux hosts:
a) incomming mail;
b) outgoing destinations:
1) local users
2) central mail system accounts
3) internet accounts

some one suggested to start with a clean slate. Very good idea. make a copy of /etc/mail/* (tar gzip whaterver you prefer). The minimum one needs in /etc/mail/ are sendmail.cf, sendmail.cw and aliases[.*]
Default information can be found down the /usr/newconfig/etc/mail tree.

sendmail.cw; should contain hostname, localhost, Full Qualified Domain Name (FQDN)
localhost
myserver
myserver.mydomain.com

sendmail.cf; gen_cf yourself a fresh one.
make a few changes using your favourite editor:

DSsmtpserver.mydomain.com

DS will make sure, that if this host cannot resolve the destination host, it will pass the message on to smtpserver, who will (we trust) be able to deliver the message, or pass it on.

perhaps you want to hide your local host(s). use masquerading for that:

DMmydomain.com

Something else to consider with regards to masquerading, when sending to the internet, a lot of companies have configured their incomming mail gateways, to do a so-called reverse lookup. They want to make sure the sending system can be reached, if the mail turnsout to be undeliverable. So, your return address must be valid, since it will be checked (most of the times). This means myserver.mydomain.com must be resolvable from the internet, if you do not masquerade. If you decide to masquerade, please think ahead, so that mail from me@myserver.mydomain.com will be transformed to me@mydomain.com. If someone replies to that, it would be nice that 'me' would receive this reply. If me@mydomain.com does not exist, but the person does have another account on the main mailserver: my.full.name@mydomain.com, you better translate this when sending a message on the hp-ux box, so the message can be replied to. Since this is a next step, I would like to wait with explaining this until you can send where you want.

the line in /etc/nsswitch.conf should read something like:

hosts: files dns

the place where dns is put, is irrelevant. HP's implementation of sendmail, will attempt to resolve using DNS first, no matter where it is mentioned in the hosts line. There are samples for nsswitch.conf in /etc, /etc/nsswitch.*

With these settings, you should be able to get going. If mail is refused/queued, please share the entries from /var/adm/syslog/mail.log, as well as what mailer you use. (I find it odd, that UUCP was attempted..)

Hope this helps

Kasper
HP sendmail, OpenMail, OVO-u support engineer
It depends