cancel
Showing results for 
Search instead for 
Did you mean: 

Sendmail Issue

 
Omprakash_2
Frequent Advisor

Sendmail Issue

Hi,

Can you pls suggest me to resolve the sendmail issue. Service has been started successfully. but mails are not moving. Kindly find the attached doc. for your reference
30 REPLIES
Jeeshan
Honored Contributor

Re: Sendmail Issue

is your sendmail act as relay server or forwarding?

check in /etc/resolv.conf file.
a warrior never quits
Omprakash_2
Frequent Advisor

Re: Sendmail Issue

Hi,

I have checked and compared the same with another working server its fine and also checked file permission.
Dennis Handly
Acclaimed Contributor

Re: Sendmail Issue

Have you looked at those files in mailq?
vi /var/spool/mqueue/?fKAA02045
Omprakash_2
Frequent Advisor

Re: Sendmail Issue

Hi,

The mqueue directory is empty. I have removed all the files before.
Jeeshan
Honored Contributor

Re: Sendmail Issue

also check the mail log (/var/adm/syslog/mail.log)
a warrior never quits
Omprakash_2
Frequent Advisor

Re: Sendmail Issue

Hi,

Having that with lot of errors like:

Oct 22 09:22:31 md2080 sendmail[29147]: NOQUEUE: SYSERR(root): dbm map "Alias0":
unsafe map file /etc/mail/aliases: No such file or directory


Feb 3 10:46:28 md2080 sendmail[2232]: KAA02230: to=root, ctladdr=root (0/3), delay=00:00:01, xdelay=00:00:01, mailer=local, stat=Sent
VK2COT
Honored Contributor

Re: Sendmail Issue

Run:

# newaliases

Cheers,

VK2COT
VK2COT - Dusan Baljevic
Omprakash_2
Frequent Advisor

Re: Sendmail Issue

Dear All,

Its displaying the below mentioned. Then i tried to send mail but no response.

# newaliases
/etc/mail/aliases: 8 aliases, longest 15 bytes, 109 bytes total
VK2COT
Honored Contributor

Re: Sendmail Issue

Hello,

OK, you fixed one problem.

Now the next.

a) Test if local mail deliver works.

# mailx -s test root

If the mail gets delivered to root,
than local delivery is fine.

b) Judging by the document you sent,
remote email delivery doe snot work.

Two options:

1. Your server must be configured to reach
internet freely (that is quite suicidal
and insecure),

or

2. Your sendmail setup must be configured
to use Smart Host (look for DS line
in /etc/mail/sendmail.cf).

Most probably that line currently loosk like:

DS

.. And what is should look like is:

DSsmtprelay

whene smtprelay is a hostname for the
machine that acts as email gateway in
your company.

Cheers,

VK2COT
VK2COT - Dusan Baljevic
Omprakash_2
Frequent Advisor

Re: Sendmail Issue

Hi,

Where i should the local inbox in server???

And i have checked all the points that you have mentioned.
Dennis Handly
Acclaimed Contributor

Re: Sendmail Issue

>Where I should the local inbox in server???

(should what?)

There are no inboxes with sendmail. There is /var/mail/ for each user. There is /var/spool/mqueue/ for outgoing mail.
Omprakash_2
Frequent Advisor

Re: Sendmail Issue

Hi,

I have checked the local inbox, mails is there. But my problem is mail is not going outside in the same domain. Can you pls suggest me for the same
Dennis Handly
Acclaimed Contributor

Re: Sendmail Issue

>But my problem is mail is not going outside in the same domain.

Have you done what VK2COT said?
Have you checked /var/adm/syslog/mail.log?
Omprakash_2
Frequent Advisor

Re: Sendmail Issue

Yes, i have checked
VK2COT
Honored Contributor

Re: Sendmail Issue

Hello Omprakash,

I had to smile at your last response.

Dennis asked you: Have you checked /var/adm/syslog/mail.log?

You responded: Yes, i have checked.

This short answer reminds me of a funny scene
in one of Pink Panther films where
the Inspector Cluso (sp?) asked a Swiss
person if he knew the current time. The guy
responded "Yes" and walked away :)

What Dennis meant by his question was:

What does the log file say?

Most probably, the message is deferred because the server cannot contact remote
mail server or it cannot resolve domain name
for the recipient.

Hence, as we said before, you need to
set up sendmail with Smarthost support.

Cheers,

