Neglected Sanity
Neglected Sanity

Reputation: 1430

sendmail on linux not working

I have tried everything I can possibly find on the interwebs and nothing I do makes any difference at all. I am trying to send out email with sendmail on my linux box. The larger picture is I need to send off emails when a process fails or crashes on a node server, my company does not have smtp by choice, so I am looking into using sendmail through nodemailer. Needless to say it isn't working correctly. I am not getting an error, but the mail never goes through, so I decided to go more basic and just test sendmail through the terminal, and I can't get any mail to send at all. I have gone into the /etc/mail directory and edited both the sendmail.mc and submit.mc files to get a fully qualified domain name, I found a quick tutorial online that said to add the following to the sendmail.mc file...

Dmbar.com
define('confDOMAIN_NAME', '$w.$m')dnl

So I added that and then ran the 'sendmailconfig' command to update the app, then just to be safe I ran the '/etc/init.d/sendmail restart' command to restart the sendmail daemon. Then I run the sendmail command to test send an email like so...

sendmail -t < email.txt

Where the contents of email.txt are simply...

to:realemail@gmail.com
from:myemail@mydomain.com
subject: Test email

test test etst

yes the "realemail@gmail.com' is not where it was sent, there is a real email in that line, and the 'myemail@mydomain.com' is not what is in the file either, that is replaced with an actual email address.

Still no mail goes through. When I bring up the 'sendmail -bp' command I get things like...

 u4KJaAJF030710readqf*  -1   Fri May 20 12:36  <****@***********>
             (Deferred: Connection refused by alt4.gmail-smtp-in.l.google.)
                 <realemail@gmail.com>

yes I replaced the sender with *****, but safe to say it is using computeruser@computername and not the from in the mail file, nor the DOMAIN_NAME that has been defined in the .mc file.

I am really lost here, nothing I do seems to matter, I can't get this to send an email and I really need this running. I have been scouring the internet all day and everything I find is either, add that define line in to the sendmail.mc file, or just simple commands on how to actually send the mail, I can't find anything that would help as to why this isn't sending any emails. I can, however, hop into a PHP page and successfully send an email with the "mail" PHP function just fine, so I know my system is able to send emails correctly. I am begging for any help at all, email is not my strong suit, so any help is greatly appreciated. Thank you.

Upvotes: 0

Views: 3655

Answers (1)

Neglected Sanity
Neglected Sanity

Reputation: 1430

Found the issue finally. It turns out that Comcast does not allow any communications on port 25, so all of my emails are getting blocked. Pain in the ...!

Upvotes: 1

Related Questions