unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 0/1] Install mail queue tool with msmtp
@ 2016-02-22  5:38 Leo Famulari
  2016-02-22  5:38 ` [PATCH 1/1] gnu: msmtp: Install msmtpq Leo Famulari
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Leo Famulari @ 2016-02-22  5:38 UTC (permalink / raw)
  To: guix-devel

msmtp comes with a couple of scripts called msmtpq and msmtp-queue that
will queue mail locally if necessary.

https://sourceforge.net/p/msmtp/code/ci/master/tree/scripts/msmtpq/README.msmtpq

I've been using them out of the Debian msmtp package, but I'd like to
see them in Guix.

Thoughts?

Leo Famulari (1):
  gnu: msmtp: Install msmtpq.

 gnu/packages/mail.scm | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

-- 
2.7.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/1] gnu: msmtp: Install msmtpq.
  2016-02-22  5:38 [PATCH 0/1] Install mail queue tool with msmtp Leo Famulari
@ 2016-02-22  5:38 ` Leo Famulari
  2016-02-22  9:34 ` [PATCH 0/1] Install mail queue tool with msmtp Andy Wingo
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Leo Famulari @ 2016-02-22  5:38 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/mail.scm (msmtp)[arguments]: Install msmtpq scripts.
---
 gnu/packages/mail.scm | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 5a9f420..3266fc9 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
 ;;; Copyright © 2016 Al McElrath <hello@yrns.org>
+;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -629,7 +630,19 @@ which can add many functionalities to the base client.")
     (arguments
      `(#:configure-flags (list "--with-libgsasl"
                                "--with-libidn"
-                               "--with-tls=gnutls")))
+                               "--with-tls=gnutls")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'install-msmtpq
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin"))
+                    (doc (string-append out "/share/doc"))
+                    (msmtpq (string-append "scripts/msmtpq")))
+               (install-file (string-append msmtpq "/msmtpq") bin)
+               (install-file (string-append msmtpq "/msmtp-queue") bin)
+               (install-file (string-append msmtpq "/README.msmtpq") doc)
+               #t))))))
     (synopsis
      "Simple and easy to use SMTP client with decent sendmail compatibility")
     (description
-- 
2.7.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/1] Install mail queue tool with msmtp
  2016-02-22  5:38 [PATCH 0/1] Install mail queue tool with msmtp Leo Famulari
  2016-02-22  5:38 ` [PATCH 1/1] gnu: msmtp: Install msmtpq Leo Famulari
@ 2016-02-22  9:34 ` Andy Wingo
  2016-02-22 17:16   ` Leo Famulari
  2016-02-28 15:11 ` Ludovic Courtès
  2016-02-28 15:46 ` Ricardo Wurmus
  3 siblings, 1 reply; 8+ messages in thread
From: Andy Wingo @ 2016-02-22  9:34 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

On Mon 22 Feb 2016 06:38, Leo Famulari <leo@famulari.name> writes:

> msmtp comes with a couple of scripts called msmtpq and msmtp-queue that
> will queue mail locally if necessary.
>
> https://sourceforge.net/p/msmtp/code/ci/master/tree/scripts/msmtpq/README.msmtpq
>
> I've been using them out of the Debian msmtp package, but I'd like to
> see them in Guix.
>
> Thoughts?

Can you write up how to use it, like in
https://lists.gnu.org/archive/html/guix-devel/2015-11/msg00081.html ?

Cheers,

Andy

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/1] Install mail queue tool with msmtp
  2016-02-22  9:34 ` [PATCH 0/1] Install mail queue tool with msmtp Andy Wingo
@ 2016-02-22 17:16   ` Leo Famulari
  2016-02-24 22:39     ` Leo Famulari
  0 siblings, 1 reply; 8+ messages in thread
From: Leo Famulari @ 2016-02-22 17:16 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guix-devel

