Sub-addressing ("plus-addressing") questions...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Sub-addressing ("plus-addressing") questions...

Nick-2
Hi!

We have been asked to allow the plus sign in emails addresses.

On Postfix's side I added "recipient_delimiter = +" and everything seems
to work perfectly.

The way I understood it only the server which receives the emails and
does the actual delivery to the "mailbox" has to know how to deal with
sub-addressing ("plus-addressing"), the server which sends the email
could be unable to deal with those kind of addresses as long as it is
not involved in delivering the mail to the "mailbox" there should not be
a problem, is that right?

I also have to tell the developers of our applications what should be
allowed...

Is it possible to have more than one "+" sign in the email address, what
does Postfix do when it sees that, does it stop at the first one and
considers everything that follow a sub-addres?

ie something like this

[hidden email]

Is this legit and does Postfix uses only the user part and domain part
for delivery and leaves dealing with the "+foo_bar" to the MUA?

I know the plus sign is not allowed by every website but I have been
told that is not a problem as long as our own websites accept it

Apart from the obvious problem with websites, and servers which can
allow sub-addressing ("plus-addressing") but on which it was not
activated, are there any other known issues with it? I know that an old
ms exchange server is involved in the sending of some of our emails but
as long as it is not involved in the reception of the emails there
should be no problem, right?

(Because the plus sign was always a recognized character by the RFC
(originally 822 and 2822 I believe...))

Thank you and have a nice day!

Nick
Reply | Threaded
Open this post in threaded view
|

Re: Sub-addressing ("plus-addressing") questions...

Phil Stracchino
On 10/14/20 3:20 PM, Nick wrote:
> I also have to tell the developers of our applications what should be
> allowed...

Good luck with that one.  I have encountered INNUMERABLE werb sites
which fervently insist that '+' is not a legal character in an email
address.

> Is it possible to have more than one "+" sign in the email address, what
> does Postfix do when it sees that, does it stop at the first one and
> considers everything that follow a sub-addres?

My best understanding is that under RFC2822 and others, '+' is
explicitly a legal character in the local part of an email address, and
there is no stipulation as to how many times it may occur in the local
part.  However, it is entirely up to the receiving server how to
interpret single or multiple + characters, and I do not know what
happens if you try to use an address with apparently multiple
sub-address parts because I've never tried it.

What I would ASSUME and EXPECT is that Postfix will treat everything
after the FIRST + as a sub-address and deliver mail addressed to
[hidden email] to [hidden email].




--
  Phil Stracchino
  Babylon Communications
  [hidden email]
  [hidden email]
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958
Reply | Threaded
Open this post in threaded view
|

Re: Sub-addressing ("plus-addressing") questions...

Peter Ajamian
In reply to this post by Nick-2
On 15/10/20 8:20 am, Nick wrote:
> Is it possible to have more than one "+" sign in the email address, what
> does Postfix do when it sees that, does it stop at the first one and
> considers everything that follow a sub-addres?

Yes.  Postfix uses the strcspn() C function to do the split which
explicitly looks for the first matching character in the string, so the
rest is considered to be the extension and is not looked at further.

I'm not sure if this is documented anywhere and if it isn't then it
means that this could be subject to change in future versions.


Peter
Reply | Threaded
Open this post in threaded view
|

Re: Sub-addressing ("plus-addressing") questions...

Viktor Dukhovni
On Thu, Oct 15, 2020 at 01:09:33PM +1300, Peter wrote:

> On 15/10/20 8:20 am, Nick wrote:
> > Is it possible to have more than one "+" sign in the email address, what
> > does Postfix do when it sees that, does it stop at the first one and
> > considers everything that follow a sub-addres?
>
> Yes.  Postfix uses the strcspn() C function to do the split which
> explicitly looks for the first matching character in the string, so the
> rest is considered to be the extension and is not looked at further.
>
> I'm not sure if this is documented anywhere and if it isn't then it
> means that this could be subject to change in future versions.

The documentation of the recipient delimiter is in the
"recipient_delimiter" section of postconf(5).  It could be more
clear, but it does strongly suggest that the first (leftmost)
delimiter is the one and only.  This is also implicit in all
the descriptions of how address lookups happen, first with
the full localpart then with just the bare name without
*the* extension.  There is only one extension.

