Disabled account can still receive email
See original GitHub issueImpacted versions
- OS Type: Debian
- OS Version: Buster
- Database Type: PostgreSQL
- Database version: 11
- Modoboa: 1.17.0
Steps to reproduce
- Create an account with Simple user role and disable it - either at the creation or after
- Send an email to this account
Current behavior
Even if the account is disabled, the recipient is still allowed by Postfix and the email is delivered.
Expected behavior
If I understand the meaning of a disabled account, emails to this address should be rejected.
Debugging
While trying to find in Postfix when this recipient is accepted, I found that it was by looking up in sql-aliases.cf
table. Even if there is a condition on enabled
in the admin_alias
table, the object is still returned. And indeed, even if the core_user
is disabled, the corresponding admin_alias
is not.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Do active directory disabled users still receive emails? - Reddit
Yes, mailboxes belonging to disabled users still receive mail. In an Exchange environment, if you'd like to preserve a former employee's mailbox ...
Read more >Disabled mailboxes: Can they really receive email?
Disabled mailboxes cannot receive email. Or rather, could not receive email. This has been true all this while, and hasn't changed in Exchange...
Read more >Disabled AD users receiving emails - TechNet - Microsoft
1. Find the mailbox you want to configure and open properties. · 2. Click the Mail Flow Settings tab. · 3. Select Message...
Read more >Can a disabled Gmail account still receive emails? - Quora
Nope because they'll have that email registered in the system. You can try a different email but they might also have other identifying...
Read more >How do I stop email delivery to disabled accounts?
If I recall correctly, disabling the user account will cause new email to bounce. Existing email will remain. Edit: Looks like I may...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
I’m running 1.17.0 and I added the patch manually. But the mail are still received. I think that’s because that’s dovecot-lmtp which is responsible for accepting or not the mail. And in the user_query in dovecot, we never check for the is_active attribute.
Hi @kryskool, no it does not fix this problem and this is why I commented this commit. It only disables aliases which have been added manually from the interface (
internal=False
) and not automatically like here (internal=True
).