Additions:
Download: [[http://code.google.com/p/klenwell/downloads/detail?name=ubuntu_gmail_mailx-v11.10.sh ubuntu_gmail_mailx-v11.10.sh]]
$ gedit /tmp/ubuntu_gmail_mailx-v11.10.sh
$ chmod 755 /tmp/ubuntu_gmail_mailx-v11.10.sh
$ /tmp/ubuntu_gmail_mailx-v11.10.sh install
$ sudo apt-get install msmtp heirloom-mailx
$ gedit /tmp/ubuntu_gmail_mailx-v11.10.sh
$ chmod 755 /tmp/ubuntu_gmail_mailx-v11.10.sh
$ /tmp/ubuntu_gmail_mailx-v11.10.sh install
$ sudo apt-get install msmtp heirloom-mailx
Deletions:
$ gedit /tmp/ubuntu_gmail_mailx-v1.0.sh
$ chmod 755 /tmp/ubuntu_gmail_mailx-v1.0.sh
$ /tmp/ubuntu_gmail_mailx-v1.0.sh install
$ sudo apt-get install msmtp mailx
Additions:
account gmail
account default : gmail
account default : gmail
Deletions:
#account default : gmail
Additions:
return to CategoryUbuntu
For the **nail** version of this script (which I prefer!), see UbuntuCommandLineGmailNail
For the **nail** version of this script (which I prefer!), see UbuntuCommandLineGmailNail
Additions:
$ ( cat /tmp/emailbody ; uuencode $TMP_ARCHIVE $FNAME ) | mailx -s "email test" $EMAIL_TO
Deletions:
Additions:
$ sudo apt-get install sharutils
Additions:
===Usage===
Deletions:
Additions:
===Usages===
Send a file with an attachment
$ EMAIL_TO=YOURNAME@gmail.com
$ echo "email test" > /tmp/emailbody
$ TMP_ARCHIVE=/tmp/some_archive
$ FNAME=$(basename $TMP_ARCHIVE)
$ ( cat /tmp/emailbody ; uuencode $TMP_ARCHIVE $FNAME) | mailx -s "email test" $EMAIL_TO
http://stackoverflow.com/questions/96326/korn-shell-code-to-send-attachments-with-mailx-and-uuencode/96636#96636
Send a file with an attachment
$ EMAIL_TO=YOURNAME@gmail.com
$ echo "email test" > /tmp/emailbody
$ TMP_ARCHIVE=/tmp/some_archive
$ FNAME=$(basename $TMP_ARCHIVE)
$ ( cat /tmp/emailbody ; uuencode $TMP_ARCHIVE $FNAME) | mailx -s "email test" $EMAIL_TO
http://stackoverflow.com/questions/96326/korn-shell-code-to-send-attachments-with-mailx-and-uuencode/96636#96636
Additions:
====Now Available: Install Script====
Source: [[http://code.google.com/p/klenwell/source/browse/trunk/projects/bash/mailx/setup_gmail_command_line.sh setup_gmail_command_line.sh]]
Download: [[http://code.google.com/p/klenwell/downloads/detail?name=ubuntu_gmail_mailx-v1.0.sh ubuntu_gmail_mailx-v1.0.sh]]
===Installation===
1. Download the script from http://code.google.com/p/klenwell/downloads/list. (Next steps assume you download it to dir ""<tt>/tmp</tt>"".
2. To completely automate installation, update your gmail settings at top of script:
$ gedit /tmp/ubuntu_gmail_mailx-v1.0.sh
3. Make script executable and run with ""<tt>install</tt>"" command:
$ chmod 755 /tmp/ubuntu_gmail_mailx-v1.0.sh
$ /tmp/ubuntu_gmail_mailx-v1.0.sh install
=====Manual Guide=====
Source: [[http://code.google.com/p/klenwell/source/browse/trunk/projects/bash/mailx/setup_gmail_command_line.sh setup_gmail_command_line.sh]]
Download: [[http://code.google.com/p/klenwell/downloads/detail?name=ubuntu_gmail_mailx-v1.0.sh ubuntu_gmail_mailx-v1.0.sh]]
===Installation===
1. Download the script from http://code.google.com/p/klenwell/downloads/list. (Next steps assume you download it to dir ""<tt>/tmp</tt>"".
2. To completely automate installation, update your gmail settings at top of script:
$ gedit /tmp/ubuntu_gmail_mailx-v1.0.sh
3. Make script executable and run with ""<tt>install</tt>"" command:
$ chmod 755 /tmp/ubuntu_gmail_mailx-v1.0.sh
$ /tmp/ubuntu_gmail_mailx-v1.0.sh install
=====Manual Guide=====
Additions:
++Install Thawte Certificate for Gmail++
Deletions:
Additions:
If you don't have the certificate for some reason, you can download it in this package here: http://packages.ubuntu.com/en/source/lucid/ca-certificates
Additions:
++2. Install Thawte Certificate for Gmail++
2. Configure msmtp
3. Configure mailx
4. Test
===++Install Certificate++===
===2. Configure msmtp===
===3. Configure mailx===
===4. Test===
2. Configure msmtp
3. Configure mailx
4. Test
===++Install Certificate++===
===2. Configure msmtp===
===3. Configure mailx===
===4. Test===
Deletions:
3. Configure msmtp
4. Configure mailx
5. Test
===2. Install Certificate===
===3. Configure msmtp===
===4. Configure mailx===
===5. Test===
Additions:
===2. Install Certificate===
According to [[http://wiki.archlinux.org/index.php/Msmtp archlinux.org]], Google is in the process of becoming it's own certificate authority and has switched to a "Google Certificate Authority" certificate rooted in Equifax.
This means you can user the existing certificate at ""<tt>/usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crt</tt>"". Verify that that certificate exists and nothing else needs to be done at this step.
tls_trust_file /usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crt
According to [[http://wiki.archlinux.org/index.php/Msmtp archlinux.org]], Google is in the process of becoming it's own certificate authority and has switched to a "Google Certificate Authority" certificate rooted in Equifax.
This means you can user the existing certificate at ""<tt>/usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crt</tt>"". Verify that that certificate exists and nothing else needs to be done at this step.
tls_trust_file /usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crt
Deletions:
This requires a Thawte certificate. The steps below assume that it is still available at the provided url. If not, you can create a file from the text included below.
$ mkdir -p ~/etc/.certs
$ chmod 0700 ~/etc/.certs
$ cd ~/etc/.certs
$ wget http://userweb.cs.utexas.edu/~suriya/UT-wireless/ThawtePremiumServerCA_b64.txt
The certificate, in all its glory:
-----BEGIN CERTIFICATE-----
MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkEx
FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
biBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFByZW1pdW0gU2Vy
dmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZlckB0aGF3dGUuY29t
MB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYTAlpB
MRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsG
A1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRp
b24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNl
cnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNv
bTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2aovXwlue2oFBYo847kkE
VdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIhUdib0GfQ
ug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMR
uHM/qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG
9w0BAQQFAAOBgQAmSCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUI
hfzJATj/Tb7yFkJD57taRvvBxhEf8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JM
pAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7tUCemDaYj+bvLpgcUQg==
-----END CERTIFICATE-----
source: http://userweb.cs.utexas.edu/~suriya/UT-wireless/ThawtePremiumServerCA_b64.txt
tls_trust_file /home/USER/etc/.certs/ThawtePremiumServerCA_b64.txt
Additions:
http://wiki.archlinux.org/index.php/Msmtp
Additions:
$ mailx -s "mailx gmail test" YOURNAME@gmail.com < /tmp/test_email
Deletions:
Additions:
=====Command Line Gmail Using msmtp/mailx=====
Deletions:
No Differences
Deletions:
Posted on 3 March 2009, 8:53 pm, by klenwell, under Miscellany.
This guide explains how to configure Ubuntu so that you can send email from the command line using mailx with your Gmail account for delivery. This updates a guide I originally posted on the ubuntu forums for mailx, which is part of the current Ubuntu repositories (versions 7 and 8). To use nail, for which this guide was originally drawn up, see this post.
In 5 Fairly Easy Steps
1. Install the needed programs
$ sudo apt-get install msmtp
$ sudo apt-get install mailx
2. Install Thawte certificates for Gmail
EDIT: verisign.com apparently no longer issues certs at the address below. So the ‘wget’ step will not work. adkein, in a comment below (click here), links to another page when you can apparently get the needed cert. I cannot vouch for this as my cert still works. But you might try downloading that and putting it your ~/etc/.certs directory if you’re having issues finding the cert.
This is necessary for Gmail. (Thanks to laurentbois.com.)
$ wget https://www.verisign.com/support/thawte-roots.zip –no-check-certificate
$ unzip thawte-roots.zip
$ cp ‘Thawte Server Roots/ThawtePremiumServerCA_b64.txt’ ThawtePremiumServerCA.crt
This will open up a new msmtp configuration file
view plaincopy to clipboardprint?
1.
# config options: http://msmtp.sourceforge.net/doc/msmtp.html#A-user-configuration-file
2.
defaults
3.
logfile /tmp/msmtp.log
4.
5.
# gmail account
6.
#account gmail
7.
auth on
8.
host smtp.gmail.com
9.
port 587
10.
user YOURNAME@gmail.com
11.
password YOURPASSWORD
12.
from YOURNAME@gmail.com
13.
tls on
14.
tls_trust_file /home/USER/etc/.certs/ThawtePremiumServerCA.crt
15.
16.
# set default account to use (not necessary with single account)
17.
#account default : gmail
tls_trust_file /home/USER/etc/.certs/ThawtePremiumServerCA.crt
view plaincopy to clipboardprint?
1.
# set smtp for nail
2.
# ref: http://ubuntuforums.org/showpost.php?p=4531994&amp;amp;amp;amp;amp;amp;amp;postcount=6
3.
4.
# gmail account (default)
5.
# $ mailx -s "subject line" -a /path/file recipient@email.com < /path/body.txt
6.
set from="YOURNAME@gmail.com (YOURNAME)"
7.
set sendmail="/usr/bin/msmtp"
8.
set message-sendmail-extra-arguments="-a gmail"
# set smtp for nail
# ref: http://ubuntuforums.org/showpost.php?p=4531994&amp;amp;amp;amp;amp;amp;amp;postcount=6
# $ mailx -s "subject line" -a /path/file recipient@email.com < /path/body.txt
5. Run a test
Additions:
Open mailx config file:
$ gedit ~/.mailrc
Copy the following lines and replace UPPERCASE text with your personal settings:
# set smtp for mailx
# gmail account (default)
# $ mailx -s "subject line" -a /path/attachment recipient@email.com < /path/body.txt
set from="YOURNAME@gmail.com (YOURNAME)"
set sendmail="/usr/bin/msmtp"
set message-sendmail-extra-arguments="-a gmail"
Command Line Email on Ubuntu (mailx version)
Posted on 3 March 2009, 8:53 pm, by klenwell, under Miscellany.
This guide explains how to configure Ubuntu so that you can send email from the command line using mailx with your Gmail account for delivery. This updates a guide I originally posted on the ubuntu forums for mailx, which is part of the current Ubuntu repositories (versions 7 and 8). To use nail, for which this guide was originally drawn up, see this post.
In 5 Fairly Easy Steps
1. Install the needed programs
$ sudo apt-get install msmtp
$ sudo apt-get install mailx
2. Install Thawte certificates for Gmail
EDIT: verisign.com apparently no longer issues certs at the address below. So the ‘wget’ step will not work. adkein, in a comment below (click here), links to another page when you can apparently get the needed cert. I cannot vouch for this as my cert still works. But you might try downloading that and putting it your ~/etc/.certs directory if you’re having issues finding the cert.
This is necessary for Gmail. (Thanks to laurentbois.com.)
$ wget https://www.verisign.com/support/thawte-roots.zip –no-check-certificate
$ unzip thawte-roots.zip
$ cp ‘Thawte Server Roots/ThawtePremiumServerCA_b64.txt’ ThawtePremiumServerCA.crt
This will open up a new msmtp configuration file
view plaincopy to clipboardprint?
1.
# config options: http://msmtp.sourceforge.net/doc/msmtp.html#A-user-configuration-file
2.
defaults
3.
logfile /tmp/msmtp.log
4.
5.
# gmail account
6.
#account gmail
7.
auth on
8.
host smtp.gmail.com
9.
port 587
10.
user YOURNAME@gmail.com
11.
password YOURPASSWORD
12.
from YOURNAME@gmail.com
13.
tls on
14.
tls_trust_file /home/USER/etc/.certs/ThawtePremiumServerCA.crt
15.
16.
# set default account to use (not necessary with single account)
17.
#account default : gmail
tls_trust_file /home/USER/etc/.certs/ThawtePremiumServerCA.crt
$ gedit ~/.mailrc
Copy the following lines and replace UPPERCASE text with your personal settings:
view plaincopy to clipboardprint?
1.
# set smtp for nail
2.
# ref: http://ubuntuforums.org/showpost.php?p=4531994&amp;amp;amp;amp;amp;amp;amp;postcount=6
3.
4.
# gmail account (default)
5.
# $ mailx -s "subject line" -a /path/file recipient@email.com < /path/body.txt
6.
set from="YOURNAME@gmail.com (YOURNAME)"
7.
set sendmail="/usr/bin/msmtp"
8.
set message-sendmail-extra-arguments="-a gmail"
# set smtp for nail
# ref: http://ubuntuforums.org/showpost.php?p=4531994&amp;amp;amp;amp;amp;amp;amp;postcount=6
# gmail account (default)
# $ mailx -s "subject line" -a /path/file recipient@email.com < /path/body.txt
set from="YOURNAME@gmail.com (YOURNAME)"
set sendmail="/usr/bin/msmtp"
set message-sendmail-extra-arguments="-a gmail"
5. Run a test
Send a test message to your gmail account:
$ echo -e "testing email from the command line" > /tmp/test_email
$ mailx -s "nail gmail test" YOURNAME@gmail.com < /tmp/test_email
Check your gmail account and you should have a message from yourself. You can also check your log:
$ tail /tmp/msmtp.log
$ gedit ~/.mailrc
Copy the following lines and replace UPPERCASE text with your personal settings:
# set smtp for mailx
# gmail account (default)
# $ mailx -s "subject line" -a /path/attachment recipient@email.com < /path/body.txt
set from="YOURNAME@gmail.com (YOURNAME)"
set sendmail="/usr/bin/msmtp"
set message-sendmail-extra-arguments="-a gmail"
Command Line Email on Ubuntu (mailx version)
Posted on 3 March 2009, 8:53 pm, by klenwell, under Miscellany.
This guide explains how to configure Ubuntu so that you can send email from the command line using mailx with your Gmail account for delivery. This updates a guide I originally posted on the ubuntu forums for mailx, which is part of the current Ubuntu repositories (versions 7 and 8). To use nail, for which this guide was originally drawn up, see this post.
In 5 Fairly Easy Steps
1. Install the needed programs
$ sudo apt-get install msmtp
$ sudo apt-get install mailx
2. Install Thawte certificates for Gmail
EDIT: verisign.com apparently no longer issues certs at the address below. So the ‘wget’ step will not work. adkein, in a comment below (click here), links to another page when you can apparently get the needed cert. I cannot vouch for this as my cert still works. But you might try downloading that and putting it your ~/etc/.certs directory if you’re having issues finding the cert.
This is necessary for Gmail. (Thanks to laurentbois.com.)
$ wget https://www.verisign.com/support/thawte-roots.zip –no-check-certificate
$ unzip thawte-roots.zip
$ cp ‘Thawte Server Roots/ThawtePremiumServerCA_b64.txt’ ThawtePremiumServerCA.crt
This will open up a new msmtp configuration file
view plaincopy to clipboardprint?
1.
# config options: http://msmtp.sourceforge.net/doc/msmtp.html#A-user-configuration-file
2.
defaults
3.
logfile /tmp/msmtp.log
4.
5.
# gmail account
6.
#account gmail
7.
auth on
8.
host smtp.gmail.com
9.
port 587
10.
user YOURNAME@gmail.com
11.
password YOURPASSWORD
12.
from YOURNAME@gmail.com
13.
tls on
14.
tls_trust_file /home/USER/etc/.certs/ThawtePremiumServerCA.crt
15.
16.
# set default account to use (not necessary with single account)
17.
#account default : gmail
tls_trust_file /home/USER/etc/.certs/ThawtePremiumServerCA.crt
$ gedit ~/.mailrc
Copy the following lines and replace UPPERCASE text with your personal settings:
view plaincopy to clipboardprint?
1.
# set smtp for nail
2.
# ref: http://ubuntuforums.org/showpost.php?p=4531994&amp;amp;amp;amp;amp;amp;amp;postcount=6
3.
4.
# gmail account (default)
5.
# $ mailx -s "subject line" -a /path/file recipient@email.com < /path/body.txt
6.
set from="YOURNAME@gmail.com (YOURNAME)"
7.
set sendmail="/usr/bin/msmtp"
8.
set message-sendmail-extra-arguments="-a gmail"
# set smtp for nail
# ref: http://ubuntuforums.org/showpost.php?p=4531994&amp;amp;amp;amp;amp;amp;amp;postcount=6
# gmail account (default)
# $ mailx -s "subject line" -a /path/file recipient@email.com < /path/body.txt
set from="YOURNAME@gmail.com (YOURNAME)"
set sendmail="/usr/bin/msmtp"
set message-sendmail-extra-arguments="-a gmail"
5. Run a test
Send a test message to your gmail account:
$ echo -e "testing email from the command line" > /tmp/test_email
$ mailx -s "nail gmail test" YOURNAME@gmail.com < /tmp/test_email
Check your gmail account and you should have a message from yourself. You can also check your log:
$ tail /tmp/msmtp.log
Additions:
Change permission on this file or msmtp will complain:
$ chmod 600 ~/.msmtprc
$ chmod 600 ~/.msmtprc
Additions:
%%(bash)
%%(bash)
===3. Configure msmtp===
Create a new msmtp config file:
%%(bash)
$ gedit ~/.msmtprc
Copy the following lines. Replace UPPERCASE text with your personal settings:
# config options: http://msmtp.sourceforge.net/doc/msmtp.html#A-user-configuration-file
defaults
logfile /tmp/msmtp.log
# gmail account
#account gmail
auth on
host smtp.gmail.com
port 587
user YOURNAME@gmail.com
password YOURPASSWORD
from YOURNAME@gmail.com
tls on
tls_trust_file /home/USER/etc/.certs/ThawtePremiumServerCA_b64.txt
# set default account to use (not necessary with single account)
#account default : gmail
===4. Configure mailx===
===5. Test===
%%(bash)
===3. Configure msmtp===
Create a new msmtp config file:
%%(bash)
$ gedit ~/.msmtprc
Copy the following lines. Replace UPPERCASE text with your personal settings:
# config options: http://msmtp.sourceforge.net/doc/msmtp.html#A-user-configuration-file
defaults
logfile /tmp/msmtp.log
# gmail account
#account gmail
auth on
host smtp.gmail.com
port 587
user YOURNAME@gmail.com
password YOURPASSWORD
from YOURNAME@gmail.com
tls on
tls_trust_file /home/USER/etc/.certs/ThawtePremiumServerCA_b64.txt
# set default account to use (not necessary with single account)
#account default : gmail
===4. Configure mailx===
===5. Test===
Deletions:
Additions:
2. Install Thawte Certificate for Gmail
===2. Install Thawte Certificate===
This requires a Thawte certificate. The steps below assume that it is still available at the provided url. If not, you can create a file from the text included below.
$ mkdir -p ~/etc/.certs
$ chmod 0700 ~/etc/.certs
$ cd ~/etc/.certs
$ wget http://userweb.cs.utexas.edu/~suriya/UT-wireless/ThawtePremiumServerCA_b64.txt
$ mv ThawtePremiumServerCA_b64.txt ThawtePremiumServerCA.crt
The certificate, in all its glory:
-----BEGIN CERTIFICATE-----
MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkEx
FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
biBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFByZW1pdW0gU2Vy
dmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZlckB0aGF3dGUuY29t
MB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYTAlpB
MRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsG
A1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRp
b24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNl
cnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNv
bTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2aovXwlue2oFBYo847kkE
VdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIhUdib0GfQ
ug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMR
uHM/qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG
9w0BAQQFAAOBgQAmSCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUI
hfzJATj/Tb7yFkJD57taRvvBxhEf8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JM
pAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7tUCemDaYj+bvLpgcUQg==
-----END CERTIFICATE-----
source: http://userweb.cs.utexas.edu/~suriya/UT-wireless/ThawtePremiumServerCA_b64.txt
===2. Install Thawte Certificate===
This requires a Thawte certificate. The steps below assume that it is still available at the provided url. If not, you can create a file from the text included below.
$ mkdir -p ~/etc/.certs
$ chmod 0700 ~/etc/.certs
$ cd ~/etc/.certs
$ wget http://userweb.cs.utexas.edu/~suriya/UT-wireless/ThawtePremiumServerCA_b64.txt
$ mv ThawtePremiumServerCA_b64.txt ThawtePremiumServerCA.crt
The certificate, in all its glory:
-----BEGIN CERTIFICATE-----
MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkEx
FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
biBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhhd3RlIFByZW1pdW0gU2Vy
dmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZlckB0aGF3dGUuY29t
MB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYTAlpB
MRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsG
A1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRp
b24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNl
cnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNv
bTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2aovXwlue2oFBYo847kkE
VdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIhUdib0GfQ
ug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMR
uHM/qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG
9w0BAQQFAAOBgQAmSCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUI
hfzJATj/Tb7yFkJD57taRvvBxhEf8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JM
pAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7tUCemDaYj+bvLpgcUQg==
-----END CERTIFICATE-----
source: http://userweb.cs.utexas.edu/~suriya/UT-wireless/ThawtePremiumServerCA_b64.txt
Deletions:
Additions:
2. Install Certificate for Gmail
3. Configure msmtp
4. Configure mailx
5. Test
3. Configure msmtp
4. Configure mailx
5. Test
Additions:
http://phosphorusandlime.blogspot.com/2008/05/ubuntu-command-line-email.html
Additions:
1. Install Necessary Packages
===1. Install Necessary Packages===
%%
$ sudo apt-get install msmtp mailx
%%
===1. Install Necessary Packages===
%%
$ sudo apt-get install msmtp mailx
%%
Additions:
http://ubuntuforums.org/showthread.php?t=780509