1833294 Members
3010 Online
110051 Solutions
New Discussion

Re: mail requirements

 
SOLVED
Go to solution
Ricky B. Nino
Frequent Advisor

mail requirements

Hi,

I have a SHELL script that automatically sends (mailx) email messages to centain email addresses.

These messages were not delivered succesfully. What are the things I need to consider?

Thanks...
Opportunities expand for people willing to put time and effort into learning new skills.
7 REPLIES 7
Sridhar Bhaskarla
Honored Contributor

Re: mail requirements

Hi,

First look at /var/adm/syslog/mail.log file. It contains the errors.

Also look at your the mailbox of the account that is used to send mails. It may have returned mails that can give you some clues. To view the local mailbox use "elm".

$elm

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Steven E. Protter
Exalted Contributor

Re: mail requirements

Attached is a tested, production script.

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
Ricky B. Nino
Frequent Advisor

Re: mail requirements

Hi Guys,

To be more specific. My email recepients resides in MS-Exchange Server.

Do I need to make my Unix server recognize this server? how?
Opportunities expand for people willing to put time and effort into learning new skills.
Michael Tully
Honored Contributor
Solution

Re: mail requirements

To route all your out-bound mails through an exchange server, you need to configure it as the "Smart host" in the sendmail.cf file in /etc/mail directory. The relevant part of the sendmail.cf file below.

------------------
# "Smart" relay host (may be null)
DSmydomain.foo.com
-----------------------------

Where, mydomain.foo.com is the name for your Exchange SMTP server.

Anyone for a Mutiny ?
Ricky B. Nino
Frequent Advisor

Re: mail requirements

Hi Michael,

Im trying to debug my system's sendmail.cf file. and it's quite complicated for me.

I encountered a line that says... "check_relay -- check hostname/address on SMTP startup". Any idea where can I locate this startup file?





Opportunities expand for people willing to put time and effort into learning new skills.
Michael Tully
Honored Contributor

Re: mail requirements

Hi Ricky,

There should be no need to do any further changes to your /etc/mail/sendmail.cf file other than the changes I mentioned before.

Make the changes and then restart the sendmail process.

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

HTH
Michael
Anyone for a Mutiny ?
Ricky B. Nino
Frequent Advisor

Re: mail requirements

Hi Michael,

It worked! thanks...

Also, I tried to enter more than 1 "Smart host". First is for Exchange Server and the second is for Unix Server. The second does not work. why?
Opportunities expand for people willing to put time and effort into learning new skills.