Bug 45083 - Wrong query filter in /etc/postfix/ldap.virtual
Wrong query filter in /etc/postfix/ldap.virtual
Status: CLOSED WORKSFORME
Product: UCS
Classification: Unclassified
Component: Mail
UCS 4.2
amd64 Linux
: P5 critical (vote)
: ---
Assigned To: Daniel Tröder
Sönke Schwardt-Krummrich
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-27 01:16 CEST by t0mc
Modified: 2017-07-31 13:12 CEST (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description t0mc 2017-07-27 01:16:04 CEST
In /etc/postfix/ldap.virtual the query filter has changed from

(&(objectClass=univentionMail)(|(mailAlternativeAddress=%s)(mailPrimaryAddress=%s))(!(univentionCanonicalRecipientRewriteEnabled=1)))

to

(&(objectClass=univentionMail)(mailAlternativeAddress=%s)(!(univentionCanonicalRecipientRewriteEnabled=1)))

=> The search in mailPrimaryAddress is missing
Result:
Users with only the primary address set couldn't receive mails any more; postfix rejected them with an "Recipient address rejected: User unknown in virtual mailbox table" error

The root - of course - would be the template file 
/etc/univention/templates/files/etc/postfix/ldap.virtual.d/10_base
Comment 1 Daniel Tröder univentionstaff 2017-07-27 08:51:33 CEST
The virtual tables have been split into those for mailboxes and those for aliases.

Aliases are now searched in /etc/postfix/ldap.virtual and mailboxes in /etc/postfix/ldap.virtual_mailbox.

The list of maps considered for aliases is managed through the UCR variable mail/postfix/virtual/alias/maps and the list of tables to look in for mailboxes is in mail/postfix/virtual/mailbox/maps.

If those UCR variables have been changed on your system, it's possible the required map isn't included. The defaults are:

default_virtual_alias_maps = 'hash:/etc/postfix/virtual, ldap:/etc/postfix/ldap.groups, ldap:/etc/postfix/ldap.distlist, ldap:/etc/postfix/ldap.virtual, ldap:/etc/postfix/ldap.external_aliases, ldap:/etc/postfix/ldap.sharedfolderremote, ldap:/etc/postfix/ldap.sharedfolderlocal_aliases'

default_virtual_mailbox_maps = 'ldap:/etc/postfix/ldap.virtual_mailbox, ldap:/etc/postfix/ldap.sharedfolderlocal'


For systems with the OX app, the UCRVs are different:

mail/postfix/virtual/mailbox/maps="ldap:/etc/postfix/ldap.ox-sharedfolder_mailbox, ldap:/etc/postfix/ldap.ox-virtual_mailbox" \

mail/postfix/virtual/alias/maps="hash:/etc/postfix/virtual, ldap:/etc/postfix/ldap.groups, ldap:/etc/postfix/ldap.ox-distlist, ldap:/etc/postfix/ldap.ox-sharedfolder, ldap:/etc/postfix/ldap.ox-virtual, ldap:/etc/postfix/ldap.external_aliases"

Please check that mail/postfix/virtual/mailbox/maps on your system contains ldap:/etc/postfix/ldap.virtual_mailbox.
Comment 2 t0mc 2017-07-27 11:13:29 CEST
Thx for the explanation what pushed me to the root cause of my problem... 

For some reason during the update the template file "/etc/univention/templates/files/etc/postfix/main.cf.d/30_maps" didn't get updated, the new one was named "30_maps.dpkg-dist". As I never changed anything in the original template I'm wondering why the update thought it wasn't the original one and so didn't overwrite it.... anyway... I renamed the new file and did a "ucr commit /etc/postfix"... now the main.cf looks as u described and postfix behaves as it should.
Comment 3 t0mc 2017-07-27 11:30:02 CEST
Thx for the explanation what pushed me to the root cause of my problem... 

For some reason during the update the template file "/etc/univention/templates/files/etc/postfix/main.cf.d/30_maps" didn't get updated, the new one was named "30_maps.dpkg-dist". As I never changed anything in the original template I'm wondering why the update thought it wasn't the original one and so didn't overwrite it.... anyway... I renamed the new file and did a "ucr commit /etc/postfix"... now the main.cf looks as u described and postfix behaves as it should.
Comment 4 Daniel Tröder univentionstaff 2017-07-27 13:35:47 CEST
That's good news.
Thanks for reporting.