Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1062646

Summary: [notifier] MAIL_SMTP_ENCRYPTION=tls falls back to plain-text SMTP if server does not advertise STARTTLS
Product: [Retired] oVirt Reporter: Jiri Belka <jbelka>
Component: ovirt-engine-notificiationsAssignee: Martin Perina <mperina>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Belka <jbelka>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.4CC: acathrow, gklein, iheim, mperina, talayan, yeylon
Target Milestone: ---   
Target Release: 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: ovirt-3.4.0-beta3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-31 12:30:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
notifier.log none

Description Jiri Belka 2014-02-07 15:30:53 UTC
Created attachment 860557 [details]
notifier.log

Description of problem:

Using MAIL_SMTP_ENCRYPTION=tls causes falling back to plain-text SMTP if server does not advertise STARTTLS.

# grep ^MAIL_ /etc/ovirt-engine/notifier/notifier.conf.d/00-my.conf 
MAIL_SERVER=localhost
MAIL_PORT=25
MAIL_USER=jbelka
MAIL_PASSWORD=BLABLABLA
MAIL_SMTP_ENCRYPTION=tls
MAIL_FROM=
MAIL_REPLY_TO=

2014-02-07 16:15:13,539 INFO  [org.ovirt.engine.core.utils.LocalConfig] Value of property "MAIL_FROM" is "".
2014-02-07 16:15:13,539 INFO  [org.ovirt.engine.core.utils.LocalConfig] Value of property "MAIL_PASSWORD" is "***".
2014-02-07 16:15:13,539 INFO  [org.ovirt.engine.core.utils.LocalConfig] Value of property "MAIL_PORT" is "25".
2014-02-07 16:15:13,540 INFO  [org.ovirt.engine.core.utils.LocalConfig] Value of property "MAIL_REPLY_TO" is "".
2014-02-07 16:15:13,540 INFO  [org.ovirt.engine.core.utils.LocalConfig] Value of property "MAIL_SERVER" is "localhost".
2014-02-07 16:15:13,540 INFO  [org.ovirt.engine.core.utils.LocalConfig] Value of property "MAIL_SMTP_ENCRYPTION" is "tls".
2014-02-07 16:15:13,540 INFO  [org.ovirt.engine.core.utils.LocalConfig] Value of property "MAIL_USER" is "jbelka".
2014-02-07 16:15:13,540 INFO  [org.ovirt.engine.core.utils.LocalConfig] Value of property "NOTIFIER_DEBUG_ADDRESS" is "".
2014-02-07 16:15:13,540 INFO  [org.ovirt.engine.core.utils.LocalConfig] Value of property "NOTIFIER_STOP_INTERVAL" is "1".
2014-02-07 16:15:13,540 INFO  [org.ovirt.engine.core.utils.LocalConfig] Value of property "NOTIFIER_STOP_TIME" is "30".
2014-02-07 16:15:13,540 INFO  [org.ovirt.engine.core.utils.LocalConfig] Value of property "REPEAT_NON_RESPONSIVE_NOTIFICATION" is "false".
2014-02-07 16:15:13,540 INFO  [org.ovirt.engine.core.utils.LocalConfig] Value of property "SENSITIVE_KEYS" is ",MAIL_PASSWORD".
2014-02-07 16:15:13,540 INFO  [org.ovirt.engine.core.utils.LocalConfig] Value of property "SSL_IGNORE_CERTIFICATE_ERRORS" is "false".
2014-02-07 16:15:13,540 INFO  [org.ovirt.engine.core.utils.LocalConfig] Value of property "SSL_IGNORE_HOST_VERIFICATION" is "false".
2014-02-07 16:15:13,541 INFO  [org.ovirt.engine.core.utils.LocalConfig] Value of property "SSL_PROTOCOL" is "TLS".

