LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-23-2012, 12:21 PM   #1
milksnake12
LQ Newbie
 
Registered: Aug 2012
Posts: 12

Rep: Reputation: Disabled
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 >.<
 
Old 08-23-2012, 06:10 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,434

Rep: Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790
What does the maillog say?
 
Old 08-23-2012, 06:32 PM   #3
milksnake12
LQ Newbie
 
Registered: Aug 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
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...

Last edited by milksnake12; 08-23-2012 at 08:40 PM.
 
Old 08-23-2012, 07:53 PM   #4
milksnake12
LQ Newbie
 
Registered: Aug 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
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.
 
Old 08-24-2012, 12:30 AM   #5
milksnake12
LQ Newbie
 
Registered: Aug 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
Contacted Bluehost and found that they don't allow you to use your domains to relay emails... Bumer
 
Old 08-24-2012, 12:53 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,434

Rep: Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790
That's pretty common ... I was going to suggest asking them ..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
slackware 8.1 and sendmail 8.12, changes? can't send email. RazorH Slackware 5 01-29-2010 05:56 AM
Can't send email from linux machine using sendmail Zero187 Linux - General 2 06-24-2009 02:33 PM
Sendmail will not send email alwayslearning Linux - Software 3 05-06-2008 10:32 AM
send email with sendmail from out stigmata Linux - Software 1 12-20-2005 02:35 PM
sendmail won't send email robmainella Linux - Software 0 09-10-2003 04:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:10 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