#1138 SMTP: Superfluous SIZE parameter in MAIL FROM

closed-fixed
libcurl (356)
5
2014-08-21
2012-09-02
No

Problem:

SMTP client should send SIZE parameter in MAIL FROM command

Version: latest git (ca84361e4b0d6b0f45a9a874d376cb598bc6803d)

Discussion

  • František Kučera

    Problem: SMTP client always sends SIZE (rfc1870) parameter in MAIL FROM command. If server does not support this param, it can say: "504 Command parameter not implemented" and reject the message (or send 555 – rfc1869).

    Solution: So we should send SIZE param only if server advertises its support by "250-SIZE" in response to EHLO. This is done by attached patch.

     
  • Daniel Stenberg

    Daniel Stenberg - 2012-09-02

    Thanks for the report and the patch.

    First, an EHLO gets a 230 by the ftpserver.pl test server, which seems like a flaw. It should be 250. Right?

    Your patch makes test 1406 break since it assumes a SIZE but the test server doesn't signal support for it the way you've just added detection for. Can you check and see if you can make 1406 work, and possibly add a test that runs without SIZE?

     
  • František Kučera

    Yes, the respons should be 250 as defined in RFC 5321 (and also common mail servers like Postfix and Sendmail send 250 code).

    I will check the test tomorrow...

     
  • Daniel Stenberg

    Daniel Stenberg - 2012-09-04

    I just pushed a fix to ftpserver.pl that now makes test 1406 run fine even with your patch applied!

     
  • Daniel Stenberg

    Daniel Stenberg - 2012-09-04

    Ok, I also added a test 1411 that now verifies the action without advertised SIZE support in the server and it works fine. I've pushed your patch and my changes as well now. Case closed. Thanks again!

     
  • Daniel Stenberg

    Daniel Stenberg - 2012-09-04
    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks