From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Wingo Subject: Re: [PATCH 2/2] gnu: Add esmtp. Date: Tue, 03 Nov 2015 15:32:45 +0000 Message-ID: <87611jjdya.fsf@igalia.com> References: <1446562473-5808-1-git-send-email-wingo@igalia.com> <1446562473-5808-2-git-send-email-wingo@igalia.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtdZu-0004hr-0Z for guix-devel@gnu.org; Tue, 03 Nov 2015 10:32:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtdZq-0007so-02 for guix-devel@gnu.org; Tue, 03 Nov 2015 10:32:53 -0500 Received: from pb-sasl0.int.icgroup.com ([208.72.237.25]:60829 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtdZp-0007sk-TK for guix-devel@gnu.org; Tue, 03 Nov 2015 10:32:49 -0500 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl0.pobox.com (Postfix) with ESMTP id 5F465230A5 for ; Tue, 3 Nov 2015 10:32:49 -0500 (EST) Received: from pb-sasl0.int.icgroup.com (unknown [127.0.0.1]) by pb-sasl0.pobox.com (Postfix) with ESMTP id 58270230A4 for ; Tue, 3 Nov 2015 10:32:49 -0500 (EST) Received: from rusty (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl0.pobox.com (Postfix) with ESMTPSA id 9B2D6230A1 for ; Tue, 3 Nov 2015 10:32:48 -0500 (EST) In-Reply-To: <1446562473-5808-2-git-send-email-wingo@igalia.com> (Andy Wingo's message of "Tue, 3 Nov 2015 15:54:33 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org On Tue 03 Nov 2015 14:54, Andy Wingo writes: > * gnu/packages/mail.scm (esmtp): New public variable. This patch adds a "sendmail" that works, more or less. In my ~/.esmtprc I have: hostname = your.smtp.server:port username = user@email.com password = 'yourpasswordhere' starttls = required That configures the esmtp MTA. Then in Emacs you have these variables: (setq send-mail-function 'sendmail-send-it) (setq sendmail-program "/home/USER/.guix-profile/sbin/sendmail") And install esmtp: guix package -i esmtp So now C-x m works, cool. You probably also want to install git-send-email: guix package -i git:send-email and configure it globally: git config --global sendemail.from "Your Name " # Don't Cc: yourself on mails. git config --global sendemail.suppressfrom true git config sendemail.smtpserver $HOME/.guix-profile/sbin/sendmail git config envelopesender auto And probably in your guix checkout you want to do: git config sendemail.to guix-devel@gnu.org And if all that is set up... well then you should be able to git send-email 0001-foo.patch 0002-bar.patch or git send-email origin/master..HEAD or whatever. Anyway you all have probably already hooked all of this up but I was really struggling, and maybe this is useful to someone else. Finally, the esmtp daemon will normally block on sending mails and never queue anything. If you want to queue, there's the esmtp-wrapper shell script shipped with esmtp; simply do: ln -s ~/.guix-profile/bin/esmtp-wrapper ~/bin/sendmail ln -s ~/.guix-profile/bin/esmtp-wrapper ~/bin/mailq It will queue to ~/.esmtp_queue. This gives you the ability to send mails while being offline. Later to send them, you can "mailq -q". OK, that's all! At some point it would be nice to rewrite this hacky pile of C and shell with a nice Guile relay-only MTA, but that day is not today, at least for me :) Cheers, Andy