[root@jb-rh34 ovirt_log_collector]# tcpdump -i lo -A -nn port 25
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes
16:24:04.523086 IP 127.0.0.1.38130 > 127.0.0.1.25: Flags [S], seq 2879815025, win 32792, options [mss 16396,sackOK,TS val 1206766554 ecr 0,nop,wscale 7], length 0
E..<..@.@.................}q..............@....
G...........
16:24:04.523110 IP 127.0.0.1.25 > 127.0.0.1.38130: Flags [S.], seq 1290895177, ack 2879815026, win 32768, options [mss 16396,sackOK,TS val 1206766554 ecr 1206766554,nop,wscale 7], length 0
E..<..@.@.<.............L..I..}r..........@....
G...G.......
16:24:04.523129 IP 127.0.0.1.38130 > 127.0.0.1.25: Flags [.], ack 1, win 257, options [nop,nop,TS val 1206766554 ecr 1206766554], length 0
E..4..@.@.................}rL..J...........
G...G...
16:24:04.552386 IP 127.0.0.1.25 > 127.0.0.1.38130: Flags [P.], seq 1:56, ack 1, win 256, options [nop,nop,TS val 1206766583 ecr 1206766554], length 55
E..k..@.@...............L..J..}r....._.....
G...G...220 jb-rh34.rhev.lab.eng.brq.redhat.com ESMTP Postfix

16:24:04.552458 IP 127.0.0.1.38130 > 127.0.0.1.25: Flags [.], ack 56, win 257, options [nop,nop,TS val 1206766583 ecr 1206766583], length 0
E..4..@.@.................}rL........X.....
G...G...
16:24:04.552719 IP 127.0.0.1.38130 > 127.0.0.1.25: Flags [P.], seq 1:43, ack 56, win 257, options [nop,nop,TS val 1206766583 ecr 1206766583], length 42
E..^..@.@.................}rL........R.....
G...G...EHLO jb-rh34.rhev.lab.eng.brq.redhat.com

16:24:04.552733 IP 127.0.0.1.25 > 127.0.0.1.38130: Flags [.], ack 43, win 256, options [nop,nop,TS val 1206766583 ecr 1206766583], length 0
E..4..@.@..0............L.....}....../.....
G...G...
16:24:04.552866 IP 127.0.0.1.25 > 127.0.0.1.38130: Flags [P.], seq 56:200, ack 43, win 256, options [nop,nop,TS val 1206766583 ecr 1206766583], length 144
E.....@.@...............L.....}............
G...G...250-jb-rh34.rhev.lab.eng.brq.redhat.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

16:24:04.553822 IP 127.0.0.1.38130 > 127.0.0.1.25: Flags [P.], seq 43:98, ack 200, win 265, options [nop,nop,TS val 1206766584 ecr 1206766583], length 55
E..k..@.@.................}.L......     ._.....
G...G...MAIL FROM:<ovirt.lab.eng.brq.redhat.com>

16:24:04.565557 IP 127.0.0.1.25 > 127.0.0.1.38130: Flags [P.], seq 200:214, ack 98, win 256, options [nop,nop,TS val 1206766596 ecr 1206766584], length 14
E..B..@.@.. ............L.....}......6.....
G...G...250 2.1.0 Ok

16:24:04.565778 IP 127.0.0.1.38130 > 127.0.0.1.25: Flags [P.], seq 98:127, ack 214, win 265, options [nop,nop,TS val 1206766596 ecr 1206766596], length 29
E..Q..@.@.................}.L......     .E.....
G...G...RCPT TO:<jbelka>

16:24:04.576995 IP 127.0.0.1.25 > 127.0.0.1.38130: Flags [P.], seq 214:228, ack 127, win 256, options [nop,nop,TS val 1206766608 ecr 1206766596], length 14
E..B..@.@...............L.....}......6.....
G...G...250 2.1.5 Ok

16:24:04.577151 IP 127.0.0.1.38130 > 127.0.0.1.25: Flags [P.], seq 127:133, ack 228, win 265, options [nop,nop,TS val 1206766608 ecr 1206766608], length 6
E..:..@.@..
..............}.L..-... .......
G...G...DATA

