ref: c98f73af8b1f33a63f90315da2aed6285edf71c0
parent: d77b4f0b9ba5695daf565d35b832d1f49c96f6ef
author: stanley lieber <stanley.lieber@gmail.com>
date: Wed Dec 18 17:16:31 EST 2019
fqa.ms, fqa8.ms: add 8.4.1.1.2 - Sending mail with gmail (thanks, Philippe)
--- a/fqa.ms
+++ b/fqa.ms
@@ -1161,6 +1161,10 @@
8.4.1.1.1 - Reading gmail via IMAP
.ihtml a
+.ihtml a <a href="fqa8.html#8.4.1.1.2">
+8.4.1.1.2 - Sending mail with gmail
+.ihtml a
+
.ihtml a <a href="fqa8.html#8.4.1.2">
8.4.1.2 - nedmail
.ihtml a
--- a/fqa8.ms
+++ b/fqa8.ms
@@ -324,7 +324,7 @@
.B Note:
While the behavior of the arrow and page keys is fairly consistent between programs, mousewheel scrolling is not. So far,
.CW shift
-+
+
.CW up
or
.CW down
@@ -890,6 +890,64 @@
.B Note:
Opening large mailboxes over a slow 9p link will be very slow.
+
+.html - <a name="8.4.1.1.2" />
+.ihtml h5 <h5>
+.SH
+8.4.1.1.2 - Sending mail with gmail
+.R
+.ihtml h5
+
+Add your gmail password to the factotum:
+.P1
+echo 'key proto=pass server=smtp.gmail.com service=smtp \e
+ user=your.username@gmail.com !password=yourpassword' >/mnt/factotum/ctl
+.P2
+
+Modify
+.CW /mail/lib/remotemail
+to gateway mail through your gmail account:
+.P1
+#!/bin/rc
+shift
+sender=your.username@gmail.com
+shift
+addr=tcp!smtp.gmail.com!587
+shift
+fd=`{/bin/upas/aliasmail -f $sender}
+switch($fd){
+case *.*
+ ;
+case *
+ fd=gmail.com
+}
+exec /bin/upas/smtp -u your.username@gmail.com -a -h $fd $addr $sender $*
+.P2
+
+Before this will work you need to retrieve the certificate hash. This can be done
+by trying to send an e-mail and then looking for the hash in the log:
+.P1
+echo hello | mail -s test your.username@gmail.com
+.P2
+
+Then look in
+.CW /sys/log/smtp
+for the following error:
+.P1
+cert for smtp.gmail.com not recognized:
+ sha256=wnu7Uuzq4MlyJHP90+8f2smoh6x3cj0dG5z02jJlX42
+.P2
+
+Add the certificate to your system:
+.P1
+echo 'x509 sha256=wnu7Uuzq4MlyJHP90+8f2smoh6x3cj0dG5z02jJlX42' \e
+ >> /sys/lib/tls/smtp
+.P2
+
+You should now be able to send e-mail through gmail! I'm sorry.
+
+.B Note:
+This configuration breaks local e-mail delivery.
.html - <a name="8.4.1.2" />
.ihtml h4 <h4>