Operating System - HP-UX
1851095 Members
2100 Online
104056 Solutions
New Discussion

Re: Problem with configuring the sendmail

 
SOLVED
Go to solution
bunty.....
Frequent Advisor

Problem with configuring the sendmail

I need to configure sendmail to send mails
I have done these changes:

1.# swlist -l product | grep -i sendmail
PHNE_31734 1.0 sendmail(1m) 8.11.1 patch
2. edit the /etc/mail.sendmail.cf file
DShostname.domain_name.com
Dj$w.domain_name.com
3. edit the /etc/mail/sendmail.cw file
localhost
unknown
localhost
hostname_server
hostname_server.domain_name
hostname_server.domain_name.com
4. #/sbin/inid.d/sendmail stop
5. #/sbin/init.d/sendmail start
6. #/usr/sbin/sendmail -bd -q30m
7. mailx -s "TEST MAIL" bunty@yahoo.com
hi bunty, this is a test mail
ctrl


I am not getiing mails
please suggest

16 REPLIES 16
Peter Godron
Honored Contributor

Re: Problem with configuring the sendmail

Bunty,
have you added the DS machine to /etc/hosts.
i.e. is the machine recognised ?
Anything in the mail.log ?
Chan 007
Honored Contributor

Re: Problem with configuring the sendmail

Bunty,

1. Yahoo may be out side your firewall. So check that you can send mails via your firewall.

2. Check you /etc/nsswitch.conf where that lookup is DNS or hosts. Correct to what you use.

007
Ivan Ferreira
Honored Contributor

Re: Problem with configuring the sendmail

What is the error that you get in /var/adm/syslog/mail.log. Also, you don't need to run sendmail -bd -q30m after /sbin/init.d/sendmail start.

What is the status of the queue? mailq -v?

Can you connect to your smart host hostname.domain_name.com to the port 25?

telnet hostname.domain_name.com 25

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Steven E. Protter
Exalted Contributor

Re: Problem with configuring the sendmail

Shalom,

Most coroporate networks are configued so that sendmail mustrelay mail throgh another server.

This server may be a fierewall, it may be gateway or firewal itsself or any server It desginates.

In this cae,your hpux server can not send mail directly to the public Internet. You must use the Smart relay option if I am correct.

sendmail.cf DS=hostname-of-relay-server

Same can be done with Macro's if you wish. sendmail.mc

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
bunty.....
Frequent Advisor

Re: Problem with configuring the sendmail

ok, Now i am trying with my corporate email id , same problem with this email id.

i am not able to connect through : telnet hostname.domain_name.com from my work station.

# mailx -s "test mail" bunty@mycompany.com
hi, this is a test mail
EOT
#

Please suggest.
Ivan Ferreira
Honored Contributor

Re: Problem with configuring the sendmail

Ensure that you specified the port in the telnet command:

telnet hostname.domain_name.com 25

If you cannot connect to the port 25 of your mail server, there is a problem with your mail server, routing or firewall configuration.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
bunty.....
Frequent Advisor

Re: Problem with configuring the sendmail

yes , i tried with port 25,
it not connecting,


now what changes should i made ?
Chan 007
Honored Contributor

Re: Problem with configuring the sendmail

Check

1. /etc/mail/service.switch

last 2 lines may have

hosts files -----> need to change it to DNS if you use DNS
aliases files


2. check the /etc/mail/sendmail.cw

has your hosts like below

localhost

---- I mean FQD


3. /etc/nsswitch.conf

hosts: files ---> need to change it to DNS if you use DNS

4. Ensure that you have your /etc/resolv.conf is connect

5. Check that you localhost/relay agent is reachable and entry is on hosts/dns
Ivan Ferreira
Honored Contributor

Re: Problem with configuring the sendmail

I want to know something, the host that you specified in DS is not your local host right?

DShostname.domain_name.com

