mailcow / mailcow-dockerized

mailcow: dockerized - 🐮 + 🐋 = 💕
https://mailcow.email
GNU General Public License v3.0
8.91k stars 1.17k forks source link

Mailbox can exceed its assigned quota by 100% (Maybe BCC related) #4649

Open kev-ac opened 2 years ago

kev-ac commented 2 years ago

Contribution guidelines

I've found a bug and checked that ...

Description

Today I've found by accident that one created mailbox was able to exceed its quota by exactly 100%.

The mailbox is only used for sending notifications from an app. To keep track of outgoing emails every email is BCC'd to itself.

Now that the quota is exceeded by 100% every following email seems to be rejected (BCC, outgoing works fine).

Maybe there is a bug related to this specific use case.

Logs

Jun 23 17:31:12 f96c19e96712 dovecot: lmtp(xxxx@xxxx.de)<906813><0JRVIkCHtGI91g0AqBEyxg>: sieve: msgid=<bf5ce244f40cc90592797d9f41093570@xxxx.de>: failed to store into mailbox 'INBOX': Quota exceeded (mailbox for user is full)

Steps to reproduce

  1. Add a mailbox with set quota
  2. Send emails as this mailbox and add BCC to itself

System information

Question Answer
My operating system Ubuntu 20.04
Is Apparmor, SELinux or similar active? No
Virtualization technology (KVM, VMware, Xen, etc - LXC and OpenVZ are not supported KVM
Server/VM specifications (Memory, CPU Cores) 4 cores, 8GB RAM
Docker version (docker version) 20.10.14
docker-compose version (docker-compose version) v2.6.0
mailcow version (git describe --tags `git rev-list --tags --max-count=1`) 2022-06
Reverse proxy (custom solution) no
milkmaker commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

kev-ac commented 2 years ago

Not a stale issue.

milkmaker commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

kev-ac commented 2 years ago

Still not a stale issue.

milkmaker commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

kev-ac commented 1 year ago

Still not a stale issue.

milkmaker commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

kev-ac commented 1 year ago

Still not a stale issue.

FreddleSpl0it commented 1 year ago

I cannot reproduce the error. What kind of emails filled the mailbox? Only the bcc forwarded?

kev-ac commented 1 year ago

The flow looks like this: mailbox-a@example.org is used by a web application to send emails via SMTP. The web application sends the emails to an external recipient (john.doe@mailcow.email) and also sends a copy of this email in BCC to itself (mailbox-a@example.org).

The mailbox can use its assigned quota (for example 1GB) twice, so the mailbox stops filling when the storage hits 2GB.