mirror of
https://github.com/opensolutions/ViMbAdmin.git
synced 2026-04-26 08:45:54 +03:00
[GH-ISSUE #105] AliasRepository::loadWithMailbox() has wrong like-check #81
Labels
No labels
bug
feature
feature
improvement
improvement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ViMbAdmin-opensolutions#81
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @liayn on GitHub (Jul 16, 2014).
Original GitHub issue: https://github.com/opensolutions/ViMbAdmin/issues/105
If you have a mailbox called lastname@example.com and an alias
something@example.com -> admin@example.com, firstname.lastname@example.com
AliasRepository::loadWithMailbox() will also include this alias although it is completely unrelated. This causes a problem when purging mailboxes, as they try to delete this alias too.
The SQL like query should be replaced to something like find_in_set() or, if that is not doable due to other DBs not supporting it, one can choose
a.goto like ',' & ?2 OR a.goto like ?2 & ','@liayn commented on GitHub (Jul 16, 2014):
Correction: It odes of course not delete the alias, but the listing is wrong
@PhrozenByte commented on GitHub (Jul 22, 2014):
My humble opinion: Maybe it would be the best and most flexible solution to change the database scheme and store multiple goto addresses in multiple rows.
@liayn commented on GitHub (Jul 22, 2014):
Of course a clean 1:n scheme would be best, but then you need to join them to a string again for the postfix query, which is not so nice and not very fast.
That's why I didn't suggest this.
@PhrozenByte commented on GitHub (Jul 22, 2014):
You mustn't. Postfix treats comma-separated lists and multiple rows equally.
@liayn commented on GitHub (Jul 22, 2014):
Oh really. Didn't know that.
Then I propose an immediate DB scheme update.
(I don't like denormalized DBs. You only run into troubles in the long-run.)
@barryo commented on GitHub (Jul 23, 2014):
The current schema is a hangover from Postfixadmin.
Schema changes are disruptive for existing users and thus we would be disinclined to make any large schema change without a major new release.
@liayn commented on GitHub (Jul 23, 2014):
Then at least fix the SQL stmt as mentioned above please!
@liayn commented on GitHub (Jan 5, 2016):
Ping...