2

I'm trying to send mails from command line with my 1and1 credentials.

But if the following configuration worked to send mails from my nexcloud server :

  • send mode : smtp
  • encryption : SSL/TLS
  • from address : contact@mydomain.fr
  • Authentication method : login
  • Authentication required : yes
  • server address : auth.smtp.1and1.fr:465
  • Credentials : contact@mydomain.fr - mypassword

The following configuration and command still fail :

/etc/ssmtp/ssmtp.conf :

AuthUser=contact@mydomain.fr
AuthPass=mypassword
mailhub=auth.smtp.1and1.fr:465
rewriteDomain=mydomain.fr
UseTLS=YES

/etc/ssmtp/revaliases :

vmonteco:contact@mydomain.fr:auth.smtp.1and1.fr:465

command line :

$ echo test | mail -v -s "Test" mymail@hotmail.fr
mail: Loading /etc/mail.rc
mail: No such file to load: /home/vmonteco/.mailrc
mail: Setting up PseudoRandomNumberGenerator: *SSL RAND_*
[<-] 220 kundenserver.de (mreue105) Nemesis ESMTP Service ready
[->] EHLO localhost.localdomain
[<-] 250 SIZE 69920427
[->] AUTH LOGIN
[<-] 334 VXNlcm5hbWU6
[->] Y29udGFjdEB2b250ZWNvLm5pbmph
[<-] 334 UGFzc3dvcmQ6
[<-] 535 Authentication credentials invalid
sendmail: Authorization failed (535 Authentication credentials invalid)

Is there something I forgot?

EDIT :

I also tried with port 25 and without TLS

vmonteco
  • 119
  • 1
  • 5

1 Answers1

-1

I finally restarted from scratch and I had to use this answer, use port 465 instead of 587, and use rewriteDomain.

So finally my configuration file finally looked like :

root=contact@mydomain.fr
mailhub=auth.smtp.1and1.fr:465
AuthUser=contact@mydomain.fr
AuthPass=mypassword
rewriteDomain=mydomain.fr
UseTLS=YES
UseSTARTTLS=YES

Which is even simpler since I don't use revaliases file.

vmonteco
  • 119
  • 1
  • 5