--
    Viktor.
Reply | Threaded
Open this post in threaded view
|

Re: Sub-addressing ("plus-addressing") questions...

Nick-2
Hi!

On 2020-10-14 9:29 p.m., Viktor Dukhovni wrote:

> On Thu, Oct 15, 2020 at 01:09:33PM +1300, Peter wrote:
>
>> On 15/10/20 8:20 am, Nick wrote:
>>> Is it possible to have more than one "+" sign in the email address, what
>>> does Postfix do when it sees that, does it stop at the first one and
>>> considers everything that follow a sub-addres?
>>
>> Yes.  Postfix uses the strcspn() C function to do the split which
>> explicitly looks for the first matching character in the string, so the
>> rest is considered to be the extension and is not looked at further.
>>
>> I'm not sure if this is documented anywhere and if it isn't then it
>> means that this could be subject to change in future versions.
>
> The documentation of the recipient delimiter is in the
> "recipient_delimiter" section of postconf(5).  It could be more
> clear, but it does strongly suggest that the first (leftmost)
> delimiter is the one and only.  This is also implicit in all
> the descriptions of how address lookups happen, first with
> the full localpart then with just the bare name without
> *the* extension.  There is only one extension.
>

Thank you both!

So any additional occurrences of the characters(s) put in
recipient_delimiter are considered to be part of the extension and MUA
are free to do any processing of it they want to...

There's probably some special handling of the situation where the
delimiter would be the first character of the full localpart, that most
probably bounces if not otherwise remapped...

Thank you very much and have a nice day!

Nick
Reply | Threaded
Open this post in threaded view
|

Re: Sub-addressing ("plus-addressing") questions...

Nick-2
In reply to this post by Phil Stracchino
Hi!

On 2020-10-14 3:33 p.m., Phil Stracchino wrote:
> On 10/14/20 3:20 PM, Nick wrote:
>> I also have to tell the developers of our applications what should be
>> allowed...
>
> Good luck with that one.  I have encountered INNUMERABLE werb sites
> which fervently insist that '+' is not a legal character in an email
> address.

Well since we are talking of my employer's own developers for their own
application that will not be much of a problem...

We (I am also one of their developers) will have to allow it...

>> Is it possible to have more than one "+" sign in the email address, what
>> does Postfix do when it sees that, does it stop at the first one and
>> considers everything that follow a sub-addres?
>
> My best understanding is that under RFC2822 and others, '+' is
> explicitly a legal character in the local part of an email address, and
> there is no stipulation as to how many times it may occur in the local
> part.  However, it is entirely up to the receiving server how to
> interpret single or multiple + characters, and I do not know what
> happens if you try to use an address with apparently multiple
> sub-address parts because I've never tried it.
>
> What I would ASSUME and EXPECT is that Postfix will treat everything
> after the FIRST + as a sub-address and deliver mail addressed to
> [hidden email] to [hidden email].

That's essentially what I thought too... The first "+" separates the
user part from the extension/sub-address and any additional "+" are part
of the extension/subaddress..

Looks like the relevant RFCs (apart from RFC822, RFC2822 and the ones
that followed) seem to be RFC3598 which was later obsoleted by RFC5233
and none of them seem to say what should happen if the delimiter is
there multiple times...

Funny thing is, they don't actually specify what the delimiter should be
as far as I can tell, that's certainly not the best way of making sure
it will be standardized...

Thank you and have a nice day!

Nick


Reply | Threaded
Open this post in threaded view
|

Re: Sub-addressing ("plus-addressing") questions...

Bill Cole-3
On 15 Oct 2020, at 16:59, Nick wrote:

> Looks like the relevant RFCs (apart from RFC822, RFC2822 and the ones
> that followed) seem to be RFC3598 which was later obsoleted by RFC5233
> and none of them seem to say what should happen if the delimiter is
> there multiple times...

Neither 3598 nor 5233 is relevant except in the context of a Sieve
implementation. Since Postfix does not include a Sieve implementation,
they do not apply at all to how Postfix handles subaddress syntax.

--
Bill Cole
[hidden email] or [hidden email]
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire