Mailing List Archive

Rejecting spam from <>: SES, message-id caches and cookies (long)
I've been thinking a fair bit over the past few months about the
correct way to deal with unwanted mail from the <> address, be it spam
explicitly sent from that address, or bounces from joe jobs.

There are two main approaches to this that I've seen discussed, and
I've seen references to both solutions being deployed (though how
wisespread they are is difficult to determine).

The first is to use a timespamed, cryptographically signed envelope
sender, as is proposed in SES. In fact, I currently do something
similar using TMDA's dated address feature.

The second approach is to record the message-ids of all messages that
you emit, and then scan incoming mail from the <> address for a
message-id you recognise.

I'm also going to propose a third class of solution for discussion:
place a cryptographically signed cookie in an extension header.

With the first approach (signed envelope sender), there are a couple
of points to note with regard to how it interacts with other anti-spam
technology already in widespread use.

The first issue is Sender Address Verification (SAV). A number of
MTAs have the option to verify all envelope senders, by issueing the
following sequence of commands to the primary MX associated with the
sender's domain.

MAIL FROM:<>
RCPT TO:<address-to-test>
RSET

The idea is to test whether the originating domain thinks the address
is a valid address. If the RCPT TO command gives a hard error, then
an MTA using SAV will return a hard error for the transaction, too.

Therefore, as Shevek notes, any SES scheme needs to postpone rejecting
the SMTP transaction until after the DATA command. Rejecting unsigned
addresses at the RCPT TO command will cause MTAs that use SAV to fail
to validate your address, and hence reject mail from you.

Since SAV is a standard feature of the latest versions of a number of
popular MTAs (including exim and postfix), it's reasonable to expect
it to be widely deployed, so any SES scheme needs to play nice with
it.

The second potential problem with SES and similar schemes is how they
interact with challenge/response systems, such as TMDA.
Challenge/response systems send a message to the sender (typically the
envelope sender) the first time they receive a message from that
sender -- this is the challenge. The sender is required to respond to
the challenge in some way (typically by replying to it or by clicking
on a URL containing in the challenge) in order to verify that they
really received the challenge. Some systems incorporate a CAPTCHA
into the challenge to verify that the sender is human, too. Once the
sender has successfully responded, they are whitelisted, and won't
have to go through this process again.

With an SES-like scheme, every message will come from a new, unknown
envelope sender, and hence will trigger a challenge and require a
response before the message can be delivered.

TMDA has a solution to this; since it implements both
challenge/response and signed envelope senders, it has to. The
solution is that any messsage using a signed sender should also
contain an X-Primary-Address header, containing the primary (unsigned)
address of the sender. Provided the value of the header matches a
rudimentory sanity check (the domain matches that in the envelope
sender) this address is whitelisted, rather than the envelope sender
address. Subsequent whitelist checks test both the envelope sender
and the X-Primary-Address header, and let the message through if
either matches.

I would therefore suggest that any SES scheme should add an
X-Primary-Address header, since if nothing else this will ensure it
plays nice with TMDA.

An alternative solution would be for challenge/response systems to try
to parse the signed envelope sender and guess the underlying real
sender, but the problem with that is that there are probably too many
different encoding schemes in use (eg TMDAs dated addresses are
completely unlike SRS addresses). Perhaps a challenge/response system
could fall back to this if there are known widely deployed SES systems
that don't add a X-Primary-Address header.

The third (related) problem with SES and similar schemes is that it
interacts badly with greylisting.

Greylisting is a technique where mail from a new, unrecognised
envelope sender is delayed for a while (typically a couple of hours)
by returning a 4xx code from the SMTP transaction. The idea is
generally to see whether the originating IP address identifies itself
as a spammer during this period (eg by hitting a spam trap) in which
case the IP address will be blacklisted and subsequent delivery
attempts will be rejected with a 5xx code. If nothing untoward
happens during the holding period, then the envelope sender address is
whitelisted, and subsequent delivery attempts from this envelope
sender will succeed without delay.

The problem with an SES sender talking to a greylisting receiver is
that _every_ message will be delayed for a couple of hours, since it
will always be from a new, unknown sender address that hasn't been
whitelisted.

