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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
08-24-2012, 01:21 AM
|
#1
|
|
LQ Newbie
Registered: Aug 2012
Posts: 12
Rep: 
|
Sendmail set up with Yahoo
I'm trying to get Sendmail to relay through Yahoo. I got it working with gmail after following some tutorials, but I'm hanging up on yahoo. I made certificates for the gmail one and left all the configurations I had for the gmail one but just inserted the Yahoo smtp stuff - but no go. My authinfo file looks like this:
AuthInfo:smtp.mail.yahoo.com "U:myUsername@yahoo.com" "I:myUsername@yahoo.com" "P:Password" "M:PLAIN"
AuthInfo:smtp.mail.yahoo.com:465 "U:myUsername@yahoo.com" "I:myUsername@yahoo.com" "P:Password" "M:PLAIN"
and the part of my sendmail.mc thats been changed is:
FEATURE(`authinfo',`hash /etc/mail/authinfo.db')
define(`SMART_HOST',`smtp.mail.yahoo.com')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 465')
define(`ESMTP_MAILER_ARGS', `TCP $h 465')
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
I left it how it was with gmail and redid the makemap hash on the authinfo and ran the m4 sendmail.mc>sendmail.cf and restarted sendmail and I get nothing. I can switch it back to gmail's info and it sends, but not Yahoo. My mail log has this in it after my last email attempt after redoing the authinfo and sendmail:
Aug 23 15:59:54 localhost sendmail[2857]: starting daemon (8.14.4): SMTP+queueing@01:00:00
Aug 23 15:59:54 localhost sendmail[2857]: STARTTLS=server: file /usr/share/ssl/certs/sendmail.pem unsafe: Group readable file
Aug 23 15:59:54 localhost sm-msp-queue[2867]: starting daemon (8.14.4): queueing@01:00:00
Aug 23 16:00:00 localhost sendmail[2873]: q7NN00qx002873: from=userName, size=216, class=0, nrcpts=1, msgid=<201208232300.q7NN00qx002873@localhost.localdomain>, relay=root@localhost
Aug 23 16:00:01 localhost sendmail[2874]: q7NN004O002874: from=<userName@localhost.localdomain>, size=487, class=0, nrcpts=1, msgid=<201208232300.q7NN00qx002873@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Aug 23 16:00:01 localhost sendmail[2873]: q7NN00qx002873: to=example@aol.com, ctladdr=userName (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 (q7NN004O002874 Message accepted for delivery)
Aug 23 16:00:21 localhost sendmail[2876]: q7NN004O002874: to=<example@aol.com>, ctladdr=<userName@localhost.localdomain> (500/500), delay=00:00:20, xdelay=00:00:20, mailer=relay, pri=120487, relay=smtp.mail.yahoo.com [98.138.84.55], dsn=4.0.0, stat=Deferred: Connection reset by smtp.mail.yahoo.com
I'm on CentOS 2.6.32-220.17.1.el6.x86_64 if that helps.
Anyone had any success using Sendmail and Yahoo to relay emails? Everything look ok in the authinfo and sendmail.mc? Not sure if any of those lines in the .mc need to be removed from the gmail setup I had or are they ok the way they are?
Thanks for any help on this, I've been stuck on this for a few days...
|
|
|
|
08-24-2012, 02:17 AM
|
#2
|
|
Senior Member
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,157
|
Since you have mention 465 as default port for sendmail you need to enable those port in sendmail.mc file to be able to send mail
One way is to comment those lines so that you can send mail on port 25.
Code:
define(`RELAY_MAILER_ARGS', `TCP $h 465')
define(`ESMTP_MAILER_ARGS', `TCP $h 465')
Secondly inside sendmail.mc
Change as following
Code:
dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
# uncomment for sendmail to listen on port 587
DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
# uncomment for sendmail to listen on port 587
DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl
check your firewall
Code:
#netstat -ntlp | grep sendmail
|
|
|
|
08-24-2012, 02:49 AM
|
#3
|
|
LQ Newbie
Registered: Aug 2012
Posts: 12
Original Poster
Rep: 
|
I got 465 from a website that said Yahoo smtp uses 465, should that be something different?
Quote:
|
Since you have mention 465 as default port for sendmail you need to enable those port in sendmail.mc file to be able to send mail
|
Comment as in comment them out, or change "465" to "25"
Quote:
One way is to comment those lines so that you can send mail on port 25.
Code:
define(`RELAY_MAILER_ARGS', `TCP $h 465')
define(`ESMTP_MAILER_ARGS', `TCP $h 465')
|
I made these changes and ran m4 again and still no emails made it through.
Quote:
Secondly inside sendmail.mc
Change as following
Code:
dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
# uncomment for sendmail to listen on port 587
DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
# uncomment for sendmail to listen on port 587
DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl
|
I turned it off just to make sure when I tested.
Quote:
check your firewall
Code:
#netstat -ntlp | grep sendmail
|
Any other ideas? Should I post my whole sendmail.mc?
And thanks for the help by the way!
|
|
|
|
08-24-2012, 03:16 AM
|
#4
|
|
Senior Member
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,157
|
Yes please post your sendmail.mc and maillog
I have not worked with yahoo mail server as I use smtp.gmail.com
For reference you can use this page
Sendmail error messages
Configuring Sendmail
|
|
|
|
08-24-2012, 02:38 PM
|
#5
|
|
LQ Newbie
Registered: Aug 2012
Posts: 12
Original Poster
Rep: 
|
I cut out everything that was commented out of the sendmail.mc to reduce the size. So here is what I got.
SENDMAIL.MC:
Code:
divert(-1)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for linux')dnl
OSTYPE(`linux')dnl
define(`SMART_HOST',`smtp.mail.yahoo.com')dnl
define(`confDEF_USER_ID', ``8:12'')dnl
dnl define(`confAUTO_REBUILD')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST', `True')dnl
define(`confDONT_PROBE_INTERFACES', `True')dnl
define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
define(`confTO_IDENT', `0')dnl
FEATURE(`no_default_msa', `dnl')dnl
FEATURE(`smrsh', `/usr/sbin/smrsh')dnl
FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl
DAEMON_OPTIONS(`Port=smtps, Name=MTA')dnl
dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')dnl
dnl DAEMON_OPTIONS(`Name=MTA-v4, Family=inet, Name=MTA-v6, Family=inet6')
FEATURE(`accept_unresolvable_domains')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
FEATURE(`authinfo',`hash /etc/mail/authinfo.db')
dnl define(`RELAY_MAILER_ARGS', `TCP $h 465')
dnl define(`ESMTP_MAILER_ARGS', `TCP $h 465')
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
MAILER(smtp)dnl
MAILER(procmail)dnl
dnl MAILER(cyrusv2)dnl
My authinfo file is still the same.
Mail log looks like this:
Code:
Aug 24 05:25:18 localhost sendmail[3147]: q7OCPI8r003147: from=userName, size=216, class=0, nrcpts=1, msgid=<201208241225.q7OCPI8r003147@localhost.localdomain>, relay=root@localhost
Aug 24 05:25:19 localhost sendmail[3058]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Address already in use
Aug 24 05:25:19 localhost sendmail[3058]: daemon MTA: problem creating SMTP socket
Aug 24 05:25:24 localhost sendmail[3058]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Address already in use
Aug 24 05:25:24 localhost sendmail[3058]: daemon MTA: problem creating SMTP socket
Aug 24 05:25:24 localhost sendmail[3058]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: server SMTP socket wedged: exiting
Aug 24 05:25:24 localhost sm-msp-queue[3069]: q7OCMu9b002954: to=example@aol.com, ctladdr=userName (500/500), delay=00:02:28, xdelay=00:00:50, mailer=relay, pri=120216, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection reset by [127.0.0.1]
Aug 24 05:25:24 localhost sendmail[3072]: q7OCOcv8003072: to=example@aol.com, ctladdr=userName (500/500), delay=00:00:46, xdelay=00:00:46, mailer=relay, pri=30216, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection reset by [127.0.0.1]
Aug 24 05:25:24 localhost sendmail[3147]: q7OCPI8r003147: to=example@aol.com, ctladdr=userName (500/500), delay=00:00:06, xdelay=00:00:06, mailer=relay, pri=30216, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection reset by [127.0.0.1]
Aug 24 05:25:24 localhost sm-msp-queue[3069]: q7OCLZ64002851: to=example@aol.com, ctladdr=userName (500/500), delay=00:03:49, xdelay=00:00:00, mailer=relay, pri=210216, relay=[127.0.0.1], dsn=4.0.0, stat=Deferred: Connection reset by [127.0.0.1]
Is this correct in my .mc file? Commented out ok? Should 465 be another number?
Code:
dnl define(`RELAY_MAILER_ARGS', `TCP $h 465')
dnl define(`ESMTP_MAILER_ARGS', `TCP $h 465')
And is the 465 in my authinfo the correct number after smtp:mail.yahoo.com in the second entry?
Sorry for all the questions guys >.< Trying to get my head around this.
|
|
|
|
08-25-2012, 12:58 AM
|
#6
|
|
Senior Member
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,157
|
check your firewall if it is listening for port 465 and other smtp ports
Code:
#netstat -ntlp | grep sendmail
Code:
#telnet smtp:mail.yahoo.com 465
#telnet smtp:mail.yahoo.com 567
#telnet smtp:mail.yahoo.com 25
|
|
|
|
08-25-2012, 03:30 PM
|
#7
|
|
LQ Newbie
Registered: Aug 2012
Posts: 12
Original Poster
Rep: 
|
I ran this netstat command and it didn't return anything. Not sure if that is desired or it was supposed to say something
Quote:
check your firewall if it is listening for port 465 and other smtp ports
Code:
#netstat -ntlp | grep sendmail
|
Quote:
Code:
#telnet smtp:mail.yahoo.com 465
|
returned this
Code:
[root@localhost Desktop]# telnet smtp.mail.yahoo.com 465
Trying 98.138.84.55...
Connected to smtp.mail.yahoo.com.
Quote:
Code:
#telnet smtp:mail.yahoo.com 567
|
returned this and never connected
Code:
[root@localhost Desktop]# telnet smtp.mail.yahoo.com 567
Trying 98.139.212.139...
Quote:
Code:
#telnet smtp:mail.yahoo.com 25
|
returned this
Code:
[root@localhost Desktop]# telnet smtp.mail.yahoo.com 25
Trying 98.138.84.55...
Connected to smtp.mail.yahoo.com.
Escape character is '^]'.
220 smtp213.mail.ne1.yahoo.com ESMTP
Not sure how to process that information but I'm hoping some more seasoned eyes know what to do with that.
Last edited by milksnake12; 08-27-2012 at 02:02 AM.
|
|
|
|
08-27-2012, 02:07 AM
|
#8
|
|
LQ Newbie
Registered: Aug 2012
Posts: 12
Original Poster
Rep: 
|
My ISP is Comcast also. I've read that sometimes ISP's have an issue with port 25. Based on those telnet results, is 465 the way to go?
Spent another day on this and still nowhere >.<
I'm at your mercy brilliant Linux people... I've almost reached the end of the rope on this, I've tried everything I can think of in my limited knowledge. I'm open to any suggestions whatsoever *begs*.
|
|
|
|
08-27-2012, 02:41 AM
|
#9
|
|
Senior Member
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,157
|
try this command
Code:
#netstat -ntl | grep sendmail
The command and the switch may vary as per your distro as I use Redhat in my case.
You can remove these lines from your config file
Code:
define(`RELAY_MAILER_ARGS', `TCP $h 465')
define(`ESMTP_MAILER_ARGS', `TCP $h 465')
open your sendmail.cf and search for this line
Code:
Mrelay, P=[IPC], F=mDFMuXa8, S=EnvFromSMTP/HdrFromSMTP, R=MasqSMTP, E=\r\n, L=2040,
T=DNS/RFC822/SMTP,
A=TCP $h 567
and restart your sendmail and make sure once you make changes in sendmail.cf don't use m4 command as it will again over write the file with new configuration in sendmail.mc
If 465 doesnot work out try with 567 as well and let me know the results along with the maillog
|
|
|
|
08-27-2012, 02:59 AM
|
#10
|
|
LQ Newbie
Registered: Aug 2012
Posts: 12
Original Poster
Rep: 
|
I found this line, it matches all except the 567 isn't there. The line is just "A=TCP $h". No port. Should I add a port directly to the .cf?
Quote:
open your sendmail.cf and search for this line
Code:
Mrelay, P=[IPC], F=mDFMuXa8, S=EnvFromSMTP/HdrFromSMTP, R=MasqSMTP, E=\r\n, L=2040,
T=DNS/RFC822/SMTP,
A=TCP $h 567
|
|
|
|
|
08-27-2012, 03:30 AM
|
#11
|
|
Senior Member
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,157
|
yes add the port no. as I had showed you
try with 465 and 567 both
make sure your firewall and selinux is not blocking sendmail.
|
|
|
|
08-28-2012, 04:10 PM
|
#12
|
|
LQ Newbie
Registered: Aug 2012
Posts: 12
Original Poster
Rep: 
|
I tried that and I still can't get it to work....
|
|
|
|
08-29-2012, 12:41 AM
|
#13
|
|
LQ Newbie
Registered: Aug 2012
Posts: 12
Original Poster
Rep: 
|
Well I've got about 40+ hours of troubleshooting in this and still can't seem to get a result. I'm also considering switching to Postfix if someone has a working configuration with Yahoo, I would be forever indebted to you if you could post it. And thank you guys so much for taking the time to throw ideas out there! Just cant seem to get anything to work.
|
|
|
|
02-02-2013, 02:51 PM
|
#14
|
|
LQ Newbie
Registered: Feb 2013
Posts: 1
Rep: 
|
Hey milksnake12,
I am working on this problem also. One of the things I've come across repeatedly is that yahoo doesn't allow this usage on non-premium accounts. I think their other servers are smtp.bizmail.yahoo.com and smtp.prem.yahoo.com. Alas, I am, however, still getting the error message on bizmail. So that's not the only problem...
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:08 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|