Mailx smtp connection problem
Hello,
I would like to send an email with mailx from my server, but the emails were not delivered to my email box/address on a Exchange server. It seems that the mail / sendmail / exim / whatever want to use the smtp server added to one domain, but I want to use another smtp server. When I run "mail -v myemailaddres", the end of the verbose informaion looks like this: 050 <myemailaddress>,<myemailaddress2>... Connecting to mail.somedomain.biz. via esmtp... 050 <myemailaddress>,<myemailaddress2>... Deferred: Connection timed out with mail.somedomain.biz. 250 2.0.0 r2DEvgvm029236 Message accepted for delivery myemailaddress,myemailaddress2... Sent (r2DEvgvm029236 Message accepted for delivery) Closing connection to [127.0.0.1] >>> QUIT 221 2.0.0 (none) closing connection Mailq command says the following: r2DCW2q1031793 22 Wed Mar 13 13:32 <root@server-domain.biz> (Deferred: Connection timed out with mail.somedomain.biz.) Problem is that I would like to use "new.somedomain.biz" which is not the same what "mail -v" want to use. My mail.rc config contains the hostname of the good smtp server (none):/var/log# cat /etc/mail.rc set ask askcc append dot save crt ignore Received Message-Id Resent-Message-Id Status Mail-From Return-Path Via Delivered-To set smtp=new.somedomain.biz set from=root@server-domain.biz How can I "ask" mailx to use new.somedomain.biz ? Thank you! |
You need to set your MTA to use a relay host. Make sure that the host you are relaying to allows your linux host access.
|
Hello,
Thank you, I tried that. I used sendmailconfig command, and added new.somedomain.biz as a smarthost. Now email is working. |
All times are GMT -5. The time now is 03:11 AM. |