From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f46.google.com ([209.85.221.46]) by ewsd; Wed Dec 18 14:29:05 EST 2019 Received: by mail-wr1-f46.google.com with SMTP id j42so3508148wrj.12 for <9front@9front.org>; Wed, 18 Dec 2019 11:29:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:date:to:subject:in-reply-to:mime-version; bh=2kA+bgNYJ5bmcNfjt61v9oWlY8iVc917RoY5TPXpBVs=; b=srBZhax4EPtYsFh0SA0D6SzKwu/RENEAYlZw/C0PFHxLtbM1Tqr5KHa23XLAKtNrS6 Jx2yg2FCkTSYNHTVxP2CcP9TsPBHOU5LgOdUJX1Jqu6CM2PntxgrcPe7bFbT8XX40Qv/ P99SFh1PODxVlXIG0TxObYoItpRjdBb/Z3nSRIG83PgPBIZICNBAeA2YDs8hQoM0cFU3 1tHwu1adfIZy1DTCME6KDWudxcdiaGeEBhew010V9fT1YgqYnYSX2RtJiEXvpen4dRrE nM2F5BXd9xI41S8udW3bOqrg9Mj1aa7HZsdl3I+xARiuq7B64eS3ePGqTZO+C/pRknYs idGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:date:to:subject:in-reply-to :mime-version; bh=2kA+bgNYJ5bmcNfjt61v9oWlY8iVc917RoY5TPXpBVs=; b=rhY8nFwi7WZdU7ybX3fNc7IZaI7HokmbPj1HL9jbx6RNgahrflqN2RODe6JUNFQNeK 3IBquCM5JKoAE6RHzVGvTZgZ7XrR9o0u4SNrPntLL+tRvCMFHc6+thuurLIQAlEsYo2p Ho1Iy4qr+rnFP/usB6wv/oRd4YpGLEArFt5V20LLeipa9cc+3COMa8H2mkB3FNxv+sv4 PC/ZwR5Zt6bYkjQ/fBja4V9/X5KdtuFZ8WOEQVRLw2u11ZUHE/4ruMMPRguOrzYib1Z0 99K+6UO6DixRuCCnNoe8LMwvDvPpDAoI84u+TjQzBh/tidjeMFSW1vOAMt8WTZyxsnzm GdbQ== X-Gm-Message-State: APjAAAWC5D5GdLdTiPzEB37YPtwkhK4qzs3GlFHeBTTdJIcY2tlXi+T3 MLHjcO4QTCFwvFSOHrV0180= X-Google-Smtp-Source: APXvYqw+j11ndidUwUeiQx8r+G8gXsvRS6/DHYKdmDZGxxRaWCmxQRjL7ie5bVlKu1I1ULS/JwzQVA== X-Received: by 2002:adf:ea0f:: with SMTP id q15mr4572589wrm.324.1576697341591; Wed, 18 Dec 2019 11:29:01 -0800 (PST) Return-Path: Received: from hades (lfbn-idf1-1-352-97.w86-195.abo.wanadoo.fr. [86.195.7.97]) by smtp.gmail.com with ESMTPSA id g199sm3743993wmg.12.2019.12.18.11.29.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Dec 2019 11:29:00 -0800 (PST) From: telephil9@gmail.com X-Google-Original-From: pme@gmail.com Message-ID: <32414457957A781AB3E8C173D958496B@gmail.com> Date: Wed, 18 Dec 2019 20:28:52 +0100 To: ori@eigenstate.org, 9front@9front.org, telephil9@gmail.com Subject: Re: [9front] fqa8: sending email with gmail In-Reply-To: <20191218092901.9361ffc8c97b08207cd3babe@eigenstate.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-skdxswxzhraflvrewioltxpkjg" List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: progressive event-oriented reduce/map locator This is a multi-part message in MIME format. --upas-skdxswxzhraflvrewioltxpkjg Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Hi Ori, Thanks for the feedback. Here is an amended version of the patch. Regarding your last point, I'll try to look into it in the upcoming weeks. Regards, Philippe --upas-skdxswxzhraflvrewioltxpkjg Content-Type: message/rfc822 Content-Disposition: inline Delivered-To: philippe.mechai@gmail.com Received: by 2002:ac9:57d8:0:0:0:0:0 with SMTP id h24csp1143658ocp; Wed, 18 Dec 2019 09:29:47 -0800 (PST) X-Google-Smtp-Source: APXvYqyCs95PghMA+q7lJmojw0NguHWxvl6QlloMgHvAfTN2dUdyjkyj9nG991Yd0thxoxJzOLmT X-Received: by 2002:a63:31d0:: with SMTP id x199mr4368295pgx.286.1576690187562; Wed, 18 Dec 2019 09:29:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576690187; cv=none; d=google.com; s=arc-20160816; b=pp0vGsyz4oG2rkLa3UuaVWw9V/ddaxqNK1Oq+xin3tB0diyOosjOJvJSuBGCxg8jXp kGYLLNWHa41vDnQX8yT59GyDzFs7Ck1hj4gClFimnn9OLJYXhvqFxokl6+7gTaGIUR/L WMIiMFOIdTchrFN52U8St9zFleVaHlHHHJMCID4R8S2GC1sc4624kR5cvef00Q904Wrz XWumEa0BXfJd6dvp0dm9OoJnI8gEjLEeL6IZlK1wk5ENaRraUKd1ytZ2hky3FlWls+oQ 8mzlbWi8rzOXW41VKLj4bTV4jqbNCn59W5cE4N/OidCMEIL3oHoQlxfxBnPJ57tDVjr/ UBmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=precedence:reply-to:subject:list-help:list-id :content-transfer-encoding:mime-version:references:in-reply-to :message-id:cc:to:from:date; bh=jz4ywowhaPBzcxbjVeLKIW9tugG7b33FV+oW0W4bA6U=; b=ZYeF9jpBAkU72FZA9covre65SEyzbYh4ItxzMw9rR3zX2FpVyYBpJcQnhrlChf/tBy HuUNMV8IeX2Ui2qyK7acccyW2B/CAI+GfxKlp3MCoX5tX4SeqogWZU5BEJHHcWnJYpEO JwhEm9M1Mue49vcvnAIu4FuCD8w3PKn/TK1Ww7FpWNZlZbGM+ZgyHLY/bxASu6xBqQve m8Su3PlGd07cJ3hEroNktREiC4wQER6l3sRw0P61BkRL3nUbhgnNPNQmSeHJwS/ZzmvJ p6fY9axCKI4Gn6yKXdAo+qJhxJu2yfezIQclYjWTgQiZDpj2uE/SyKN2nlirdhKBuhoN DxlQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of 9front-bounces@ewsd.inri.net designates 107.191.116.128 as permitted sender) smtp.mailfrom=9front-bounces@ewsd.inri.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=eigenstate.org Return-Path: <9front-bounces@ewsd.inri.net> Received: from ewsd.inri.net (ewsd.inri.net. [107.191.116.128]) by mx.google.com with ESMTP id f11si3182206pgr.122.2019.12.18.09.29.42; Wed, 18 Dec 2019 09:29:47 -0800 (PST) Received-SPF: pass (google.com: domain of 9front-bounces@ewsd.inri.net designates 107.191.116.128 as permitted sender) client-ip=107.191.116.128; Authentication-Results: mx.google.com; spf=pass (google.com: domain of 9front-bounces@ewsd.inri.net designates 107.191.116.128 as permitted sender) smtp.mailfrom=9front-bounces@ewsd.inri.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=eigenstate.org Received: from mimir.eigenstate.org ([206.124.132.107]) by ewsd; Wed Dec 18 12:29:11 EST 2019 Received: from gooseberry.eigenstate.org (rrcs-76-81-176-155.west.biz.rr.com [76.81.176.155]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id 4addb1bd (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Wed, 18 Dec 2019 09:29:03 -0800 (PST) Date: Wed, 18 Dec 2019 09:29:01 -0800 From: Ori Bernstein To: 9front@9front.org Cc: telephil9@gmail.com Message-Id: <20191218092901.9361ffc8c97b08207cd3babe@eigenstate.org> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-unknown-openbsd6.6) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: virtualized patented storage Subject: Re: [9front] fqa8: sending email with gmail Reply-To: 9front@9front.org Precedence: bulk On Wed, 18 Dec 2019 18:03:49 +0100, telephil9@gmail.com wrote: > Hi, > > Attached is a patch to fqa8 that documents sending mail with gmail. > Thanks to Ori_B and kvik for helping me with the issues I had. > > Regards, > Philippe Thanks for taking the time to fix our docs! This can still use a bit of polish. Specifically, I think the section below could be better written: +Now you can try sending an email: +.P1 +echo hello | mail -s test your.username@gmail.com +.P2 + +This will not work the first time as we also need to add a certificate. +Look into /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 emails from 9front! I think the thing that I dislike most is that 'now you can try sending an email' reads as though things should work at that point. Maybe replacing it with 'Now we need to extract the certificate hash. We can do this by failing to send an email:' It may also be worth taking a bit of time to figure out and recommend a setup that works for both gmail and local mail. Not sure about that. -- Ori Bernstein --upas-skdxswxzhraflvrewioltxpkjg Content-Type: multipart/mixed; boundary="upas-iwsldvepwspaismxrxyfnglclv" Content-Disposition: inline This is a multi-part message in MIME format. --upas-iwsldvepwspaismxrxyfnglclv Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit from postmaster@hades: The following attachment had content that we can't prove to be harmless. To avoid possible automatic execution, we changed the content headers. The original header was: Content-Disposition: attachment; filename=fqa8-send-gmail.patch Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit --upas-iwsldvepwspaismxrxyfnglclv Content-Type: application/octet-stream Content-Disposition: attachment; filename="fqa8-send-gmail.patch.suspect" diff -r c259787f7f92 fqa8.ms --- a/fqa8.ms Wed Dec 04 21:18:36 2019 -0500 +++ b/fqa8.ms Wed Dec 18 20:21:19 2019 +0100 @@ -891,6 +891,67 @@ .B Note: Opening large mailboxes over a slow 9p link will be very slow. +.html - +.ihtml 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 + +Configure upas to use gmail as a gateway for outgoing email: +.P1 +cat /mail/lib/rewrite.gateway >> /mail/lib/rewrite +.P2 + +Modify /mail/lib/remotemail to use 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 + +A last step is needed, retrieving the certificate hash. This can be done +by trying to send an email and then looking for the hash in the error logs: +.P1 +echo hello | mail -s test your.username@gmail.com +.P2 + +Then look into /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 emails from 9front! + +.B Note: +This configuration does not work for local email delivery. + + + .html - .ihtml h4

.SH --upas-iwsldvepwspaismxrxyfnglclv--