outgoing smtp mail from CB is maybe getting blocked by ISP

57 views
Skip to first unread message

Neil Pahl

unread,
May 28, 2014, 5:33:02 AM5/28/14
to chica...@googlegroups.com
I send my transactional email via mandrill.com and it is quite reliable in getting emails reliably to their desitination. However, my emails are not getting to the Mandrill service on some networks when using the CB.

I'm getting this error while on some networks, and not on others:

Supervisor boss_mail_sup had child mail_controller started with boss_mail_controller:start_link([{driver,boss_mail_driver_smtp}]) at <0.1179.0> exit with reason {error,retries_exceeded,{network_failure,"smtp.mandrillapp.com",{error,closed}}} in context child_terminated


Is there I way I can make it work on the other ISPs?  I've tried the following python script from teh same machine and it seems to be working:

#! /usr/local/bin/python


SMTPserver = 'smtp.mandrillapp.com'
sender =     'x...@xxx.com'
destination = ['x...@xxx.com']

USERNAME = "xxx"
PASSWORD = "xxx"

# typical values for text_subtype are plain, html, xml
text_subtype = 'plain'


content="""\
Test message
"""

subject="Sent from Python"

import sys
import os
import re

from smtplib import SMTP_SSL as SMTP       # this invokes the secure SMTP protocol (port 465, uses SSL)
# from smtplib import SMTP                  # use this for standard SMTP protocol   (port 25, no encryption)
from email.MIMEText import MIMEText

try:
    msg = MIMEText(content, text_subtype)
    msg['Subject']=       subject
    msg['From']   = sender # some SMTP servers will do this automatically, not all

    conn = SMTP(SMTPserver)
    conn.set_debuglevel(False)
    conn.login(USERNAME, PASSWORD)
    try:
        conn.sendmail(sender, destination, msg.as_string())
    finally:
        conn.close()

except Exception, exc:
    sys.exit( "mail failed; %s" % str(exc) ) # give a error message

Neil Pahl

unread,
May 28, 2014, 10:43:28 PM5/28/14
to chica...@googlegroups.com
Sorry, it seems that if I telnet smtp.mandrillapp.com on port 25, it doesn't work, but telnet will connect on port 587.

I will try add 
{mail_relay_port, 587},

to boss.config

can2nac

unread,
May 29, 2014, 11:02:08 AM5/29/14
to chica...@googlegroups.com
"I'm getting this error while on some networks, and not on others:" - check that 25th port is available with your ISP, some hosting providers (not ISPs) block all ports and open them with separate request only. May be your ISP has the same policies.

u can as well use this tool http://ping.eu/port-chk/ to determine is port is available

Trying 54.195.231.78...

mandrill is available throught 25th port.

give a shot to boss_mail:send(FromAddress, ToAddress, Subject, Body) from terminal and post result here
also post mail related part of boss.config

Neil Pahl

unread,
Jun 1, 2014, 8:33:21 PM6/1/14
to chica...@googlegroups.com
Thanks for your response... I tried telnet and was able to connect to the smtp server on the desired ports but it wasn't until firing up wireshark, I was able to find out that things were going wrong for during the TLS authentication. Perhaps on my work network (the one which worked for me) either did something to fix it or made CB think that it wasn't available. 

I will explore further into how to properly setup my TLS for use with CB and perhaps write a blog post or wiki entry to document it.

Cheers,

PS - my home ISP was blocking port 25 as I was able to telnet on that port. But switching to port 587 solved that problem.
Reply all
Reply to author
Forward
0 new messages