Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

SMTP Multiple Recipients?

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


marc at perkel

Apr 20, 2011, 4:09 PM

Post #1 of 10 (1692 views)
Permalink
SMTP Multiple Recipients?

Trying to understand the smtp protocol with multiple recipients. From
what I understand the recipients are specified as follows:

rcpt to:person1 [at] domain
250 Accepted
rcpt to:person2 [at] domain
250 Accepted
rcpt to:person2 [at] domain
250 Accepted

Suppose I'm doing forward callouts to verify recipients. And suppose
person2 [at] domain is a bad email address. How should the server respond
to say that there is one bad address but 2 are ok?

Thanks in advance.






--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


marc at perkel

Apr 20, 2011, 4:23 PM

Post #2 of 10 (1636 views)
Permalink
Re: SMTP Multiple Recipients? - corrected [In reply to]

Trying to understand the smtp protocol with multiple recipients. From
what I understand the recipients are specified as follows:

rcpt to:person1 [at] domain
250 Accepted
rcpt to:person2 [at] domain
250 Accepted
rcpt to:person3 [at] domain
250 Accepted

Suppose I'm doing forward callouts to verify recipients. And suppose
person2 [at] domain is a bad email address. How should the server respond
to say that there is one bad address but 2 are ok?

What I'm trying to do is pass the email for the good recipients and
reject the email for the bad recipients at SMTP time.

Thanks in advance.



--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


wbh at conducive

Apr 20, 2011, 5:07 PM

Post #3 of 10 (1637 views)
Permalink
Re: SMTP Multiple Recipients? - corrected [In reply to]

Marc Perkel wrote:
> Trying to understand the smtp protocol with multiple recipients. From
> what I understand the recipients are specified as follows:
>
> rcpt to:person1 [at] domain
> 250 Accepted
> rcpt to:person2 [at] domain
> 250 Accepted
> rcpt to:person3 [at] domain
> 250 Accepted
>
> Suppose I'm doing forward callouts to verify recipients. And suppose
> person2 [at] domain is a bad email address. How should the server respond
> to say that there is one bad address but 2 are ok?
>
> What I'm trying to do is pass the email for the good recipients and
> reject the email for the bad recipients at SMTP time.
>
> Thanks in advance.
>
>
>

Marc,

...... ???

- just as an acceptance code is returned for each accepted recipient,
so, too a rejection code is returned for each one that is unwanted.

- as with any other rejection, it may be temporary or permanent.

Either way... at final rejection ELSE retry timeout, submitting MTA
generates a DSN to the sender so advising. Well 'real' MTA do. Dunno
about the 'bots. Or care.

HTH,

Bill

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


tlyons at ivenue

Apr 20, 2011, 5:40 PM

Post #4 of 10 (1642 views)
Permalink
Re: SMTP Multiple Recipients? [In reply to]

On Wed, Apr 20, 2011 at 4:09 PM, Marc Perkel <marc [at] perkel> wrote:
> Trying to understand the smtp protocol with multiple recipients. From what I
> understand the recipients are specified as follows:
>
> rcpt to:person1 [at] domain
> 250 Accepted
> rcpt to:person2 [at] domain
> 250 Accepted
> rcpt to:person2 [at] domain
> 250 Accepted
>
> Suppose I'm doing forward callouts to verify recipients. And suppose
> person2 [at] domain is a bad email address. How should the server respond to
> say that there is one bad address but 2 are ok?

[todd [at] todd-Latitude-D62 ~]$ telnet mail.mrball.net 25
Trying 208.89.139.252...
Connected to mail.mrball.net.
Escape character is '^]'.
220 mail.mrball.net ESMTP Sendmail 8.13.8/8.13.8; Wed, 20 Apr 2011
17:40:44 -0700
ehlo localhost
250-mail.mrball.net Hello 166-205-137-022.mobile.mymmode.com
[166.205.137.22] (may be forged), pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
mail from: <tlyons [at] ivenue>
250 2.1.0 <tlyons [at] ivenue>... Sender ok
rcpt to: <todd [at] mrball>
250 2.1.5 <todd [at] mrball>... Recipient ok
rcpt to: <stupidhead [at] mrball>
550 5.1.1 <stupidhead [at] mrball>... User unknown
rcpt to: <cannonball [at] mrball>
250 2.1.5 <cannonball [at] mrball>... Recipient ok
quit
221 2.0.0 mail.mrball.net closing connection
Connection closed by foreign host.