The problem here is much the same as for challenge/response, and the
potential solutions would appear to be the same: either whitelist the
address indicated in the X-Primary-Address header, or attempt to
intuit the correct address yourself by parsing the signed sender
address. There's an added wrinkle, though, with using
X-Primary-Address. The greylisting system can no longer reject with
4xx after RCPT TO; it needs to see the entire message in order to
check whether the address in the X-Primary-Address header has been
whitelisted, so will have to reject after the DATA phase.

Message-ID systems are immune to these problems since they don't
involve modifying the envelope sender. All bounce messages should
contain the full headers of the original message, so they should be
reliable. Because Message-ID systems tend to play nicer with other
anti-spam technologies, I'm inclined to favour them over SES schemes.
However, although they're ideal for implementing in an MUA, they cause
scalability problems if you want to implement them in a large MTA
cluster: each MTA needs access to the complete list of message-ids of
all messages sent by all MTAs in the cluster, in order to be able to
validate bounces.

As an aside, there's a subcategory of message-id schemes which use a
cryptographically-signed message ID, rather than maintaining a list of
all message-ids. Unfortunately this is only implementable in an MUA,
since by the time an MTA receives the message it might already have a
message-id, preventing the MTA from making its own choice here.

So I'd like to propose a third class of solution to this problem: the
cryptographically signed cookie (CSC).

The idea is that you add an additional header (X-CSC-Cookie, say) to
all outgoing mail. For sake of argument, this could contain a
timestamp, and a keyed hash of the timestamp and message-id of the
message. When you receive a bounce, you just need to extract the
Message-ID and X-CSC-Cookie fields to validate it. This avoids the
problems of SES, and is completely scalable in large MTA clusters,
since the MTA only needs to know the key in order to perform
verification.

There is another problem which all these solutions face, which is
worth analysing, and that is how they handle automatically generated
messages that are _not_ bounces, eg vacation messages, challenges from
challenge/response systems, etc.

I'll dismiss the challenge/response case very quickly by observing
that all challenges sent by a default TMDA install are syntactically
identical to bounces. They are sent from the <> address to the
envelope sender of the original message, and include the full headers
of the original message. So any of the above schemes (and indeed any
other scheme that correctly handles bounce messages) will necesarily
do the right thing for TMDA challenges, too. Of course, this may not
be true of other challenge/response systems.

So, what happens when an autoresponder sends a message from the <>
sender address?

Well, if the autoresponder sends a message to the envelope sender,
then SES is fine. If it sends it to some other address (header
sender, address already on file) then SES will lose.

Message-ID schemes will work either if the message includes full
headers (typically not the case in vacation messages) or if it quotes
the Message-ID in an In-Reply-To or References header.

The Cookie scheme fairs somewhat worse than the Message-ID scheme,
here though, since it needs the full headers of the message.

And of course, if the autogenerated message was some kind of
notification what was not generated in response to a message, all the
above schemes lose.

Just some random thoughts,

-roy


-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=srs-discuss@v2.listbox.com
Re: Rejecting spam from <>: SES, message-id caches and cookies (long) [ In reply to ]
On Sat, 2004-02-28 at 14:51 +0000, Roy Badami wrote:
> The second approach is to record the message-ids of all messages that
> you emit, and then scan incoming mail from the <> address for a
> message-id you recognise.
>
> I'm also going to propose a third class of solution for discussion:
> place a cryptographically signed cookie in an extension header.

The problem is that these work _only_ if you get the headers of the
original message back, which is often not the case. That's why I haven't
seriously considered the idea.

What do you do when you receive a bounce which doesn't contain one of
your cookies? Assume it wasn't really in response to one of your mails?
You'll often be wrong if you do that, I think. But either you assume
that and drop real bounces, or you _don't_ assume it and you haven't
actually achieved anything.

Does anyone have actual figures for the percentage of bounces which
contain headers? I have a feeling Exchange doesn't give sane bounces,
which will unfortunately skew the figures to be somewhat low.

> The first issue is Sender Address Verification (SAV). A number of
> MTAs have the option to verify all envelope senders, by issueing the
> following sequence of commands to the primary MX associated with the
> sender's domain.
>
> MAIL FROM:<>
> RCPT TO:<address-to-test>
> RSET
>
> The idea is to test whether the originating domain thinks the address
> is a valid address. If the RCPT TO command gives a hard error, then
> an MTA using SAV will return a hard error for the transaction, too.

