Sub addressing delimiters
Hello,
There is a disconnect between the way Postfix handles recipient_delimiter and the way Dovecot handles it. For Postfix, it is a set of delimiters that can each individually be used to separate the address from the . In Dovecot, having multiple characters in recipient_delimiters simply makes it a multi-character single delimiter.
For my purposes, the Postfix method is much more versatile. Extra delimiters can be added without breaking the way users currently have delimiters.
I am wondering what the odds are of reconciling the two approaches, hopefully in favour of the Postfix one. Failing a switch to the other behaviour, is it possible to add the Postfix method as an option? Would a patch for either of these be accepted?
Thanks,
Kurt Fitzner
On 8/23/2016 4:42 PM, Kurt Fitzner <kurt+dove@va1der.ca> wrote:
There is a disconnect between the way Postfix handles recipient_delimiter and the way Dovecot handles it. For Postfix, it is a set of delimiters that can each individually be used to separate the address from the . In Dovecot, having multiple characters in recipient_delimiters simply makes it a multi-character single delimiter.
For my purposes, the Postfix method is much more versatile. Extra delimiters can be added without breaking the way users currently have delimiters.
Objection: assumes facts not in evidence.
This is the way it is supposed to work now in dovecot, so, either it is now broken, was always broken (I haven't had an opportunity to test it since I was forced to migrate our email server to Office365 last year), or you are not doing it right.
But we'd need to see your config to make that determination...
On 2016-08-24 09:20, Tanstaafl wrote:
Objection: assumes facts not in evidence.
This is the way it is supposed to work now in dovecot, so, either it is now broken, was always broken ... or you are not doing it right.
But we'd need to see your config to make that determination...
How about source tree?
I now present my case to the court. :)
The changelog: 2009-11-10 * src/lib-lda/lda-settings.c, src/lmtp/commands.c: recipient_delimiter: Allow multi-character delimiters. [0d659ac4656d] <HEAD> (taken from the change log in 2.2.13 since this entry is no longer visible in the change log in 2.2.13.
There are no other relevant entries referencing recipient_delimiter in 2.2.25. This isn't a sure indication, but it seems to me to imply what the intention was.rcpt_address_parse() in lmtp/commands.c
domain = strchr(address, '@'); p = strstr(address, client->unexpanded_lda_set->recipient_delimiter);
This function is looking for the domain separation with strchr(), but looking for the username and detail separation with strstr(). To treat recipient_delimiter as a list of single-character delimiters you can pick from, then you'd need to loop through recipient_delimiter and use strchr() for each character.
- Right now I have recipient_delimiter set to + and it works. When I tried to set it to +_ to use either a plus or underscore, then sent test email to name_detail@domain.org it caused an error, but name+_detail@domain.org was delivered correctly. Reversing the order in dovecot's recipient_delimiter setting to _+ caused only name_+detail@domain.org to work in test emails.
Switching to the behaviour where recipient_delimiter is treated as a list of usable delimiters might not be totally trivial. If you look in address_add_detail() in lmtp/commands.c you'll see why. This function is trying to recreate a complete email address from the recipient, the detail, and domain but since the delimiter that was used when the username/detail was split isn't saved, it simply uses the multi-character recipient_delimiter setting in its entirety.
Kurt
On 23 Aug 2016, at 10:42, Kurt Fitzner <kurt+dove@va1der.ca> wrote:
Hello,
There is a disconnect between the way Postfix handles recipient_delimiter and the way Dovecot handles it. For Postfix, it is a set of delimiters that can each individually be used to separate the address from the . In Dovecot, having multiple characters in recipient_delimiters simply makes it a multi-character single delimiter.
For my purposes, the Postfix method is much more versatile. Extra delimiters can be added without breaking the way users currently have delimiters.
I am wondering what the odds are of reconciling the two approaches, hopefully in favour of the Postfix one. Failing a switch to the other behaviour, is it possible to add the Postfix method as an option? Would a patch for either of these be accepted?
For v2.3 (maybe early next year): https://git.dovecot.net/dovecot/core/commit/972c9172e9e6a0fc6053efb3d2ee9d35...
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Mon, 29 Aug 2016, Timo Sirainen wrote:
For v2.3 (maybe early next year): https://git.dovecot.net/dovecot/core/commit/972c9172e9e6a0fc6053efb3d2ee9d35...
is this an internal address?
$ host git.dovecot.net Host git.dovecot.net not found: 3(NXDOMAIN)
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEVAwUBV8WJ83z1H7kL/d9rAQLlbggAlTKNhRbBieDf/RoaVfIjCQZXv7wH+W9N 5gtu9/to5mw62I+3dtsyCF9Ui2YFm0AGTeOAyU8p//oYv34jttjBV4/OUL+U73QP PDxo/1DiJly1YCAATl1KAlc4jlvjk99XRES0P7ykIznHPM9x4a5OmsH1OWLYq4SH nEi5BqsfBCuoeY/xDM+bFZ4eLWXcNF1PHVIStp8eM7xWaGHUb5lE7YLsqf/x2187 Zsjhlj2xiHgXf1n55dWP2nkJmBHnZCieokcHOfA3fyBVdIogbt1jEwtFYShYinoi X4j6zgLs6kJjbdY5ToD/3FG5ZYwPxihzah+lnO718HbNA0nPzycZGg== =V1Oe -----END PGP SIGNATURE-----
On Tue, Aug 30, 2016 at 15:28:19 +0200, Steffen Kaiser wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Mon, 29 Aug 2016, Timo Sirainen wrote:
For v2.3 (maybe early next year): https://git.dovecot.net/dovecot/core/commit/972c9172e9e6a0fc6053efb3d2ee9d35...
is this an internal address?
It is, but you can look up the same commit hash on github:
https://github.com/dovecot/core/commit/972c9172e9e6a0fc6053efb3d2ee9d354b677...
Jeff.
$ host git.dovecot.net Host git.dovecot.net not found: 3(NXDOMAIN)
- -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEVAwUBV8WJ83z1H7kL/d9rAQLlbggAlTKNhRbBieDf/RoaVfIjCQZXv7wH+W9N 5gtu9/to5mw62I+3dtsyCF9Ui2YFm0AGTeOAyU8p//oYv34jttjBV4/OUL+U73QP PDxo/1DiJly1YCAATl1KAlc4jlvjk99XRES0P7ykIznHPM9x4a5OmsH1OWLYq4SH nEi5BqsfBCuoeY/xDM+bFZ4eLWXcNF1PHVIStp8eM7xWaGHUb5lE7YLsqf/x2187 Zsjhlj2xiHgXf1n55dWP2nkJmBHnZCieokcHOfA3fyBVdIogbt1jEwtFYShYinoi X4j6zgLs6kJjbdY5ToD/3FG5ZYwPxihzah+lnO718HbNA0nPzycZGg== =V1Oe -----END PGP SIGNATURE-----
-- Failure is not an option, It comes bundled with your Microsoft product.
participants (5)
-
Josef 'Jeff' Sipek
-
Kurt Fitzner
-
Steffen Kaiser
-
Tanstaafl
-
Timo Sirainen