The DS is to configure a smart host, another host that will process the mail. If your server don't use a smart host, comment out that line and restart sendmail.

If you use smart host, and you cannot connect to port 25 to that host, can you at least ping to that host? what about traceroute?
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
bunty.....
Frequent Advisor

Re: Problem with configuring the sendmail

I am not using the smart host.

DShostname.domain_name.com means DShost_name_of_server.domain_name.com

please suggest

Ivan Ferreira
Honored Contributor
Solution

Re: Problem with configuring the sendmail

If you don't use smart host, you don't need to configure that line:

DShostname.domain_name.com

Just comment out or leave it null.

# "Smart" relay host (may be null)
DS

Then, restart the sendmail service:

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

Ensure that DNS is working, check your /etc/resolv.conf, it should be like this:

cat /etc/resolv.conf
domain domain.com
nameserver 200.4.140.1
nameserver 200.4.140.2

The, verify your /etc/nsswitch.conf file, should be like this:

passwd: compat
group: compat
hosts: dns [NOTFOUND=continue] files
ipnodes: dns [NOTFOUND=continue] files
networks: nis [NOTFOUND=continue] files
protocols: nis [NOTFOUND=continue] files
rpc: nis [NOTFOUND=continue] files
publickey: nis [NOTFOUND=continue] files
netgroup: nis [NOTFOUND=continue] files
automount: files nis
aliases: files nis
services: nis [NOTFOUND=return] files


Ensure that DNS is working with:

nslookup -query=mx hp.com

You will get something like thie:

Name Server: ns1.personal.net.py
Address: 200.3.250.1

Trying DNS
Non-authoritative answer:
hp.com preference = 10, mail exchanger = smtp.hp.com
hp.com preference = 30, mail exchanger = smtpx.hp.com

Authoritative answers can be found from:
hp.com nameserver = am1.hp.com
hp.com nameserver = am3.hp.com
hp.com nameserver = ap1.hp.com
hp.com nameserver = eu1.hp.com
hp.com nameserver = eu2.hp.com
hp.com nameserver = eu3.hp.com
smtpx.hp.com internet address = 15.45.89.154
smtpx.hp.com internet address = 15.45.89.155
smtpx.hp.com internet address = 15.45.89.156
smtpx.hp.com internet address = 15.45.89.157
smtpx.hp.com internet address = 15.81.168.20
smtpx.hp.com internet address = 15.81.168.21
smtpx.hp.com internet address = 15.81.176.20
smtpx.hp.com internet address = 15.81.176.21
am1.hp.com internet address = 15.227.128.50
am3.hp.com internet address = 15.243.160.50
ap1.hp.com internet address = 16.130.64.50
eu1.hp.com internet address = 16.14.64.50
eu2.hp.com internet address = 16.6.64.50
eu3.hp.com internet address = 16.8.64.50

You can use:

dig hp.com MX

Also. If you get all that working, you should be able to send mail.

If you have problems, post the contents of /var/adm/syslog/mail.log
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
bunty.....
Frequent Advisor

Re: Problem with configuring the sendmail

