Actually, I'm using a RaspberryPI 3b.
This is my /etc/ssmtp/ssmtp.conf
:
[email protected]
mailhub=smtp.gmail.com:587
rewriteDomain=gmail.com
hostname=raspi
FromLineOverride=YES
UseTLS=Yes
UseSTARTTLS=YES
AuthUser=gmail_user
AuthPass=PASSWD
This is my /etc/ssmtp/revaliases
:
root:[email protected]:smtp.gmail.com:587
pi:[email protected]:smtp.gmail.com:587
Trying to send a mail:
root@raspberrypi:~# echo "hola" | ssmtp [email protected] -v
[<-] 220 smtp.gmail.com ESMTP x129sm89284054wmg.44 - gsmtp
[->] EHLO raspi
[<-] 250 SMTPUTF8
[->] STARTTLS
[<-] 220 2.0.0 Ready to start TLS
[->] EHLO raspi
[<-]
ssmtp: (raspi)
hostname
:
root@raspberrypi:~# hostname
raspberrypi
This is a ping
to google and the DNS servers that I'm using:
root@raspberrypi:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=54 time=13.1 ms
^C
--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 13.134/13.134/13.134/0.000 ms
root@raspberrypi:~# cat /etc/resolv.conf
# Generated by resolvconf
nameserver 8.8.8.8
nameserver 8.8.4.4
Also...
- the GMail account have the thing to let less secure applications use the account.
- to make sure the name and password where correct, used copy/paste to google Chrome (Using SSH, so that I can copy/paste things)
- I have a Debian server which works well, also trying to copy/paste all the configuration and change the names from users and hostname, but it didn't work.