LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Connection Refused error while sending mail using mutt and msmtp (http://www.linuxquestions.org/questions/linux-server-73/connection-refused-error-while-sending-mail-using-mutt-and-msmtp-4175413108/)

Iyyappan 06-24-2012 06:03 AM

Connection Refused error while sending mail using mutt and msmtp
 
Hi,
I have installed mutt and mstmp in a server. mutt and .msmtp conf is as follows

.muttrc
set sendmail="/usr/local/bin/msmtp -C /home/oracle/.msmtprc --logfile=/tmp/msmtp.log"
set realname="Alerts"
set from=alerts@domain.com
set envelope_from=yes

.msmtprc
account default
host *.*.*.*
from alerts@domain.com

Both have 600 rights and correct owner and group. But i am unable to receive mail.
I tried sending mail using telnet smtphost 25. In log i get the following error messages in mail server logs


Error
Jun 24 18:40:17 s608897hk7sl01 sendmail[13135]: q5OGeHfM013135: from=<alerts@domain.com>, size=328, class=0, nrcpts=1, msgid=<20120624083527.GA2267@domain.com>, proto=ESMTP, daemon=MTA, relay=[10.90.14.251]
Jun 24 18:40:18 s608897hk7sl01 sendmail[13139]: q5OGeHfM013135: to=<mail@mail.com>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120328, relay=mail.domain.com. [*.*.*.*], dsn=4.0.0, stat=Deferred: Connection refused by mail.domain.com .


Kindly provide some help to solve this issue

Zetec 06-24-2012 06:59 AM

Is sendmail installed? If it is disable it (unless mutt needs it).

What is the result of: telnet localhost 25

Iyyappan 06-30-2012 04:49 AM

Found the issue, actually the smtp server ip which i had used was a secondary ip. Afteer opening smtp port for the primary ip, it started to work. thanks a lot


All times are GMT -5. The time now is 08:12 AM.