Send emails from web service through Protonmail

Hi,

I have a Protonmail business account and my own domain is set up with Protonmail as per their recommendations. I can send emails from my TrueNAS server that way.

Now, I like to send emails (invoices) from an external web service lexware.de (german SMB accounting) using my domain. But the configuration fails with error “550 5.7.26 Submission not allowed for messages in which MAIL FROM my_email does not match header From”.

I did put lexwares email server IPs in the SPF record, but I get the same error.

I’d appreciate it if anyone could point me in the right direction.

1 Like

The SPF change will not help in this case. This error comes from Proton’s SMTP submission, not from the receiving side.

Proton only accepts the message if the envelope sender (MAIL FROM) and the From: header are exactly the address for which the SMTP token was created.

So in Lexware, the sender address, SMTP username and From address all need to be the same address. If Lexware is using its own bounce address as envelope sender, Proton will continue to refuse the message.

If Lexware cannot do this, another solution would be to let Lexware send directly from their own servers using your domain. In this case, keep their IPs in your SPF and add their DKIM key if they provide one. Then you don’t use Proton SMTP for Lexware at all.

1 Like

Thank you all for your help, much appreciated.

I have had a look at the Proton SMTP article which pointed my towards SPF. And yes, there was something wrong with the email headers.

And I solved the problem. The error message says '[…] abc@xyz.com does not match header From <“abc@xys.com” '. The missing > and the double quotes made me wonder. In short, Lexware & Proton wanted my plain name in the From field without non-ASCII characters: my name contains an umlaut, so without that it works.