Yes. They do this upon receipt of a mail claiming to be _from_ said
'address-to-test'. In the case that you're implementing SES, there is
never any MAIL FROM: your 'raw' address. So any such callout is
obviously in response to an attempted joe-job. Therefore, the correct
behaviour is to reject the callout, causing the intended recipient of
the joe-job to reject that too.

> Therefore, as Shevek notes, any SES scheme needs to postpone rejecting
> the SMTP transaction until after the DATA command.

That's a very broken solution to a non-problem and demonstrates a lack
of clarity about how SMTP works. By the time you get to the DATA command
you may have multiple recipients. It makes the implementation a _lot_
harder, and you end up having to issue temporary rejections to
subsequent RCPT TO if the response to DATA would be different...
Seriously, don't go there.

> Since SAV is a standard feature of the latest versions of a number of
> popular MTAs (including exim and postfix), it's reasonable to expect
> it to be widely deployed, so any SES scheme needs to play nice with
> it.

Yes. The point to note, which you won't necessarily get right in the
first implementation, is _not_ the one above. It's that some people do
sender verification callouts _not_ with MAIL FROM:<>, but with
postmaster@<their domain> as the MAIL FROM: address. Therefore, your SES
addresses must at least appear to accept mail from 'postmaster@.*'. In
fact, there's no harm in _actually_ accepting mail from postmaster, so
still no need to go down the painful route of rejecting at DATA time.

See my mail to the SPF list yesterday, discussing precisely this.

> The second potential problem with SES and similar schemes is how they
> interact with challenge/response systems, such as TMDA.
<...>
> I would therefore suggest that any SES scheme should add an
> X-Primary-Address header, since if nothing else this will ensure it
> plays nice with TMDA.

Seems like a reasonable answer, although I don't quite understand why
it's not sufficient to have the address in question in the From: header.

I'm not familiar with TMDA, and what little I know leads me to suspect
it's an abomination worse than the problem it tries to solve.

> The third (related) problem with SES and similar schemes is that it
> interacts badly with greylisting.
<...>
> The problem with an SES sender talking to a greylisting receiver is
> that _every_ message will be delayed for a couple of hours, since it
> will always be from a new, unknown sender address that hasn't been
> whitelisted.

Seems strange to whitelist a single sender address when it retries,
rather than whitelisting the host it came from.

> The problem here is much the same as for challenge/response, and the
> potential solutions would appear to be the same: either whitelist the
> address indicated in the X-Primary-Address header, or attempt to
> intuit the correct address yourself by parsing the signed sender
> address. There's an added wrinkle, though, with using
> X-Primary-Address. The greylisting system can no longer reject with
> 4xx after RCPT TO; it needs to see the entire message in order to
> check whether the address in the X-Primary-Address header has been
> whitelisted, so will have to reject after the DATA phase.

Rejecting after DATA is _hard_. Well, not really -- but implemented
naïvely it's generally going to be done wrong.

> So I'd like to propose a third class of solution to this problem: the
> cryptographically signed cookie (CSC).
>
> The idea is that you add an additional header (X-CSC-Cookie, say) to
> all outgoing mail. For sake of argument, this could contain a
> timestamp, and a keyed hash of the timestamp and message-id of the
> message. When you receive a bounce, you just need to extract the
> Message-ID and X-CSC-Cookie fields to validate it. This avoids the
> problems of SES, and is completely scalable in large MTA clusters,
> since the MTA only needs to know the key in order to perform
> verification.

I like this kind of idea for signing message content, and have mentioned
it elsewhere. All of the people mentioned in the From:, Sender:,
Resent-From: addresses can independently sign the mail, for example. But
for checking the reverse-path I'm still hung up on the idea that we just
can't rely on getting the headers back.

The other problem is that you don't get to reject the sender
verification callbacks, so you don't help to protect other people from
mail _claiming_ to be from you. You're just trying to hide from the
fallout.

> There is another problem which all these solutions face, which is
> worth analysing, and that is how they handle automatically generated
> messages that are _not_ bounces, eg vacation messages, challenges from
> challenge/response systems, etc.

Again, this was discussed in my mail to the SPF list yesterday.

> So, what happens when an autoresponder sends a message from the <>
> sender address?
>
> Well, if the autoresponder sends a message to the envelope sender,
> then SES is fine. If it sends it to some other address (header
> sender, address already on file) then SES will lose.

