Repository navigation
Conversation
LDAP group expansion cannot skip members, so a group with a disabled member bounced every message back to the sender. Route disabled mailboxes to the discard transport instead.
0208493 to
4dedc17
Compare
DavidePrincipi
left a comment
There was a problem hiding this comment.
The approach is right. I proposed a variation in my review of #312: #312 (review)
It uses a generated texthash file instead of the inline transport map, shared with the RCPT check of #312. Since both PRs would then rely on the same list, I'd fold this one into #312.
|
I'm closing this one. As Davide suggested in his review of #312, I folded it into #312. Both fixes use the same list of disabled mailboxes. #312 now generates a texthash table from DOVECOT_DISABLED_USERS and puts it first in transport_maps, so copies that reach a disabled mailbox through an alias, a group, a forward or the catch-all are discarded without a bounce. The robot cases from this PR moved to tests/50__smtp/00__disabled_mailbox.robot. |
When a group or an alias with several destinations contained a disabled mailbox, every message sent to it returned a bounce to the sender for that mailbox. The other members received the message. NethServer/dev#8205
Now the copy for a disabled mailbox is dropped and no bounce is sent. The other members still receive the message. This works with AD and OpenLDAP groups, aliases and forwards to a group.
Known limit: if every member of a group is disabled, the message is accepted and dropped. The expected behavior is a rejection at SMTP time, it is documented in the issue and in the tests.
This branch is built on top of #312, so the PR targets its branch. GitHub will switch the base to main once #312 is merged. I tested it on a real cluster with AD and OpenLDAP.
How to test
The new suite
tests/50__smtp/00__disabled_mailbox_expansion.robotcovers these cases. To check by hand:relay=noneandstatus=sent, which means the copy was discarded. No bounce is sent.