cancel
Showing results for 
Search instead for 
Did you mean: 

Sendmail

SOLVED
Go to solution
Ron Irving
Trusted Contributor

Sendmail

Hi guys!!

We have a small network here, (kind of a staging area.) We have a couple of servers in the network, (1 X rx7640 & 1 X bladeserver.) Both are running 11.31. We'd like to get sendmail relaying to us, but DNS is not setup on the servers. We have a workstation setup as a mailserver. Is there a way to 'fool' sendmail in this case?

Curiously yours,

Ron
Should have been an astronaut.
17 REPLIES
Patrick Wallek
Honored Contributor

Re: Sendmail

You should be able to set up the smart relay in /etc/mail/sendmail.cf so that mail goes to the workstation that is the mail server.

You don't necessarily need DNS. Set up the hostnames in /etc/hosts so that they can get resolved locally.

Your /etc/nsswitch.conf may need:

hosts: files

Michael Steele_2
Honored Contributor

Re: Sendmail

What is reported from:

grep DS /etc/mail/sendmail.cf?

This is your mail server.
Support Fatherhood - Stop Family Law
Ron Irving
Trusted Contributor

Re: Sendmail

DSmailserver.usfi.com

syntax correct?
Should have been an astronaut.
Patrick Wallek
Honored Contributor

Re: Sendmail

That looks good.

Is mailserver.usfi.com defined in your /etc/hosts file?
Ron Irving
Trusted Contributor

Re: Sendmail

yup!

I just tried, # date | mailx -s "test mail" xxx@yyy.com

nothing yet. ran mailq -v, and it's in the queue. Is there something else I'm (likely) missing?

Regards!
Should have been an astronaut.
Patrick Wallek
Honored Contributor

Re: Sendmail

Anything useful in /var/adm/syslog/mail.log?

What does the mailq output show?

What happens if you do a 'sendmail -q' to try to clear out the queue.
Michael Steele_2
Honored Contributor

Re: Sendmail

Is sendmail running?

ps -ef | grep -i sendmail

If it is then restart it.

If still problems then debug:

sendmail -bv alias@domain.com < /dev/null

Post messages
Support Fatherhood - Stop Family Law
Ron Irving
Trusted Contributor

Re: Sendmail

root@fobdb / =#ps -ef | grep sendmail
root 14873 1257 0 18:47:20 pts/1 0:00 grep sendmail
root@fobdb / =#/sbin/init.d/sendmail start
mailserver.usfi.com
root@fobdb / =#ps -ef | grep sendmail
root 14925 1257 1 18:47:46 pts/1 0:00 grep sendmail
root@fobdb / =#sendmail -bv dmmcnish@yahoo.com < /dev/null
dmmcnish@yahoo.com... deliverable: mailer esmtp, host yahoo.com, user dmmcnish@yahoo.com


It looks like sendmail doesn't even start. Perplexing.
Should have been an astronaut.
Patrick Wallek
Honored Contributor

Re: Sendmail

The sendmail daemon does not have to run in order to send mail. When sending, sendmail is run just long enough to send the message and then it terminates.

Are there any messages in /var/adm/syslog/mail.log indicating any failures?
Ron Irving
Trusted Contributor

Re: Sendmail

Guys, thanks for all of your responses. I have to put this on the shelf for a day or so. As soon as I get in and can move this back to the front of the list, I will continue working on it.

Stay tuned!! (Points are coming...no worries.)
Should have been an astronaut.
Wilfred Chau_1
Respected Contributor

Re: Sendmail

what is the load on the server? Check and see if it is greater than QueueLA. If its greater, it will just queue up the mails.

Second, have you tried telnet to port 25 of the mail server from the client?

telnet mailserver.usfi.com 25
1) at the prompt, type 'helo'
2) type 'mail from: your email'
3) type 'rcpt to: your email'
4) type 'data', then enter something and when you are done, begin a new line and type '.' to end the message
5) type ctrl-] then ctrl-D to exit out of telnet