According to RFC2821 this SHOULD NOT happen. Admittedly it _does_
happen, but I suspect there are many who are willing to make the policy
decision that this is an acceptable loss.

Note that there's a correlation between those broken autoresponders
which reply to an address other than the reverse-path, and those even
more broken autoresponders which use a non-empty reverse-path in their
own reply. And an autoresponder guilty of _both_ sins will actually
manage to get its mail through the net.

--
dwmw2


-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=srs-discuss@v2.listbox.com
Re: Rejecting spam from <>: SES, message-id cachesand cookies (long) [ In reply to ]
----- Original Message -----
From: "David Woodhouse" <dwmw2@infradead.org>
To: <srs-discuss@v2.listbox.com>
Sent: Saturday, February 28, 2004 8:22 PM
Subject: Re: [srs-discuss] Rejecting spam from <>: SES, message-id cachesand
cookies (long)

> > Therefore, as Shevek notes, any SES scheme needs to postpone rejecting
> > the SMTP transaction until after the DATA command.

I believe it was I who noted this.

> That's a very broken solution to a non-problem and demonstrates a lack
> of clarity about how SMTP works. By the time you get to the DATA command
> you may have multiple recipients.

No. If you receive MAIL FROM: <>, there can only ever be ONE single
recipient; that demonstrates my clarity on how SMTP works. ;) Should there
be multiple recipients, then you have an invalid DSN -- which is grounds to
reject all by itself.

Therefore, the very tripartite condition of having,

a) An empty envelope-from,
b) AND a DATA phase,
c) AND a cryptographically unsigned recipient,

Is itself enough to REJECT the message as a forged bounce.

> It makes the implementation a _lot_
> harder,

Not really. Rejecting at the DATA phase (mind you, not at the data COMMAND),
for all practical purpose and intent, just means you will reject at the
first available oportunity; in a Milter, this would be as early as the
header_callback. The DATA phase would still be completed, but the message
simply not be accepted for delivery.

- Mark

System Administrator Asarian-host.org

---
"If you were supposed to understand it,
we wouldn't call it code." - FedEx

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=srs-discuss@v2.listbox.com
Re: Rejecting spam from <>: SES, message-id cachesand cookies (long) [ In reply to ]
On Sun, 2004-02-29 at 08:57 +0000, Mark wrote:
> No. If you receive MAIL FROM: <>, there can only ever be ONE single
> recipient; that demonstrates my clarity on how SMTP works. ;) Should there
> be multiple recipients, then you have an invalid DSN -- which is grounds to
> reject all by itself.

I believe I presented a counter-example to this. It may not be _common_
but we cannot declare that it does not exist just because it complicates
our lives.

> > It makes the implementation a _lot_ harder,

> Not really. Rejecting at the DATA phase (mind you, not at the data COMMAND),
> for all practical purpose and intent, just means you will reject at the
> first available oportunity;

Why should this be the first available opportunity? What's wrong with
doing it in an ACL at RCPT time?

For example, since I've been rewriting my outgoing addresses for a while
now I'm about to roll out this in my RCPT ACL:

deny senders = :
recipients = @@lsearch;CONFDIR/always-srs-senders
message = This address never sends messages directly, and should not accept bounces.\n\t\
Please see SRS_URL or contact postmaster@infradead.org for further information.

But perhaps I should be more specific: Rejecting at DATA time would make
the implementation a lot harder for _me_ and for anyone I consider
competent to run a mail host. This is because I, and by definition those
I consider competent, would not want to break the case that of receiving
a message which is acceptable to one RCPT but not to another; however
rare that case may be.

Naïve implementations which break corner cases obviously aren't as hard.

--
dwmw2


-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=srs-discuss@v2.listbox.com
Re: Rejecting spam from <>: SES, message-id cachesand cookies (long) [ In reply to ]
David Woodhouse <dwmw2@infradead.org> [2004-02-29/13:41]:
> On Sun, 2004-02-29 at 08:57 +0000, Mark wrote:
> > No. If you receive MAIL FROM: <>, there can only ever be ONE single
> > recipient; that demonstrates my clarity on how SMTP works. ;) Should
> > there be multiple recipients, then you have an invalid DSN -- which
> > is grounds to reject all by itself.
>
> I believe I presented a counter-example to this. It may not be
> _common_ but we cannot declare that it does not exist just because it
> complicates our lives.

