Difference between revisions of "/etc/ssmtp/ssmtp.conf"
Jump to navigation
Jump to search
(5 intermediate revisions by 2 users not shown) | |||
Line 5: | Line 5: | ||
mailhub=mail | mailhub=mail | ||
hostname=yourmachineName | hostname=yourmachineName | ||
+ | |||
+ | Default [[Amazon Linux]]: | ||
+ | cat /etc/ssmtp/ssmtp.conf | grep -v "#" | grep . | ||
+ | root=postmaster | ||
+ | mailhub=mail | ||
+ | [[TLS_CA_File]]=[[/etc/pki/tls/]]certs/ca-bundle.crt | ||
+ | |||
+ | |||
== Example for [[Gmail]] == | == Example for [[Gmail]] == | ||
Line 16: | Line 24: | ||
echo "My first email" | ssmtp [email protected] | echo "My first email" | ssmtp [email protected] | ||
+ | |||
+ | echo "My first email" | ssmtp [email protected] | ||
+ | ssmtp: Authorization failed (535 5.7.8 https://support.google.com/mail/?p=BadCredentials | ||
+ | y26-20020a1c4b1a000000b003ef62deb830sm6320083wma.25 - gsmtp) | ||
+ | |||
+ | Solution: check your username and password. | ||
+ | |||
+ | echo "My first email" | ssmtp [email protected] | ||
+ | ssmtp: Authorization failed (534 5.7.9 | ||
+ | https://support.google.com/mail/p=[[InvalidSecondFactor]] l32-20020a05600c1d2000b003f0321c22basm5246080wms.12 - gsmtp) | ||
+ | |||
+ | ssmtp: Authorization failed (535 5.7.8 https://support.google.com/mail/?p=BadCredentials z20- 20020a7bc7d4000000b003eeb1d6a470sm6437612wmk.13 - gsmtp) | ||
== Default Ubuntu == | == Default Ubuntu == | ||
Line 44: | Line 64: | ||
== Related == | == Related == | ||
− | * [[mailx]] | + | * <code>[[mailx]]</code> |
== See also == | == See also == | ||
* {{ssmtp}} | * {{ssmtp}} | ||
− | |||
* {{mail}} | * {{mail}} | ||
[[Category:Linux]] | [[Category:Linux]] |
Latest revision as of 15:56, 11 July 2023
Default Ubuntu
cat /etc/ssmtp/ssmtp.conf | grep -v "#" | grep . root=postmaster mailhub=mail hostname=yourmachineName
Default Amazon Linux:
cat /etc/ssmtp/ssmtp.conf | grep -v "#" | grep . root=postmaster mailhub=mail TLS_CA_File=/etc/pki/tls/certs/ca-bundle.crt
Example for Gmail[edit]
[email protected] mailhub=smtp.gmail.com:465 FromLineOverride=YES [email protected] AuthPass=yourpassword UseTLS=YES
https://unix.stackexchange.com/a/363815
echo "My first email" | ssmtp [email protected]
echo "My first email" | ssmtp [email protected] ssmtp: Authorization failed (535 5.7.8 https://support.google.com/mail/?p=BadCredentials y26-20020a1c4b1a000000b003ef62deb830sm6320083wma.25 - gsmtp) Solution: check your username and password.
echo "My first email" | ssmtp [email protected] ssmtp: Authorization failed (534 5.7.9 https://support.google.com/mail/p=InvalidSecondFactor l32-20020a05600c1d2000b003f0321c22basm5246080wms.12 - gsmtp)
ssmtp: Authorization failed (535 5.7.8 https://support.google.com/mail/?p=BadCredentials z20- 20020a7bc7d4000000b003eeb1d6a470sm6437612wmk.13 - gsmtp)
Default Ubuntu[edit]
/etc/ssmtp/ssmtp.conf
# # Config file for sSMTP sendmail # # The person who gets all mail for userids < 1000 # Make this empty to disable rewriting. root=postmaster # 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= # The full hostname hostname=Think.localdomain # 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
Related[edit]
See also[edit]
Advertising: