question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disabled account can still receive email

See original GitHub issue

Impacted versions

  • OS Type: Debian
  • OS Version: Buster
  • Database Type: PostgreSQL
  • Database version: 11
  • Modoboa: 1.17.0

Steps to reproduce

  1. Create an account with Simple user role and disable it - either at the creation or after
  2. 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:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Toniobcommented, Jun 28, 2022

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.

0reactions
jeromelebleucommented, Jan 18, 2021

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).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found