Project

General

Profile

Actions

Bug #2241

closed

Let Net::SMTP continu when at least one RCPT is accepted

Added by keroami (Kero van Gelder) about 15 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
1.8 as well as 1.9
Backport:
[ruby-core:26190]

Description

=begin
(sorry for the delay in filing on redmine I had some
problems with creating the account; as said, I'm messing
with SMTP daemons ;) )

Ruby's Net::SMTP quits when the first Unknown User is
encountered. I think Net::SMTP should continue with
other RCPTs, then use DATA to let the mail be delivered
to existing users.

I think this should be so, because

  • RFC821 mentions clearly in the second paragraph in section 2
    "if not, it responds with a reply rejecting that recipient
    (but not the whole mail transaction)", and
  • RFC2821 leaves this in the middle, but still gives
    an example in section D.1 A Typical SMTP Transaction Scenario
    "C: RCPT TO:
    S: 250 OK
    C: RCPT TO:
    S: 550 No such user here
    C: RCPT TO:
    S: 250 OK"

So, I wrote code to accomplish this.
Please find a patch attached.

Comments welcome, especially on the Errors constructed and returned.
They are in plain text; I can imagine making the unknown and ok
users explicit (arrays within the exception), so that code that uses
Net::SMTP has an easier time determining which emails were not sent.

Bye,
Kero.

PS: patch applies to both ruby_1_8 branch and trunk
=end


Files

smtp_rcptto.patch (3.24 KB) smtp_rcptto.patch the proposed patch, comments welcome keroami (Kero van Gelder), 10/21/2009 07:33 AM
Actions #1

Updated by nobu (Nobuyoshi Nakada) over 14 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r27374.
Kero, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions #2

Updated by dmarkow (Dylan Markow) over 14 years ago

=begin
There is a typo in this -- line 842 of lib/net/smtp.rb should reference "ok_users" not "ok_addrs"
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0