• Resolved David W

    (@developcents)


    When I run a Postie Configuration Test, it fails with:

    Connect to Mail Host
    Unable to connect. The server said:

    (Nothing after “The server said:”)

    I check the Apache Error Logs, and I see this:

    [Mon Jul 13 10:58:05.416138 2015] [:error] [pid 8419] [client 74.221.189.99:36390] PHP Warning: imap_open(): Couldn’t open stream {my.mailserver.com:995/service=pop3/ssl/tls/novalidate-cert} in /home/www/my.website/www/wp-content/plugins/postie/postieIMAP.php on line 89, referer: https://my.website.org/wp-admin/admin.php?page=postie-settings

    I can confirm that php-imap is installed on the server, and I can confirm that this is a valid email address on the mail server (because I just created the email address).

    Any idea what’s going on and how to troubleshoot this?

    https://www.ads-software.com/plugins/postie/

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author Wayne Allen

    (@wayneallen-1)

    Typically this means that either the tls, host or port setting is incorrect. Another option is that the mail server is blocking the request. Gmail does this until you specifically permit POP/IMAP access.

    Thread Starter David W

    (@developcents)

    Well, I’m the mail server administrator, and I can confirm port settings are correct (and the firewall on the mail server is allowing communication on those ports).

    I just checked the web server (where the website resides, outgoing connection) and did find that outgoing TCP ports 993 and 995 were disabled. After enabling that port on the web server (outgoing TCP port 993), I’m still getting the same results.

    So, ports are correct on both servers now.

    I can also confirm the email address is valid & working (I just set it up in Thunderbird to ensure connectivity).

    The mail server supports both POP3 and IMAP, on ports 995 and 993, respectively. I’ve tested postie with both protocols (unsuccessfully), but have successfully connected to the mail server using a mail client in my local environment.

    Plugin Author Wayne Allen

    (@wayneallen-1)

    Please try the techniques listed here from your web server
    https://postieplugin.com/faq/postie-wont-connect-mailserver/

    Thread Starter David W

    (@developcents)

    Again, I can confirm that the mail server is correctly configured. That isn’t the issue.

    The following is compliments of my local environment:

    david@Develop-CENTS:~$ openssl s_client -connect mail.developcents.com:993
    CONNECTED(00000003)
    
    {snip}
    
    * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.

    The following is compliments of the shell on the web server (where WordPress / Postie is installed), connecting successfully to the mail server:

    * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
    
    {snip}
    
    [root@myers ~]# openssl s_client -connect mail.developcents.com:993
    CONNECTED(00000003)

    The following is compliments of https://mxtoolbox.com/SuperTool.aspx?action=mx%3adevelopcents.com&run=toolpage#

    Session Transcript:
    Connecting to 45.56.70.117

    220 mail.developcents.com ESMTP Postfix [672 ms]
    EHLO PWS3.mxtoolbox.com
    250-mail.developcents.com
    250-PIPELINING
    250-SIZE 20480000
    250-VRFY
    250-ETRN
    250-STARTTLS
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 DSN [609 ms]
    MAIL FROM:<[email protected]>
    250 2.1.0 Ok [609 ms]
    RCPT TO:<[email protected]>
    454 4.7.1 <[email protected]>: Relay access denied [609 ms]

    PWS3v2 3142ms

    Plugin Author Wayne Allen

    (@wayneallen-1)

    I don’t doubt that your server is configured correctly, it is all about whether the web server can access it.

    Running those commands in your local environment doesn’t help other than to confirm that the mail server is up.

    You need to run them from the same machine the web server is on.

    Thread Starter David W

    (@developcents)

    I appreciate that you’re trying to help, and am biting my tongue so that I don’t reply with a snarky comment.

    That said, if you re-read my last response, one of the tests I provided was from the server in question. I provided tests from 3 environments:
    1) The actual web server where WordPress is installed
    2) mxtoolbox.com
    3) My local environment

    Plugin Author Wayne Allen

    (@wayneallen-1)

    Sorry about that. Shouldn’t do support when tired.

    I’m running out of ideas. Is there anything in the apache error log?

    Thread Starter David W

    (@developcents)

    No worries. Happens to the best of us.

    This is what I’m seeing in the Apache log:

    [Mon Jul 13 10:58:05.416138 2015] [:error] [pid 8419] [client 74.221.189.99:36390] PHP Warning: imap_open(): Couldn’t open stream {my.mailserver.com:995/service=pop3/ssl/tls/novalidate-cert} in /home/www/my.website/www/wp-content/plugins/postie/postieIMAP.php on line 89, referer: https://my.website.org/wp-admin/admin.php?page=postie-settings

    Plugin Author Wayne Allen

    (@wayneallen-1)

    I see that when you tested the connection you were using port 993, but it looks like Postie is configured for port 995.

    Thread Starter David W

    (@developcents)

    I’ve tested on both IMAP-SSL as well as POP3-SSL. When I use “mail protocol” of IMAP-SSL on wp-admin/admin.php?page=postie-settings, I specify the port as 993.

    And when I use POP3-SSL, I specify the port as 995.

    Either way produces the same symptoms, and the same error in the apache log (although the port changes, obviously).

    [Tue Jul 21 15:22:57.679589 2015] [:error] [pid 16809] [client 74.221.189.99:49552] PHP Warning: imap_open(): Couldn’t open stream {mail.developcents.com:993/service=imap/ssl/tls/novalidate-cert} in /home/www/theagapepuppets.org/www/wp-content/plugins/postie/postieIMAP.php on line 89, referer: https://new.theagapepuppets.org/wp-admin/admin.php?page=postie-settings

    Plugin Author Wayne Allen

    (@wayneallen-1)

    Can you test with another mail server?

    Thread Starter David W

    (@developcents)

    Ok, I just enabled IMAP access onto my gmail account (for testing purposes only), and entered in my gmail address / password, configured settings and ports for IMAP-SSL (instead of POP3-SSL).

    Got the same results.

    Full log output:

    [Tue Jul 21 19:46:23.477094 2015] [:error] [pid 19942] [client 74.221.189.99:56559] PHP Warning: imap_open(): Couldn’t open stream {imap.gmail.com:995/service=imap/ssl/tls/novalidate-cert}INBOX in /home/www/theagapepuppets.org/www/wp-content/plugins/postie/postieIMAP.php on line 89, referer: https://new.theagapepuppets.org/wp-admin/admin.php?page=postie-settings
    [Tue Jul 21 19:46:23.477111 2015] [:error] [pid 19942] [client 74.221.189.99:56559] Postie: imap_open failed: Can’t open mailbox {imap.gmail.com:995/service=imap/ssl/tls/novalidate-cert}INBOX: invalid remote specification, referer: https://new.theagapepuppets.org/wp-admin/admin.php?page=postie-settings
    [Tue Jul 21 19:46:23.477147 2015] [:error] [pid 19942] [client 74.221.189.99:56559] Postie: Unable to connect. The server said:, referer: https://new.theagapepuppets.org/wp-admin/admin.php?page=postie-settings
    [Tue Jul 21 19:46:23.477166 2015] [:error] [pid 19942] [client 74.221.189.99:56559] Postie: , referer: https://new.theagapepuppets.org/wp-admin/admin.php?page=postie-settings

    Plugin Author Wayne Allen

    (@wayneallen-1)

    There is something else going on then. Postie has 1,000s of installs with almost no issues of this type and the resolution was always server config.

    Thread Starter David W

    (@developcents)

    I just ran a “check for mail manually with full debug”…. here are the top portion of the results:

    Checking for mail manually with debug output
    Starting mail fetch
    Postie Version: 1.7.2
    Wordpress Version: 4.2.2
    PHP Version: 5.4.16
    OS: Linux myers.developcents.com 4.1.0-x86_64-linode59 #1 SMP Mon Jun 22 10:39:23 EDT 2015 x86_64
    Debug mode: On
    Time: 2015-07-21 21:38:52 GMT
    Error log:
    TMP dir: /tmp/
    Postie is in /home/www/theagapepuppets.org/www/wp-content/plugins/postie/
    Cron: On
    Alternate Cron: Off
    iconv: installed
    imap: installed
    mbstring: installed
    wp_content_path: /home/www/theagapepuppets.org/www/wp-content
    imap: TLS enabled
    Connecting to imap.gmail.com:995 (imap-ssl) with TLS
    imap: using Google INBOX
    imap: connection string – {imap.gmail.com:995/service=imap/ssl/tls/novalidate-cert}INBOX
    imap: disabling GSSAPI
    Mail Connection Time Out
    Common Reasons: Server Down, Network Issue, Port/Protocol MisMatch
    Array
    (
    [0] => Can’t open mailbox {imap.gmail.com:995/service=imap/ssl/tls/novalidate-cert}INBOX: invalid remote specification
    )

    The Server said:
    imap: closing connection
    There are 0 messages to process
    memory at start of email processing:37139392

    Plugin Author Wayne Allen

    (@wayneallen-1)

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Config test fails’ is closed to new replies.