LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-13-2013, 10:40 AM   #1
daraja
LQ Newbie
 
Registered: Mar 2013
Posts: 6

Rep: Reputation: Disabled
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!
 
Old 03-13-2013, 12:40 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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.
 
Old 03-14-2013, 05:27 AM   #3
daraja
LQ Newbie
 
Registered: Mar 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hello,

Thank you, I tried that. I used sendmailconfig command, and added new.somedomain.biz as a smarthost.

Now email is working.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
nail.rc/mailx problem, unexpected EOF on smtp connection? trey85stang Linux - Server 1 04-29-2009 07:34 PM
mailx how add ISP as SMTP Shwick Linux - Software 5 10-04-2008 01:07 PM
Syntax using nail (mailx) for smtp without postfix or sendmail Casey Linux - Server 2 06-12-2007 01:41 AM
smtp connection problem phoebus Slackware 1 04-07-2006 04:57 PM
Problem With SMTP Server Connection Manash Linux - Networking 3 10-02-2004 11:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration