Re: Courier 20240725 development build
Bernd Wurst <[email protected]> Wed, 11 Sep 2024 14:43:16 +0200
| Newsgroups | gmane.mail.imap.courier.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Sam.
Am 26.07.24 um 02:25 schrieb Sam Varshavchik:
> • Allow using + instead of - as separators for extensions to local email
> addresses.
I'd like to inform you that this little change has killed our setup of
using plus extensions with virtual accounts.
We keep our users for our hosted domains in a SQL table and use a custom
SQL query in authmysqlrc.
In this query, using some SQL magic, I search for a plus sign and
discard everything afterwards to return back the "real" mailbox. SQL
looks like this:
MYSQL_SELECT_CLAUSE SELECT \
account, cryptpass, clearpass, uid, gid, homedir, maildir, quota,
fullname, options \
FROM courier_virtual_deliveries \
WHERE '$(service)' IN ('courier', 'login') \
AND (account='$(local_part)@$(domain)' OR \
(account=CONCAT(SUBSTRING_INDEX('$(local_part)', '+', 1),'@',
'$(domain)') AND \
enableextensions=1)) \
[...]
With the latest courier upgrade, this SQL lost its magic because the
$(local_part) gets substituted by courier to never contain any plus sign
any more BEFORE it's handed over to SQL.
Doing the same magic with "-" will not work because people use this sign
regularly in their addresses and we got a good chance to split on the
wrong hyphen.
I'd really like this behavior to be configurable altogether or find a
way to do this only for local .courier file lookups and not for virtual
address handling.
Don't get my wrong, I like the plus as extension sign and it's okay to
extend the hyphen-extension-system to using plus sign but this was
propably a bit hasty and has serious side effects.
Is there another way to use extension addresses (sub-level-catchall)
working with virtual accounts e.g. from SQL?
regards,
Bernd
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users