On Mon, Feb 22, 2016 at 10:34:22AM +0100, Andy Wingo wrote:
> On Mon 22 Feb 2016 06:38, Leo Famulari <leo@famulari.name> writes:
> 
> > msmtp comes with a couple of scripts called msmtpq and msmtp-queue that
> > will queue mail locally if necessary.
> >
> > https://sourceforge.net/p/msmtp/code/ci/master/tree/scripts/msmtpq/README.msmtpq
> >
> > I've been using them out of the Debian msmtp package, but I'd like to
> > see them in Guix.
> >
> > Thoughts?
> 

I realized the part of the patch that installs the README should install
it in "share/doc/msmtp", so I will make that change.

> Can you write up how to use it, like in
> https://lists.gnu.org/archive/html/guix-devel/2015-11/msg00081.html ?

Sure. Here's a basic configuration file for msmtp itself:

---

defaults
auth on
tls on
tls_trust_file /path/to/ca-certificates.crt

account account-name
host mail.example.com
from me@example.com
user me@example.com
passwordeval the rest of this string is an invocation of my password manager

account default : account-name

---

Once you've got that in a file called ~/.msmtprc, you can do this:
echo here's a patch | msmtp guix-devel@gnu.org

Or:
echo here's a patch | msmtpq guix-devel@gnu.org

The second method will queue mail for you in ~/.msmtp.queue if
necessary, and the queue is logged in ~/.msmtp.queue.log . The mail will
be sent the next time you are able to send mail.

In my Mutt configuration, I use it like this:
set sendmail = msmtpq
set sendmail_wait = -1 # background the 'sendmail' process but watch for
		       # a return code from msmtpq.

Users can inspect and work on the queue with the 'msmtp-queue' command,
which "calls msmtpq with the --q-mgmt command ; it exposes routines for
queue management and maintenance".

Configuration of msmtpq is supposed to be done by editing the msmtpq
script itself, but in my opinion the defaults are sensible and don't
need to be changed. I didn't even realize it was configurable until you
asked for this synopsis and I've been using for it about a year.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/1] Install mail queue tool with msmtp
  2016-02-22 17:16   ` Leo Famulari
@ 2016-02-24 22:39     ` Leo Famulari
  0 siblings, 0 replies; 8+ messages in thread
From: Leo Famulari @ 2016-02-24 22:39 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guix-devel

On Mon, Feb 22, 2016 at 12:16:51PM -0500, Leo Famulari wrote:
> On Mon, Feb 22, 2016 at 10:34:22AM +0100, Andy Wingo wrote:
> > On Mon 22 Feb 2016 06:38, Leo Famulari <leo@famulari.name> writes:
> > 
> > > msmtp comes with a couple of scripts called msmtpq and msmtp-queue that
> > > will queue mail locally if necessary.
> > >
> > > https://sourceforge.net/p/msmtp/code/ci/master/tree/scripts/msmtpq/README.msmtpq
> > >
> > > I've been using them out of the Debian msmtp package, but I'd like to
> > > see them in Guix.
> > >
> > > Thoughts?
> > 
> 
> I realized the part of the patch that installs the README should install
> it in "share/doc/msmtp", so I will make that change.
> 
> > Can you write up how to use it, like in
> > https://lists.gnu.org/archive/html/guix-devel/2015-11/msg00081.html ?
> 
> Sure. Here's a basic configuration file for msmtp itself:

Taking into account the extra information, does anyone have any
objections?

> 
> ---
> 
> defaults
> auth on
> tls on
> tls_trust_file /path/to/ca-certificates.crt
> 
> account account-name
> host mail.example.com
> from me@example.com
> user me@example.com
> passwordeval the rest of this string is an invocation of my password manager
> 
> account default : account-name
> 
> ---
> 
> Once you've got that in a file called ~/.msmtprc, you can do this:
> echo here's a patch | msmtp guix-devel@gnu.org
> 
> Or:
> echo here's a patch | msmtpq guix-devel@gnu.org
> 
> The second method will queue mail for you in ~/.msmtp.queue if
> necessary, and the queue is logged in ~/.msmtp.queue.log . The mail will
> be sent the next time you are able to send mail.
> 
> In my Mutt configuration, I use it like this:
> set sendmail = msmtpq
> set sendmail_wait = -1 # background the 'sendmail' process but watch for
> 		       # a return code from msmtpq.
> 
> Users can inspect and work on the queue with the 'msmtp-queue' command,
> which "calls msmtpq with the --q-mgmt command ; it exposes routines for
> queue management and maintenance".
> 
> Configuration of msmtpq is supposed to be done by editing the msmtpq
> script itself, but in my opinion the defaults are sensible and don't
> need to be changed. I didn't even realize it was configurable until you
> asked for this synopsis and I've been using for it about a year.
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/1] Install mail queue tool with msmtp
  2016-02-22  5:38 [PATCH 0/1] Install mail queue tool with msmtp Leo Famulari
  2016-02-22  5:38 ` [PATCH 1/1] gnu: msmtp: Install msmtpq Leo Famulari
  2016-02-22  9:34 ` [PATCH 0/1] Install mail queue tool with msmtp Andy Wingo
