nextcloud / mail

💌 Mail app for Nextcloud
https://apps.nextcloud.com/apps/mail
GNU Affero General Public License v3.0
844 stars 260 forks source link

Handle message size limits on SMTP #8295

Open ChristophWurst opened 1 year ago

ChristophWurst commented 1 year ago

Steps to reproduce

  1. Have a server with a message size restriction, e.g. 10MB
  2. Send email with a 11.5MB attachment

Expected behavior

Message is sent

Actual behavior

https://nextcloud-gmbh.sentry.io/issues/4032642026

Horde_Smtp_Exception: Message size exceeds fixed limit
#14 /mail/vendor/nextcloud/horde-smtp/lib/Horde/Smtp.php(1076): Horde_Smtp::_getResponse
#13 /mail/vendor/nextcloud/horde-smtp/lib/Horde/Smtp.php(659): Horde_Smtp::send
#12 /mail/vendor/bytestream/horde-mail/lib/Horde/Mail/Transport/Smtphorde.php(143): Horde_Mail_Transport_Smtphorde::send
#11 /mail/vendor/bytestream/horde-mime/lib/Horde/Mime/Part.php(1620): Horde_Mime_Part::send
#10 /mail/vendor/bytestream/horde-mime/lib/Horde/Mime/Mail.php(479): Horde_Mime_Mail::send
#9 /mail/lib/Service/MailTransmission.php(272): OCA\Mail\Service\MailTransmission::sendMessage
#8 /mail/lib/Service/MailTransmission.php(344): OCA\Mail\Service\MailTransmission::sendLocalMessage
#7 /mail/lib/Service/OutboxService.php(142): OCA\Mail\Service\OutboxService::sendMessage
#6 /mail/lib/Controller/OutboxController.php(227): OCA\Mail\Controller\OutboxController::send
#5 /var/www/cloud.domain.com/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(230): OC\AppFramework\Http\Dispatcher::executeController
#4 /var/www/cloud.domain.com/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(137): OC\AppFramework\Http\Dispatcher::dispatch
#3 /var/www/cloud.domain.com/nextcloud/lib/private/AppFramework/App.php(183): OC\AppFramework\App::main
#2 /var/www/cloud.domain.com/nextcloud/lib/private/Route/Router.php(315): OC\Route\Router::match
#1 /var/www/cloud.domain.com/nextcloud/lib/base.php(1052): OC::handleRequest
#0 /var/www/cloud.domain.com/nextcloud/index.php(36): null

Horde_Mail_Exception: Message size exceeds fixed limit
#12 /mail/vendor/bytestream/horde-mail/lib/Horde/Mail/Transport/Smtphorde.php(145): Horde_Mail_Transport_Smtphorde::send
#11 /mail/vendor/bytestream/horde-mime/lib/Horde/Mime/Part.php(1620): Horde_Mime_Part::send
#10 /mail/vendor/bytestream/horde-mime/lib/Horde/Mime/Mail.php(479): Horde_Mime_Mail::send
#9 /mail/lib/Service/MailTransmission.php(272): OCA\Mail\Service\MailTransmission::sendMessage
#8 /mail/lib/Service/MailTransmission.php(344): OCA\Mail\Service\MailTransmission::sendLocalMessage
#7 /mail/lib/Service/OutboxService.php(142): OCA\Mail\Service\OutboxService::sendMessage
#6 /mail/lib/Controller/OutboxController.php(227): OCA\Mail\Controller\OutboxController::send
#5 /var/www/cloud.domain.com/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(230): OC\AppFramework\Http\Dispatcher::executeController
#4 /var/www/cloud.domain.com/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(137): OC\AppFramework\Http\Dispatcher::dispatch
#3 /var/www/cloud.domain.com/nextcloud/lib/private/AppFramework/App.php(183): OC\AppFramework\App::main
#2 /var/www/cloud.domain.com/nextcloud/lib/private/Route/Router.php(315): OC\Route\Router::match
#1 /var/www/cloud.domain.com/nextcloud/lib/base.php(1052): OC::handleRequest
#0 /var/www/cloud.domain.com/nextcloud/index.php(36): null

