LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Can't send mail with Sendmail (https://www.linuxquestions.org/questions/linux-software-2/cant-send-mail-with-sendmail-213549/)

familyman 08-04-2004 09:14 PM

Can't send mail with Sendmail
 
It all started in my Debian box when MON was trying to send an alert via email. I set up sendmail for the express purpose of allowing MON to send email. I didn't get an emailed alert, but I found the message in /var/mail/root. the message included the following error:

*** START ERROR ***

The original message was received at Mon, 2 Aug 2004 17:01:52 -0700
from root@localhost

----- The following addresses had permanent fatal errors -----
me@domain.com
(reason: 553 5.1.8 <root@dns1>... Domain of sender address root@dns1 does no
t exist)
(expanded from: me@domain.com)

----- Transcript of session follows -----
... while talking to [127.0.0.1]:
>>> MAIL From:<root@dns1> SIZE=700
<<< 553 5.1.8 <root@dns1>... Domain of sender address root@dns1 does not exist
501 5.6.0 Data format error

*** END ERROR ***

I looked in the mail.alert file and saw that the perl script was calling sendmail, so I tried to execute the command directly from the command line and got:

*** START ERROR ***

dns1:~# sendmail -v me@domain.com
testing
.
WARNING: local host name (dns1) is not qualified; fix $j in config file
me@domain.com... Connecting to [127.0.0.1] port 587 via relay...
me@domain.com... Deferred: Connection refused by [127.0.0.1]

*** END ERROR ***

Is it telling me that I must have a domain name resolving to my server? I know my server can resolve domain names, I can ping yahoo. I've been working for 2 days now on this and I'm not getting anywhere. Sorry if it's something stupid. Any help would be appreciated.

paul316 09-15-2004 09:29 AM

I think you have the problem discussed here:

***
http://www.mailarchive.ca/lists/comp...3-07/0873.html
***
Basically the newer version of sendmail stops listen to port 587. I had the same issue upgrading from 8.11 to 8.12 or 8.13

I just added the following to enable listening on the port and everything seems to work.

DAEMON_OPTIONS(`Port=587,Name=MSA,M=E')dnl

If you find a better way to do the same thing in sendmail.mc post it back here.
Hope this helps

paul316 09-15-2004 09:31 AM

PS - forgot to mention you need to comment out the line with no_default_msa like this:

# FEATURE(`no_default_msa',`dnl')dnl

this was mentioned in the link I put in on the last post.

paul316 09-15-2004 10:30 AM

Just noticed when I did this that local mail was ok send/receive but other systems couldn't send me mail.
I'm not an expert in DAEMON-OPTIONS and apparently when I explicitly configured port 587 this shutdown port 25.
My system currently seems to be listen on both 587 and 25 - after I added the line below:

DAEMON_OPTIONS(`Port=smtp,Addr=xx.xx.xx.xx, Name=MTA')dnl

Where the 'xx' address is the IP address of local box - not 127.0.0.1.

If there is a better way to get everything working at the same time post it.


All times are GMT -5. The time now is 10:21 PM.