{"id":247,"date":"2009-05-13T09:40:57","date_gmt":"2009-05-13T07:40:57","guid":{"rendered":"http:\/\/raftaman.net\/?p=247"},"modified":"2021-05-15T11:46:42","modified_gmt":"2021-05-15T09:46:42","slug":"googlemail-and-ssmtp-on-centos","status":"publish","type":"post","link":"https:\/\/possiblelossofprecision.net\/?p=247","title":{"rendered":"Googlemail and sSMTP on CentOS"},"content":{"rendered":"<p>sSMTP is a very simple and straightforward alternative to big MTAs like sendmail or Exim. Unfortunately CentOS repositories don&#8217;t come with it, so you have to fetch it from <a href=\"http:\/\/fedoraproject.org\/wiki\/EPEL\">Fedora&#8217;s EPEL repo<\/a>.<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\r\nrpm -Uvh http:\/\/download.fedora.redhat.com\/pub\/epel\/5\/i386\/epel-release-5-3.noarch.rpm\r\n<\/pre>\n<p>After activating the &#8216;Extra Packages for Enterprise Linux&#8217; repository, you can install sSMTP:<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\r\nyum install ssmtp\r\n<\/pre>\n<p>Configuration is rather simple. Just change the following values in your <code>\/etc\/ssmtp\/ssmtp.conf<\/code><\/p>\n<pre class=\"brush: plain; highlight: [3,8,14,17,21,22]; light: true; title: ; notranslate\" title=\"\">\r\n# The person who gets all mail for userids &lt; 500\r\n# Make this empty to disable rewriting.\r\nroot=youraccount@googlemail.com\r\n\r\n# The place where the mail goes. The actual machine name is required\r\n# no MX records are consulted. Commonly mailhosts are named mail.domain.com\r\n# The example will fit if you are in domain.com and your mailhub is so named.\r\nmailhub=smtp.googlemail.com:465\r\n\r\n&#x5B;...]\r\n\r\n# Set this to never rewrite the &quot;From:&quot; line (unless not given) and to\r\n# use that address in the &quot;from line&quot; of the envelope.\r\nFromLineOverride=YES\r\n\r\n# Use SSL\/TLS to send secure messages to server.\r\nUseTLS=YES\r\n\r\n&#x5B;...]\r\n\r\nAuthUser=YOURACCOUNT\r\nAuthPass=PASSWORD\r\n\r\n<\/pre>\n<p>You can test by sending a mail to <code>user@domain.tld<\/code><\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\r\n# echo test | mail -s &quot;testing ssmtp&quot; user@domain.tld\r\n<\/pre>\n<p>Resources and further reading:<br \/>\n<a href=\"http:\/\/www.boristheengineer.co.uk\/slug\/configuring_ssmtp.htm\">http:\/\/www.boristheengineer.co.uk\/slug\/configuring_ssmtp.htm<\/a><br \/>\n<a href=\"http:\/\/www.destr0yr.com\/article.php\/Gmail_and_sSMTP\">http:\/\/www.destr0yr.com\/article.php\/Gmail_and_sSMTP<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>sSMTP is a very simple and straightforward alternative to big MTAs like sendmail or Exim. Unfortunately CentOS repositories don&#8217;t come with it, so you have to fetch it from Fedora&#8217;s EPEL repo. rpm -Uvh http:\/\/download.fedora.redhat.com\/pub\/epel\/5\/i386\/epel-release-5-3.noarch.rpm After activating the &#8216;Extra Packages for Enterprise Linux&#8217; repository, you can install sSMTP: yum install ssmtp Configuration is rather simple. Just change the following values&#8230; <a href=\"https:\/\/possiblelossofprecision.net\/?p=247\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[13],"class_list":["post-247","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-centos"],"_links":{"self":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=247"}],"version-history":[{"count":12,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/247\/revisions"}],"predecessor-version":[{"id":2703,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/247\/revisions\/2703"}],"wp:attachment":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}