--
Regards...      Todd
"It is the nature of the human species to reject what is true but
unpleasant and to embrace what is obviously false but comforting."
"You might be a skeptic if you have pedantically argued the topic of pedantry."

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


marc at perkel

Apr 20, 2011, 5:49 PM

Post #5 of 10 (1634 views)
Permalink
Re: SMTP Multiple Recipients? - corrected [In reply to]

On 4/20/2011 5:07 PM, W B Hacker wrote:
> Marc Perkel wrote:
>> Trying to understand the smtp protocol with multiple recipients. From
>> what I understand the recipients are specified as follows:
>>
>> rcpt to:person1 [at] domain
>> 250 Accepted
>> rcpt to:person2 [at] domain
>> 250 Accepted
>> rcpt to:person3 [at] domain
>> 250 Accepted
>>
>> Suppose I'm doing forward callouts to verify recipients. And suppose
>> person2 [at] domain is a bad email address. How should the server respond
>> to say that there is one bad address but 2 are ok?
>>
>> What I'm trying to do is pass the email for the good recipients and
>> reject the email for the bad recipients at SMTP time.
>>
>> Thanks in advance.
>>
>>
>>
>
> Marc,
>
> ...... ???
>
> - just as an acceptance code is returned for each accepted recipient,
> so, too a rejection code is returned for each one that is unwanted.
>
> - as with any other rejection, it may be temporary or permanent.
>
> Either way... at final rejection ELSE retry timeout, submitting MTA
> generates a DSN to the sender so advising. Well 'real' MTA do. Dunno
> about the 'bots. Or care.
>
> HTH,
>
> Bill
>

What I'm finding is that if I issue a DENY then every one after that is
also denied. Unless I'm doing something else wrong.


--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


marc at perkel

Apr 20, 2011, 6:41 PM

Post #6 of 10 (1627 views)
Permalink
Re: SMTP Multiple Recipients? - corrected [In reply to]

On 4/20/2011 5:07 PM, W B Hacker wrote:
> Marc Perkel wrote:
>> Trying to understand the smtp protocol with multiple recipients. From
>> what I understand the recipients are specified as follows:
>>
>> rcpt to:person1 [at] domain
>> 250 Accepted
>> rcpt to:person2 [at] domain
>> 250 Accepted
>> rcpt to:person3 [at] domain
>> 250 Accepted
>>
>> Suppose I'm doing forward callouts to verify recipients. And suppose
>> person2 [at] domain is a bad email address. How should the server respond
>> to say that there is one bad address but 2 are ok?
>>
>> What I'm trying to do is pass the email for the good recipients and
>> reject the email for the bad recipients at SMTP time.
>>
>> Thanks in advance.
>>
>>
>>
>
> Marc,
>
> ...... ???
>
> - just as an acceptance code is returned for each accepted recipient,
> so, too a rejection code is returned for each one that is unwanted.
>
> - as with any other rejection, it may be temporary or permanent.
>
> Either way... at final rejection ELSE retry timeout, submitting MTA
> generates a DSN to the sender so advising. Well 'real' MTA do. Dunno
> about the 'bots. Or care.
>
> HTH,
>
> Bill

Weird - now everything seems to be working. Like it was haunted and the
ghost went away ......

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


exim at esmtp

Apr 20, 2011, 6:41 PM

Post #7 of 10 (1631 views)
Permalink
Re: SMTP Multiple Recipients? [In reply to]

On Wed, Apr 20, 2011, Todd Lyons wrote:
> On Wed, Apr 20, 2011 at 4:09 PM, Marc Perkel <marc [at] perkel> wrote:

> > rcpt to:person1 [at] domain
syntax error.

> mail from: <tlyons [at] ivenue>
syntax error.
> rcpt to: <todd [at] mrball>
syntax error.

RFC 5321:

3.3. Mail Transactions
....
MAIL FROM:<reverse-path>
....
RCPT TO:<forward-path>
....
Since it has been a common source of errors, it is worth noting that
spaces are not permitted on either side of the colon following FROM
in the MAIL command or TO in the RCPT command. The syntax is exactly
as given above.


--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


tlyons at ivenue

Apr 21, 2011, 5:54 AM