if the telnet method works, try replace the name with the IP address of the DS record in sendmail.cf. Then try again. This is to eliminate the DNS out of the equation.
Ron Irving
Trusted Contributor

Re: Sendmail

I'm back!!

Ok...the telnet test passed, so I replaced the mailserver name with the ip address in the sendmail.cf file. I ran another test: date | mailx -s "test" rirving@mythics.com. I've pasted the last few lines of the mail.log file. Parse error? Has that been the problem?

May 14 09:58:07 fobdb sendmail[15150]: p4E6tHvV015038: to=dmmcnish@yahoo.com, delay=00:02:50, mailer=relay, pri=120170, relay=10.128.11.63, dsn=4.4.3, stat=Transient pa
rse error -- message queued for future delivery
May 14 09:58:07 fobdb sendmail[15150]: p4CEdcww012786: to=dmmcnish@yahoo.com, delay=1+16:18:29, mailer=relay, pri=300165, relay=10.128.11.63, dsn=4.4.3, stat=Transient
parse error -- message queued for future delivery
May 14 09:58:08 fobdb sendmail[15150]: p4CEdcww012786: p4E6w7E1015150: sender notify: Warning: could not send message for past 4 hours
May 14 09:58:08 fobdb sendmail[15150]: p4E6w7E1015150: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31531, dsn=2.0.0, stat=Sent
May 14 09:58:08 fobdb sendmail[15150]: p4CEduU8012791: to=rirving@mythics.com, delay=1+16:18:12, mailer=relay, pri=300166, relay=10.128.11.63, dsn=4.4.3, stat=Transient
parse error -- message queued for future delivery
May 14 09:58:08 fobdb sendmail[15150]: p4CEduU8012791: p4E6w7E2015150: sender notify: Warning: could not send message for past 4 hours
May 14 09:58:08 fobdb sendmail[15150]: p4E6w7E2015150: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31533, dsn=2.0.0, stat=Sent


Thanks!!
Should have been an astronaut.
Ron Irving
Trusted Contributor

Re: Sendmail

guys,

Is there anything else I can check on this? I've sent a few mails, but no luck.

Ron
Should have been an astronaut.
Ron Irving
Trusted Contributor

Re: Sendmail

I tried again, using mail to root and out using the /etc/aliases. Here's the last few lines of the mail.log

May 14 16:56:26 fobdb sendmail[2075]: p4EDuQsS002075: to=dmmcnish@yahoo.com, delay=00:00:00, mailer=relay, pri=0, relay=10.128.11.63, dsn=4.4.3, stat=Transient parse error -- message queued for future delivery
May 14 16:56:26 fobdb sendmail[2075]: p4EDuQsS002075: from=root, size=161, class=0, nrcpts=1, msgid=<201105141356.p4EDuQsS002075@fobdb.usfi.com>, relay=root@localhost
May 14 16:56:26 fobdb sendmail[2075]: p4EDuQsS002075: to=dmmcnish@yahoo.com, delay=00:00:00, mailer=relay, pri=30161, dsn=4.4.3, stat=queued
Should have been an astronaut.
Bob_Vance
Esteemed Contributor
Solution

Re: Sendmail

Try bracketing the IP

DS[10....]

Also, try putting files before DNS in

## cat /etc/nsswitch.conf
...
hosts: files [NOTFOUND=continue UNAVAIL=continue] dns
ipnodes: files [NOTFOUND=continue UNAVAIL=continue] dns


bv
"The lyf so short, the craft so long to lerne." - Chaucer
Ron Irving
Trusted Contributor

Re: Sendmail

Bracketing the ip address seems to have worked, along with the nsswitch.conf changes.

I'll let you know how I do!!

Thanks alot guys
Should have been an astronaut.
Bob_Vance
Esteemed Contributor

Re: Sendmail

Did you try the name again after fixing nsswitch?


bv
"The lyf so short, the craft so long to lerne." - Chaucer