# tail mail.log
Jan 13 13:37:08 dipper sendmail[4292]: k0DJW2V04289: to=vipin.singhal@symphonysv.com, ctladdr=root (0/3), delay=00:05:06, xdelay=00:05:06, mailer=esmtp, pri=120162, relay=blrmail.symphonysv.com. [10.66.2.39], dsn=4.0.0, stat=Deferred: Connection timed out with blrmail.symphonysv.com.
Jan 13 13:38:51 dipper sendmail[4389]: k0DDF8A18803: to=vipin.singhal@symphonysv.com, ctladdr=root (0/3), delay=06:23:43, xdelay=00:05:05, mailer=esmtp, pri=1290170, relay=blrmail.symphonysv.com. [10.66.2.39], dsn=4.0.0, stat=Deferred: Connection timed out with blrmail.symphonysv.com.
Jan 13 13:38:51 dipper sendmail[4389]: k0DAXGM17204: to=vipin.singhal@symphonysv.com, ctladdr=root (0/3), delay=09:05:35, xdelay=00:00:00, mailer=esmtp, pri=1740151, relay=blrmail.symphonysv.com., dsn=4.0.0, stat=Deferred: Connection timed out with blrmail.symphonysv.com.
Jan 13 13:38:51 dipper sendmail[4389]: k0DAVPa17137: to=vipin.singhal@symphonysv.com, ctladdr=root (0/3), delay=09:07:26, xdelay=00:00:00, mailer=esmtp, pri=1740159, relay=blrmail.symphonysv.com., dsn=4.0.0, stat=Deferred: Connection timed out with blrmail.symphonysv.com.
Jan 13 13:38:51 dipper sendmail[4389]: k0DAZQW17251: to=vipin.singhal@symphonysv.com, ctladdr=root (0/3), delay=09:03:25, xdelay=00:00:00, mailer=esmtp, pri=1740170, relay=blrmail.symphonysv.com., dsn=4.0.0, stat=Deferred: Connection timed out with blrmail.symphonysv.com.
Jan 13 13:38:51 dipper sendmail[4389]: k0CKZxT25497: to=vipin.singhal@symphonysv.com, ctladdr=root (0/3), delay=23:02:52, xdelay=00:00:00, mailer=esmtp, pri=4350171, relay=blrmail.symphonysv.com., dsn=4.0.0, stat=Deferred: Connection timed out with blrmail.symphonysv.com.
Jan 13 13:38:51 dipper sendmail[4389]: k0CKZDH25492: to=vipin.singhal@symphonysv.com, ctladdr=root (0/3), delay=23:03:38, xdelay=00:00:00, mailer=esmtp, pri=4350182, relay=blrmail.symphonysv.com., dsn=4.0.0, stat=Deferred: Connection timed out with blrmail.symphonysv.com.
Jan 13 13:38:51 dipper sendmail[4389]: k0CKKSq25280: to=vipin.singhal@symphonysv.com, ctladdr=root (0/3), delay=23:18:23, xdelay=00:00:00, mailer=esmtp, pri=4440189, relay=blrmail.symphonysv.com., dsn=4.0.0, stat=Deferred: Connection timed out with blrmail.symphonysv.com.
Jan 13 13:38:52 dipper sendmail[4389]: k0CKEVo25170: to=vipin.singhal@symphonysv.com, ctladdr=root (0/3), delay=23:24:21, xdelay=00:00:00, mailer=esmtp, pri=4440223, relay=blrmail.symphonysv.com., dsn=4.0.0, stat=Deferred: Connection timed out with blrmail.symphonysv.com.
Jan 13 13:39:19 dipper sendmail[4405]: k0DJYE204403: to=vipin.singhal@symphonysv.com, ctladdr=root (0/3), delay=00:05:05, xdelay=00:05:05, mailer=esmtp, pri=120182, relay=blrmail.symphonysv.com. [10.66.2.39], dsn=4.0.0, stat=Deferred: Connection timed out with blrmail.symphonysv.com.


please suggest
Deoncia Grayson_1
Honored Contributor

Re: Problem with configuring the sendmail

can you even ping blrmail.symphonysv.com from this server?
If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon
Ivan Ferreira
Honored Contributor

Re: Problem with configuring the sendmail

This message:

Connection timed out with blrmail.symphonysv.com.

Means that your server cannot connect directly with that host, that could be because your gateway is incorrect or your corporate firewall is preventing access.

Check your gateway configuration:

/etc/rc.config.d/netconf

ROUTE_DESTINATION[0]=default
ROUTE_GATEWAY[0]=100.130.40.1

If you run netstat -nr, you should see the default gateway:

default 100.130.4.1 UG 0 lan0 0

The, run:

traceroute blrmail.symphonysv.com

