ssmtp + google email

Created: Jan. 1, 2010, 4 a.m.
Update: Oct. 29, 2020, 6:46 p.m.
enviar email usando ssmtp com uma conta google/gmail

Ubuntu 14.04

Usando uma conta de email google, usando googles apps com dominio proprio.

 

Instalar pacotes

$ apt-get install ssmtp mailutils

 

Editar arquivo de configuração

$ vim /etc/ssmtp/ssmtp.conf

 

# The person who gets all mail for userids < 1000

# Make this empty to disable rewriting.

root=destino@email.com

 

# The place where the mail goes. The actual machine name is required no 

# MX records are consulted. Commonly mailhosts are named mail.domain.com

#mailhub=mail

 

# Where will the mail seem to come from?

rewriteDomain=futuria.com.br

 

# The full hostname

hostname=backup-server

 

# Are users allowed to set their own From: address?

# YES - Allow the user to specify their own From: address

# NO - Use the system generated From: address

FromLineOverride=YES

 

mailhub=smtp.googlemail.com:587

AuthUser=user@futuria.com.br

AuthPass=password

 

FromLineOverride=YES

UseTLS=YES

UseSTARTTLS=YES


Teste SSMTP
$ mail -s "TESTE SSMTP"  destino@mail.com < /dev/null



Tiago de Souza Moraes - teago.futuria.com.br - 2020 // CSS by UIKIT CSS