[GH-ISSUE #1701] Email body attachment gets truncated to 4k (= message size limit?) #1181

Open
opened 2026-05-07 00:30:52 +02:00 by BreizhHardware · 0 comments

Originally created by @etfz on GitHub (Apr 14, 2026).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1701

Hi,

When publishing by email, message bodies exceeding a certain length are enclosed as an attachment, but the attachments all seem to get truncated to 4096 bytes. Had a glance at the source, and to my rookie eyes it seems like that might happen here, as the truncated body is used for the new message object:
https://github.com/binwiederhier/ntfy/blob/main/server/smtp_server.go#L161

ntfy server 2.17.

server.yml

base-url: "https://notify.system.example.com"
cache-file: "/var/cache/ntfy/cache.db"
cache-duration: 30d
attachment-cache-dir: "/var/cache/ntfy/attachments"
attachment-expiry-duration: "30d"
auth-file: "/var/lib/ntfy/user.db"
auth-default-access: "deny-all"
behind-proxy: true
enable-login: true
manager-interval: 1h

smtp-server-listen: ":25"
smtp-server-domain: "ntfy.example.com"

visitor-request-limit-burst: 300
Originally created by @etfz on GitHub (Apr 14, 2026). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1701 Hi, When publishing by email, message bodies exceeding a certain length are enclosed as an attachment, but the attachments all seem to get truncated to 4096 bytes. Had a glance at the source, and to my rookie eyes it seems like that might happen here, as the truncated body is used for the new message object: https://github.com/binwiederhier/ntfy/blob/main/server/smtp_server.go#L161 ntfy server 2.17. **server.yml** ``` base-url: "https://notify.system.example.com" cache-file: "/var/cache/ntfy/cache.db" cache-duration: 30d attachment-cache-dir: "/var/cache/ntfy/attachments" attachment-expiry-duration: "30d" auth-file: "/var/lib/ntfy/user.db" auth-default-access: "deny-all" behind-proxy: true enable-login: true manager-interval: 1h smtp-server-listen: ":25" smtp-server-domain: "ntfy.example.com" visitor-request-limit-burst: 300 ```
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/ntfy#1181
No description provided.