airflow-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reed Villanueva <>
Subject EmailOperator throws SMTPException(“STARTTLS extension not supported by server.”)
Date Tue, 15 Oct 2019 21:01:48 GMT
Trying to use airflow's EmailOperator to send an email on
trigger_rule.ONE_FAILED and seeing error:

[2019-10-14 13:31:50,604] {} WARNING - section/key
[smtp/smtp_user] not found in configTraceback (most recent call last):
   File "/bin/airflow", line 27, in <module>[     args.func(args)
   File "/usr/lib/python2.7/site-packages/airflow/bin/", line 392, in run
   File "/usr/lib/python2.7/site-packages/airflow/utils/", line
50, in wrapper
     result = func(*args, **kwargs)
   File "/usr/lib/python2.7/site-packages/airflow/", line
1493, in _run_raw_task
     result = task_copy.execute(context=context)
   File "/usr/lib/python2.7/site-packages/airflow/operators/",
line 64, in execute
     send_email(, self.subject, self.html_content,
files=self.files,, bcc=self.bcc,
   File "/usr/lib/python2.7/site-packages/airflow/utils/",
line 44, in send_email
     return backend(to, subject, html_content, files=files,
dryrun=dryrun, cc=cc, bcc=bcc, mime_subtype=mime_subtype)
   File "/usr/lib/python2.7/site-packages/airflow/utils/",
line 87, in send_email_smtp
     send_MIME_email(SMTP_MAIL_FROM, recipients, msg, dryrun)
   File "/usr/lib/python2.7/site-packages/airflow/utils/",
line 109, in send_MIME_email
   File "/usr/lib64/python2.7/", line 643, in starttls
     raise SMTPException("STARTTLS extension not supported by server.")
 smtplib.SMTPException: STARTTLS

Have not changed the default airflow.cfg (other than for basic password
authentication to access the webserver) and the email portion looks like

email_backend =

# If you want airflow to send emails on retries, failure, and you want to use
# the function, you have to configure an
# smtp server here
smtp_host = localhost
smtp_starttls = True
smtp_ssl = False
# Uncomment and set the user/pass settings if you want to use SMTP AUTH
# smtp_user = airflow
# smtp_password = airflow
smtp_port = 25
smtp_mail_from =

Checking the port in the cfg file, it seems to be open and listening...

[rvillanueva@mapr001 queensetl_airflow]$ netstat -plnt | grep
':25'(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0  *
LISTEN      -
tcp6       0      0 ::1:25                  :::*
LISTEN      -

... and I am able to use the linux sendmail bash command for other process
that run on this same machine (CentOS 7).
Anyone know what could be going on here or any further debugging tips?

This electronic message is intended only for the named 
recipient, and may 
contain information that is confidential or 
privileged. If you are not the 
intended recipient, you are 
hereby notified that any disclosure, copying, 
distribution or 
use of the contents of this message is strictly 
prohibited. If 
you have received this message in error or are not the 
recipient, please notify us immediately by contacting the 
sender at 
the electronic mail address noted above, and delete 
and destroy all copies 
of this message. Thank you.

View raw message