It is common enough. Granted, I might run an out of the ordinary
mailserver, but we have it here all the time. People have `function' or
`role' aliases which usually expand to more than one remote address, and
they frequently send mail from such addresses. Such messages generate
bounces addressed to more than one recipient.

But as some MTA admins assume that a DSN can only have one recipient, I
had to work around these and make sure that bounces are only sent to a
single remote recipient at a time, which seems like an unnecessary waste
of resources...

I believe there is no RFC which states that DSN can only have a single
recipient, but feel free to proove me wrong.

Cheers,
Dan

--
Daniel Roethlisberger <daniel@roe.ch>
GnuPG key ID 0x804A06B1 (DSA/ElGamal)

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=srs-discuss@v2.listbox.com
Re: Rejecting spam from <>: SES, message-id cachesand cookies (long) [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "Daniel" == Daniel Roethlisberger
>>>>> "Re: Rejecting spam from <>: SES, message-id cachesand cookies (long)"
>>>>> Sun, 29 Feb 2004 15:23:39 +0100

Daniel> I believe there is no RFC which states that DSN can only
Daniel> have a single recipient, but feel free to proove me wrong.

Can you point to a standards track RFC that suggests using the null
sender and multiple envelope recipients?

jam

-----BEGIN PGP SIGNATURE-----

iD8DBQFAQgayUEvv1b/iXy8RApIwAKCTQCgX9U0yhyI/MMrFQ6Ju0TMs7gCffu8h
gauh0lILQbH+cey1ltWTLBc=
=6IH5
-----END PGP SIGNATURE-----

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=srs-discuss@v2.listbox.com
Re: Rejecting spam from <>: SES, message-id cachesand cookies (long) [ In reply to ]
----- Original Message -----
From: "Daniel Roethlisberger" <daniel@roe.ch>
To: <srs-discuss@v2.listbox.com>
Sent: Sunday, February 29, 2004 3:23 PM
Subject: Re: [srs-discuss] Rejecting spam from <>: SES, message-id cachesand
cookies (long)

> But as some MTA admins assume that a DSN can only have one recipient,
> I had to work around these and make sure that bounces are only sent to
> a single remote recipient at a time, which seems like an unnecessary
> waste of resources...
>
> I believe there is no RFC which states that DSN can only have a
> single recipient, but feel free to proove me wrong.

Quoting RFC 1891 (SMTP Service Extension for Delivery Status Notifications):

7.1 SMTP Envelope to be used with delivery status notifications

The DSN sender address (in the SMTP MAIL command) MUST be a null
reverse-path ("<>"), as required by section 5.3.3 of [9]. The DSN
recipient address (in the RCPT command) is copied from the MAIL
command which accompanied the message for which the DSN is being
issued.

Since the DSN recipient address is copied from the MAIL command (and the
MAIL From: is always a single sender address), it naturally follows that the
reverse of that single MAIL From: address is a single recipient.

At least, this has always been my interpretation of things.

- Mark

System Administrator Asarian-host.org

---
"If you were supposed to understand it,
we wouldn't call it code." - FedEx

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=srs-discuss@v2.listbox.com
Re: Rejecting spam from <>: SES, message-id cachesand cookies (long) [ In reply to ]
Mark <admin@asarian-host.net> [2004-02-29/16:13]:
> The DSN sender address (in the SMTP MAIL command) MUST be a null
> reverse-path ("<>"), as required by section 5.3.3 of [9]. The DSN
> recipient address (in the RCPT command) is copied from the MAIL
> command which accompanied the message for which the DSN is being
> issued.
>
> Since the DSN recipient address is copied from the MAIL command (and
> the MAIL From: is always a single sender address), it naturally
> follows that the reverse of that single MAIL From: address is a single
> recipient.

...which can subsequently expand to multiple recipients, which in turn
leaves us with a valid DSN addressed to more than just one recipient.

> At least, this has always been my interpretation of things.

Same here :)

Cheers,
Dan

--
Daniel Roethlisberger <daniel@roe.ch>
GnuPG key ID 0x804A06B1 (DSA/ElGamal)

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=srs-discuss@v2.listbox.com
Re: Re: Rejecting spam from <>: SES, message-id cachesand cookies (long) [ In reply to ]
John A. Martin <jam@athene.jamux.com> [2004-02-29/10:35]:
> Can you point to a standards track RFC that suggests using the null
> sender and multiple envelope recipients?