Post #8 of 10 (1616 views)
Permalink
Re: SMTP Multiple Recipients? [In reply to]

Hello Claus!

On Wed, Apr 20, 2011 at 6:41 PM, Claus Assmann <exim [at] esmtp> wrote:
>
>> > rcpt to:person1 [at] domain
> syntax error.

I knew about this one because it didn't have the <> around it.

>> mail from: <tlyons [at] ivenue>
> syntax error.
> RFC 5321:
> 3.3. Mail Transactions
> MAIL FROM:<reverse-path>
> RCPT TO:<forward-path>
> Since it has been a common source of errors, it is worth noting that
> spaces are not permitted on either side of the colon following FROM
> in the MAIL command or TO in the RCPT command. The syntax is exactly
> as given above.

Thanks for that correction! I thought I was intimately familiar with
5321 and 5322, but I had overlooked that space requirement.

I guess it would be worth mentioning that all versions of
sendmail (sendmail 8.13.8 on stock CentOS 5.x boxen and
sendmail.8.14.4 rpms that I build) accept it with that space. The
above test was to "220 mail.mrball.net ESMTP Sendmail 8.13.8/8.13.8;"
so while the RFC specifies it, sendmail and exim both chomp the spaces
out and accept it. I assume that's the "be strict in what you emit
and liberal in what you accept" mindset in action.

Have a great day!

--
Regards... Todd
"It is the nature of the human species to reject what is true but
unpleasant and to embrace what is obviously false but comforting."
"You might be a skeptic if you have pedantically argued the topic of pedantry."

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


graeme at graemef

Apr 21, 2011, 6:26 AM

Post #9 of 10 (1621 views)
Permalink
Re: SMTP Multiple Recipients? [In reply to]

On Thu, 2011-04-21 at 05:54 -0700, Todd Lyons wrote:
> Thanks for that correction! I thought I was intimately familiar with
> 5321 and 5322, but I had overlooked that space requirement.

We've had that in the RCPT ACL in our config for some time, like this:

warn condition = ${if eq{$h_--CUSTOM_HEADER--:}{}}
condition = ${if !match{$smtp_command}\
{\N^(?i)rcpt to:<[^ >]+>$\N}\
}
message = --CUSTOM_HEADER--: $smtp_command
log_message = --CUSTOM_HEADER--: $smtp_command

Obviously --CUSTOM_HEADER-- isn't really what's in the config.

When the message is passed to SpamAssassin, we score on the existence of
that header so it adds to the likelihood of being marked as spam.

We've dealt with a few instances - mainly, so far as I recall, Java MTA
code - which have either ended up being whitelisted or have actually
changed their code to be syntactically correct.

Graeme


--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


tlyons at ivenue

Apr 21, 2011, 8:33 AM

Post #10 of 10 (1617 views)
Permalink
Re: SMTP Multiple Recipients? [In reply to]

On Thu, Apr 21, 2011 at 6:26 AM, Graeme Fowler <graeme [at] graemef> wrote:
>
> We've had that in the RCPT ACL in our config for some time, like this:
>
>    warn condition   = ${if eq{$h_--CUSTOM_HEADER--:}{}}
>         condition   = ${if !match{$smtp_command}\
>                                  {\N^(?i)rcpt to:<[^ >]+>$\N}\
>                        }
>         message     = --CUSTOM_HEADER--: $smtp_command
>         log_message = --CUSTOM_HEADER--: $smtp_command
>
> Obviously --CUSTOM_HEADER-- isn't really what's in the config.

I had to look it up in the spec because I wasn't sure what it was
doing (doesn't obviously add a header) and found this:

"For compatibility with previous versions of Exim, a message modifier
for a warn verb acts in the same way as add_header, ... This usage of
message is now deprecated."

I'm now adding almost the same thing as you have though I'm explicitly
using "add_header" instead of relying on the deprecated function of
"message".

Interesting. One of the things that I'm seeing in my initial testing
is at least one customer that is using smtp auth is tripping this as
well. I will put a query out to see what MUA they are using, and at
the same time, make sure their machine is not bot'ed.

This is turning out to be an informative thread for me :-) Thanks
Graeme and Claus!

--
Regards...      Todd
"It is the nature of the human species to reject what is true but
unpleasant and to embrace what is obviously false but comforting."
"You might be a skeptic if you have pedantically argued the topic of pedantry."

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.