Mudanças entre as edições de "Msmtp"

De MochilaWiki
Ir para navegaçãoIr para pesquisar
 
(4 revisões intermediárias pelo mesmo usuário não estão sendo mostradas)
Linha 1: Linha 1:
  sendmail_path = "/usr/bin/msmtp -C /path/to/your/config -t"
+
<source lang="bash">
 +
apt-get install msmtp msmtp-mta mailutils
 +
ln -s /usr/bin/msmtp /usr/sbin/sendmail
 +
touch /var/log/msmtprc && chmod 666 /var/log/msmtprc
 +
chmod 600 ~/.msmtprc
 +
</source>
 +
 
 +
ou em /etc/msmtprc
 +
 
 +
 
 +
== gmail ==
 +
# Set default values for all following accounts.
 +
defaults
 +
logfile /var/log/msmtp.log
 +
port 587
 +
tls on
 +
tls_trust_file /etc/ssl/certs/ca-certificates.crt
 +
 +
# gmail account
 +
account gmail
 +
host smtp.gmail.com
 +
auth on
 +
port 587
 +
user your.account@gmail.com
 +
password yourpassword
 +
from your.account@gmail.com
 +
#aliases        /etc/aliases
 +
#tls_trust_file /usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crt
 +
 
 +
== Locaweb ==
 +
defaults
 +
tls on
 +
tls_starttls on
 +
tls_trust_file /etc/ssl/certs/ca-certificates.crt
 +
 +
#logfile ~/.msmtp.log
 +
logfile /var/log/msmtp.log
 +
 +
# The SMTP servers
 +
account locaweb
 +
host email-ssl.com.br
 +
from contato@seudominio.com.br
 +
auth login
 +
user contato@seudominio.com.br
 +
password suasenha
 +
port 587
 +
 +
# Set a default account
 +
account default : locaweb
 +
 
 +
== PHP ==
 +
  sendmail_path = "/usr/bin/msmtp -C /etc/msmtprc -t"
  
 
== Referencias ==
 
== Referencias ==
Linha 7: Linha 58:
 
* https://www.sylvaindurand.org/send-emails-with-msmtp/
 
* https://www.sylvaindurand.org/send-emails-with-msmtp/
 
* https://wiki.debian.org/msmtp
 
* https://wiki.debian.org/msmtp
 +
* https://websistent.com/how-to-use-msmtp-with-gmail-yahoo-and-php-mail/
 +
* https://decatec.de/linux/linux-einfach-e-mails-versenden-mit-msmtp/

Edição atual tal como às 20h39min de 20 de março de 2020

apt-get install msmtp msmtp-mta mailutils
ln -s /usr/bin/msmtp /usr/sbin/sendmail
touch /var/log/msmtprc && chmod 666 /var/log/msmtprc
chmod 600 ~/.msmtprc

ou em /etc/msmtprc


gmail

# Set default values for all following accounts.
defaults
logfile /var/log/msmtp.log
port 587
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt

# gmail account
account gmail
host smtp.gmail.com
auth on
port 587
user your.account@gmail.com
password yourpassword
from your.account@gmail.com
#aliases        /etc/aliases
#tls_trust_file /usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crt

Locaweb

defaults
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt

#logfile ~/.msmtp.log
logfile /var/log/msmtp.log

# The SMTP servers
account locaweb
host email-ssl.com.br
from contato@seudominio.com.br
auth login
user contato@seudominio.com.br
password suasenha
port 587

# Set a default account
account default : locaweb

PHP

sendmail_path = "/usr/bin/msmtp -C /etc/msmtprc -t"

Referencias