And post the results
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
bunty.....
Frequent Advisor

Re: Problem with configuring the sendmail

# netstat -nr
Routing tables
Destination Gateway Flags Refs Interface Pmtu
default 170.118.8.6 UG 0 lan0 0

# traceroute blrmail.symphonysv.com
traceroute to blrmail.symphonysv.com (10.66.2.39), 30 hops max, 40 byte packets
1 170.118.8.4 (170.118.8.4) 0.412 ms 0.509 ms 0.382 ms
2 170.118.17.83 (170.118.17.83) 0.552 ms 0.515 ms 1.051 ms
3 170.118.8.4 (170.118.8.4) 0.855 ms 0.586 ms 0.868 ms
4 170.118.17.83 (170.118.17.83) 1.021 ms 1.031 ms 1.029 ms
5 * 170.118.8.4 (170.118.8.4) 0.856 ms 0.729 ms
6 170.118.17.83 (170.118.17.83) 0.923 ms 0.855 ms 0.785 ms
7 170.118.8.4 (170.118.8.4) 1.245 ms 0.805 ms 0.996 ms
8 170.118.17.83 (170.118.17.83) 0.950 ms 1.276 ms 1.224 ms
9 * 170.118.8.4 (170.118.8.4) 1.290 ms 1.228 ms
10 170.118.17.83 (170.118.17.83) 1.473 ms 1.480 ms 1.494 ms
11 170.118.8.4 (170.118.8.4) 1.472 ms 1.505 ms 1.482 ms
12 170.118.17.83 (170.118.17.83) 1.730 ms 1.749 ms 1.742 ms
13 * 170.118.8.4 (170.118.8.4) 1.550 ms 1.500 ms
14 170.118.17.83 (170.118.17.83) 1.823 ms 1.720 ms 1.626 ms
15 170.118.8.4 (170.118.8.4) 1.615 ms 1.831 ms 1.790 ms
16 170.118.17.83 (170.118.17.83) 1.797 ms 1.990 ms 1.830 ms
17 * 170.118.8.4 (170.118.8.4) 1.974 ms 1.825 ms
18 170.118.17.83 (170.118.17.83) 2.139 ms 2.037 ms 2.135 ms
19 170.118.8.4 (170.118.8.4) 2.136 ms 2.315 ms 2.135 ms
20 170.118.17.83 (170.118.17.83) 2.543 ms 2.567 ms 2.508 ms
21 * 170.118.8.4 (170.118.8.4) 2.548 ms 2.507 ms
22 170.118.17.83 (170.118.17.83) 2.732 ms 2.733 ms 2.610 ms
23 170.118.8.4 (170.118.8.4) 2.732 ms 3.422 ms 2.646 ms
24 170.118.17.83 (170.118.17.83) 2.778 ms 3.171 ms 2.790 ms
25 * 170.118.8.4 (170.118.8.4) 3.124 ms 3.209 ms
26 170.118.17.83 (170.118.17.83) 3.270 ms 3.423 ms 3.476 ms
27 170.118.8.4 (170.118.8.4) 3.521 ms 3.193 ms 3.483 ms
28 170.118.17.83 (170.118.17.83) 3.482 ms 3.464 ms 3.486 ms
29 * 170.118.8.4 (170.118.8.4) 3.362 ms 3.207 ms
30 * * *
**** max ttl expired before reaching blrmail.symphonysv.com (10.66.2.39)

# ping blrmail.symphonysv.com
PING blrmail.symphonysv.com: 64 byte packets

----blrmail.symphonysv.com PING Statistics----
9 packets transmitted, 0 packets received, 100% packet loss

please suggest

Deoncia Grayson_1
Honored Contributor

Re: Problem with configuring the sendmail

Since you are not able to do a ping or a traceroute to that server, that is why you're not able to send an email there. You should get with your networking team to find out the ip address you need to add to your routing tables in order to reach that server.
If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon