[GH-ISSUE #672] Link attachments directly in the email #493

Open
opened 2026-05-07 00:24:45 +02:00 by BreizhHardware · 3 comments

Originally created by @merspieler on GitHub (Mar 18, 2023).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/672

💡 Idea
I've got the problem that my browser always runs in private mode so I don't get to see the web UI.
I just use this to get email notifications.
I'm sending my self the logs if a backup job fails.
Right now, I need to open another browser (sometimes even install one in the first place) to open the site to get at the log.
I'd like to have a direct link to the attached log in the email

💻 Target components

ntfy server I assume

Originally created by @merspieler on GitHub (Mar 18, 2023). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/672 :bulb: **Idea** I've got the problem that my browser always runs in private mode so I don't get to see the web UI. I just use this to get email notifications. I'm sending my self the logs if a backup job fails. Right now, I need to open another browser (sometimes even install one in the first place) to open the site to get at the log. I'd like to have a direct link to the attached log in the email :computer: **Target components** <!-- Where should this feature/enhancement be added? --> ntfy server I assume
Author
Owner

@binwiederhier commented on GitHub (Mar 19, 2023):

That seems reasonable. We could also just actually attach the attachment in the email instead of linking it, but the link would be easier. Though the link expires after 3h in the default config ... 🤔

<!-- gh-comment-id:1475047435 --> @binwiederhier commented on GitHub (Mar 19, 2023): That seems reasonable. We could also just actually attach the attachment in the email instead of linking it, but the link would be easier. Though the link expires after 3h in the default config ... :thinking:
Author
Owner

@merspieler commented on GitHub (Mar 19, 2023):

Attaching makes sense if the attached file is below a size limit.
Maybe let the user decide via a "attach to email" option?

<!-- gh-comment-id:1475199896 --> @merspieler commented on GitHub (Mar 19, 2023): Attaching makes sense if the attached file is below a size limit. Maybe let the user decide via a "attach to email" option?
Author
Owner

@binwiederhier commented on GitHub (Apr 12, 2023):

"Let the user decide" always means "one more option", and that also means that people complain about "too many options". This is not an easy choice IMHO.

There is also the issue of illegal/inappropriate email attachments being sent via the ntfy email server. With 3h-expiry attachments, it's not worth it for the bad guys to use ntfy as a file host. Emails do not expire, so I am hesitant to add this option at all.

If there was an option it'd probably be this:

Could be a server side option, which governs if files can be attached to emails:

smtp-sender-attach-file-limit: 10M  # Set to 0/disable on ntfy.sh
smtp-sender-attach-file-mode: auto | always | disabled  # auto = attach if < 2 MB, ...

And then there could also be a client-header that we could send on request

curl -T image.jpg -H "email-attach: yes" ntfy.sh/mytopic

Honestly though. I don't really like these at all. I'd probably much rather just add the link in the email.

<!-- gh-comment-id:1505330748 --> @binwiederhier commented on GitHub (Apr 12, 2023): "Let the user decide" always means "one more option", and that also means that people complain about "too many options". This is not an easy choice IMHO. There is also the issue of illegal/inappropriate email attachments being sent via the ntfy email server. With 3h-expiry attachments, it's not worth it for the bad guys to use ntfy as a file host. Emails do not expire, so I am hesitant to add this option at all. If there was an option it'd probably be this: Could be a server side option, which governs if files can be attached to emails: ``` smtp-sender-attach-file-limit: 10M # Set to 0/disable on ntfy.sh smtp-sender-attach-file-mode: auto | always | disabled # auto = attach if < 2 MB, ... ``` And then there could also be a client-header that we could send on request ``` curl -T image.jpg -H "email-attach: yes" ntfy.sh/mytopic ``` Honestly though. I don't really like these at all. I'd probably much rather just add the link in the email.
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#493
No description provided.