Bug 197264 - esmtp compatible with 'mail'?
esmtp compatible with 'mail'?
Product: Fedora
Classification: Fedora
Component: esmtp (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Patrice Dumas
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2006-06-29 14:48 EDT by Neal Becker
Modified: 2008-05-06 12:04 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-06 12:04:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Neal Becker 2006-06-29 14:48:30 EDT
Description of problem:
Is esmtp compatible with 'mail' command?  Doesn't seem to work.

Version-Release number of selected component (if applicable):

How reproducible:

every time.

Steps to Reproduce:
1. Calling esmtp directly works
2. Setting esmtp as MTA, and using 'mail', nothing delivered
No messages indicating any reason or any problem.
3. I'm  using starttls, if that matters
Actual results:

Expected results:

Additional info:
Comment 1 Patrice Dumas 2006-06-29 17:19:56 EDT
I have tested that it works for me. I don't use starttls.

Have you checked that it is really used as an alternative, namely
that /usr/sbin/sendmail points to /usr/bin/esmtp? If it is the case
I can't see what's wrong. You may also want to give -d to mailx
such that it shows how argv for the execv is constructed, you could
then be able to run 'sendmail' by hand with the same options. 

Here I get
$ echo test | mail -d pertusus@free.fr
user = dumas, homedir = /home/dumas
Sendmail arguments: "send-mail" "-i" "pertusus@free.fr"

So it just calls
/usr/sbin/sendmail -i pertusus@free.fr

and esmtp ignores -i.
Comment 2 Patrice Dumas 2006-09-27 09:24:56 EDT
Can I close that bug?
Comment 3 Neal Becker 2006-09-27 09:32:41 EDT
echo test | mail -d nbecker@hns.com
user = nbecker, homedir = /home/nbecker
Sendmail arguments: "send-mail" "-i" "nbecker@hns.com"
[nbecker@nbecker ~]$ echo 'test' | /usr/sbin/sendmail -i nbecker@hns.com
0 (null)
nbecker@hns.com: 0 (null)

But no mail got sent.  How can I debug this?
Comment 4 Patrice Dumas 2006-09-27 09:53:37 EDT
Could you also please paste the output of
ls -l /usr/sbin/sendmail /etc/alternatives/mta

To debug further, you can post

echo 'test' | /usr/bin/esmtp -v nbecker at hns.com

(beware that the mail adresses are available for spammers
in buzilla comments, I personnaly don't care, but you could).
Comment 5 Patrice Dumas 2006-09-27 10:04:01 EDT
Well, a better looking mail may be sent with

echo -e 'To:nbecker at hns.com\n\ntest' | /usr/bin/esmtp -v nbecker at hns.com

with  at  replaced by an arobase.
Comment 6 Patrice Dumas 2006-09-27 10:17:15 EDT
(In reply to comment #5)
> Well, a better looking mail may be sent with
> echo -e 'To:nbecker at hns.com\n\ntest' | /usr/bin/esmtp -v nbecker at hns.com

And you can even add a From, if needed:

echo -e 'From:somebody@somwhere.com\nTo:nbecker at hns.com\n\ntest' |
/usr/bin/esmtp -v nbecker at hns.com

Comment 7 Neal Becker 2006-09-27 10:32:00 EDT
echo -e 'To:nbecker at hns.com\n\ntest2' | /usr/bin/esmtp -v nbecker@hns.com
Connected to MTA
StartTLS OK (168 bits)
Disconnected to MTA
0 (null)
nbecker@hns.com: 0 (null)

But no mail got delivered.
Comment 8 Patrice Dumas 2006-09-27 11:13:08 EDT
It seems to me that nothing is sent after the StartTLS session 

I have seen another interesting option, with -X esmtp.log the
conversation between esmtp and the server is logged to esmtp.log.
So you could try:

echo -e 'To:nbecker at hns.com\n\ntest3' | /usr/bin/esmtp -v -X esmtp.log

And attach or paste esmtp.log.

As a side note, when in verbose mode, and without startTLS, I get:

Connected to MTA
From (null): 250 Ok
To pertusus@free.fr: 250 Ok
Message data: .
Message sent: 250 Ok: queued as 6398A275D9
Disconnected to MTA
Comment 9 Neal Becker 2006-09-27 11:17:14 EDT
cat esmtp.log
S: 220 mx.gmail.com ESMTP 27sm916026wrl
C: EHLO nbecker
S: 250-mx.gmail.com at your service, []
250-SIZE 20971520
S: 220 2.0.0 Ready to start TLS
C: EHLO nbecker
S: 250-mx.gmail.com at your service, []
250-SIZE 20971520
S: 334 UGFzc3dvcmQ6
C: c2xlZXp5
S: 235 2.7.0 Accepted
Comment 10 Patrice Dumas 2006-09-27 11:55:40 EDT
In the README there is a section about 'Using the StartTLS extension',
maybe you could have a look at it. It says something relevant, that is
when things go wrong you don't get specific error messages, and 
has informations about certificates and pointers.

Maybe you have an error in your certificate setups?

In any case this seems to be a libesmtp issue, I will reassign
to libesmtp if the issue is confirmed. 
Comment 11 Patrice Dumas 2006-10-20 18:08:47 EDT
Did you verify your certificates and do you still have that
Comment 12 Patrice Dumas 2008-01-25 18:21:20 EST
Is it still an issue?
Comment 13 Bug Zapper 2008-04-03 23:11:36 EDT
Fedora apologizes that these issues have not been resolved yet. We're
sorry it's taken so long for your bug to be properly triaged and acted
on. We appreciate the time you took to report this issue and want to
make sure no important bugs slip through the cracks.

If you're currently running a version of Fedora Core between 1 and 6,
please note that Fedora no longer maintains these releases. We strongly
encourage you to upgrade to a current Fedora release. In order to
refocus our efforts as a project we are flagging all of the open bugs
for releases which are no longer maintained and closing them.

If this bug is still open against Fedora Core 1 through 6, thirty days
from now, it will be closed 'WONTFIX'. If you can reporduce this bug in
the latest Fedora version, please change to the respective version. If
you are unable to do this, please add a comment to this bug requesting
the change.

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we are following is outlined here:

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

And if you'd like to join the bug triage team to help make things
better, check out http://fedoraproject.org/wiki/BugZappers
Comment 14 Bug Zapper 2008-05-06 12:03:59 EDT
This bug is open for a Fedora version that is no longer maintained and
will not be fixed by Fedora. Therefore we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen thus bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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