Forums

[resolved] WordPress Registration Email settings, where are they? (4 posts)

  1. lancerkind
    Member
    Posted 3 years ago #

    I'm on the OSX platfrom and I don't know how WordPress has done this, but it is using my email address to send the registration email to people. The problem is that Yahoo/ComCast/Spamhaus won't allow those emails to go out to the Internet unless I authenticate into Yahoo (just like everyone does using Outlook/MacMail). How do I configure this with WordPress? I can see the below problem it is having in my mail logs. My approach has been trying to get postfix to authenticate with yahoo mail. I'd like to know more about how WordPress is getting the registration email sent, and how it decides to use my email lancerkind@yahoo.com:

    Sep 3 18:44:16 MacMini postfix/pickup[43476]: CEBCC192C2A: uid=70 from=<_www>
    Sep 3 18:44:16 MacMini postfix/cleanup[43478]: CEBCC192C2A: message-id=<ae987e5ffcdc1b14a409fa06beed6c80@skind.net>
    Sep 3 18:44:16 MacMini postfix/qmgr[43468]: CEBCC192C2A: from=<_www@MacMini.local>, size=518, nrcpt=1 (queue active)
    Sep 3 18:44:16 MacMini postfix/tlsmgr[43482]: warning: no entropy source specified with parameter tls_random_source
    Sep 3 18:44:16 MacMini postfix/tlsmgr[43482]: warning: encryption keys etc. may be predictable
    Sep 3 18:44:19 MacMini postfix/smtp[43483]: certificate verification failed for smtp1.google.com: num=19:self signed certificate in certificate chain
    Sep 3 18:44:20 MacMini postfix/smtp[43481]: certificate verification failed for smtp3.google.com: num=19:self signed certificate in certificate chain
    Sep 3 18:44:20 MacMini postfix/smtp[43483]: CEBCC192C2A: to=<noreply360@yahoo.com>, relay=smtp1.google.com[209.85.237.25]:25, delay=3.3, delays=0.02/0.06/3.1/0.09, dsn=5.1.8, status=bounced (host smtp1.google.com[209.85.237.25] said: 553 5.1.8 <_www@MacMini.local>... Domain of sender address _www@MacMini.local does not exist (in reply to MAIL FROM command))
    Sep 3 18:44:20 MacMini postfix/cleanup[43478]: 3913C192C2E: message-id=<20080904014420.3913C192C2E@MacMini.local>
    Sep 3 18:44:20 MacMini postfix/qmgr[43468]: 3913C192C2E: from=<>, size=2510, nrcpt=1 (queue active)
    Sep 3 18:44:20 MacMini postfix/bounce[43484]: CEBCC192C2A: sender non-delivery notification: 3913C192C2E
    Sep 3 18:44:20 MacMini postfix/qmgr[43468]: CEBCC192C2A: removed
    Sep 3 18:44:20 MacMini postfix/local[43485]: 3913C192C2E: to=<_www@MacMini.local>, relay=local, delay=0.01, delays=0/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
    Sep 3 18:44:20 MacMini postfix/qmgr[43468]: 3913C192C2E: removed
    Sep 3 18:44:21 MacMini postfix/smtp[43481]: CB8A2192C28: to=<lancerkind@yahoo.com>, relay=smtp3.google.com[64.233.183.25]:25, delay=4.3, delays=0.04/0.06/4/0.19, dsn=5.1.8, status=bounced (host smtp3.google.com[64.233.183.25] said: 553 5.1.8 <_www@MacMini.local>... Domain of sender address _www@MacMini.local does not exist (in reply to MAIL FROM command))
    Sep 3 18:44:21 MacMini postfix/cleanup[43478]: 42975192C31: message-id=<20080904014421.42975192C31@MacMini.local>
    Sep 3 18:44:21 MacMini postfix/qmgr[43468]: 42975192C31: from=<>, size=2526, nrcpt=1 (queue active)
    Sep 3 18:44:21 MacMini postfix/bounce[43484]: CB8A2192C28: sender non-delivery notification: 42975192C31
    Sep 3 18:44:21 MacMini postfix/qmgr[43468]: CB8A2192C28: removed
    Sep 3 18:44:21 MacMini postfix/local[43485]: 42975192C31: to=<_www@MacMini.local>, relay=local, delay=0.01, delays=0/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
    Sep 3 18:44:21 MacMini postfix/qmgr[43468]: 42975192C31: removed
    Sep 3 18:50:56 MacMini postfix/postfix-script[43501]: stopping the Postfix mail system
    Sep 3 18:50:56 MacMini postfix/master[43467]: terminating on signal 15
    Sep 3 18:50:59 MacMini postfix/postfix-script[43610]: starting the Postfix mail system
    Sep 3 18:50:59 MacMini postfix/master[43611]: daemon started -- version 2.4.3, configuration /usr/local/cutedge/postfix/etc
    Sep 3 18:51:51 MacMini postfix/postfix-script[43672]: stopping the Postfix mail system
    Sep 3 18:51:51 MacMini postfix/master[43611]: terminating on signal 15
    Sep 3 18:51:54 MacMini postfix/postfix-script[43781]: starting the Postfix mail system
    Sep 3 18:51:54 MacMini postfix/master[43782]: daemon started -- version 2.4.3, configuration /usr/local/cutedge/postfix/etc

  2. lancerkind
    Member
    Posted 3 years ago #

    I'd still love to hear how WordPress integrates itself into OSX 10.5 so it gets those registration emails out. So please give me the infodump if you've got it. (You can even send it to lancerkind@yahoo.com.)

    Any way, after spending a total of 8-12 hours of un-consecutive time, I've got the registrations going out into the Internet. Here is the story, which will be useful to anyone else who is using WordPress on OSX 10.5. This was quite a rabbit hole!

    The Problem
    I installed WordPress, got it up and running, but realized that none of the email's were getting out to the users who were registering.
    So I snooped in the Console (love the OSX console/log viewer, simple and easy to use. Not at all like that piece of nastyness on Windows called the Event Viewer) and discovered that an OSX deamon was having to kill postfix about every couple of seconds. Then I used the left hand nav in the console to look at the mail log (its there beneath LogFiles->/var/log->mail. That revealed the log file mentioned at the top of this thread which mentions Spamhaus.
    I studied the problem by creating a free account on google and yahoo mail and registering them and unregistering them. This is something I did probably a hundred times throughout this discovery process until I found a solution.

    The response from Yahoo's smtp server pointed me in the right direction. It had a URL. (Those Yahoos are very clever!)

    Yahoo said:
    (source: http://help.yahoo.com/l/us/yahoo/mail/postmaster/550-bl21.html)

    553 5.7.1 [BL21] Connections not accepted from IP addresses on Spamhaus PBL
    In our continuing efforts to protect our users from unsolicited email, Yahoo! Mail does not accept SMTP connections from dynamic or residential IP addresses, as determined by the Spamhaus PBL. If you are seeing this error message, please do not retry sending your message using the same IP address. Instead, please contact your ISP for information on which SMTP server you are authorized to use for your outbound email.
    If you think that your IP address has been listed in error, you or your email administrator should contact Spamhaus. Once your IP is de-listed by Spamhaus, Yahoo! Mail will automatically unblock your IP within 48 hours.

    Spamhaus said:
    (source: http://www.spamhaus.org/pbl/query/PBL191731)

    Outbound Email Policy of Comcast for this IP range:

    Email sent by Comcast subscribers using a mail program such as Outlook Express are required to send the email through Comcast. To insure your mail program is properly configured, please visit http://www.comcast.net/help/faq/index.jsp?faq=Email117481. If you are a Comcast Commercial Services customer and need support, please contact support_biz@cable.comcast.com

    And further:
    (source: http://www.spamhaus.org/faq/answers.lasso?section=Spamhaus%20PBL)

    What if I want to run a mail server on dynamic IPs listed in the PBL?
    Due to the vast volumes of compromised PCs spewing spam "direct-to-mx" from dynamic domestic Internet connections, most major mail systems choose not to accept unauthenticated SMTP mail from servers on dynamic IPs.

    Unless you use Authenticated SMTP, there is no way for a machine to differentiate between legitimate email sent by your server from a dynamic IP and spam mail sent by a virus on a dynamic IP next door to yours. Most networks therefore nowadays make it their policy not to accept unauthenticated SMTP email sent "direct-to-mx" from dynamic IP pools. The Spamhaus PBL enables networks to enforce this policy.

    If you're on a dynamic IP address and you absolutely need to run your own mail server, then use your ISP's outgoing mail relay as a 'smarthost'. If your ISP does not provide an outgoing mail relay, find a commercial smarthost provider. Such smarthosting arrangements are very common and inexpensive; contact your ISP or a hosting company for information.

    Industry best practice is to block outgoing port 25 of dynamic pools (MAAWG documents).

    I learned that what I was trying to do was use smtp.mail.yahoo.com as a relay since WordPress on OSX uses PostFix as the originating smtp server. My understanding at this point was that I could do this if I authenticated into that yahoo smtp server. But since Postfix ran as a daemon process, how do I program that to do so?

    The rabbit hole got even deeper. After scanning few some man pages and googleing I found this: http://postfix.state-of-mind.de/patrick.koetter/smtpauth/smtp_auth_mailservers.html
    I gave it a shot trying to relay through yahoo, watched the log files, registered my username/email addresses, and failed to get it to work.
    A blog that referred to the above page mentioned an inexpensive product called MailServe (http://cutedgesystems.com/) that would give me a UI to configure postfix. I didn't want to become an export on programming smtp agents so I dropped the $15 and bought it. Unfortunately, I found it quirky and the UI un-intuitive, but it did know better how to configure PostFix *.conf files better than I because I got much further with it. (There is a ridiculous amount of configuration you can do to Postfix which makes it completely overwhelming.)

    So using MailServer I soldier on.

    I start wondering if Yahoo is never going to work. I get further but still see problems in the log file and responses of distrust from yahoo. So I decide to use my bloody ISPs smtp server as a relay rather than yahoo, which is what most of the web pages I read keep suggesting.
    Comcast said:
    (Source: http://help.comcast.net/content/faq/What-are-the-Comcast-Mail-Server-Settings)

    What are the Comcast Mail Server Settings?
    The Comcast Mail server settings are as follows:

    Outgoing mail (SMTP): smtp.comcast.net
    Incoming mail (POP3): mail.comcast.net

    I use the mac email client to send an email through the bloody thing to give me a level of confidence that it will at least relay those emails.

    Then I got the bloody thing working by using MailServe to configure PostFix so:
    "Masquarad as" set to my DNS domain name: skind.net
    The "smart host name" to: smtp.comcast.net
    Enable SASL Authentication and SSL.
    UserID set to my comcast userid, password set to my comcast password.

    After that, registration emails poured through the Internets and I danced!!!! (It complained about certificates but it works.) God DAMN that was a pain in the a**!
    Here is the mail log:

    Sep  3 22:48:01 MacMini postfix/postfix-script[45373]: starting the Postfix mail system
    Sep  3 22:48:01 MacMini postfix/master[45374]: daemon started -- version 2.4.3, configuration /usr/local/cutedge/postfix/etc
    Sep  3 22:48:26 MacMini postfix/pickup[45380]: 0672D193414: uid=70 from=<_www>
    Sep  3 22:48:26 MacMini postfix/cleanup[45382]: 0672D193414: message-id=<0162cc22d0555574f8ba348df940000b@skind.net>
    Sep  3 22:48:26 MacMini postfix/qmgr[45375]: 0672D193414: from=<_www@skind.net>, size=537, nrcpt=1 (queue active)
    Sep  3 22:48:26 MacMini postfix/pickup[45380]: 09FE7193416: uid=70 from=<_www>
    Sep  3 22:48:26 MacMini postfix/cleanup[45382]: 09FE7193416: message-id=<525b04e07e0605a6322f45e93fa55c27@skind.net>
    Sep  3 22:48:26 MacMini postfix/qmgr[45375]: 09FE7193416: from=<_www@skind.net>, size=521, nrcpt=1 (queue active)
    Sep  3 22:48:26 MacMini postfix/tlsmgr[45386]: warning: no entropy source specified with parameter tls_random_source
    Sep  3 22:48:26 MacMini postfix/tlsmgr[45386]: warning: encryption keys etc. may be predictable
    Sep  3 22:48:26 MacMini postfix/smtp[45387]: certificate verification failed for smtp.comcast.net: num=20:unable to get local issuer certificate
    Sep  3 22:48:26 MacMini postfix/smtp[45387]: certificate verification failed for smtp.comcast.net: num=27:certificate not trusted
    Sep  3 22:48:26 MacMini postfix/smtp[45385]: certificate verification failed for smtp.comcast.net: num=20:unable to get local issuer certificate
    Sep  3 22:48:26 MacMini postfix/smtp[45385]: certificate verification failed for smtp.comcast.net: num=27:certificate not trusted
    Sep  3 22:48:27 MacMini postfix/smtp[45387]: 09FE7193416: to=<noreply360@yahoo.com>, relay=smtp.comcast.net[76.96.30.117]:25, delay=1.3, delays=0.01/0.08/0.9/0.36, dsn=2.0.0, status=sent (250 2.0.0 AVoS1a0043Dyk3c8NVoTHK mail accepted for delivery)

    Notice the lovely "mail accepted for delivery!!!!

  3. lancerkind
    Member
    Posted 3 years ago #

    After that, I'm going to have a beer!
    [sig moderated]

  4. lancerkind
    Member
    Posted 3 years ago #

    Here are the pertinent changes that MailServe did to my /etc/postfix/main.cf (You'll still need to setup the password DB which is covered in the link about configuring authentication in Postfix, mentioned in the second post of this thread):

    ###Start MailServe###
    biff=no
    alias_maps=hash:/usr/local/cutedge/postfix/etc/aliases
    alias_database=hash:/usr/local/cutedge/postfix/etc/aliases
    smtpd_sender_restrictions=check_sender_access hash:/usr/local/cutedge/postfix/etc/access
    inet_interfaces=all
    message_size_limit=0
    mailbox_size_limit=0
    myorigin=skind.net
    myhostname=postfix.skind.net
    relayhost=smtp.comcast.net
    
    smtp_sasl_auth_enable=yes
    smtp_sasl_password_maps=hash:/usr/local/cutedge/postfix/etc/sasl_passwd
    smtp_sasl_security_options=
    smtp_use_tls=yes
    ###End MailServe###

    I hope this helps others!

    [sig moderated]

Topic Closed

This topic has been closed to new replies.

About this Topic