16:24:04.577313 IP 127.0.0.1.25 > 127.0.0.1.38130: Flags [P.], seq 228:265, ack 133, win 256, options [nop,nop,TS val 1206766608 ecr 1206766608], length 37
E..Y..@.@...............L..-..}......M.....
G...G...354 End data with <CR><LF>.<CR><LF>

16:24:04.578008 IP 127.0.0.1.38130 > 127.0.0.1.25: Flags [P.], seq 133:689, ack 265, win 265, options [nop,nop,TS val 1206766609 ecr 1206766608], length 556
E..`..@.@.................}.L..R...     .U.....
G...G...Date: Fri, 7 Feb 2014 16:24:04 +0100 (CET)
To: jbelka
Message-ID: <1547105498.1.1391786644520.JavaMail.ovirt.lab.eng.brq.redhat.com>
Subject: Alert Notification. (jb-rh34.rhev.lab.eng.brq.redhat.com), [Host
 dell-r210ii-13 was switched to Maintenance mode by admin.]
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Time:2014-02-07 16:24:03.349
Message:Host dell-r210ii-13 was switched to Maintenance mode by admin.
Severity:0
User Name: admin
Host Name: dell-r210ii-13
.

16:24:04.583991 IP 127.0.0.1.25 > 127.0.0.1.38130: Flags [P.], seq 265:301, ack 689, win 265, options [nop,nop,TS val 1206766615 ecr 1206766609], length 36
E..X..@.@...............L..R..."...     .L.....
G...G...250 2.0.0 Ok: queued as 8CBE582402

16:24:04.584210 IP 127.0.0.1.38130 > 127.0.0.1.25: Flags [P.], seq 689:695, ack 301, win 265, options [nop,nop,TS val 1206766615 ecr 1206766615], length 6
E..:..@.@.................."L..v...     .......
G...G...QUIT

16:24:04.584379 IP 127.0.0.1.25 > 127.0.0.1.38130: Flags [P.], seq 301:316, ack 695, win 265, options [nop,nop,TS val 1206766615 ecr 1206766615], length 15
E..C..@.@...............L..v...(...     .7.....
G...G...221 2.0.0 Bye

16:24:04.584399 IP 127.0.0.1.25 > 127.0.0.1.38130: Flags [F.], seq 316, ack 695, win 265, options [nop,nop,TS val 1206766615 ecr 1206766615], length 0
E..4..@.@..)............L......(...     .U.....
G...G...
16:24:04.584809 IP 127.0.0.1.38130 > 127.0.0.1.25: Flags [F.], seq 695, ack 317, win 265, options [nop,nop,TS val 1206766615 ecr 1206766615], length 0
...............(L...... .T.....
G...G...
16:24:04.584907 IP 127.0.0.1.25 > 127.0.0.1.38130: Flags [.], ack 696, win 265, options [nop,nop,TS val 1206766615 ecr 1206766615], length 0
E..4..@.@..(............L......)...     .T.....
G...G...
^C
21 packets captured
42 packets received by filter
0 packets dropped by kernel


Version-Release number of selected component (if applicable):
ovirt-engine-tools-3.4.0-0.5.beta1.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. define some mail server which does not advertise STARTTLS
2.
3.

Actual results:
plain-text

Expected results:
fail

Additional info:

Comment 1 Itamar Heim 2014-02-09 08:53:07 UTC
Setting target release to current version for consideration and review. please
do not push non-RFE bugs to an undefined target release to make sure bugs are
reviewed for relevancy, fix, closure, etc.

Comment 2 Sandro Bonazzola 2014-02-19 12:27:10 UTC
This bug is referenced in ovirt-engine-3.4.0-beta3 logs. Moving to ON_QA

Comment 3 Jiri Belka 2014-02-27 12:15:23 UTC
ok, beta3.

Comment 4 Sandro Bonazzola 2014-03-31 12:30:22 UTC
this is an automated message: moving to Closed CURRENT RELEASE since oVirt 3.4.0 has been released