Description of problem: The ovirt-engine-notifier fails to send emails unless MAIL_FROM is set in 90-email-notify.conf. This only seems to happen for me on a recent 4.4.4.7 installation - an older 4.3.7.2 installation successfully sends email even if MAIL_FROM is undefined. In the /var/log/ovirt-engine/notifier/notifier.log I would see entries like this: 2021-03-02 12:45:46,841Z INFO [org.ovirt.engine.core.notifier.transport.smtp.Smtp idle] Sending e-mail subject='alertMessage (ovirt-engine), [Migration started (VM: vm-ataylor, Source: vm-host-1, Destination: vm-host-2, User: ataylor@internal-authz). ]' to='user' but I would never see an entry confirming the email had been successfully sent. MAIL_SERVER and MAIL_PORT were both set correctly (tested by connecting to that server/port via telnet on the oVirt Engine). The logs on the mail server and a tcpdump on port 25 showed nothing even attempting to connect. After enabling debug mode in ovirt-engine-notifier and connecting an IDE to it, I found it was hitting a null pointer exception here: https://github.com/oVirt/ovirt-engine/blob/ovirt-engine-4.4.4.7/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/smtp/Smtp.java#L211 As soon as I set MAIL_FROM and restarted ovirt-engine-notifier emails were sent successfully. Version-Release number of selected component (if applicable): 4.4.4.7 How reproducible: Always until MAIL_FROM is set. Steps to Reproduce: 1. Follow the RHEV 4.4 documentation to configure event notifications and set up the notifier service: https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.4/html/administration_guide/chap-event_notifications 2. Leave MAIL_FROM in 90-email-notify.conf as the default value (empty) 3. Trigger an event in oVirt which leads to a notification being sent. Actual results: The email notification is never sent. Expected results: An email notification is sent. Perhaps MAIL_FROM should be marked as a required value, but ovirt-engine-notifier seems to work without it being set in 4.3.x. Additional info: I don't know Java, but having done a bit of reading of the MimeMessage.setFrom documentation I thought this might have something to do with setFrom attempting to generate a from address from the local hostname. In case it was related I checked the oVirt Engine hostname/DNS configuration and it all seems fine, but perhaps there is an environmental issue.
The documentation text flag should only be set after 'doc text' field is provided. Please provide the documentation text and set the flag to '?' again.
Verified on: ovirt-engine-4.4.7.5-0.9.el8ev.noarch Steps: 1. configure event notifications and set up the notifier service: https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.4/html/administration_guide/chap-event_notifications 2. Leave MAIL_FROM in 90-email-notify.conf as the default value (empty) 3. On UI, set up vm events for a specific user 4. Migrate a vm in with that user to Trigger an notification email Results: Email sent and received successfully with sender as: (unknown sender)
This bugzilla is included in oVirt 4.4.7 release, published on July 6th 2021. Since the problem described in this bug report should be resolved in oVirt 4.4.7 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.