VK2COT
VK2COT - Dusan Baljevic
Omprakash_2
Frequent Advisor

Re: Sendmail Issue

Smarthost support.

Can you provide me how to make this smarthost support setup. Hey I am new to HP UX servers, so required a huge support to solve a small issue.
VK2COT
Honored Contributor

Re: Sendmail Issue

Hello,

Sendmail setup is not specific to HP-UX.
It is common to many Unices and Linux.

Simplest method. Let's assume your smarthost
is hostname myhost.mydom.dom, or just
myhost, or its IP address is
192.168.5.20.

Edit /etc/mail/sendmail.cf and
look for line "DS" (CAPITALS ARE IMPORTANT!).

Replace:

DS

with

DSmyhost.mydom.dom

or

DSmyhost

or

DS192.168.5.20

Then, restart sendmail:

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

Note that myhost or myhost.mydom.dom MUST
be resolvable on your HP-UX server.
Hint: check /etc/nsswitch.conf
and probably /etc/resolv.conf (unless
you, for some reason use LDAP or NIS/NIS+).

If you have multiple smarthosts in your company, you can even do this:

DShostA:hostB:hostC

Or even

DS[hostA]:[hostB]:[hostC]

The entries with square brackets
mean "do not use DNS to resolve hostnames"...

Cheers,

VK2COT
VK2COT - Dusan Baljevic
Omprakash_2
Frequent Advisor

Re: Sendmail Issue

Hi,

As you said i have added the DS entries in sendmail.cf file, Still my problem is not resoloved.

I have compared the same file in another HP UX server, but i dont find any entery in DS.

One thing i like to share with you is, now i am getting msg like "you have a mail".

Dennis Handly
Acclaimed Contributor

Re: Sendmail Issue

>i am getting msg like "you have a mail".

Have you read this mail? It may be a bounce message?
Avinash20
Honored Contributor

Re: Sendmail Issue

I believe you should post the last 50 lines of mail.log

# tail -n 50 /var/adm/syslog/mail.log > mail_now.log

Attach the mail_now.log
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Omprakash_2
Frequent Advisor

Re: Sendmail Issue

Sorry, by mistake i have removed and created a new mail.log file. Any suggestion pls
Omprakash_2
Frequent Advisor

Re: Sendmail Issue

Hi,

Kindly find the attached doc. for further reference hope it will usefull to check the difference, thanks in advance. Help me plssssssssss
VK2COT
Honored Contributor

Re: Sendmail Issue

Hello,

a) We still do not have any information from
your mail.log.

b) From your attachment, it is obvious
that your Fully-Qualified-Domain Name (FQDN)
is not set properly in your /etc/hosts
and/or /etc/mail/sendmail.cf.

Possibly the simplest way for you to fix it
is to copy /etc/mail/sendmail.cf from
the good host and make smaller changes.
Same applies to /etc/hosts.

c) As well, your version of sendmail 8.9.3
is very old, insecure, and primitive.

Cheers,

VK2COT
VK2COT - Dusan Baljevic
Omprakash_2
Frequent Advisor

Re: Sendmail Issue

Hi,

1. I have checked /etc/hosts & /etc/mail/sendmail.cf , i dont find any difference on these two files. Note: I have copied the sendmail.cf from the good working server.

2. I have already removed mail.log and created new mail.log file by mistake on past 5 days before.

3. checked the file permission for complete /etc/mail directory and mail.log file

4. compared /etc/hosts file from the good server. And found hostname like 111.222.333.44 puneqad

But in faulty server its looks like 111.222.333.55 md2080 mkjkjkj.kijuhy.com

when i edit the faulty server as 111.222.333.55 md2080
i am getting a msg like not "qualified domain name". So again i have modified it as 111.222.333.55 md2080 kjsdhks.kagkakk.com.

Now service has been started successfully, but cant able to receive mail.

If i run #mailq its shows like :
# mailq
Mail Queue (2 requests)
--Q-ID-- --Size-- -----Q-Time----- ------------Sender/Recipient------------
MAA27519 18 Wed Feb 4 12:08 qadadmin
(host map: lookup (visteon.com): deferred)
xxxxxxx@xxxxxxx.com
LAA25281 1 Wed Feb 4 11:33 qadadmin
(host map: lookup (visteon.com): deferred)
xxxxxxx@xxxxxxxx.com

And also i have checked sendmail.cw file its normal like good working server.