The best I can offer is a Best Current Practice RFC.

Quoting RFC 2505 - Anti-Spam Recommendations for SMTP MTAs:
| 2.6.1. "MAIL From: <>"
| [...]
| The most common case of such legitimate "MAIL From: <>" is to one
| recipient, i.e. an error message returned to one single individual.
| Since spammers have used "MAIL From: <>" to send to many
| recipients, it is tempting to either reject such mail completely or
| to reject all but the first recipient. However, there are
| legitimate causes for an error mail to go to multiple recipients,
| e.g. a list with several list owners, all located at the same
| remote site, and thus the MTA MUST NOT refuse "MAIL From: <>" even
| in this case.

Cheers,
Dan

--
Daniel Roethlisberger <daniel@roe.ch>
GnuPG key ID 0x804A06B1 (DSA/ElGamal)

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=srs-discuss@v2.listbox.com
Re: Rejecting spam from <>: SES, message-id cachesand cookies (long) [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "Daniel" == Daniel Roethlisberger
>>>>> "Re: Re: Rejecting spam from <>:
>>>>> SES, message-id cachesand cookies (long)"
>>>>> Sun, 29 Feb 2004 19:08:45 +0100

Daniel> John A. Martin <jam@athene.jamux.com> [2004-02-29/10:35]:
>> Can you point to a standards track RFC that suggests using the
>> null sender and multiple envelope recipients?

Daniel> The best I can offer is a Best Current Practice RFC.

Daniel> Quoting RFC 2505 - Anti-Spam Recommendations for SMTP MTAs:
Daniel>|2.6.1. "MAIL From: <>"
Daniel>|[...]
Daniel>|The most common case of such legitimate "MAIL From: <>" is to one
Daniel>|recipient, i.e. an error message returned to one single individual.
Daniel>|Since spammers have used "MAIL From: <>" to send to many
Daniel>|recipients, it is tempting to either reject such mail completely or
Daniel>|to reject all but the first recipient. However, there are
Daniel>|legitimate causes for an error mail to go to multiple recipients,
Daniel>|e.g. a list with several list owners, all located at the same
Daniel>|remote site, and thus the MTA MUST NOT refuse "MAIL From: <>" even
Daniel>|in this case.

Will not all such expansions create new envelopes?

jam

-----BEGIN PGP SIGNATURE-----

iD8DBQFAQklJUEvv1b/iXy8RAovbAKCdW0rQg6w93eGBrdAUpxlnwL3dNACeLMSS
hlV79rUOm6FbNw6JnvnzYuo=
=Of8V
-----END PGP SIGNATURE-----

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=srs-discuss@v2.listbox.com
Re: Re: Rejecting spam from <>: SES, message-id cachesand cookies (long) [ In reply to ]
John A. Martin <jam@athene.jamux.com> [2004-02-29/15:19]:
> > However, there are legitimate causes for an error mail to go to
> > multiple recipients, e.g. a list with several list owners, all
> > located at the same remote site, and thus the MTA MUST NOT refuse
> > "MAIL From: <>" even in this case.
>
> Will not all such expansions create new envelopes?

Not by design, no; but for all I know there might be MTA default
configurations out there which explicitly create a whole new message for
multiple recipient DSN by default; but I know that those few MTA I've
worked with lately did not do so, and required some tricks to get them
to send DSN only one at a time.

I personally consider blocking multi-recipient DSN harmful.

Cheers,
Dan


--
Daniel Roethlisberger <daniel@roe.ch>
GnuPG key ID 0x804A06B1 (DSA/ElGamal)

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=srs-discuss@v2.listbox.com
Re: Rejecting spam from <>: SES, message-id cachesand cookies (long) [ In reply to ]
>>>>> "Daniel" == Daniel Roethlisberger
>>>>> "Re: Re: Rejecting spam from <>:
>>>>> SES, message-id cachesand cookies (long)"
>>>>> Sun, 29 Feb 2004 21:47:31 +0100

Daniel> John A. Martin <jam@athene.jamux.com> [2004-02-29/15:19]:
>> > However, there are legitimate causes for an error mail to go
>> > to multiple recipients, e.g. a list with several list owners,
>> > all located at the same remote site, and thus the MTA MUST
>> > NOT refuse "MAIL From: <>" even in this case.
>>
>> Will not all such expansions create new envelopes?

Daniel> Not by design, no;

Hmm... some observations and some questions:

1. Some mailing list management software accepts delivery of DSNs then
mails the list owner(s) using a non-null reverse path. Is this the
common behavior? Are there important exceptions to this behavior?

2. Dnsreport.com has appeared to test postmaster, abuse, and
domain-literal addresses by sending a single empty envelope from
the null sender to multiple postmaster and abuse mailbox addresses.
This is a possible problem only for a local domain that enforces a
"Multi-recipient bounce" without exempting their postmaster and
abuse addresses.

3. A DSN or other single recipient null envelope addressed to an
address exploded by /etc/aliases or the like can indeed result in
null envelopes addressed to multiple recipients. This would be a
problem only if mail is sent with a reverse path that "explodes" to
multiple addresses within non-local domains. A return path that
explodes into multiple recipients within the local domain of the
original reverse path ought to be handled by the local domain and
is therefore merely a local configuration issue, right?

Daniel> I personally consider blocking multi-recipient DSN
Daniel> harmful.

After a period of logging the would-be results I've used a
"Multiple-recipient bounce" restriction on all non-postmaster,
non-abuse mail from untrusted sources (non-local networks) for more
than a year. I find it cheap and effective rejecting would be abusive
mail based solely upon objective information without the need for DNS
queries. I've not noticed any wanted mail rejected that way and have
had no complaints. This has however been for only a few relatively
small "edge" domains.

jam

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=srs-discuss@v2.listbox.com
Re: Re: Rejecting spam from <>: SES, message-id cachesand cookies (long) [ In reply to ]
John A. Martin <jam@athene.jamux.com> [2004-03-01/13:02]:
> 3. A DSN or other single recipient null envelope addressed to an
> address exploded by /etc/aliases or the like can indeed result in
> null envelopes addressed to multiple recipients. This would be a
> problem only if mail is sent with a reverse path that "explodes" to
> multiple addresses within non-local domains. A return path that
> explodes into multiple recipients within the local domain of the
> original reverse path ought to be handled by the local domain and
> is therefore merely a local configuration issue, right?

Yes, and no; as it is perfectly legitimate, it is not a local
configuration _issue_, that is, it is not the fault of the local
configuration, but that of the _remote_ configuration which harmfully
blocks multi recipient DSN.


> Daniel> I personally consider blocking multi-recipient DSN
> Daniel> harmful.
>
> After a period of logging the would-be results I've used a
> "Multiple-recipient bounce" restriction on all non-postmaster,
> non-abuse mail from untrusted sources (non-local networks) for more
> than a year. I find it cheap and effective rejecting would be abusive
> mail based solely upon objective information without the need for DNS
> queries.

I generally consider delivering legitimate mail the first and foremost
duty of a mailserver; blocking the unwanted stuff is less important. So
simply blocking multi-recipient DSN is not an acceptable solution in my
eyes, at least not as long as multi-recipient DSN are fully valid
according to applicable specifications.


> I've not noticed any wanted mail rejected that way and have had no
> complaints.

Of course you wont get many complaints; users will not notice when
bounces get silently dropped. Only the admin of the sending host can
determine that there is a problem, if he notices the refused bounces in
the logs. As MTA logs on forwarding hosts are full of refused bounces
these days, I don't believe that this will get noticed immediately.

And it is quite possible that there are no such multi-recipient
forwarders pointing to addresses on your systems.

Anyway, everybody is free to violate BCP as they deem reasonable.
I just think it is unwise, and generally the wrong thing to do.

Cheers,
Dan


--
Daniel Roethlisberger <daniel@roe.ch>
GnuPG key ID 0x804A06B1 (DSA/ElGamal)

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=srs-discuss@v2.listbox.com
Re: Rejecting spam from <>: SES, message-id cachesand cookies (long) [ In reply to ]
>>>>> "Daniel2" == Daniel Roethlisberger
>>>>> "Re: Re: Rejecting spam from <>:
>>>>> SES, message-id cachesand cookies (long)"
>>>>> Mon, 1 Mar 2004 19:28:04 +0100

Daniel2> John A. Martin <jam@athene.jamux.com> [2004-03-01/13:02]:
>> 3. A DSN or other single recipient null envelope addressed to
>> an address exploded by /etc/aliases or the like can indeed
>> result in null envelopes addressed to multiple recipients.
>> This would be a problem only if mail is sent with a reverse
>> path that "explodes" to multiple addresses within non-local
>> domains. A return path that explodes into multiple recipients
>> within the local domain of the original reverse path ought to
>> be handled by the local domain and is therefore merely a local
>> configuration issue, right?

Daniel2> Yes, and no; as it is perfectly legitimate, it is not a
Daniel2> local configuration _issue_, that is, it is not the fault
Daniel2> of the local configuration, but that of the _remote_
Daniel2> configuration which harmfully blocks multi recipient DSN.

Right. We can avoid creating the problem for others by not creating
Multiple-recipient bounces. When we reject Multiple-recipient bounces
we risk rejecting useful bounces. My question is how many useful
Multi-recipient bounces do we see that would not be rejected by other
more expensive or less objective but well accepted criteria.

Daniel2> Of course you wont get many complaints; users will not
Daniel2> notice when bounces get silently dropped.

People notice when mail, as they see it, turns into a black hole. We
agree, I think, that blocking Multiple-recipient bounces would do this
for those that are on an alias that is used as an envelope sender when
others in the same domain are also on the same alias.

Daniel2> And it is quite possible that there are no such
Daniel2> multi-recipient forwarders pointing to addresses on your
Daniel2> systems.

More specifically, there may be no multi-recipient forwarders _used as
reverse paths_ and therefore to to relay DSNs pointing...

How realistic is it likely to be otherwise?

jam

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=srs-discuss@v2.listbox.com
Re: Re: Rejecting spam from <>: SES, message-id cachesand cookies (long) [ In reply to ]
John A. Martin <jam@athene.jamux.com> [2004-03-01/16:17]:
> People notice when mail, as they see it, turns into a black hole.

I disagree, most people will definately not notice immediately.

> More specifically, there may be no multi-recipient forwarders _used as
> reverse paths_ and therefore to to relay DSNs pointing...
> How realistic is it likely to be otherwise?

As I said, we have this situation here regularly. Role email aliases
are very convenient; when you use them as return path, all responsible
people will get all replies to a message.

But we are way off topic again.

Cheers,
Dan


--
Daniel Roethlisberger <daniel@roe.ch>
GnuPG key ID 0x804A06B1 (DSA/ElGamal)

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=srs-discuss@v2.listbox.com
RE: Re: Rejecting spam from <>: SES, message-id cachesand cookies (long) [ In reply to ]
> -----Original Message-----
> From: owner-srs-discuss@v2.listbox.com
> [mailto:owner-srs-discuss@v2.listbox.com]On Behalf Of Daniel
> Roethlisberger
> Sent: Tuesday, March 02, 2004 11:20 AM
> To: srs-discuss@v2.listbox.com
> Subject: Re: [srs-discuss] Re: Rejecting spam from <>: SES, message-id
> cachesand cookies (long)
>
>
> John A. Martin <jam@athene.jamux.com> [2004-03-01/16:17]:
> > People notice when mail, as they see it, turns into a black hole.
>
> I disagree, most people will definately not notice immediately.
>
> > More specifically, there may be no multi-recipient
> forwarders _used as
> > reverse paths_ and therefore to to relay DSNs pointing...
> > How realistic is it likely to be otherwise?
>
> As I said, we have this situation here regularly. Role email aliases
> are very convenient; when you use them as return path, all responsible
> people will get all replies to a message.

Just as a point of information, does the expansion of aliases occur
during the SMTP session itself so that the MTA knows at RCPT TO: time
that there are more than one recipients?

--

Seth Goodman

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=srs-discuss@v2.listbox.com
RE: Re: Rejecting spam from <>: SES, message-id cachesand cookies (long) [ In reply to ]
On Tue, 2004-03-02 at 11:26 -0600, Seth Goodman wrote:
> Just as a point of information, does the expansion of aliases occur
> during the SMTP session itself so that the MTA knows at RCPT TO: time
> that there are more than one recipients?

Generally it'll happen later. But if when it does happen there are two
recipients at the same domain (or even sharing an MX host), then the MTA
in question is perfectly justified in connecting to _that_ MX host and
issuing MAIL FROM:<> with two or more subsequent RCPT TO: commands.

--
dwmw2

-------
To unsubscribe, change your address, or temporarily deactivate your subscription,
please go to http://v2.listbox.com/member/?listname=srs-discuss@v2.listbox.com