klenwell information services : UbuntuCommandLineGmailNail

Revision history for UbuntuCommandLineGmailNail


Revision [3004]

Last edited on 2016-07-09 16:54:43 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]
Additions:
Source: [[http://code.google.com/p/klenwell/source/browse/trunk/projects/bash/nail/setup_gmail_command_line.sh | setup_gmail_command_line.sh]]
Download: [[http://code.google.com/p/klenwell/downloads/detail?name=ubuntu_gmail_nail-v1.0.sh | ubuntu_gmail_nail-v1.0.sh]]
This guide covers using the [[http://linux.die.net/man/1/nail | nail program]], which is my client of choice but is no longer in the main repositories. (Apparently, it is now known as [[http://heirloom.sourceforge.net/mailx.html | heirloom mailx]].) Find a guide for using mailx, which is part of the current Ubuntu repositories, here: [[UbuntuCommandLineGmail | Command Line Gmail Using msmtp/mailx]]
Deletions:
Source: [[http://code.google.com/p/klenwell/source/browse/trunk/projects/bash/nail/setup_gmail_command_line.sh setup_gmail_command_line.sh]]
Download: [[http://code.google.com/p/klenwell/downloads/detail?name=ubuntu_gmail_nail-v1.0.sh ubuntu_gmail_nail-v1.0.sh]]
This guide covers using the [[http://linux.die.net/man/1/nail nail program]], which is my client of choice but is no longer in the main repositories. (Apparently, it is now known as [[http://heirloom.sourceforge.net/mailx.html heirloom mailx]].) Find a guide for using mailx, which is part of the current Ubuntu repositories, here: [[UbuntuCommandLineGmail Command Line Gmail Using msmtp/mailx]]


Revision [1639]

Edited on 2010-10-12 14:14:42 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]
Additions:
1. Add Breezy Repositories for Nail to Apt Sources
Deletions:
1. Add Beezy Repositories for Nail to Apt Sources


Revision [1440]

Edited on 2010-06-21 20:15:58 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]
Additions:
Although I prefer nail, there is also a mailx version of this script available here: UbuntuCommandLineGmail
Deletions:
Although I prefer nail, there is also a mailx version of this script available here: UbuntuCommandLineGmailMailx


Revision [1439]

Edited on 2010-06-21 20:15:20 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]
Additions:
return to CategoryUbuntu
Although I prefer nail, there is also a mailx version of this script available here: UbuntuCommandLineGmailMailx
====Now Available: Install Script====
Source: [[http://code.google.com/p/klenwell/source/browse/trunk/projects/bash/nail/setup_gmail_command_line.sh setup_gmail_command_line.sh]]
Download: [[http://code.google.com/p/klenwell/downloads/detail?name=ubuntu_gmail_nail-v1.0.sh ubuntu_gmail_nail-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_nail-v1.0.sh
3. Make script executable and run with ""<tt>install</tt>"" command:
$ chmod 755 /tmp/ubuntu_gmail_nail-v1.0.sh
$ /tmp/ubuntu_gmail_nail-v1.0.sh install
===Usage===
Send a file with an attachment
$ nail -s "nail gmail test" -a /tmp/test_email YOURNAME@gmail.com < /tmp/test_email
=====Manual Installation=====


Revision [1381]

Edited on 2010-05-13 22:51:57 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]
Additions:
3. Configure msmtp
4. Configure nail
5. Test
===3. Configure msmtp===
tls_trust_file /usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crt
===4. Configure nail===
===5. Test===
http://wiki.archlinux.org/index.php/Msmtp
Deletions:
3. Install Thawte Certificate for Gmail
4. Configure msmtp
5. Configure nail
6. Test
===3. 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
The certificate, in all its glory:
-----BEGIN CERTIFICATE-----
MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkEx
FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb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ls_trust_file /home/USER/etc/.certs/ThawtePremiumServerCA.crt
===5. Configure nail===
===6. Test===


Revision [1380]

Edited on 2010-05-13 22:50:39 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]
Additions:
This guide covers using the [[http://linux.die.net/man/1/nail nail program]], which is my client of choice but is no longer in the main repositories. (Apparently, it is now known as [[http://heirloom.sourceforge.net/mailx.html heirloom mailx]].) Find a guide for using mailx, which is part of the current Ubuntu repositories, here: [[UbuntuCommandLineGmail Command Line Gmail Using msmtp/mailx]]
Deletions:
This guide covers using the [[http://linux.die.net/man/1/nail nail program]], which is my client of choice but is no longer in the main repositories. (Apparently, it is now known as [[http://heirloom.sourceforge.net/mailx.html heirloom mailx]].) Find a guide for using mailx, which is part of the current Ubuntu repositories


Revision [1372]

Edited on 2010-05-12 10:33:10 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]
Additions:
5. Configure nail
# isp account
account isp
auth login
host SMTP.YOURISP.COM
port 25
user YOURNAME@ISP.COM
from YOURNAME@ISP.COM
account gmail
tls_trust_file /home/USER/etc/.certs/ThawtePremiumServerCA.crt
# set default account to use (from above)
account default : gmail
===5. Configure nail===
Open nail config file:
# set smtp for nail
# ref: http://ubuntuforums.org/showpost.php?p=4531994&amp;amp;amp;amp;postcount=6
# $ nail -s "subject line" -a /path/file recipient@email.com < /path/body.txt
# isp account (add -A option to command line)
# $ nail -A isp -s "subject line" -a /path/file recipient@email.com < /path/body.txt
account isp {
set from="YOURNAME@ISP.COM"
set message-sendmail-extra-arguments="-a isp"
}
$ nail -s "nail gmail test" YOURNAME@gmail.com < /tmp/test_email
http://linux.die.net/man/1/nail
Deletions:
5. Configure mailx
#account gmail
tls_trust_file /home/USER/etc/.certs/ThawtePremiumServerCA_b64.txt
# set default account to use (not necessary with single account)
#account default : gmail
===5. Configure mailx===
Open mailx config file:
# set smtp for mailx
# $ mailx -s "subject line" -a /path/attachment recipient@email.com < /path/body.txt
$ mailx -s "nail gmail test" YOURNAME@gmail.com < /tmp/test_email


Revision [1371]

The oldest known version of this page was created on 2010-05-12 10:26:35 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]