Horde_Mime_Exception: Message size exceeds fixed limit
#11 /mail/vendor/bytestream/horde-mime/lib/Horde/Mime/Part.php(1642): Horde_Mime_Part::send
#10 /mail/vendor/bytestream/horde-mime/lib/Horde/Mime/Mail.php(479): Horde_Mime_Mail::send
#9 /mail/lib/Service/MailTransmission.php(272): OCA\Mail\Service\MailTransmission::sendMessage
#8 /mail/lib/Service/MailTransmission.php(344): OCA\Mail\Service\MailTransmission::sendLocalMessage
#7 /mail/lib/Service/OutboxService.php(142): OCA\Mail\Service\OutboxService::sendMessage
#6 /mail/lib/Controller/OutboxController.php(227): OCA\Mail\Controller\OutboxController::send
#5 /var/www/cloud.domain.com/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(230): OC\AppFramework\Http\Dispatcher::executeController
#4 /var/www/cloud.domain.com/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(137): OC\AppFramework\Http\Dispatcher::dispatch
#3 /var/www/cloud.domain.com/nextcloud/lib/private/AppFramework/App.php(183): OC\AppFramework\App::main
#2 /var/www/cloud.domain.com/nextcloud/lib/private/Route/Router.php(315): OC\Route\Router::match
#1 /var/www/cloud.domain.com/nextcloud/lib/base.php(1052): OC::handleRequest
#0 /var/www/cloud.domain.com/nextcloud/index.php(36): null

OCA\Mail\Exception\ServiceException: Could not send message: Message size exceeds fixed limit
#9 /mail/lib/Service/MailTransmission.php(274): OCA\Mail\Service\MailTransmission::sendMessage
#8 /mail/lib/Service/MailTransmission.php(344): OCA\Mail\Service\MailTransmission::sendLocalMessage
#7 /mail/lib/Service/OutboxService.php(142): OCA\Mail\Service\OutboxService::sendMessage
#6 /mail/lib/Controller/OutboxController.php(227): OCA\Mail\Controller\OutboxController::send
#5 /var/www/cloud.domain.com/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(230): OC\AppFramework\Http\Dispatcher::executeController
#4 /var/www/cloud.domain.com/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(137): OC\AppFramework\Http\Dispatcher::dispatch
#3 /var/www/cloud.domain.com/nextcloud/lib/private/AppFramework/App.php(183): OC\AppFramework\App::main
#2 /var/www/cloud.domain.com/nextcloud/lib/private/Route/Router.php(315): OC\Route\Router::match
#1 /var/www/cloud.domain.com/nextcloud/lib/base.php(1052): OC::handleRequest
#0 /var/www/cloud.domain.com/nextcloud/index.php(36): null

Mail app version

3.0.0

Mailserver or service

No response

Operating system

No response

PHP engine version

None

Web server

None

Database

None

Additional info

No response

ChristophWurst commented 1 year ago

The same attachment can be sent from Thunderbird. needs confirmation

ChristophWurst commented 1 year ago

Thunderbird

20230324_103532

Gnome Evolution

Bildschirmfoto vom 2023-03-24 10-34-01

corvus-albus commented 17 hours ago

For over a week now, we face the "Message size exceeds fixed limit" error. As an admin, I have no chance to find out, who's responsible. The username is not included in the log. The user himself likely hasn't noticed at sending time, that his E-Mail wasn't send. Otherwise he would have take action. If he recognizes afterwards, that his email wasn't send, he will blame the mail-app being unreliable. Because I don't know the username, I can't give a hint to the user in question. Now the situation is: an unsure user and a log filled with errors. Perhaps it is a good idea to include the username in the error log until this issue is closed.