Bug 2530756

Summary: esmtp-wrapper masks the real esmtp exit code
Product: [Fedora] Fedora Reporter: madni
Component: esmtpAssignee: Jaroslav Škarvada <jskarvad>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: jskarvad
Target Milestone: ---Keywords: Upstream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
URL: https://bugzilla.cendio.com/show_bug.cgi?id=8248
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description madni 2026-09-09 11:34:35 UTC
The esmtp package ships /usr/bin/esmtp-wrapper to queue mail and then invokes the real esmtp binary. This causes two problems for callers that rely on esmtp's exit code or stderr to determine whether a specific message was delivered:

1. esmtp-wrapper itself always exits before the real esmtp call has happened, so its own exit code says nothing about whether the mail was actually delivered. The real esmtp is only invoked later, in a separate, detached process, once the queue is flushed.

2. When esmtp is eventually invoked to flush the queue, it may send several queued messages in one go. Any errors on stderr at that point come from the whole queue flush, not necessarily from the message that triggered it. This means a caller can see errors unrelated to their own message, or conversely see no error even though their message failed, since success/failure is reported per flush rather than per message.

Taken together, esmtp-wrapper does not provide a way to reliably determine per-message delivery success or failure.

Debian and Ubuntu do not appear to install this wrapper.

We'd like Fedora to reconsider shipping esmtp-wrapper, given how unreliable its error reporting is.

Reproducible: Always

Steps to Reproduce:
1. Configure a program to send mail via /usr/bin/esmtp-wrapper, e.g. as its sendmail-compatible MTA
2. Send a mail message that should fail and check the exit code
3.
Actual Results:
The exit code from esmtp-wrapper does not reflect whether the message was actually delivered.

Expected Results:
Either esmtp-wrapper should reflect the real esmtp exit code and error output for the specific message just submitted or it should not be used as a default sendmail replacement.

Comment 1 madni 2026-09-09 11:37:05 UTC
We encountered the bug here: https://bugzilla.cendio.com/show_bug.cgi?id=8248