YoRyan / mailrise

An SMTP gateway for Apprise notifications.
https://mailrise.xyz
MIT License
892 stars 39 forks source link

when attempting to configure proxmox to use mailrise I get a wierd error #123

Open simonmcnair opened 4 months ago

simonmcnair commented 4 months ago

thanks for looking at this.

telegram@mailrise.xyz works via powershell test: Send-MailMessage -from simon@local -to "telegram@mailrise.xyz" -subject "test" -body "test" -smtpserver 10.150.30.240 -port 8025

image

[2024-06-25 12:11:27] WARNING:apprise:Failed to send Telegram notification to 5526294333: Bad Request: can't parse entities: Unsupported start tag "simon@local.com" at byte offset 34, error=400. [2024-06-25 12:11:27] WARNING:mailrise.skeleton:Notification failed: address: [ Proxmox VE simon@local.com ➤ telegram@mailrise.xyz ] subject: [ Test notification ] body: [ This is a test of th (0.1K) ] [2024-06-25 12:12:20] WARNING:apprise:Failed to send Telegram notification to 5526294333: Bad Request: can't parse entities: Unsupported start tag "telegram@mailrise.xyz" at byte offset 34, error=400. [2024-06-25 12:12:20] WARNING:mailrise.skeleton:Notification failed: address: [ Proxmox VE telegram@mailrise.xyz ➤ telegram@mailrise.xyz ] subject: [ Test notification ] body: [ This is a test of th (0.1K) ] [2024-06-25 12:15:36] WARNING:apprise:Failed to send Telegram notification to 5526294333: Bad Request: can't parse entities: Unsupported start tag "simon" at byte offset 34, error=400. [2024-06-25 12:15:36] WARNING:mailrise.skeleton:Notification failed: address: [ Proxmox VE ➤ telegram@mailrise.xyz ] subject: [ Test notification ] body: [ This is a test of th (0.1K) ] [2024-06-25 12:17:54] WARNING:apprise:Failed to send Telegram notification to 5526294333: Bad Request: can't parse entities: Unsupported start tag "simon" at byte offset 34, error=400. [2024-06-25 12:17:54] WARNING:mailrise.skeleton:Notification failed: address: [ Proxmox VE ➤ telegram@mailrise.xyz ] subject: [ Test notification ] body: [ This is a test of th (0.1K) ]

sachapan commented 4 months ago

Try it with a valid email address in the 'From Address' field. That works for me.

AlBundy33 commented 3 months ago

I assume that proxmox sets <simon@local.com> as sender. do you get the same error with

Send-MailMessage -from "<simon@local.com>" -to "telegram@mailrise.xyz" -subject "test" -body "test" -smtpserver 10.150.30.240 -port 8025
Deniom3 commented 2 months ago

I encountered a similar problem when sending from proxmox. There was an error in the logs:

WARNING:mailrise.skeleton:Notification failed: address: [ Proxmox VE <proxmox@domain.com> ➤ proxmox@domain.com ] subject: [ Test notification  ] body: [ This is a test of th (0.0K) ]

By chance I managed to find out what the problem was. Mailrise does not work correctly with the author field. The problem goes away if you put a space there. It seems to me that the problem is on the mailrise side, since alternative solutions handle this situation correctly.

P.S. Until the next edit of the submission

Example of working settings: image

configs:
  "proxmox@domain.com":
    urls:
      - tgram://....
Deniom3 commented 2 months ago

Unfortunately, although the above setting worked for testing, it did not work in real notifications. The problem is still the same: the sender's nickname is transmitted, which breaks the entire logic of parsing recipients.

[2024-08-25 10:38:18] WARNING:apprise:Failed to send Telegram notification to <chatid>: Bad Request: can't parse entities: Unsupported start tag "proxmox@domain.com" at byte offset 73, error=400.
[2024-08-25 10:38:18] WARNING:mailrise.skeleton:Notification failed: address: [ Proxmox <proxmox@domain.com> ➤ proxmox@domain.com ] subject: [ vzdump backup status (proxmox.domain.com): backup successful  ] body: [ <html>
 (3.4K) ]

I managed to solve the problem only partially (html is not displayed correctly in telegram messages), but the notifications themselves finally arrive with these settings:

image

configs:
  "*@proxmox.domain.com":
    urls:
      - tgram://....
    mailrise:
      body_format: text
luispabon commented 1 week ago

Is there any way to configure proxmox not to format these as HTML to begin with?