[GH-ISSUE #1220] Cannot attach file to email #996

Closed
opened 2026-02-27 11:14:38 +03:00 by kerem · 12 comments
Owner

Originally created by @svandecappelle on GitHub (Aug 24, 2017).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/1220

Impacted versions

  • Modoboa: 1.8.1
  • installer used: Yes
  • Webserver: Nginx

Steps to reproduce

Send a mail and add an attachement file. (tested file is 400 octets sized)

Current behavior

It generate an error 'file too big' (max size is 2048).

Expected behavior

File added and uploaded on email.

Video/Screenshot link (optional)

http://imgur.com/a/A5pxq

Originally created by @svandecappelle on GitHub (Aug 24, 2017). Original GitHub issue: https://github.com/modoboa/modoboa/issues/1220 # Impacted versions * Modoboa: 1.8.1 * installer used: Yes * Webserver: Nginx # Steps to reproduce Send a mail and add an attachement file. (tested file is 400 octets sized) # Current behavior It generate an error 'file too big' (max size is 2048). # Expected behavior File added and uploaded on email. # Video/Screenshot link (optional) http://imgur.com/a/A5pxq
kerem closed this issue 2026-02-27 11:14:39 +03:00
Author
Owner

@tonioo commented on GitHub (Aug 25, 2017):

You can change the max. size allowed for uploaded files. Go to Modoboa > Parameters > Webmail.

<!-- gh-comment-id:324875025 --> @tonioo commented on GitHub (Aug 25, 2017): You can change the max. size allowed for uploaded files. Go to Modoboa > Parameters > Webmail.
Author
Owner

@svandecappelle commented on GitHub (Aug 25, 2017):

But in this case the file I tried to upload was lower than the parameter.

<!-- gh-comment-id:325052092 --> @svandecappelle commented on GitHub (Aug 25, 2017): But in this case the file I tried to upload was lower than the parameter.
Author
Owner

@tonioo commented on GitHub (Sep 17, 2017):

@svandecappelle Have you tried to change the max value?

<!-- gh-comment-id:330032912 --> @tonioo commented on GitHub (Sep 17, 2017): @svandecappelle Have you tried to change the max value?
Author
Owner

@VladimirKiev commented on GitHub (Feb 10, 2020):

@tonioo Have you tried to change the max value?

Hi. I have the same problem. Changed the value to a larger one (20480) - writes the same error but with the new value (Attachment is too big (limit: 20480).
Please tell me where you can change this value to fix the error ...

<!-- gh-comment-id:584079556 --> @VladimirKiev commented on GitHub (Feb 10, 2020): > @tonioo Have you tried to change the max value? Hi. I have the same problem. Changed the value to a larger one (20480) - writes the same error but with the new value (Attachment is too big (limit: 20480). Please tell me where you can change this value to fix the error ...
Author
Owner

@tonioo commented on GitHub (Feb 10, 2020):

@VladimirKiev Try with something like this: 20M

<!-- gh-comment-id:584155434 --> @tonioo commented on GitHub (Feb 10, 2020): @VladimirKiev Try with something like this: 20M
Author
Owner

@VladimirKiev commented on GitHub (Feb 10, 2020):

@VladimirKiev Try with something like this: 20M

New error: Failed to save attachment: [Errno 2] No such file or directory: '/srv/modoboa/instance/media/webmail/tmp05zWR1'

<!-- gh-comment-id:584174468 --> @VladimirKiev commented on GitHub (Feb 10, 2020): > @VladimirKiev Try with something like this: 20M New error: Failed to save attachment: [Errno 2] No such file or directory: '/srv/modoboa/instance/media/webmail/tmp05zWR1'
Author
Owner

@VladimirKiev commented on GitHub (Feb 11, 2020):

@VladimirKiev Try with something like this: 20M

I also checked the web_utils.py file as an example here github.com/modoboa/modoboa@9f2ea29a9f/modoboa/lib/web_utils.py (L117)
changed the values of client_max_body_size on nginx.conf. nothing helped. Your help is very necessary ...

<!-- gh-comment-id:584683075 --> @VladimirKiev commented on GitHub (Feb 11, 2020): > @VladimirKiev Try with something like this: 20M I also checked the web_utils.py file as an example here https://github.com/modoboa/modoboa/blob/9f2ea29a9fe0cf78db2cf340e286601dc799756a/modoboa/lib/web_utils.py#L117 changed the values of client_max_body_size on nginx.conf. nothing helped. Your help is very necessary ...
Author
Owner

@tonioo commented on GitHub (Feb 12, 2020):

@VladimirKiev Have you checked if the /srv/modoboa/instance/media/webmail/folder exists?

<!-- gh-comment-id:585304636 --> @tonioo commented on GitHub (Feb 12, 2020): @VladimirKiev Have you checked if the `/srv/modoboa/instance/media/webmail/`folder exists?
Author
Owner

@VladimirKiev commented on GitHub (Feb 13, 2020):

@VladimirKiev Have you checked if the /srv/modoboa/instance/media/webmail/folder exists?

There is /srv/modoboa/instance/media/modoboa_webmail folder...

image

<!-- gh-comment-id:585597082 --> @VladimirKiev commented on GitHub (Feb 13, 2020): > @VladimirKiev Have you checked if the `/srv/modoboa/instance/media/webmail/`folder exists? There is /srv/modoboa/instance/media/modoboa_webmail folder... ![image](https://user-images.githubusercontent.com/53512202/74412578-707ae180-4e46-11ea-9d47-9eb5e81ff009.png)
Author
Owner

@ikatheria commented on GitHub (Jun 20, 2022):

Modoboa stopped sending the attachment emails suddenly. Aamvis status

Jun 20 20:01:04 mailoddy.com amavis[124711]: (124711-02) (!)ESMTP ABORTING: Connection broken during DATA: at (eval 107) line 270.
Jun 20 20:01:04 mailoddy.com amavis[124711]: (124711-02) (!)ESMTP: NOTICE: ABORTING the session: Connection broken during DATA: at (eval 107) line 270.
Jun 20 20:09:23 mailoddy.com amavis[124711]: (124711-03) (!)ESMTP ABORTING: timed out during waiting for input from client
Jun 20 20:09:23 mailoddy.com amavis[124711]: (124711-03) (!)ESMTP: NOTICE: ABORTING the session: timed out during waiting for input from client
Jun 20 20:10:41 mailoddy.com amavis[124711]: (124711-05) (!)ESMTP ABORTING: Connection broken during DATA: at (eval 107) line 270.
Jun 20 20:10:41 mailoddy.com amavis[124711]: (124711-05) (!)ESMTP: NOTICE: ABORTING the session: Connection broken during DATA: at (eval 107) line 270.

without attachment emails are working fine.

<!-- gh-comment-id:1160814171 --> @ikatheria commented on GitHub (Jun 20, 2022): Modoboa stopped sending the attachment emails suddenly. Aamvis status Jun 20 20:01:04 mailoddy.com amavis[124711]: (124711-02) (!)ESMTP ABORTING: Connection broken during DATA: at (eval 107) line 270. Jun 20 20:01:04 mailoddy.com amavis[124711]: (124711-02) (!)ESMTP: NOTICE: ABORTING the session: Connection broken during DATA: at (eval 107) line 270. Jun 20 20:09:23 mailoddy.com amavis[124711]: (124711-03) (!)ESMTP ABORTING: timed out during waiting for input from client Jun 20 20:09:23 mailoddy.com amavis[124711]: (124711-03) (!)ESMTP: NOTICE: ABORTING the session: timed out during waiting for input from client Jun 20 20:10:41 mailoddy.com amavis[124711]: (124711-05) (!)ESMTP ABORTING: Connection broken during DATA: at (eval 107) line 270. Jun 20 20:10:41 mailoddy.com amavis[124711]: (124711-05) (!)ESMTP: NOTICE: ABORTING the session: Connection broken during DATA: at (eval 107) line 270. without attachment emails are working fine.
Author
Owner

@ikatheria commented on GitHub (Jun 20, 2022):

/var/log/mail.log

Jun 20 20:15:20 mailoddy postfix/postscreen[127674]: CONNECT from [45.125.65.159]:63230 to [74.208.54.131]:25
Jun 20 20:15:26 mailoddy postfix/postscreen[127674]: PASS NEW [45.125.65.159]:63230
Jun 20 20:15:26 mailoddy postfix/smtpd[127679]: warning: hostname srv-45-125-65-159.serveroffer.net does not resolve to address 45.125.65.159: Name or service not known
Jun 20 20:15:26 mailoddy postfix/smtpd[127679]: connect from unknown[45.125.65.159]
Jun 20 20:15:28 mailoddy postfix/smtps/smtpd[125159]: lost connection after DATA (6 bytes) from unknown[103.253.174.76]
Jun 20 20:15:28 mailoddy postfix/smtps/smtpd[125159]: disconnect from unknown[103.253.174.76] ehlo=1 auth=1 mail=1 rcpt=1 data=0/1 commands=4/5
Jun 20 20:15:28 mailoddy amavis[124711]: (124711-08) (!)ESMTP ABORTING: Connection broken during DATA: at (eval 107) line 270.
Jun 20 20:15:28 mailoddy amavis[124711]: (124711-08) (!)ESMTP: NOTICE: ABORTING the session: Connection broken during DATA: at (eval 107) line 270.
Jun 20 20:15:29 mailoddy postfix/smtpd[127679]: warning: unknown[45.125.65.159]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Jun 20 20:15:29 mailoddy postfix/smtpd[127679]: disconnect from unknown[45.125.65.159] ehlo=1 auth=0/1 quit=1 commands=2/3
Jun 20 20:15:34 mailoddy postfix/postscreen[127674]: CONNECT from [141.98.10.203]:54375 to [74.208.54.131]:25
Jun 20 20:15:36 mailoddy postfix/postscreen[127674]: CONNECT from [141.98.10.24]:56222 to [74.208.54.131]:25
Jun 20 20:15:40 mailoddy postfix/postscreen[127674]: PASS NEW [141.98.10.203]:54375
Jun 20 20:15:40 mailoddy postfix/smtpd[127679]: connect from unknown[141.98.10.203]
Jun 20 20:15:42 mailoddy postfix/postscreen[127674]: PASS NEW [141.98.10.24]:56222
Jun 20 20:15:42 mailoddy postfix/smtpd[127682]: connect from unknown[141.98.10.24]
Jun 20 20:15:43 mailoddy postfix/smtpd[127679]: warning: unknown[141.98.10.203]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Jun 20 20:15:43 mailoddy postfix/smtpd[127679]: disconnect from unknown[141.98.10.203] ehlo=1 auth=0/1 quit=1 commands=2/3
Jun 20 20:15:45 mailoddy postfix/smtpd[127682]: warning: unknown[141.98.10.24]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Jun 20 20:15:45 mailoddy postfix/smtpd[127682]: disconnect from unknown[141.98.10.24] ehlo=1 auth=0/1 quit=1 commands=2/3
Jun 20 20:16:14 mailoddy postfix/smtps/smtpd[125159]: warning: hostname 174.253.103.in-addr.tripleplay.in does not resolve to address 103.253.174.76: Name or service not known
Jun 20 20:16:14 mailoddy postfix/smtps/smtpd[125159]: connect from unknown[103.253.174.76]

<!-- gh-comment-id:1160816717 --> @ikatheria commented on GitHub (Jun 20, 2022): /var/log/mail.log Jun 20 20:15:20 mailoddy postfix/postscreen[127674]: CONNECT from [45.125.65.159]:63230 to [74.208.54.131]:25 Jun 20 20:15:26 mailoddy postfix/postscreen[127674]: PASS NEW [45.125.65.159]:63230 Jun 20 20:15:26 mailoddy postfix/smtpd[127679]: warning: hostname srv-45-125-65-159.serveroffer.net does not resolve to address 45.125.65.159: Name or service not known Jun 20 20:15:26 mailoddy postfix/smtpd[127679]: connect from unknown[45.125.65.159] Jun 20 20:15:28 mailoddy postfix/smtps/smtpd[125159]: lost connection after DATA (6 bytes) from unknown[103.253.174.76] Jun 20 20:15:28 mailoddy postfix/smtps/smtpd[125159]: disconnect from unknown[103.253.174.76] ehlo=1 auth=1 mail=1 rcpt=1 data=0/1 commands=4/5 Jun 20 20:15:28 mailoddy amavis[124711]: (124711-08) (!)ESMTP ABORTING: Connection broken during DATA: at (eval 107) line 270. Jun 20 20:15:28 mailoddy amavis[124711]: (124711-08) (!)ESMTP: NOTICE: ABORTING the session: Connection broken during DATA: at (eval 107) line 270. Jun 20 20:15:29 mailoddy postfix/smtpd[127679]: warning: unknown[45.125.65.159]: SASL LOGIN authentication failed: UGFzc3dvcmQ6 Jun 20 20:15:29 mailoddy postfix/smtpd[127679]: disconnect from unknown[45.125.65.159] ehlo=1 auth=0/1 quit=1 commands=2/3 Jun 20 20:15:34 mailoddy postfix/postscreen[127674]: CONNECT from [141.98.10.203]:54375 to [74.208.54.131]:25 Jun 20 20:15:36 mailoddy postfix/postscreen[127674]: CONNECT from [141.98.10.24]:56222 to [74.208.54.131]:25 Jun 20 20:15:40 mailoddy postfix/postscreen[127674]: PASS NEW [141.98.10.203]:54375 Jun 20 20:15:40 mailoddy postfix/smtpd[127679]: connect from unknown[141.98.10.203] Jun 20 20:15:42 mailoddy postfix/postscreen[127674]: PASS NEW [141.98.10.24]:56222 Jun 20 20:15:42 mailoddy postfix/smtpd[127682]: connect from unknown[141.98.10.24] Jun 20 20:15:43 mailoddy postfix/smtpd[127679]: warning: unknown[141.98.10.203]: SASL LOGIN authentication failed: UGFzc3dvcmQ6 Jun 20 20:15:43 mailoddy postfix/smtpd[127679]: disconnect from unknown[141.98.10.203] ehlo=1 auth=0/1 quit=1 commands=2/3 Jun 20 20:15:45 mailoddy postfix/smtpd[127682]: warning: unknown[141.98.10.24]: SASL LOGIN authentication failed: UGFzc3dvcmQ6 Jun 20 20:15:45 mailoddy postfix/smtpd[127682]: disconnect from unknown[141.98.10.24] ehlo=1 auth=0/1 quit=1 commands=2/3 Jun 20 20:16:14 mailoddy postfix/smtps/smtpd[125159]: warning: hostname 174.253.103.in-addr.tripleplay.in does not resolve to address 103.253.174.76: Name or service not known Jun 20 20:16:14 mailoddy postfix/smtps/smtpd[125159]: connect from unknown[103.253.174.76]
Author
Owner

@ikatheria commented on GitHub (Jun 20, 2022):

/var/log/mail.log

Jun 20 20:15:20 mailoddy postfix/postscreen[127674]: CONNECT from [45.125.65.159]:63230 to [74.208.54.131]:25
Jun 20 20:15:26 mailoddy postfix/postscreen[127674]: PASS NEW [45.125.65.159]:63230
Jun 20 20:15:26 mailoddy postfix/smtpd[127679]: warning: hostname srv-45-125-65-159.serveroffer.net does not resolve to address 45.125.65.159: Name or service not known
Jun 20 20:15:26 mailoddy postfix/smtpd[127679]: connect from unknown[45.125.65.159]
Jun 20 20:15:28 mailoddy postfix/smtps/smtpd[125159]: lost connection after DATA (6 bytes) from unknown[103.253.174.76]
Jun 20 20:15:28 mailoddy postfix/smtps/smtpd[125159]: disconnect from unknown[103.253.174.76] ehlo=1 auth=1 mail=1 rcpt=1 data=0/1 commands=4/5
Jun 20 20:15:28 mailoddy amavis[124711]: (124711-08) (!)ESMTP ABORTING: Connection broken during DATA: at (eval 107) line 270.
Jun 20 20:15:28 mailoddy amavis[124711]: (124711-08) (!)ESMTP: NOTICE: ABORTING the session: Connection broken during DATA: at (eval 107) line 270.
Jun 20 20:15:29 mailoddy postfix/smtpd[127679]: warning: unknown[45.125.65.159]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Jun 20 20:15:29 mailoddy postfix/smtpd[127679]: disconnect from unknown[45.125.65.159] ehlo=1 auth=0/1 quit=1 commands=2/3
Jun 20 20:15:34 mailoddy postfix/postscreen[127674]: CONNECT from [141.98.10.203]:54375 to [74.208.54.131]:25
Jun 20 20:15:36 mailoddy postfix/postscreen[127674]: CONNECT from [141.98.10.24]:56222 to [74.208.54.131]:25
Jun 20 20:15:40 mailoddy postfix/postscreen[127674]: PASS NEW [141.98.10.203]:54375
Jun 20 20:15:40 mailoddy postfix/smtpd[127679]: connect from unknown[141.98.10.203]
Jun 20 20:15:42 mailoddy postfix/postscreen[127674]: PASS NEW [141.98.10.24]:56222
Jun 20 20:15:42 mailoddy postfix/smtpd[127682]: connect from unknown[141.98.10.24]
Jun 20 20:15:43 mailoddy postfix/smtpd[127679]: warning: unknown[141.98.10.203]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Jun 20 20:15:43 mailoddy postfix/smtpd[127679]: disconnect from unknown[141.98.10.203] ehlo=1 auth=0/1 quit=1 commands=2/3
Jun 20 20:15:45 mailoddy postfix/smtpd[127682]: warning: unknown[141.98.10.24]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Jun 20 20:15:45 mailoddy postfix/smtpd[127682]: disconnect from unknown[141.98.10.24] ehlo=1 auth=0/1 quit=1 commands=2/3
Jun 20 20:16:14 mailoddy postfix/smtps/smtpd[125159]: warning: hostname 174.253.103.in-addr.tripleplay.in does not resolve to address 103.253.174.76: Name or service not known
Jun 20 20:16:14 mailoddy postfix/smtps/smtpd[125159]: connect from unknown[103.253.174.76]

<!-- gh-comment-id:1160817284 --> @ikatheria commented on GitHub (Jun 20, 2022): /var/log/mail.log Jun 20 20:15:20 mailoddy postfix/postscreen[127674]: CONNECT from [45.125.65.159]:63230 to [74.208.54.131]:25 Jun 20 20:15:26 mailoddy postfix/postscreen[127674]: PASS NEW [45.125.65.159]:63230 Jun 20 20:15:26 mailoddy postfix/smtpd[127679]: warning: hostname srv-45-125-65-159.serveroffer.net does not resolve to address 45.125.65.159: Name or service not known Jun 20 20:15:26 mailoddy postfix/smtpd[127679]: connect from unknown[45.125.65.159] Jun 20 20:15:28 mailoddy postfix/smtps/smtpd[125159]: lost connection after DATA (6 bytes) from unknown[103.253.174.76] Jun 20 20:15:28 mailoddy postfix/smtps/smtpd[125159]: disconnect from unknown[103.253.174.76] ehlo=1 auth=1 mail=1 rcpt=1 data=0/1 commands=4/5 Jun 20 20:15:28 mailoddy amavis[124711]: (124711-08) (!)ESMTP ABORTING: Connection broken during DATA: at (eval 107) line 270. Jun 20 20:15:28 mailoddy amavis[124711]: (124711-08) (!)ESMTP: NOTICE: ABORTING the session: Connection broken during DATA: at (eval 107) line 270. Jun 20 20:15:29 mailoddy postfix/smtpd[127679]: warning: unknown[45.125.65.159]: SASL LOGIN authentication failed: UGFzc3dvcmQ6 Jun 20 20:15:29 mailoddy postfix/smtpd[127679]: disconnect from unknown[45.125.65.159] ehlo=1 auth=0/1 quit=1 commands=2/3 Jun 20 20:15:34 mailoddy postfix/postscreen[127674]: CONNECT from [141.98.10.203]:54375 to [74.208.54.131]:25 Jun 20 20:15:36 mailoddy postfix/postscreen[127674]: CONNECT from [141.98.10.24]:56222 to [74.208.54.131]:25 Jun 20 20:15:40 mailoddy postfix/postscreen[127674]: PASS NEW [141.98.10.203]:54375 Jun 20 20:15:40 mailoddy postfix/smtpd[127679]: connect from unknown[141.98.10.203] Jun 20 20:15:42 mailoddy postfix/postscreen[127674]: PASS NEW [141.98.10.24]:56222 Jun 20 20:15:42 mailoddy postfix/smtpd[127682]: connect from unknown[141.98.10.24] Jun 20 20:15:43 mailoddy postfix/smtpd[127679]: warning: unknown[141.98.10.203]: SASL LOGIN authentication failed: UGFzc3dvcmQ6 Jun 20 20:15:43 mailoddy postfix/smtpd[127679]: disconnect from unknown[141.98.10.203] ehlo=1 auth=0/1 quit=1 commands=2/3 Jun 20 20:15:45 mailoddy postfix/smtpd[127682]: warning: unknown[141.98.10.24]: SASL LOGIN authentication failed: UGFzc3dvcmQ6 Jun 20 20:15:45 mailoddy postfix/smtpd[127682]: disconnect from unknown[141.98.10.24] ehlo=1 auth=0/1 quit=1 commands=2/3 Jun 20 20:16:14 mailoddy postfix/smtps/smtpd[125159]: warning: hostname 174.253.103.in-addr.tripleplay.in does not resolve to address 103.253.174.76: Name or service not known Jun 20 20:16:14 mailoddy postfix/smtps/smtpd[125159]: connect from unknown[103.253.174.76]
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#996
No description provided.