Bug 1502108 - Curl uses VRFY even when he server does not support it.
Summary: Curl uses VRFY even when he server does not support it.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: curl
Version: 26
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-14 09:52 UTC by Todd
Modified: 2017-10-16 10:22 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-16 08:06:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Todd 2017-10-14 09:52:06 UTC
Dear Fedora Developers,

doesn't work: Fedora 26: curl-7.53.1-7.fc26.x8664
works: Scientific Linux 7.4: curl-7.29.0-42.el7.x8664

I am trying to send eMail through curl on fc26. I am getting:

< 502 mx.zohomail.com VRFY not implemented
* Command failed: 502
> QUIT

curl is issuing the VRFY command even when the server does not support it.

My command line does work on old-out-of-date (Scientific Linux 7.4) where curl is so out-of-date that it has not yet implemented VRFY (Added in 7.34.0).

My full command line(s):
$ cat mail.txt | curl smtp://smtp.zoho.com:587 -vvv --mail-from "xxxxx" --mail-rcpt  "yyyy" --ssl -u xxxxx:redacted -k --anyauth

$ cat mail.txt | curl smtps://smtp.zoho.com:465 -vvv --mail-from "xxxxx" --mail-rcpt  "yyyy" --ssl -u xxxxx:redacted -k --anyauth


$cat mail.txt
From: "xxxxx>
To: "yyyyy>
Subject: This is a test

Hi yyyyy,
I'm sending this mail with curl thru my zoho account.
xxxxx

Comment 1 Todd 2017-10-14 11:19:05 UTC
Work around:

"-T -" picked up the pipe perfectly.

This may just be a revision change issue and not an actual bug.

Comment 2 Kamil Dudka 2017-10-16 08:06:05 UTC
(In reply to Todd from comment #0)
> curl is issuing the VRFY command even when the server does not support it.

You can use the -X option of curl to specify a custom SMTP command to be used instead of VRFY.  See the curl(1) man page.

Comment 3 Todd 2017-10-16 10:02:33 UTC
(In reply to Kamil Dudka from comment #2)
> (In reply to Todd from comment #0)
> > curl is issuing the VRFY command even when the server does not support it.
> 
> You can use the -X option of curl to specify a custom SMTP command to be
> used instead of VRFY.  See the curl(1) man page.


Indeed the man page does.  I did find that, but it did not give directions on how to use it.  Google did not produce anything either.


The "-T -" fixed the problem.  Maybe that should have been mentioned in the -X section of the man page?  Something like, 

      "When invoked with `-T -`, curl will not use VRFY.  See -T for details."

Just thinking.

Comment 4 Kamil Dudka 2017-10-16 10:22:35 UTC
You can find a pretty good tutorial in the Everything curl book:

https://ec.haxx.se/usingcurl-smtp.html

On the other hand, the man page is meant to be concise, so it cannot cover all combination of all options.  In general, curl never (if I remember correctly, TELNET is the only exception) uploads data unless you ask for that by some option.  This behavior is not really specific to SMTP.

Anyway, feel free to continue the discussion on the upstream mailing list where you already started a thread:

https://curl.haxx.se/mail/archive-2017-10/0009.html


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