﻿{"id":203,"date":"2012-06-08T10:43:43","date_gmt":"2012-06-08T13:43:43","guid":{"rendered":"http:\/\/binsfeld.com.br\/wp\/?p=203"},"modified":"2012-06-10T14:09:27","modified_gmt":"2012-06-10T17:09:27","slug":"ssmtp-google-apps","status":"publish","type":"post","link":"http:\/\/binsfeld.com.br\/wp\/?p=203","title":{"rendered":"SSMTP Google Apps"},"content":{"rendered":"<p><strong>Edit \/etc\/ssmtp\/ssmtp.conf<\/strong><\/p>\n<p>I found it easiest to comment out all the existing lines in the config and then add the following.\u00a0 Replacing the capitalized text with your own information.\u00a0 This works for GMail and Google Apps accounts.<\/p>\n<div id=\"scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:e749bcc6-f835-4755-82ec-cd336aa3956f\">\n<div id=\"highlighter_118993\">\n<div><\/div>\n<div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><code>1<\/code><\/td>\n<td><code>mailhub=smtp.gmail.com:587<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><code>2<\/code><\/td>\n<td><code>&#x68;&#x6f;&#x73;&#x74;&#110;&#97;me=US&#x45;&#x52;&#x40;&#x4d;&#x59;&#68;OMAIN&#x2e;&#x63;&#x6f;&#x6d;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><code>3<\/code><\/td>\n<td><code>&#x72;&#111;ot&#x3d;&#x55;SE&#x52;&#x40;MY&#x44;&#x4f;&#77;A&#x49;&#x4e;&#46;c&#x6f;&#x6d;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><code>4<\/code><\/td>\n<td><code>&#65;&#x75;&#116;&#x68;&#85;&#x73;e&#x72;=&#x55;S&#x45;R&#x40;M&#x59;D&#x4f;M&#x41;I&#x4e;.&#99;&#x6f;&#109;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><code>5<\/code><\/td>\n<td><code>AuthPass=PASSWORD<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><code>6<\/code><\/td>\n<td><code>UseSTARTTLS=yes<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><code>7<\/code><\/td>\n<td><code>UseTLS=yes<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><code>8<\/code><\/td>\n<td><code>FromLineOverride=yes<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><strong>Edit \/etc\/ssmtp\/revaliases<\/strong><\/p>\n<p>This file associates the computer\u2019s local user accounts with email accounts that have been defined in the config.\u00a0 As an example, I\u2019ve defined email for the following two local user accounts (but you\u2019ll want to replace\u00a0<em>matt<\/em>\u00a0with something else):<\/p>\n<div id=\"scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:6240610c-891f-4964-a418-ed4cd6953fe2\">\n<div id=\"highlighter_589339\">\n<div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><code>1<\/code><\/td>\n<td><code>root:USER&#64;MYDOMAIN.com:smtp.gmail.com:587<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><code>2<\/code><\/td>\n<td><code>matt:&#x55;&#x53;&#69;R&#64;&#x4d;&#x59;&#x44;&#79;MA&#x49;&#x4e;&#x2e;&#99;om:smtp.gmail.com:587<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><strong>Send a Test Email<\/strong><\/p>\n<p>This is where the\u00a0<em>revaliases<\/em>\u00a0config comes into play.\u00a0 If you\u2019ve only associated\u00a0<em>root<\/em>\u00a0with an email address then you\u2019ll have to send a test email using the\u00a0<em>sudo<\/em>\u00a0command:<\/p>\n<div id=\"scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:de763dbb-00e5-474d-9147-e66b379aa5ec\">\n<div id=\"highlighter_407429\">\n<div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><code>1<\/code><\/td>\n<td><code>sudo ssmtp t&#x65;s&#116;&#x40;t&#x65;s&#116;&#x2e;c&#x6f;&#x6d;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><code>2<\/code><\/td>\n<td><code>To: Test Guy &lt;&#x74;e&#x73;t&#x40;&#116;&#x65;&#x73;t&#x2e;c&#x6f;&#109;&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><code>3<\/code><\/td>\n<td><code>From: Me &lt;U&#83;&#x45;&#x52;&#64;M&#89;&#x44;&#x4f;M&#65;&#x49;&#x4e;.c&#111;&#x6d;&gt;<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><code>4<\/code><\/td>\n<td><code>Subject: Hello World<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><code>5<\/code><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><code>6<\/code><\/td>\n<td><code>Hello world!<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Note the blank line between subject and body.\u00a0 Once the body is finished, hit\u00a0<em>return<\/em>\u00a0to advance to the next line and then press\u00a0<strong>CTRL+D<\/strong>\u00a0to send.<\/p>\n<p>Cr\u00e9ditos :\u00a0<a href=\"http:\/\/www.bunkerhollow.com\/blogs\/matt\/archive\/2010\/10\/12\/ubuntu-send-email-with-ssmtp-and-google-apps-gmail.aspx\">http:\/\/www.bunkerhollow.com\/blogs\/matt\/archive\/2010\/10\/12\/ubuntu-send-email-with-ssmtp-and-google-apps-gmail.aspx<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Edit \/etc\/ssmtp\/ssmtp.conf I found it easiest to comment out all the existing lines in the config and then add the following.\u00a0 Replacing the capitalized text with your own information.\u00a0 This<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-203","post","type-post","status-publish","format-standard","hentry","category-outros"],"_links":{"self":[{"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/posts\/203"}],"collection":[{"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=203"}],"version-history":[{"count":4,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/posts\/203\/revisions"}],"predecessor-version":[{"id":213,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/posts\/203\/revisions\/213"}],"wp:attachment":[{"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=203"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=203"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=203"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}