cancel
Showing results for 
Search instead for 
Did you mean: 

Sendmail service problem

SOLVED
Go to solution
ricky2
Frequent Advisor

Sendmail service problem

Hello Friends,

I have a problem in starting the sendmail, with which Iam unable to send the mail

1.when I stopped the sendmail

/sbin/init.d/sendmail stop
Sendmail pid is 13459
Killing sendmail...
Sendmail killed.

2.when I start

/sbin/init.d/sendmail start
WARNING: World writable directory /var/spool/mqueue
/etc/mail/aliases: 7 aliases, longest 9 bytes, 88 bytes total
sendmail

3.ps -ef | grep sendmail

root 13384 1 0 13:40:22 ? 0:00 /usr/sbin/sendmail -q30m
root 13448 1 0 13:41:33 ? 0:00 /usr/sbin/sendmail -q30m
root 12978 1 0 13:25:43 ? 0:00 /usr/sbin/sendmail -q30m
root 15877 1 0 14:22:52 ? 0:00 /usr/sbin/sendmail -q30m
here after starting the sendmail , I cannot see the sendmail process accepting connections

4.Then I use the
sendmail -bd -q30m

and when I the check the sendmail process it shows

root 13384 1 0 13:40:22 ? 0:00 /usr/sbin/sendmail -q30m
root 15893 1 0 14:24:01 ? 0:00 sendmail: accepting connections on port 25
root 13448 1 0 13:41:33 ? 0:00 /usr/sbin/sendmail -q30m
root 12978 1 0 13:25:43 ? 0:00 /usr/sbin/sendmail -q30m
root 15877 1 0 14:22:52 ? 0:00 /usr/sbin/sendmail -q30m

This looks fine as for the sendmail process but Iam still not able to send the mail and the log says

5.the logs shows

Mar 30 13:43:53 unol01 sendmail[13496]: NAA13496: to=dsupp@ttslc.com, ctladdr=root (0/3), delay=00:00:03, xdelay=00:00:00, mailer=relay, relay=x-relay.ttslc.com [60.230.115.70], stat=Service unavailable

I can establish connection by telnet to port 25 of the relay server, I confirm that sendmail.cf,/etc/hosts,nsswitch.conf and remaing settings are perfect and this problem started since few days and was working well before.
Could anyone help me out the reason for failure of sendmail in sending the mail?
is it any problem with the sendmail service in my server??

Rgds,
Ricky
15 REPLIES
Ivan Ferreira
Honored Contributor

Re: Sendmail service problem

Can you post the values of the /etc/rc.config.d/mailservs file? It should look like this:

export SENDMAIL_SERVER=1
export SENDMAIL_RECVONLY=0
export SENDMAIL_SENDONLY=0

Run:

sendmail -v -d8 -d38 dsupp@ttslc.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?
Ivan Ferreira
Honored Contributor

Re: Sendmail service problem

Sorry, wrong sendmail command, just run:

sendmail -v dsupp@ttslc.com

Type the message
.

(Finish with a dot and enter)
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
ricky2
Frequent Advisor

Re: Sendmail service problem

Hi Ivan,

The /etc/rc.config.d/mailservs shows
export SENDMAIL_SERVER=1
export SENDMAIL_SERVER_NAME=

Do I need to change this settings as u described?but this was the same config even earlier when this used to work.

sendmail -v dsupp@ttslc.com

WARNING: World writable directory /var/spool/mqueue
.
dsupp@ttslc.com... Connecting to x-relay.ttslc.com via relay...
220 cpi-cxc-01.ppi.ttslc.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at Thu, 30 Mar 2006 15:05:44 +0100
>>> EHLO ual01.
501 5.5.4 Invalid Address
>>> HELO ual01.
501 5.5.4 Invalid Address
>>> QUIT
221 2.0.0 cpi-cxc-01.ppi.ttslc.com Service closing transmission channel
Service unavailable
/dead.letter... Saved message in /dead.letter
Closing connection to x-relay.ttslc.com

Thanks in advance for ur support,
Ricky
Mark Greene_1
Honored Contributor

Re: Sendmail service problem

Run mailq -v -d as root. This will show you if sendmail knows the correct host and domain names.

mark
the future will be a lot like now, only later
Jeff Schussele
Honored Contributor

Re: Sendmail service problem

Hi Ricky,

You also need to change the perms on the /var/spool/mqueue directory.
Should be no looser than 755 & be owned by bin:bin
Sendmail will refuse to move mail if it perceives security problems.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Ivan Ferreira
Honored Contributor
Solution

Re: Sendmail service problem

It seems that sendmail is unable to find your server fully qualified domain name. Check your /etc/hosts file, you should have like this:

10.10.10.10 hpux.domain.com hpux

Ensure that the hostname+domain is listed first.

What is the output of:

# sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter

> $j
hpux.domain.com

You could try configuring /etc/mail/sendmail.cf:

#Dj$w.Foo.COM
Dj$w.domain.com

Where domain.com is your domain.


Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
ricky2
Frequent Advisor

Re: Sendmail service problem

Hi Ivan,

I have changed the sendmail.cf with Dj entry and restarted the service and looks bit better now.

sendmail -v dsupp@ttslc.com

dsupp@ttslc.com... Connecting to x-relay.ttslc.com via relay...
220 cpi-cxc-01.ppi.ttslc.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at Thu, 30 Mar 2006 15:48:59 +0100
>>> EHLO ual01.ttslc.com
250-cpi-cxc-01.ppi.ttslc.com Hello [xx.xx.xx.xxx]
250-TURN
250-SIZE
250-ETRN
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-8bitmime
250-BINARYMIME
250-CHUNKING
250-VRFY
250-X-EXPS GSSAPI NTLM LOGIN
250-X-EXPS=LOGIN
250-AUTH GSSAPI NTLM LOGIN
250-AUTH=LOGIN
250-X-LINK2STATE
250-XEXCH50
250 OK
>>> MAIL From:
250 2.1.0 root@ual01.ttslc.com....Sender OK
>>> RCPT To:
250 2.1.5 dsupp@ttslc.com
>>> DATA
354 Start mail input; end with .
>>> .
250 2.6.0 <200603301447.PAA19495@ual01.ttslc.com> Queued mail for delivery
dsupp@ttslc.com... Sent (2.6.0 <200603301447.PAA19495@ual01.ttslc.com> Queued ma il for delivery)
Closing connection to x-relay.ttslc.com
>>> QUIT

but still the mail has not yet delievered

Mar 30 15:47:34 ual01 sendmail[19495]: PAA19495: from=root, size=0, class=0, pri=30000, nrcpts=1, msgid=<200603301447.PAA19495@ual01.ttslc.com>, relay=root@localhost
Mar 30 15:47:35 ual01 sendmail[19495]: PAA19495: to=dsupp@ttslc.com, ctladdr=root (0/3), delay=00:00:04, xdelay=00:00:01, mailer=relay, relay=x-relay.ttslc.com [xx.xx.xxx.xx], stat=Sent (2.6.0 <200603301447.PAA19495@ual01.ttslc.com> Queued mail for delivery)

The log says it is ququed but in /var/spool/mqueue there is no mail

Thanks,
Ricky
Peter Nikitka
Honored Contributor

Re: Sendmail service problem

Hi,

that is ok - the mail was sent to the relay => removed from local mail queue.

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
Ivan Ferreira
Honored Contributor

Re: Sendmail service problem

The problem is not in your hands by now, the message was sent and now is on the relay server. The message should be delivered in a while.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Mark Greene_1
Honored Contributor

Re: Sendmail service problem

If you had to change the Dj entry, that points to a host name problem. Either the dns entry for your host is wrong or the entry in your /etc/hosts file is wrong. Again, mailq -v -d will show you that.
the future will be a lot like now, only later
ricky2
Frequent Advisor

Re: Sendmail service problem

hi all,

thanks a lot for all your valuable inputs.I left the office so couldnt check if the mails were delievered.I will check this tomorrow and update in this form.
Iam just wondering that there wasnt any changes on this server in recent days as Iam the only person who support this and the sendmail used to work well with the same settings.

rgds,
ricky
Steven E. Protter
Exalted Contributor

Re: Sendmail service problem

Shalom,

if things were working correctly, the mail would have been delivered nearly instantly.

If possible do a tail -f on the mail.log or maillog file of the server that is supposed to be accepting the mail.

You could use DS relay but the mail as composed would get hung up.

One way to work around this is Dj as noted. Another is to alter the hostname to fully qualified domain name.

host

becomes

host.your.net

in /etc/rc.config.d/netconf

for the hostname.

Another way is through DNS support or /etc/hosts networking. In DNS you can use fqdn for this server so that when another server does a lookup it gets a complete fully qualfied name.

Even easier in /etc/hosts

host.your.net ip_address

example

host.your.net 192.168.0.10

The server will magically start sending mail with a fully qualifed domain name. You probably will need to restart sendmail.

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

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
ricky2
Frequent Advisor

Re: Sendmail service problem

Hi,
The mails are not yet delievered to the mailbox and I want to make sure with you guys is the problem still at my end
or at the relayserver.Please find below the entries
1.My /etc/hosts entries are

more /etc/hosts
127.0.0.1 localhost loopback
xx.xx.xx.xxx ual01 ual01. ual01.ttslc.com

2.mailq -v -d
getauthinfo: root@localhost

============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = ual01
(canonical domain name) $j = $w.ttslc.com
(subdomain name) $m = ttslc.com
(node name) $k = ual01
========================================================
setoption HoldExpensive (c).=F
setoption DeliveryMode (d).=
WARNING: World writable directory /var/spool/mqueue
dropenvelope 40016f30: id=, flags=1
orderq:
Mail queue is empty

3.the entries for the host in the /etc/rc.config.d/netconf

HOSTNAME="ual01"
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1

4.Entries in sendmail.cf

# Dj$w
Dj$w.ttslc.com

# "Smart" relay host (may be null)
DSx-relay.ttslc.com

I dont have the access to the relayserver to the check the logs which is accepting the mails from my server.
could you let me know if my above entries are ok or any thing needs a change.

Thanks,
Ricky
Peter Nikitka
Honored Contributor

Re: Sendmail service problem

Hi Ricky,

I definitly would take this as an error and not a warning:

WARNING: World writable directory /var/spool/mqueue

Change the access rights:

chmod 755 (perhaps better: 750) /var/spool/mqueue

Some sendmail versions refuse work at this point, I think.

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
ricky2
Frequent Advisor

Re: Sendmail service problem

Hello All,

The problem is solved now after changing to another relay server.
Thanks a lot for all you inputs and support.
It was a good understanding to me.

Thanks,
Ricky