ProtonMail / proton-bridge

Proton Mail Bridge application
GNU General Public License v3.0
1.17k stars 157 forks source link

Cannot send email via sSMTP #292

Closed UlyssesZh closed 1 year ago

UlyssesZh commented 2 years ago

I have a headless Arch Linux device, and I want it to send emails automatically through ProtonMail. I tried the following steps:

  1. have a paid ProtonMail account
  2. install and set up proton-bridge
    yay -S protonmail-bridge-nogui
    protonmail-bridge --cli # set up my account
    systemctl --user start bridge
  3. install and set up ssmtp
    sudo pacman -S ssmtp
    sudo vim /etc/ssmtp/ssmtp.conf
    #
    # /etc/ssmtp.conf -- a config file for sSMTP sendmail.
    #
    # See the ssmtp.conf(5) man page for a more verbose explanation of the
    # available options.
    root=`MY_ROOT`
    mailhub=127.0.0.1:1025
    rewritedomain=pm.me
    hostname=pm.me
    UseTLS=yes
    TLS_CA_File=/etc/ssl/certs/ca-certificates.crt
    UseSTARTTLS=yes
    AuthUser=`MY_EMAIL`
    AuthPass=`MY_PASS`
    AuthMethod=LOGIN
  4. send an email
    echo -e 'Subject: test\n\nTesting ssmtp' | sendmail -v `AN_EMAIL_ADDRESS`

Then I got the results:

[<-] 220 127.0.0.1 ESMTP Service Ready
[->] EHLO pm.me
[<-] 250 AUTH PLAIN LOGIN
[->] STARTTLS
[<-] 220 2.0.0 Ready to start TLS
sendmail: Cannot open 127.0.0.1:1025

ProtonMai Bridge has this error:

ERRO[Sep  3 20:47:26.949] TLS handshake error for 127.0.0.1:60910: local error: tls: bad record MAC  protocol=SMTP

It's very probable that this problem will just be solved if #245 is solved.

mike-lloyd03 commented 2 years ago

Were you able to get this fixed? I'm trying to do the exact same thing.

UlyssesZh commented 2 years ago

Were you able to get this fixed?

I gave up.

andrzejsza commented 1 year ago

sorry to hear, but we don't have similar setup to test/help with the config.