1
User mailbox is full -> User can't send mails through smtp (build 8664)
Question asked by Sébastien Riccio - 1/6/2024 at 6:40 AM
Answered
Hello,

I noticed we had several mails stuck in spool. These are outgoing mails from a local domain to an external domain.

In the recipients list, it shows Error: 0


Looking at the Delivery log for these mails, it shows this:

[2024.01.05] 02:06:13.567 [40269154] Added to RemoteDeliveryQueue (1 queued; 0/100 processing)
[2024.01.05] 02:06:13.567 [40269154] [RemoteDeliveryQueue] Begin Processing.
[2024.01.05] 02:06:13.567 [40269154] Sending remote mail from john@somedomain.com
[2024.01.05] 02:06:13.582 [40269154] Spam check results: [_DMARC: 0,skipped - Authenticated], [_CUSTOMRULES: ]
[2024.01.05] 02:06:13.582 [40269154] ARecord count: '1' for domain ''
[2024.01.05] 02:06:13.582 [40269154] Attempting ARecord Host Name: 'mta-gw.swisscenter.net', preference '1', Ip Count: '1'
[2024.01.05] 02:06:13.582 [40269154] Attempting to send to ARecord 'mta-gw.swisscenter.net' ip: '94.103.96.149'
[2024.01.05] 02:06:13.582 [40269154] Mailbox has exceeded maximum mailbox size. Message cannot be sent.
[2024.01.05] 02:06:13.582 [40269154] Attempt to ip, '94.103.96.149' success: 'False'
[2024.01.05] 02:06:13.582 [40269154] 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.05] 02:06:13.582 [40269154] Delivery for john@somedomain.com to paul@somerecipient.ch has bounced. Reason: Failed all attempts to connect to recipient's mail server
[2024.01.05] 02:06:13.598 [40269154] DSN email written to 640327501 with status failed to paul@somerecipient.ch
[2024.01.05] 02:06:13.598 [40269154] Process delivery status notification step from recipient success. Recipient: [paul@somerecipient.ch], Notify: [], LastError: [0 ], RanDomainFilter: [False], RanGlobalFilter: False
[2024.01.05] 02:06:13.598 [40269154] Delivery for john@somedomain.com to paul@somerecipient.ch has completed (Bounced)
[2024.01.05] 02:06:13.598 [40269154] Removed from RemoteDeliveryQueue (0 queued or processing)
[2024.01.05] 02:06:16.582 [40269154] Removing Spool message: Killed: False, Failed: False, Finished: True
[2024.01.05] 02:06:16.582 [40269154] Delivery finished for john@somedomain.com at 02:06:16	[id:640269154]

First thing I find strange is this line:
[2024.01.05] 02:06:13.582 [40269154] ARecord count: '1' for domain ''
Domain is empty ?

Then I see SM is looking up our outgoing gateway A record, which is correct
[2024.01.05] 02:06:13.582 [40269154] Attempting ARecord Host Name: 'mta-gw.swisscenter.net', preference '1', Ip Count: '1'
[2024.01.05] 02:06:13.582 [40269154] Attempting to send to ARecord 'mta-gw.swisscenter.net' ip: '94.103.96.149'

Then it complaints that the mailbox is full. 
[2024.01.05] 02:06:13.582 [40269154] Mailbox has exceeded maximum mailbox size. Message cannot be sent.
Looks like it's about the sender mailbox being full. Is that normal that a mail can't be sent through SMTP when the user mailbox is full ? When sending mail through SMTP there is nothing to be written to the sender mailbox afaik ?

Then it says there was lookup error and that it was unable to connect the remote (the gateway), which is untrue.

[2024.01.05] 02:06:13.582 [40269154] 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.05] 02:06:13.582 [40269154] Delivery for john@somedomain.com to paul@somerecipient.ch has bounced. Reason: Failed all attempts to connect to recipient's mail server
[2024.01.05] 02:06:13.598 [40269154] DSN email written to 640327501 with status failed to paul@somerecipient.ch
[2024.01.05] 02:06:13.598 [40269154] Process delivery status notification step from recipient success. Recipient: [paul@somerecipient.ch], Notify: [], LastError: [0 ], RanDomainFilter: [False], RanGlobalFilter: False
[2024.01.05] 02:06:13.598 [40269154] Delivery for john@somedomain.com to paul@somerecipient.ch has completed (Bounced)

The mails are then stuck in the spool. To check if it was related to the sender mailbox being full, I added some additional space to it and forced a retry of the mails stuck in spool. They were delivered.

To summarize:
1) Is that a wanted feature that a mailbox being full can't send mail through SMTP ? If yes, why is it accepting the mail in the first place, when the customer send it from his client. It should deny it here instead of accepting it and having it stuck in spool.

2) Why the delivery logs is saying that the server is not reachable or that there was a lookup error, when the problem is the sender mailbox being full.

I'm a bit lost here. Would love some feedback about it.

Thanks!


Sébastien Riccio
System & Network Admin

8 Replies

Reply to Thread
0
Brian Bjerring-Jensen Replied
Dont the sender sea a new mail in their sent folder??

And if its full, then no more space to store the outbound mail in sent folder.
0
Sébastien Riccio Replied
Hello :)

Nope, SMTP is not involved in storing the sent mail in the user's mailbox sent folder.
A mail client uses another protocol to save the mail in sent folders on the server (IMAP for example).

If the mailbox is full it should still accept to send the mail but report that the mail could not be saved in the sent folder. 

There are many use cases when you just want to send a mail without storing it in a mailbox sent items folders.

Anyway in the problem I'm facing, the mail IS accepted by SM's SMTP but then is stuck in the spool and not delivered outside because the sender mailbox is full, which is kinda a non-sense to me. 

For this particular case, the account is only used with SMTP by a fax/copy machine to send scans to e-mail recipients. So it was setup with a very low mailbox quota as it's not supposed to receive mails (except maybe mailer daemons)

Kind regards
Sébastien Riccio System & Network Admin https://swisscenter.com
0
Sébastien Riccio Replied
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.


Sébastien Riccio System & Network Admin https://swisscenter.com
0
Sébastien Riccio Replied
Oh, fun, when the recipient is a local mailbox and not an external recipient, it doesn't trigger the sender malbox is full issue.
Why reject outgoing mails but not local deliveries ? I don't get it here.

That means the sender using SMTP submission, with a full mailbox can send mails locally but not to remotes (without knowing it)


[2024.01.07] 03:36:48.359 [51090366] Delivery started for testfull@cybermind.ch at 03:36:48
[2024.01.07] 03:36:51.359 [51090366] Added to SpamCheckQueue (0 queued; 2/60 processing)
[2024.01.07] 03:36:51.359 [51090366] [SpamCheckQueue] Begin Processing.
[2024.01.07] 03:36:51.359 [51090366] Blocked Sender Checks started.
[2024.01.07] 03:36:51.359 [51090366] Blocked Sender Checks completed.
[2024.01.07] 03:36:51.359 [51090366] Spam Checks started.
[2024.01.07] 03:36:51.359 [51090366] Spam Checks skipped: User authenticated
[2024.01.07] 03:36:51.359 [51090366] Spam Checks completed.
[2024.01.07] 03:36:51.359 [51090366] Removed from SpamCheckQueue (1 queued or processing)
[2024.01.07] 03:36:54.375 [51090366] Added to LocalDeliveryQueue (0 queued; 2/150 processing)
[2024.01.07] 03:36:54.375 [51090366] [LocalDeliveryQueue] Begin Processing.
[2024.01.07] 03:36:54.375 [51090366] Starting local delivery to madjik@cybermind.ch
[2024.01.07] 03:36:54.812 [51090366] Process delivery status notification step from local recipient success. Recipient: [madjik@cybermind.ch], Notify: [], Delivered: [True], Forwarded: [False], Deleted: False
[2024.01.07] 03:36:54.812 [51090366] Delivery for testfull@cybermind.ch to madjik@cybermind.ch has completed (Delivered) Filter: None
[2024.01.07] 03:36:54.812 [51090366] End delivery to madjik@cybermind.ch (MessageID: <20240107033647.1681121@prism>)
[2024.01.07] 03:36:54.812 [51090366] Removed from LocalDeliveryQueue (0 queued or processing)
[2024.01.07] 03:36:57.375 [51090366] Removing Spool message: Killed: False, Failed: False, Finished: True
[2024.01.07] 03:36:57.375 [51090366] Delivery finished for testfull@cybermind.ch at 03:36:57	[id:599351090366]

Testing from the webmail, it rejects both local and remote recipients, which makes sense as the webmail need storage to save the mail in "Sent" folder. But again, please not with pure SMTP.



Sébastien Riccio System & Network Admin https://swisscenter.com
0
Sébastien Riccio Replied
Now I wonder what I can do to resolve the issue for these users using outgoing only (through SMTP) accounts ?

Appart from using the API to get a list of all over quota mailboxes server-wide. But then what ?

- Increase silently their quota to dismiss the issue (but that would be only temporary as it will get  full again, so nah)

- Notify all these customers their outgoing mails are silently stuck in our mailserver queue because their mailbox is full ?
That would mean they will have to check these mailbox frequently to be sure it's not filled or increase the mailboxes quota and use their quota for these outgoing only mailboxes.
They will ask why we changed this behavior and will want us to go back to previous state.

It's mostly set and forget mailboxes for outgoing mails, they don't care if it can't receive mails because it's over quota. They just want to use it to relay mails...

I don't know what to do at this point :(
Sébastien Riccio System & Network Admin https://swisscenter.com
0
JerseyConnect Team Replied
If the accounts aren't supposed to receive anything and no one is checking them, maybe just create an auto-clean rule to keep the mailbox size in check.

EDIT: OK you can't create an auto-clean rule on the Inbox, so I guess you'd have to pair it with a content rule moving everything to Deleted Items.
0
Employee Replied
Employee Post Marked As Answer
Hi all,

I believe this issue was resolved in Build 8747 (Dec 13, 2023). Please see the following release note: 

Fixed: When a user's mailbox size limit has been met or exceeded, SMTP will continue to retry the delivery multiple times, rather than failing the delivery right away.

Will you please upgrade and let me know if the issue persists?
0
Sébastien Riccio Replied
Hello,

With the latest version it does now indeed rejects the mail right away at submission time, which is an improvement, yes.

Thanks
Sébastien Riccio System & Network Admin https://swisscenter.com

Reply to Thread