Hey Ron,
Well I could agree if the outgoing mail was directly rejected at the moment the SMTP client submits it to the server, Something like "5XX You can't send mail while your mailbox is full".
But here it accepts the mail for relaying, then it's stuck in the spool with Error: 0 because the sender mailbox is full.
The customer has no way to know their mail is stuck in the spool (we neither, unless we periodically check the spool for stuck stuff).
I'm not even sure it will finally return a mailer daemon to the sender mailbox, when the retries count is reached, as the sender mailbox is full.
I would expect locally generated mailer daemons to be delivered even to full mailboxes though, but I'm not sure it's the case.
I reproduced the issue to check the logs entry again.
1) Created a new mailbox with very low quota (10MB)
2) Made the mailbox full
3) Sent an outgoing test mail via SMTP with this mailbox credentials
$ swaks -h MYPC -t sr@madjix.ch -f testfull@cybermind.ch -s mail01.swisscenter.com -p 587 -au testfull@cybermind.ch -ap somefunkypassword
=== Trying mail01.swisscenter.com:587...
=== Connected to mail01.swisscenter.com.
<- 220 mail01.swisscenter.com SwissCenter Mail Server; Sun, 07 Jan 2024 03:17:56 +01:00; Your IP: 94.103.97.100
-> EHLO MYPC
<- 250-mail01.swisscenter.com Hello [94.103.97.100]
<- 250-SIZE 69905066
<- 250-AUTH LOGIN CRAM-MD5
<- 250-STARTTLS
<- 250-8BITMIME
<- 250-DSN
<- 250 OK
-> AUTH CRAM-MD5
<- 235 Authentication successful
-> MAIL FROM:<testfull@cybermind.ch>
<- 250 OK <testfull@cybermind.ch> Sender ok
-> RCPT TO:<sr@madjix.ch>
<- 250 OK <sr@madjix.ch> Recipient ok
-> DATA
<- 354 Start mail input; end with <CRLF>.<CRLF>
-> Date: Sun, 07 Jan 2024 03:17:56 +0100
-> To: sr@madjix.ch
-> From: testfull@cybermind.ch
-> Subject: test Sun, 07 Jan 2024 03:17:56 +0100
-> Message-Id: <20240107031756.1679591@prism>
-> X-Mailer: swaks v20201014.0 jetmore.org/john/code/swaks/
->
-> This is a test mailing
->
->
-> .
<- 250 OK
-> QUIT
<- 221 Service closing transmission channel
=== Connection closed with remote host.
The outgoing mail from the full mailbox to an external domain is accepted. (It should be rejected at this point if you really want to prevent users with full mailboxes to submit outgoing mails).
Then I check the spool
It's stuck with Error: 0 (not a really meaningful information)
Then I check the delivery logs:
[2024.01.07] 03:17:57.589 [51090227] Delivery started for testfull@cybermind.ch at 03:17:57
[2024.01.07] 03:18:00.589 [51090227] Added to SpamCheckQueue (0 queued; 2/60 processing)
[2024.01.07] 03:18:00.589 [51090227] [SpamCheckQueue] Begin Processing.
[2024.01.07] 03:18:00.589 [51090227] Blocked Sender Checks started.
[2024.01.07] 03:18:00.589 [51090227] Spam Checks started.
[2024.01.07] 03:18:00.589 [51090227] Spam Checks skipped: User authenticated
[2024.01.07] 03:18:00.589 [51090227] Spam Checks completed.
[2024.01.07] 03:18:00.589 [51090227] Removed from SpamCheckQueue (1 queued or processing)
[2024.01.07] 03:18:03.604 [51090227] Added to RemoteDeliveryQueue (1 queued; 0/100 processing)
[2024.01.07] 03:18:03.604 [51090227] [RemoteDeliveryQueue] Begin Processing.
[2024.01.07] 03:18:03.604 [51090227] Sending remote mail from testfull@cybermind.ch
[2024.01.07] 03:18:03.620 [51090227] Spam check results: [_DMARC: 0,skipped - Authenticated], [_CUSTOMRULES: ]
[2024.01.07] 03:18:03.620 [51090227] ARecord count: '1' for domain ''
[2024.01.07] 03:18:03.620 [51090227] Attempting ARecord Host Name: 'mta-gw.swisscenter.net', preference '1', Ip Count: '1'
[2024.01.07] 03:18:03.620 [51090227] Attempting to send to ARecord 'mta-gw.swisscenter.net' ip: '94.103.96.149'
[2024.01.07] 03:18:03.620 [51090227] Mailbox has exceeded maximum mailbox size. Message cannot be sent.
[2024.01.07] 03:18:03.620 [51090227] Attempt to ip, '94.103.96.149' success: 'False'
[2024.01.07] 03:18:03.620 [51090227] Failed to send to gateway mta-gw.swisscenter.net using A Lookups, error string: Attempted to send the message to the following IPs:
[2024.01.07] 03:18:03.620 [51090227] Removed from RemoteDeliveryQueue (0 queued or processing)
[2024.01.07] 03:19:03.760 [51090227] Added to RemoteDeliveryQueue (1 queued; 0/100 processing)
[2024.01.07] 03:19:03.760 [51090227] [RemoteDeliveryQueue] Begin Processing.
[2024.01.07] 03:19:03.760 [51090227] Sending remote mail from testfull@cybermind.ch
[2024.01.07] 03:19:03.776 [51090227] Spam check results: [_DMARC: 0,skipped - Authenticated], [_CUSTOMRULES: ]
[2024.01.07] 03:19:03.776 [51090227] ARecord count: '1' for domain ''
[2024.01.07] 03:19:03.776 [51090227] Attempting ARecord Host Name: 'mta-gw.swisscenter.net', preference '1', Ip Count: '1'
[2024.01.07] 03:19:03.776 [51090227] Attempting to send to ARecord 'mta-gw.swisscenter.net' ip: '94.103.96.149'
[2024.01.07] 03:19:03.776 [51090227] Mailbox has exceeded maximum mailbox size. Message cannot be sent.
[2024.01.07] 03:19:03.776 [51090227] Attempt to ip, '94.103.96.149' success: 'False'
[2024.01.07] 03:19:03.776 [51090227] Failed to send to gateway mta-gw.swisscenter.net using A Lookups, error string: Attempted to send the message to the following IPs:
[2024.01.07] 03:19:03.776 [51090227] Removed from RemoteDeliveryQueue (0 queued or processing)
[2024.01.07] 03:20:03.881 [51090227] Added to RemoteDeliveryQueue (1 queued; 0/100 processing)
[2024.01.07] 03:20:03.881 [51090227] [RemoteDeliveryQueue] Begin Processing.
[2024.01.07] 03:20:03.881 [51090227] Sending remote mail from testfull@cybermind.ch
[2024.01.07] 03:20:03.896 [51090227] Spam check results: [_DMARC: 0,skipped - Authenticated], [_CUSTOMRULES: ]
[2024.01.07] 03:20:03.896 [51090227] ARecord count: '1' for domain ''
[2024.01.07] 03:20:03.896 [51090227] Attempting ARecord Host Name: 'mta-gw.swisscenter.net', preference '1', Ip Count: '1'
[2024.01.07] 03:20:03.896 [51090227] Attempting to send to ARecord 'mta-gw.swisscenter.net' ip: '94.103.96.149'
[2024.01.07] 03:20:03.896 [51090227] Mailbox has exceeded maximum mailbox size. Message cannot be sent.
[2024.01.07] 03:20:03.896 [51090227] Attempt to ip, '94.103.96.149' success: 'False'
[2024.01.07] 03:20:03.896 [51090227] Failed to send to gateway mta-gw.swisscenter.net using A Lookups, error string: Attempted to send the message to the following IPs:
[2024.01.07] 03:20:03.896 [51090227] Removed from RemoteDeliveryQueue (0 queued or processing)
[2024.01.07] 03:25:04.570 [51090227] Added to RemoteDeliveryQueue (1 queued; 0/100 processing)
[2024.01.07] 03:25:04.570 [51090227] [RemoteDeliveryQueue] Begin Processing.
[2024.01.07] 03:25:04.570 [51090227] Sending remote mail from testfull@cybermind.ch
[2024.01.07] 03:25:04.586 [51090227] Spam check results: [_DMARC: 0,skipped - Authenticated], [_CUSTOMRULES: ]
[2024.01.07] 03:25:04.586 [51090227] ARecord count: '1' for domain ''
[2024.01.07] 03:25:04.586 [51090227] Attempting ARecord Host Name: 'mta-gw.swisscenter.net', preference '1', Ip Count: '1'
[2024.01.07] 03:25:04.586 [51090227] Attempting to send to ARecord 'mta-gw.swisscenter.net' ip: '94.103.96.149'
[2024.01.07] 03:25:04.586 [51090227] Mailbox has exceeded maximum mailbox size. Message cannot be sent.
[2024.01.07] 03:25:04.586 [51090227] Attempt to ip, '94.103.96.149' success: 'False'
[2024.01.07] 03:25:04.586 [51090227] Failed to send to gateway mta-gw.swisscenter.net using A Lookups, error string: Attempted to send the message to the following IPs:
[2024.01.07] 03:25:04.586 [51090227] Removed from RemoteDeliveryQueue (0 queued or processing)
You can see it's exactly the same result, it says message cannot be sent due to exceeded mailbox size but also wrongly says "Failed to send to gateway mta-gw.swisscenter.net using A Lookups, error string: Attempted to send the message to the following IPs:".
This is kinda misleading as the only problem at this point is the send user mailbox full, not a problem with a lookup problem or gateway unreachable...
humpf :)
But then again I think submitting an outgoing mail with SMTP should not be prevented at all, even if the sender mailbox is full as outgoing SMTP doesn't store anything in the mailbox. It's only using it's credentials to auth to the server.
Or, at least, reject it at submission time and not when attempting to deliver the mail to it's destination.
A last note to add, i suspect this is a behavior change between build 8251 we were running and 8664 we just upgraded to, because I see a lot of stuck mails for this reason, and they were not appearing before the upgrade.
Mainly customers no-reply@ style mailboxes that are only used to send outgoing mails and that are never being checked / maintained otherwise.
EDIT: Confirmed. I've checked the delivery logs before and after the upgrade. The "Mailbox has exceeded maximum mailbox size. Message cannot be sent." appear only after the upgrade date. This means we're in trouble.