Bug 2530756 - esmtp-wrapper masks the real esmtp exit code
Summary: esmtp-wrapper masks the real esmtp exit code
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: esmtp
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL: https://bugzilla.cendio.com/show_bug....
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-09-09 11:34 UTC by madni
Modified: 2026-09-09 11:37 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.