@ 2016-02-28 15:11 ` Ludovic Courtès
  2016-02-29  3:09   ` Leo Famulari
  2016-02-28 15:46 ` Ricardo Wurmus
  3 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2016-02-28 15:11 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Leo Famulari <leo@famulari.name> skribis:

> msmtp comes with a couple of scripts called msmtpq and msmtp-queue that
> will queue mail locally if necessary.
>
> https://sourceforge.net/p/msmtp/code/ci/master/tree/scripts/msmtpq/README.msmtpq
>
> I've been using them out of the Debian msmtp package, but I'd like to
> see them in Guix.

[...]

> * gnu/packages/mail.scm (msmtp)[arguments]: Install msmtpq scripts.

Sounds like a worthy addition, please push!

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/1] Install mail queue tool with msmtp
  2016-02-22  5:38 [PATCH 0/1] Install mail queue tool with msmtp Leo Famulari
                   ` (2 preceding siblings ...)
  2016-02-28 15:11 ` Ludovic Courtès
@ 2016-02-28 15:46 ` Ricardo Wurmus
  3 siblings, 0 replies; 8+ messages in thread
From: Ricardo Wurmus @ 2016-02-28 15:46 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel


Leo Famulari <leo@famulari.name> writes:

> msmtp comes with a couple of scripts called msmtpq and msmtp-queue that
> will queue mail locally if necessary.
>
> https://sourceforge.net/p/msmtp/code/ci/master/tree/scripts/msmtpq/README.msmtpq
>
> I've been using them out of the Debian msmtp package, but I'd like to
> see them in Guix.
>
> Thoughts?

I did not know this exists.  As a user of msmtp I’ll play with this once
it’s available in Guix.

Thanks!

~~ Ricardo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/1] Install mail queue tool with msmtp
  2016-02-28 15:11 ` Ludovic Courtès
@ 2016-02-29  3:09   ` Leo Famulari
  0 siblings, 0 replies; 8+ messages in thread
From: Leo Famulari @ 2016-02-29  3:09 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Sun, Feb 28, 2016 at 04:11:14PM +0100, Ludovic Courtès wrote:
> Leo Famulari <leo@famulari.name> skribis:
> 
> > msmtp comes with a couple of scripts called msmtpq and msmtp-queue that
> > will queue mail locally if necessary.
> >
> > https://sourceforge.net/p/msmtp/code/ci/master/tree/scripts/msmtpq/README.msmtpq
> >
> > I've been using them out of the Debian msmtp package, but I'd like to
> > see them in Guix.
> 
> [...]
> 
> > * gnu/packages/mail.scm (msmtp)[arguments]: Install msmtpq scripts.
> 
> Sounds like a worthy addition, please push!

Done as 823e2ed4b3!

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-02-29  3:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-22  5:38 [PATCH 0/1] Install mail queue tool with msmtp Leo Famulari
2016-02-22  5:38 ` [PATCH 1/1] gnu: msmtp: Install msmtpq Leo Famulari
2016-02-22  9:34 ` [PATCH 0/1] Install mail queue tool with msmtp Andy Wingo
2016-02-22 17:16   ` Leo Famulari
2016-02-24 22:39     ` Leo Famulari
2016-02-28 15:11 ` Ludovic Courtès
2016-02-29  3:09   ` Leo Famulari
2016-02-28 15:46 ` Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).