Link to home
Start Free TrialLog in
Avatar of mmilhofer
mmilhofer

asked on

How to use mailx to relay email from a Solaris server via an SMTP server on the same network

Hi

This is a basic question for which I apologise. It is also something I have done before, but on this new server it is not working.

I want a backup (cron) job to email me its logfile. I use a line such as:

 /bin/cat $LOGFILE | /bin/mailx -s "Backup log" m.milhofer@atriumsoft.com.

In the past I have succeeded without running sendmail daemon on the server in question, simply by editing the /etc/hosts file to include a line like:

192.168.10.1   mailhost

But this time I am receiving the following if I run in verbose mode:

$ m.milhofer@atriumsoft.com... Connecting to [127.0.0.1] via relay...
m.milhofer@atriumsoft.com... Deferred: Connection refused by [127.0.0.1]

If I use /usr/bin/sendmail I get the same message. It looks to me as though mailx/sendmail is not finding my reference to the mail server.
Could someone help me find the obvious oversight I am missing?
Many thanks
Manfred

ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mmilhofer
mmilhofer

ASKER

Thank you jlevie, most helpful.