[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] gnu: Add esmtp.
From: |
Andy Wingo |
Subject: |
Re: [PATCH 2/2] gnu: Add esmtp. |
Date: |
Tue, 03 Nov 2015 15:32:45 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
On Tue 03 Nov 2015 14:54, Andy Wingo <address@hidden> 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 = address@hidden
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 <address@hidden>"
# 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 address@hidden
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