Using Sendmail in Linux to send email through Bluehost
I'm having trouble getting Sendmail in Linux to send email through my Bluehost email. I've successfully sent it through gmail, but I need to use my Bluehost account. I've made the certificates and had no issues typing "echo 'Message" | mail -s "subject" example@yahoo.com" and it would send fine when I had my gmail account info plugged in. I tried just swapping out the gmail info for my bluehost info and now that same command won't send the email. I ran the m4 sendmail.mc>sendmail.cf command after I made changes and "service sendmail restart".
My authinfo file looks like this: AuthInfo:mail.myDomain.com "U:example@myDomain.com" "I:example@myDomain.com" "P:My_Password" "M:PLAIN" AuthInfo:mail.myDomain.com:26 "U:example@myDomain.com" "I:example@myDomain.com" "P:My_password" "M:PLAIN" Any problems there? The relevant part of my sendmail.mc looks like this: FEATURE(`authinfo',`hash /etc/mail/authinfo.db') define(`SMART_HOST',`mail.myDomain.com')dnl define(`RELAY_MAILER_ARGS', `TCP $h 26') define(`ESMTP_MAILER_ARGS', `TCP $h 26') define(`confCACERT_PATH',`/usr/share/ssl/certs') define(`confCACERT',`/usr/share/ssl/certs/ca-bundle.crt') define(`confSERVER_CERT',`/usr/share/ssl/certs/sendmail.pem') define(`confSERVER_KEY',`/usr/share/ssl/certs/sendmail.pem') define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN') TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN') define(`confAUTH_OPTIONS', `A')dnl Everything else is default. Am I missing something that would explain why gmail worked and bluehost isn't? Thanks for any help and sorry if this is very obvious, I just can't seem to figure it out >.< |
What does the maillog say?
|
I tried sending an email and got this:
Aug 23 11:31:21 localhost sendmail[3495]: STARTTLS=server: file /usr/share/ssl/certs/sendmail.pem unsafe: Group readable file Aug 23 11:31:21 localhost sm-msp-queue[3505]: starting daemon (8.14.4): queueing@01:00:00 Aug 23 11:31:26 localhost sendmail[3510]: q7NIVQfS003510: from=MyUsername, size=216, class=0, nrcpts=1, msgid=<201208231831.q7NIVQfS003510@localhost.localdomain>, relay=root@localhost Aug 23 11:31:27 localhost sendmail[3511]: q7NIVQBk003511: from=<MyUsername@localhost.localdomain>, size=487, class=0, nrcpts=1, msgid=<201208231831.q7NIVQfS003510@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1] Aug 23 11:31:27 localhost sendmail[3510]: q7NIVQfS003510: to=example@aol.com, ctladdr=MyUsername (500/500), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30216, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q7NIVQBk003511 Message accepted for delivery) Aug 23 11:34:07 localhost sendmail[3499]: q7NHi0T3003285: to=<example@aol.com>, ctladdr=<MyUsername@localhost.localdomain> (500/500), delay=00:50:07, xdelay=00:02:46, mailer=relay, pri=210487, relay=mail.myDomain.com. [XX.XX.XX.185], dsn=4.0.0, stat=Deferred: Connection reset by mail.myDomain.com. Aug 23 11:34:13 localhost sendmail[3513]: q7NIVQBk003511: to=<example@aol.com>, ctladdr=<MyUsername@localhost.localdomain> (500/500), delay=00:02:46, xdelay=00:02:46, mailer=relay, pri=120487, relay=mail.myDomain.com. [XX.XX.XX.185], dsn=4.0.0, stat=Deferred: Connection reset by mail.myDomain.com. Thanks for the reply also! Really hung on this... |
I also tried redoing it with the ssl port number and got this in the mail log:
Aug 23 10:43:54 localhost sendmail[3270]: starting daemon (8.14.4): SMTP+queueing@01:00:00 Aug 23 10:43:54 localhost sendmail[3270]: STARTTLS=server: file /usr/share/ssl/certs/sendmail.pem unsafe: Group readable file Aug 23 10:43:54 localhost sm-msp-queue[3279]: starting daemon (8.14.4): queueing@01:00:00 Aug 23 10:44:00 localhost sendmail[3284]: q7NHhxMH003284: from=MyUsername, size=216, class=0, nrcpts=1, msgid=<201208231743.q7NHhxMH003284@localhost.localdomain>, relay=root@localhost Aug 23 10:44:00 localhost sendmail[3285]: q7NHi0T3003285: from=<MyUsername@localhost.localdomain>, size=487, class=0, nrcpts=1, msgid=<201208231743.q7NHhxMH003284@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1] Aug 23 10:44:00 localhost sendmail[3284]: q7NHhxMH003284: to=exampleEmail@aol.com, ctladdr=MyUsername (500/500), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30216, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q7NHi0T3003285 Message accepted for delivery) Aug 23 10:46:46 localhost sendmail[3287]: q7NHi0T3003285: to=<exampleEmail@aol.com>, ctladdr=<MyUsername@localhost.localdomain> (500/500), delay=00:02:46, xdelay=00:02:46, mailer=relay, pri=120487, relay=mail.myDomain.com. [XX.XX.XX.185], dsn=4.0.0, stat=Deferred: Connection reset by mail.myDomain.com. |
Contacted Bluehost and found that they don't allow you to use your domains to relay emails... Bumer
|
That's pretty common ... I was going to suggest asking them ..
|
All times are GMT -5. The time now is 08:04 AM. |