Merge remote-tracking branch 'origin/master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / mail.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014, 2015, 2017 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
5 ;;; Copyright © 2014 Sou Bunnbu <iyzsong@gmail.com>
6 ;;; Copyright © 2014 Julien Lepiller <julien@lepiller.eu>
7 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
8 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
9 ;;; Copyright © 2015, 2016 Eric Bavier <bavier@member.fsf.org>
10 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
11 ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
12 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
13 ;;; Copyright © 2016 Al McElrath <hello@yrns.org>
14 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
16 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
17 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
18 ;;; Copyright © 2016, 2017 <contact.ng0@cryptolab.net>
19 ;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
20 ;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net>
21 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
22 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
23 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
24 ;;;
25 ;;; This file is part of GNU Guix.
26 ;;;
27 ;;; GNU Guix is free software; you can redistribute it and/or modify it
28 ;;; under the terms of the GNU General Public License as published by
29 ;;; the Free Software Foundation; either version 3 of the License, or (at
30 ;;; your option) any later version.
31 ;;;
32 ;;; GNU Guix is distributed in the hope that it will be useful, but
33 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
34 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 ;;; GNU General Public License for more details.
36 ;;;
37 ;;; You should have received a copy of the GNU General Public License
38 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
39
40 (define-module (gnu packages mail)
41 #:use-module (gnu packages)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages base)
44 #:use-module (gnu packages backup)
45 #:use-module (gnu packages bash)
46 #:use-module (gnu packages bison)
47 #:use-module (gnu packages crypto)
48 #:use-module (gnu packages curl)
49 #:use-module (gnu packages cyrus-sasl)
50 #:use-module (gnu packages databases)
51 #:use-module (gnu packages dejagnu)
52 #:use-module (gnu packages dns)
53 #:use-module (gnu packages documentation)
54 #:use-module (gnu packages emacs)
55 #:use-module (gnu packages enchant)
56 #:use-module (gnu packages ghostscript)
57 #:use-module (gnu packages glib)
58 #:use-module (gnu packages gnome)
59 #:use-module (gnu packages gnupg)
60 #:use-module (gnu packages groff)
61 #:use-module (gnu packages gsasl)
62 #:use-module (gnu packages gtk)
63 #:use-module (gnu packages guile)
64 #:use-module (gnu packages flex)
65 #:use-module (gnu packages libcanberra)
66 #:use-module (gnu packages libevent)
67 #:use-module (gnu packages libidn)
68 #:use-module (gnu packages linux)
69 #:use-module (gnu packages lua)
70 #:use-module (gnu packages m4)
71 #:use-module (gnu packages ncurses)
72 #:use-module (gnu packages pcre)
73 #:use-module (gnu packages perl)
74 #:use-module (gnu packages python)
75 #:use-module (gnu packages readline)
76 #:use-module (gnu packages search)
77 #:use-module (gnu packages texinfo)
78 #:use-module (gnu packages compression)
79 #:use-module (gnu packages glib)
80 #:use-module (gnu packages pkg-config)
81 #:use-module (gnu packages flex)
82 #:use-module (gnu packages gdb)
83 #:use-module (gnu packages man)
84 #:use-module (gnu packages ruby)
85 #:use-module (gnu packages samba)
86 #:use-module (gnu packages screen)
87 #:use-module (gnu packages tls)
88 #:use-module (gnu packages networking)
89 #:use-module (gnu packages web)
90 #:use-module (gnu packages xml)
91 #:use-module (gnu packages xorg)
92 #:use-module (gnu packages docbook)
93 #:use-module ((guix licenses)
94 #:select (gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+
95 non-copyleft (expat . license:expat) bsd-3
96 public-domain bsd-4 isc (openssl . license:openssl)
97 bsd-2 x11-style agpl3))
98 #:use-module (guix packages)
99 #:use-module (guix download)
100 #:use-module (guix git-download)
101 #:use-module (guix utils)
102 #:use-module (guix build-system gnu)
103 #:use-module (guix build-system perl)
104 #:use-module (guix build-system python)
105 #:use-module (guix build-system trivial))
106
107 (define-public mailutils
108 (package
109 (name "mailutils")
110 (version "3.2")
111 (source (origin
112 (method url-fetch)
113 (uri (string-append "mirror://gnu/mailutils/mailutils-"
114 version ".tar.bz2"))
115 (sha256
116 (base32
117 "0c06yj5hgqibi24ib9sx865kq6i1h18wn201g6iwcfbpi2a7psdm"))))
118 (build-system gnu-build-system)
119 (arguments
120 '(#:phases
121 (modify-phases %standard-phases
122 (add-before 'build 'pre-build
123 (lambda _
124 ;; Use the right file name for `cat'.
125 (substitute* "testsuite/lib/mailutils.exp"
126 (("/bin/cat")
127 (which "cat")))
128
129 ;; Tests try to invoke 'maidag' such that it looks up the
130 ;; 'root' user, which does not exist in the build
131 ;; environment.
132 (substitute* "maidag/tests/testsuite"
133 (("root <") "nobody <")
134 (("spool/root") "spool/nobody")
135 (("root@localhost") "nobody@localhost"))
136
137 ;; The 'pipeact.at' tests generate a shell script; make
138 ;; sure it uses the right shell.
139 (substitute* '("sieve/tests/testsuite"
140 "mh/tests/testsuite")
141 (("#! /bin/sh")
142 (string-append "#!" (which "sh"))))
143
144 (substitute* "mh/tests/testsuite"
145 (("moreproc: /bin/cat")
146 (string-append "moreproc: " (which "cat"))))
147
148 ;; XXX: The comsatd tests rely on being able to open
149 ;; /dev/tty, but that gives ENODEV in the build
150 ;; environment. Thus, ignore test failures here.
151 (substitute* "comsat/tests/Makefile.in"
152 (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
153 (string-append "-" all)))
154
155 #t)))
156 ;; TODO: Add `--with-sql'.
157 #:configure-flags '("--sysconfdir=/etc")
158 #:parallel-tests? #f))
159 (inputs
160 `(("dejagnu" ,dejagnu)
161 ("m4" ,m4)
162 ("texinfo" ,texinfo)
163 ("guile" ,guile-2.0)
164 ("gnutls" ,gnutls)
165 ("ncurses" ,ncurses)
166 ("readline" ,readline)
167 ("linux-pam" ,linux-pam)
168 ("libltdl" ,libltdl)
169 ("gdbm" ,gdbm)))
170 (home-page "https://www.gnu.org/software/mailutils/")
171 (synopsis "Utilities and library for reading and serving mail")
172 (description
173 "GNU Mailutils is a collection of programs for managing, viewing and
174 processing electronic mail. It contains both utilities and server daemons
175 and all operate in a protocol-agnostic way. The underlying libraries are
176 also available, simplifying the addition of mail capabilities to new
177 software.")
178 (license
179 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
180 (list gpl3+ lgpl3+))))
181
182 (define-public fetchmail
183 (package
184 (name "fetchmail")
185 (version "6.3.26")
186 (source (origin
187 (method url-fetch)
188 (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-"
189 version ".tar.xz"))
190 (sha256
191 (base32
192 "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r"))))
193 (build-system gnu-build-system)
194 (inputs
195 `(("openssl" ,openssl)))
196 (arguments
197 `(#:configure-flags (list (string-append "--with-ssl="
198 (assoc-ref %build-inputs "openssl")))))
199 (home-page "http://www.fetchmail.info/")
200 (synopsis "Remote-mail retrieval and forwarding utility")
201 (description
202 "Fetchmail is a full-featured, robust, well-documented remote-mail
203 retrieval and forwarding utility intended to be used over on-demand
204 TCP/IP links (such as SLIP or PPP connections). It supports every
205 remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
206 KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
207 and IPSEC.
208
209 Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
210 so it can then be read by normal mail user agents such as mutt, elm
211 or BSD Mail. It allows all your system MTA's filtering, forwarding, and
212 aliasing facilities to work just as they would on normal mail.")
213 (license gpl2+))) ; most files are actually public domain or x11
214
215 (define-public mutt
216 (package
217 (name "mutt")
218 (version "1.8.0")
219 (source (origin
220 (method url-fetch)
221 (uri (string-append "ftp://ftp.mutt.org/pub/mutt/mutt-"
222 version ".tar.gz"))
223 (sha256
224 (base32
225 "1axdcylyv0p194y6lj1jx127g5yc74zqzzxdc014cjw02bd1x125"))
226 (patches (search-patches "mutt-store-references.patch"))))
227 (build-system gnu-build-system)
228 (inputs
229 `(("cyrus-sasl" ,cyrus-sasl)
230 ("gdbm" ,gdbm)
231 ("gpgme" ,gpgme)
232 ("ncurses" ,ncurses)
233 ("openssl" ,openssl)
234 ("perl" ,perl)))
235 (arguments
236 `(#:configure-flags '("--enable-smtp"
237 "--enable-imap"
238 "--enable-pop"
239 "--enable-gpgme"
240 "--enable-hcache" ; for header caching
241 "--enable-sidebar"
242 "--with-ssl"
243 "--with-sasl"
244 ;; so that mutt does not check whether the path
245 ;; exists, which it does not in the chroot
246 "--with-mailpath=/var/mail")))
247 (home-page "http://www.mutt.org/")
248 (synopsis "Mail client")
249 (description
250 "Mutt is a small but very powerful text-based mail client for Unix
251 operating systems.")
252 (license gpl2+)))
253
254 (define-public neomutt
255 (package
256 (inherit mutt)
257 (name "neomutt")
258 (version "20170306")
259 (source
260 (origin
261 (method url-fetch)
262 (uri (string-append "https://github.com/" name "/" name
263 "/archive/" name "-" version ".tar.gz"))
264 (file-name (string-append name "-" version ".tar.gz"))
265 (sha256
266 (base32
267 "0qwcbjm9j1hgzmybw15w53pvfbqcdf47d4sw21s6r2yaj8kx1hag"))))
268 (inputs
269 `(("cyrus-sasl" ,cyrus-sasl)
270 ("gdbm" ,gdbm)
271 ("gpgme" ,gpgme)
272 ("ncurses" ,ncurses)
273 ("gnutls" ,gnutls)
274 ("openssl" ,openssl) ;For smime
275 ("perl" ,perl)
276 ("kyotocabinet" ,kyotocabinet)
277 ("libxslt" ,libxslt)
278 ("libidn" ,libidn)
279 ("libxml2" ,libxml2)
280 ("lmdb" ,lmdb)
281 ("docbook-xsl" ,docbook-xsl)
282 ("notmuch" ,notmuch)))
283 (native-inputs
284 `(("autoconf" ,autoconf)
285 ("automake" ,automake)
286 ("pkg-config" ,pkg-config)))
287 (arguments
288 `(#:configure-flags
289 (list "--enable-smtp"
290 "--enable-imap"
291 "--enable-pop"
292 "--enable-gpgme"
293
294 ;; database, implies header caching
295 "--without-tokyocabinet"
296 "--without-qdbm"
297 "--without-bdb"
298 "--with-lmdb"
299 (string-append "--with-kyotocabinet="
300 (assoc-ref %build-inputs "kyotocabinet"))
301 "--with-gdbm"
302
303 "--with-gnutls"
304 "--without-ssl"
305 "--with-sasl"
306
307 "--with-regex"
308 "--enable-smime"
309 "--enable-notmuch"
310 "--with-idn"
311
312 ;; If we do not set this, neomutt wants to check
313 ;; whether the path exists, which it does not
314 ;; in the chroot. The workaround is this.
315 "--with-mailpath=/var/mail"
316
317 "--with-external-dotlock"
318 "--enable-nntp"
319 "--enable-compressed"
320
321 (string-append "--with-curses="
322 (assoc-ref %build-inputs "ncurses")))
323 #:phases
324 (modify-phases %standard-phases
325 (add-after 'unpack 'autoconf
326 (lambda _
327 (zero? (system* "sh" "autoreconf" "-vfi")))))))
328 (home-page "https://www.neomutt.org/")
329 (synopsis "Command-line mail reader based on Mutt")
330 (description
331 "NeoMutt is a command-line mail reader which is based on mutt.
332 It adds a large amount of features to mutt, and they all find their way
333 into mutt, so it is not a fork but a large set of feature patches.")))
334
335 (define-public gmime
336 (package
337 (name "gmime")
338 (version "2.6.22")
339 (source (origin
340 (method url-fetch)
341 (uri (string-append "mirror://gnome/sources/gmime/"
342 (version-major+minor version)
343 "/gmime-" version ".tar.xz"))
344 (sha256
345 (base32
346 "0fjmsphvz8srsmcdl4v13p2z4jp2migaybyny444hal4snbr0py2"))))
347 (build-system gnu-build-system)
348 (native-inputs
349 `(("pkg-config" ,pkg-config)
350 ("gnupg" ,gnupg))) ; for tests only
351 (inputs `(("glib" ,glib)
352 ("gpgme" ,gpgme)
353 ("zlib" ,zlib)))
354 (arguments
355 `(#:phases
356 (modify-phases %standard-phases
357 (add-after
358 'unpack 'patch-paths-in-tests
359 (lambda _
360 ;; The test programs run several programs using 'system' with
361 ;; hard-coded paths. Here we patch them all.
362 ;; We use ISO-8859-1 here because test-iconv.c contains
363 ;; raw byte sequences in several different encodings.
364 (with-fluids ((%default-port-encoding #f))
365 (substitute* (find-files "tests" "\\.c$")
366 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
367 (let* ((base (basename prog-path))
368 (prog (which base)))
369 (string-append pre
370 (or prog (error "not found: " base))))))))))))
371 (home-page "http://spruce.sourceforge.net/gmime/")
372 (synopsis "MIME message parser and creator library")
373 (description
374 "GMime provides a core library and set of utilities which may be used for
375 the creation and parsing of messages using the Multipurpose Internet Mail
376 Extension (MIME).")
377 (license (list lgpl2.1+ gpl2+ gpl3+))))
378
379 (define-public bogofilter
380 (package
381 (name "bogofilter")
382 (version "1.2.4")
383 (source (origin
384 (method url-fetch)
385 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-"
386 version "/bogofilter-"
387 version ".tar.bz2"))
388 (sha256
389 (base32
390 "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1"))))
391 (build-system gnu-build-system)
392 (arguments
393 '(#:phases
394 (modify-phases %standard-phases
395 (add-before 'check 'pre-check
396 (lambda _
397 (substitute* "src/tests/t.frame"
398 (("GREP=/bin/grep")
399 (string-append "GREP=" (which "grep") "\n")))
400 #t)))))
401 (native-inputs `(("flex" ,flex)))
402 (inputs `(("bdb" ,bdb)))
403 (home-page "http://bogofilter.sourceforge.net/")
404 (synopsis "Mail classifier based on a Bayesian filter")
405 (description
406 "Bogofilter is a mail filter that classifies mail as spam or ham
407 (non-spam) by a statistical analysis of the message's header and
408 content (body). The program is able to learn from the user's classifications
409 and corrections. It is based on a Bayesian filter.")
410 (license gpl2)))
411
412 (define-public offlineimap
413 (package
414 (name "offlineimap")
415 (version "7.0.14")
416 (source (origin
417 (method url-fetch)
418 (uri (string-append "https://github.com/OfflineIMAP/offlineimap/"
419 "archive/v" version ".tar.gz"))
420 (file-name (string-append name "-" version ".tar.gz"))
421 (sha256
422 (base32
423 "0i5dvygps1ai2qwgamab8kngrp0c5m3bgaw0jk34l8ypsk54wj8r"))))
424 (build-system python-build-system)
425 (native-inputs
426 `(("asciidoc" ,asciidoc)))
427 (inputs `(("python2-pysqlite" ,python2-pysqlite)
428 ("python2-six" ,python2-six)))
429 (arguments
430 ;; The setup.py script expects python-2.
431 `(#:python ,python-2
432 ;; Tests require a modifiable IMAP account.
433 #:tests? #f
434 #:phases
435 (modify-phases %standard-phases
436 (add-after 'build 'build-documentation
437 (lambda _
438 (substitute* "docs/Makefile"
439 ;; Prevent xmllint and xsltproc from downloading a DTD file.
440 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
441 (zero? (system* "make" "-C" "docs" "man"))))
442 (add-after 'install 'install-documentation
443 (lambda* (#:key outputs #:allow-other-keys)
444 (let* ((out (assoc-ref outputs "out"))
445 (man (string-append out "/share/man")))
446 (install-file "docs/offlineimap.1" (string-append man "/man1"))
447 (install-file "docs/offlineimapui.7" (string-append man "/man7"))
448 #t)))
449 (add-after 'install-documentation 'wrap-binary
450 (lambda* (#:key outputs #:allow-other-keys)
451 (let* ((out (assoc-ref outputs "out"))
452 (bin (string-append out "/bin/offlineimap")))
453 (wrap-program bin
454 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
455 #t))))))
456 (home-page "http://www.offlineimap.org")
457 (synopsis "Sync emails between two repositories")
458 (description
459 "OfflineImap synchronizes emails between two repositories, so that you
460 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
461 repository and Maildir/IMAP as LOCAL repository.")
462 (license gpl2+)))
463
464 (define-public emacs-mew
465 (package
466 (name "emacs-mew")
467 (version "6.7")
468 (source (origin
469 (method url-fetch)
470 (uri (string-append "http://mew.org/Release/mew-"
471 version ".tar.gz"))
472 (sha256
473 (base32
474 "03fzky2kz73vgx4cbps2psbbnrgqgkk5q7jwfldisymkzr9iz03y"))))
475 (native-inputs
476 `(("emacs" ,emacs)))
477 (propagated-inputs
478 `(("ruby-sqlite3" ,ruby-sqlite3) ; optional for the database of messages
479 ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
480 (build-system gnu-build-system)
481 (arguments
482 (let ((elisp-dir "/share/emacs/site-lisp/guix.d/mew")
483 (icon-dir "/share/mew"))
484 `(#:modules ((guix build gnu-build-system)
485 (guix build utils)
486 (guix build emacs-utils))
487 #:imported-modules (,@%gnu-build-system-modules
488 (guix build emacs-utils))
489 #:configure-flags
490 (list (string-append "--with-elispdir=" %output ,elisp-dir)
491 (string-append "--with-etcdir=" %output ,icon-dir))
492 #:phases
493 (modify-phases %standard-phases
494 (add-after 'configure 'patch-mew-icon-directory
495 (lambda* (#:key outputs #:allow-other-keys)
496 (emacs-substitute-sexps "mew-key.el"
497 ("(def.* mew-icon-directory"
498 `(progn
499 (add-to-list 'image-load-path 'mew-icon-directory)
500 ,(string-append (assoc-ref outputs "out") ,icon-dir))))
501 #t))
502 (add-after 'install 'generate-autoloads
503 (lambda* (#:key outputs #:allow-other-keys)
504 (emacs-generate-autoloads
505 "mew" (string-append (assoc-ref outputs "out") ,elisp-dir))
506 #t)))
507 #:tests? #f)))
508 (home-page "http://www.mew.org")
509 (synopsis "Emacs e-mail client")
510 (description "Mew (Messaging in the Emacs World) is a user interface
511 for text messages, multimedia messages (MIME), news articles and
512 security functionality including PGP, S/MIME, SSH, and SSL.")
513 (license bsd-3)))
514
515 (define-public mu
516 (package
517 (name "mu")
518 (version "0.9.18")
519 (source (origin
520 (method url-fetch)
521 (uri (string-append "https://github.com/djcb/mu/releases/"
522 "download/" version "/mu-"
523 version ".tar.gz"))
524 (sha256
525 (base32
526 "02g82zvxfgn17wzy846bfxj0izjj7yklhwdnhwxy1y2kin4fqnb5"))))
527 (build-system gnu-build-system)
528 (native-inputs
529 `(("pkg-config" ,pkg-config)
530 ("glib" ,glib "bin") ; for gtester
531 ("emacs" ,emacs-minimal)))
532 ;; TODO: Add webkit and gtk to build the mug GUI.
533 (inputs
534 `(("xapian" ,xapian)
535 ("guile" ,guile-2.0)
536 ("glib" ,glib)
537 ("gmime" ,gmime)
538 ("tzdata" ,tzdata))) ;for mu/test/test-mu-query.c
539 (arguments
540 `(#:modules ((guix build gnu-build-system)
541 (guix build utils)
542 (guix build emacs-utils))
543 #:imported-modules (,@%gnu-build-system-modules
544 (guix build emacs-utils))
545 #:phases
546 (modify-phases %standard-phases
547 (add-after 'unpack 'patch-configure
548 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
549 ;; so our Emacs package can't find it. Setting "--with-lispdir"
550 ;; configure flag doesn't help because "mu4e" will be added to
551 ;; the lispdir anyway, so we have to modify "configure.ac".
552 (lambda _
553 (substitute* "configure"
554 (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") ""))
555 #t))
556 (add-before 'check 'check-tz-setup
557 (lambda* (#:key inputs #:allow-other-keys)
558 ;; For mu/test/test-mu-query.c
559 (setenv "TZDIR"
560 (string-append (assoc-ref inputs "tzdata")
561 "/share/zoneinfo"))
562 #t))
563 (add-after 'install 'install-emacs-autoloads
564 (lambda* (#:key outputs #:allow-other-keys)
565 (emacs-generate-autoloads
566 "mu4e"
567 (string-append (assoc-ref outputs "out")
568 "/share/emacs/site-lisp"))
569 #t)))))
570 (home-page "http://www.djcbsoftware.nl/code/mu/")
571 (synopsis "Quickly find emails")
572 (description
573 "Mu is a tool for dealing with e-mail messages stored in the
574 Maildir-format. Mu's purpose in life is to help you to quickly find the
575 messages you need; in addition, it allows you to view messages, extract
576 attachments, create new maildirs, and so on.")
577 (license gpl3+)))
578
579 (define-public alot
580 (package
581 (name "alot")
582 (version "0.4")
583 (source (origin
584 (method url-fetch)
585 ;; package author intends on distributing via github rather
586 ;; than pypi:
587 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
588 (uri (string-append "https://github.com/pazz/alot/archive/"
589 version ".tar.gz"))
590 (file-name (string-append "alot-" version ".tar.gz"))
591 (sha256
592 (base32
593 "0sl1kl2fhkv208llnbny4blcvrfdk4vx6bcw5pnyh9ylwb0pipi2"))))
594 (build-system python-build-system)
595 (arguments
596 `(#:tests? #f ; no tests
597 ;; python 3 is currently unsupported, more info:
598 ;; https://github.com/pazz/alot/blob/master/docs/source/faq.rst
599 #:python ,python-2))
600 (inputs
601 `(("python2-magic" ,python2-magic)
602 ("python2-configobj" ,python2-configobj)
603 ("python2-twisted" ,python2-twisted)
604 ("python2-urwid" ,python2-urwid)
605 ("python2-urwidtrees" ,python2-urwidtrees)
606 ("python2-pygpgme" ,python2-pygpgme)
607 ("python2-notmuch" ,python2-notmuch)))
608 (home-page "https://github.com/pazz/alot")
609 (synopsis "Commandline MUA using notmuch")
610 (description
611 "Alot is an experimental terminal mail user agent (MUA) based on
612 @code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
613 (license gpl3+)))
614
615 (define-public notifymuch
616 (let
617 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
618 (revision "1"))
619 (package
620 (name "notifymuch")
621 (version (string-append "0.1-" revision "." (string-take commit 7)))
622 (source
623 (origin
624 (method git-fetch)
625 (uri (git-reference
626 (url "https://github.com/kspi/notifymuch.git")
627 (commit commit)))
628 (sha256
629 (base32
630 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
631 (file-name (string-append name "-" version "-checkout"))))
632 (build-system python-build-system)
633 (inputs
634 `(("python-notmuch" ,python-notmuch)
635 ("python-pygobject" ,python-pygobject)
636 ("gobject-introspection" ,gobject-introspection)
637 ("libnotify" ,libnotify)
638 ("gtk+" ,gtk+)))
639 (arguments
640 `(#:phases
641 (modify-phases %standard-phases
642 (add-after 'install 'wrap-binary
643 (lambda* (#:key outputs #:allow-other-keys)
644 (let* ((out (assoc-ref outputs "out"))
645 (bin (string-append out "/bin/notifymuch")))
646 (wrap-program bin
647 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
648 `("GI_TYPELIB_PATH" ":" prefix
649 (,(getenv "GI_TYPELIB_PATH")
650 ,(string-append out "/lib/girepository-1.0")))))
651 #t)))))
652 (home-page "https://github.com/kspi/notifymuch")
653 (synopsis "Displays notifications for changes in the notmuch email database")
654 (description "notifymuch displays desktop notifications for messages in
655 the notmuch database. The notifications are sent using libnotify to a
656 notification daemon. The query to find messages to send a notification about
657 is configurable, and a notification for the same message will not be send
658 within a configurable period (defaults to 48 hours). To use notifymuch, run
659 @command{notifymuch} after new mail is indexed, this can be automated by
660 invoking @command{notifymuch} from the post-new hook.")
661 (license gpl3))))
662
663 (define-public notmuch
664 (package
665 (name "notmuch")
666 (version "0.24")
667 (source (origin
668 (method url-fetch)
669 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
670 version ".tar.gz"))
671 (sha256
672 (base32
673 "1z3m9knsdmchvfjzjhjf2cmdc9yahmvbvzn46wsrsrihfvv4rr7p"))))
674 (build-system gnu-build-system)
675 (arguments
676 '(#:make-flags (list "V=1") ; Verbose test output.
677 #:phases (modify-phases %standard-phases
678 (add-after 'unpack 'patch-notmuch-lib.el
679 (lambda _
680 (substitute* "emacs/notmuch-lib.el"
681 (("/bin/sh") (which "sh")))
682 #t))
683 (replace 'configure
684 (lambda* (#:key outputs #:allow-other-keys)
685 (setenv "CC" "gcc")
686 (setenv "CONFIG_SHELL" (which "sh"))
687
688 (let ((out (assoc-ref outputs "out")))
689 (zero? (system* "./configure"
690 (string-append "--prefix=" out))))))
691 (add-before 'check 'prepare-test-environment
692 (lambda _
693 (setenv "TEST_CC" "gcc")
694 ;; Patch various inline shell invocations.
695 (substitute* (find-files "test" "\\.sh$")
696 (("/bin/sh") (which "sh")))
697 #t)))))
698 (native-inputs
699 `(("bash-completion" ,bash-completion)
700 ("emacs" ,emacs-no-x) ; Minimal lacks libxml, needed for some tests.
701 ("pkg-config" ,pkg-config)
702 ("python" ,python-2)
703 ("python-docutils" ,python2-docutils)
704 ("python-sphinx" ,python2-sphinx)
705
706 ;; The following are required for tests only.
707 ("which" ,which)
708 ("dtach" ,dtach)
709 ("gnupg" ,gnupg)
710 ("man" ,man-db)
711 ("perl" ,perl)))
712 (inputs
713 `(("glib" ,glib)
714 ("gmime" ,gmime)
715 ("talloc" ,talloc)
716 ("xapian" ,xapian)
717 ("zlib" ,zlib)))
718 (home-page "https://notmuchmail.org/")
719 (synopsis "Thread-based email index, search, and tagging")
720 (description
721 "Notmuch is a command-line based program for indexing, searching, read-
722 ing, and tagging large collections of email messages.")
723 (license gpl3+)))
724
725 (define-public notmuch-addrlookup-c
726 (package
727 (name "notmuch-addrlookup-c")
728 (version "7")
729 (source (origin
730 (method url-fetch)
731 (uri (string-append
732 "https://github.com/aperezdc/" name "/archive/v"
733 version ".tar.gz"))
734 (file-name (string-append name "-" version ".tar.gz"))
735 (sha256
736 (base32
737 "0rslg2ifgyhl6asv3yr1f62m9xjfcinv7i6qb07h2k217jqlmrri"))))
738 (build-system gnu-build-system)
739 (arguments
740 '(#:tests? #f ; no tests
741 #:make-flags (list "CC=gcc"
742 (string-append "PREFIX="
743 (assoc-ref %outputs "out")))
744 #:phases (modify-phases %standard-phases
745 (delete 'configure)
746 ;; Remove vim code completion config, it's not needed to
747 ;; build (or be patched).
748 (add-before 'patch-source-shebangs 'delete-ycm-file
749 (lambda _ (delete-file ".ycm_extra_conf.py")))
750 (replace 'install
751 (lambda* (#:key outputs #:allow-other-keys)
752 (let ((bin (string-append
753 (assoc-ref outputs "out") "/bin")))
754 (install-file "notmuch-addrlookup" bin)))))))
755 (native-inputs
756 `(("pkg-config" ,pkg-config)))
757 (inputs
758 `(("glib" ,glib)
759 ("notmuch" ,notmuch)))
760 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
761 (synopsis "Address lookup tool for Notmuch")
762 (description "This is an address lookup tool using a Notmuch database,
763 useful for email address completion.")
764 (license license:expat)))
765
766 (define-public python-notmuch
767 (package
768 (name "python-notmuch")
769 (version (package-version notmuch))
770 ;; Notmuch python bindings are now unavailable on pypi. The
771 ;; bindings are distributed via the notmuch release tarball.
772 (source (package-source notmuch))
773 (build-system python-build-system)
774 (inputs `(("notmuch" ,notmuch)))
775 (arguments
776 `(#:tests? #f ; no "test" target
777 #:phases
778 (modify-phases %standard-phases
779 ;; This python package lives in a subdirectory of the notmuch source
780 ;; tree, so chdir into it before building.
781 (add-after 'unpack 'enter-python-dir
782 (lambda _ (chdir "bindings/python") #t))
783 ;; Make sure the correct notmuch shared library gets loaded.
784 (add-before 'build 'set-libnotmuch-file-name
785 (lambda* (#:key inputs #:allow-other-keys)
786 (let ((notmuch (assoc-ref inputs "notmuch")))
787 (substitute* "notmuch/globals.py"
788 (("libnotmuch\\.so\\.")
789 (string-append notmuch "/lib/libnotmuch.so.")))
790 #t))))))
791 (home-page (package-home-page notmuch))
792 (synopsis "Python bindings of the Notmuch mail indexing library")
793 (description
794 "This package provides Python bindings to use the Notmuch mail indexing
795 and search library.")
796 (license gpl3+)))
797
798 (define-public python2-notmuch
799 (package-with-python2 python-notmuch))
800
801 (define-public getmail
802 (package
803 (name "getmail")
804 (version "4.52.0")
805 (source
806 (origin
807 (method url-fetch)
808 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
809 name "-" version ".tar.gz"))
810 (sha256
811 (base32
812 "0pzplrlxwbxydvfw4kkwn60l40hk1h5sxawaa6pi0k75c220k4ni"))))
813 (build-system python-build-system)
814 (arguments
815 `(#:tests? #f ; no tests
816 #:python ,python-2))
817 (home-page "http://pyropus.ca/software/getmail/")
818 (synopsis "Mail retriever")
819 (description
820 "A flexible, extensible mail retrieval system with support for
821 POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
822 arbitrary message filtering, single-user and domain-mailboxes, and many other
823 useful features.")
824
825 ;; License is specified in file '__init__.py'.
826 (license gpl2)))
827
828 (define-public libetpan
829 (package
830 (name "libetpan")
831 (version "1.7.2")
832 (source (origin
833 (method url-fetch)
834 (uri (string-append "https://github.com/dinhviethoa/" name
835 "/archive/" version ".tar.gz"))
836 (file-name (string-append name "-" version ".tar.gz"))
837 (sha256
838 (base32 "081ixgj3skglq9i7v0jb835lmfx21zi4i5b7997igwr0lj174y9j"))))
839 (build-system gnu-build-system)
840 (native-inputs `(("autoconf" ,(autoconf-wrapper))
841 ("automake" ,automake)
842 ("libtool" ,libtool)
843 ("pkg-config" ,pkg-config)))
844 (propagated-inputs
845 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
846 ;; libraries need to be propagated.
847 `(("cyrus-sasl" ,cyrus-sasl)
848 ("openssl" ,openssl)))
849 (inputs
850 `(("curl" ,curl)
851 ("expat" ,expat)
852 ("zlib" ,zlib)))
853 (arguments
854 '(#:phases
855 (modify-phases %standard-phases
856 (add-after 'unpack 'autogen
857 (lambda _
858 (setenv "NOCONFIGURE" "true")
859 (zero? (system* "sh" "autogen.sh")))))
860 #:configure-flags
861 '("--disable-static" "--disable-db")))
862 (home-page "http://www.etpan.org/libetpan.html")
863 (synopsis "Portable middleware for email access")
864 (description
865 "The purpose of this mail library is to provide a portable, efficient
866 framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
867 provides an API for C language. It's the low-level API used by MailCore and
868 MailCore 2.")
869 (license (non-copyleft "file://COPYING"))))
870
871 (define-public compface
872 (package
873 (name "compface")
874 (version "1.5.2")
875 (source (origin
876 (method url-fetch)
877 (uri (string-append "https://ftp.heanet.ie/mirrors/"
878 "ftp.xemacs.org/aux/"
879 name "-" version ".tar.gz"))
880 (sha256
881 (base32
882 "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
883 (build-system gnu-build-system)
884 (arguments
885 `(#:tests? #f))
886 (synopsis "Portrait image compressor")
887 (description "This packages takes your 48x48x1 portrait image and
888 compresses it.")
889 (home-page "http://www.cs.indiana.edu/pub/faces/")
890 (license (x11-style "file://README"))))
891
892 (define-public claws-mail
893 (package
894 (name "claws-mail")
895 (version "3.14.1")
896 (source (origin
897 (method url-fetch)
898 (uri (string-append
899 "http://www.claws-mail.org/releases/" name "-" version
900 ".tar.xz"))
901 (sha256
902 (base32
903 "0df34gj4r5cbb92834hph19gnh7ih9rgmmw47rliyg8b9z01v6mp"))))
904 (build-system gnu-build-system)
905 (native-inputs `(("pkg-config" ,pkg-config)))
906 (inputs `(("bogofilter" ,bogofilter)
907 ("curl" ,curl)
908 ("dbus-glib" ,dbus-glib)
909 ("enchant" ,enchant)
910 ("expat" ,expat)
911 ("ghostscript" ,ghostscript)
912 ("hicolor-icon-theme" ,hicolor-icon-theme)
913 ("gnupg" ,gnupg)
914 ("gnutls" ,gnutls)
915 ("gpgme" ,gpgme)
916 ("gtk" ,gtk+-2)
917 ("libarchive" ,libarchive)
918 ("libcanberra" ,libcanberra)
919 ("libetpan" ,libetpan)
920 ("libnotify" ,libnotify)
921 ("libsm" ,libsm)
922 ("libxml2" ,libxml2)
923 ("perl" ,perl)
924 ("python-2" ,python-2)
925 ("mime-info" ,shared-mime-info)))
926 (arguments
927 '(#:configure-flags
928 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant")
929 #:phases (modify-phases %standard-phases
930 (add-before 'build 'patch-mime
931 (lambda* (#:key inputs #:allow-other-keys)
932 (substitute* "src/procmime.c"
933 (("/usr/share/mime/globs")
934 (string-append (assoc-ref inputs "mime-info")
935 "/share/mime/globs"))))))))
936 (synopsis "GTK-based Email client")
937 (description
938 "Claws-Mail is an email client (and news reader) based on GTK+. The
939 appearance and interface are designed to be familiar to new users coming from
940 other popular email clients, as well as experienced users. Almost all commands
941 are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
942 which can add many functionalities to the base client.")
943 (home-page "http://www.claws-mail.org/")
944 (license gpl3+))) ; most files are actually public domain or x11
945
946 (define-public msmtp
947 (package
948 (name "msmtp")
949 (version "1.6.6")
950 (source
951 (origin
952 (method url-fetch)
953 (uri (string-append "mirror://sourceforge/msmtp/msmtp/" version
954 "/msmtp-" version ".tar.xz"))
955 (sha256
956 (base32
957 "0ppvww0sb09bnsrpqnvlrn8vx231r24xn2iiwpy020mxc8gxn5fs"))))
958 (build-system gnu-build-system)
959 (inputs
960 `(("libidn" ,libidn)
961 ("libsecret" ,libsecret)
962 ("gnutls" ,gnutls)
963 ("zlib" ,zlib)
964 ("gsasl" ,gsasl)))
965 (native-inputs
966 `(("pkg-config" ,pkg-config)))
967 (home-page "http://msmtp.sourceforge.net/")
968 (arguments
969 `(#:configure-flags (list "--with-libgsasl"
970 "--with-libidn"
971 "--with-tls=gnutls")
972 #:phases
973 (modify-phases %standard-phases
974 (add-after 'install 'install-msmtpq
975 (lambda* (#:key outputs #:allow-other-keys)
976 (let* ((out (assoc-ref outputs "out"))
977 (bin (string-append out "/bin"))
978 (doc (string-append out "/share/doc/msmtp"))
979 (msmtpq (string-append "scripts/msmtpq")))
980 (install-file (string-append msmtpq "/msmtpq") bin)
981 (install-file (string-append msmtpq "/msmtp-queue") bin)
982 (install-file (string-append msmtpq "/README.msmtpq") doc)
983 #t))))))
984 (synopsis
985 "Simple and easy to use SMTP client with decent sendmail compatibility")
986 (description
987 "msmtp is an SMTP client. In the default mode, it transmits a mail to
988 an SMTP server (for example at a free mail provider) which takes care of further
989 delivery.")
990 (license gpl3+)))
991
992 (define-public exim
993 (package
994 (name "exim")
995 (version "4.87.1")
996 (source
997 (origin
998 (method url-fetch)
999 (uri (list (string-append "ftp://ftp.exim.org/pub/exim/exim4/exim-"
1000 version ".tar.bz2")
1001 (string-append "ftp://ftp.exim.org/pub/exim/exim4/old/exim-"
1002 version ".tar.bz2")))
1003 (sha256
1004 (base32
1005 "050m2gjzpc6vyik458h1j0vi8bxplkzjsyndkyd2y394i569kdyl"))))
1006 (build-system gnu-build-system)
1007 (inputs
1008 `(("bdb" ,bdb)
1009 ("gnutls" ,gnutls)
1010 ("gzip" ,gzip)
1011 ("bzip2" ,bzip2)
1012 ("xz" ,xz)
1013 ("perl" ,perl)
1014 ("libxt" ,libxt)
1015 ("libxaw" ,libxaw)))
1016 (native-inputs
1017 `(("pcre" ,pcre "bin")
1018 ("perl" ,perl)))
1019 (arguments
1020 '(#:phases
1021 (alist-replace
1022 'configure
1023 ;; We'd use #:make-flags but the top-level Makefile calls others
1024 ;; recursively, so just set all variables this way.
1025 (lambda* (#:key outputs inputs #:allow-other-keys)
1026 (substitute* '("Makefile" "OS/Makefile-Default")
1027 (("(RM_COMMAND=).*" all var)
1028 (string-append var "rm\n")))
1029 (copy-file "src/EDITME" "Local/Makefile")
1030 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
1031 (let ((out (assoc-ref outputs "out"))
1032 (gzip (assoc-ref inputs "gzip"))
1033 (bzip2 (assoc-ref inputs "bzip2"))
1034 (xz (assoc-ref inputs "xz")))
1035 (substitute* '("Local/Makefile")
1036 (("(BIN_DIRECTORY=).*" all var)
1037 (string-append var out "/bin\n"))
1038 (("(CONFIGURE_FILE=).*" all var)
1039 (string-append var out "/etc/exim.conf\n"))
1040 (("(EXIM_USER=).*" all var)
1041 (string-append var "nobody\n"))
1042 (("(FIXED_NEVER_USERS=).*" all var)
1043 (string-append var "\n")) ;XXX no root in build environment
1044 (("(COMPRESS_COMMAND=).*" all var)
1045 (string-append var gzip "/bin/gzip\n"))
1046 (("(ZCAT_COMMAND=).*" all var)
1047 (string-append var gzip "/bin/zcat\n")))
1048 ;; This file has hardcoded names for tools despite the zcat
1049 ;; configuration above.
1050 (substitute* '("src/exigrep.src")
1051 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
1052 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
1053 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
1054 (("'lzma'") (string-append "'" xz "/bin/lzma'")))))
1055 (alist-cons-before
1056 'build 'fix-sh-paths
1057 (lambda* (#:key inputs #:allow-other-keys)
1058 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
1059 (("SHELL=/bin/sh") "SHELL=sh"))
1060 (substitute* '("scripts/Configure-config.h")
1061 (("\\| /bin/sh") "| sh"))
1062 (let ((bash (assoc-ref inputs "bash")))
1063 (substitute* '("scripts/Configure-eximon")
1064 (("#!/bin/sh") (string-append "#!" bash "/bin/sh")))))
1065 %standard-phases))
1066 #:make-flags '("INSTALL_ARG=-no_chown")
1067 ;; No 'check' target.
1068 #:tests? #f))
1069 (home-page "http://www.exim.org/")
1070 (synopsis
1071 "Message Transfer Agent (MTA) developed at the University of Cambridge")
1072 (description
1073 "Exim is a message transfer agent (MTA) developed at the University of
1074 Cambridge for use on Unix systems connected to the Internet. In style it is
1075 similar to Smail 3, but its facilities are more general. There is a great
1076 deal of flexibility in the way mail can be routed, and there are extensive
1077 facilities for checking incoming mail.")
1078 (license gpl2+)))
1079
1080 (define-public dovecot
1081 (package
1082 (name "dovecot")
1083 (version "2.2.28")
1084 (source
1085 (origin
1086 (method url-fetch)
1087 (uri (string-append "https://www.dovecot.org/releases/"
1088 (version-major+minor version) "/"
1089 name "-" version ".tar.gz"))
1090 (sha256 (base32
1091 "098zpkmkk93372qnv6drgbfg8hp5mynspzc1735qgar6wdcqya70"))))
1092 (build-system gnu-build-system)
1093 (native-inputs
1094 `(("pkg-config" ,pkg-config)))
1095 (inputs
1096 `(("openssl" ,openssl)
1097 ("zlib" ,zlib)
1098 ("bzip2" ,bzip2)
1099 ("sqlite" ,sqlite)
1100 ("linux-pam" ,linux-pam)))
1101 (arguments
1102 `(#:configure-flags '("--sysconfdir=/etc"
1103 "--localstatedir=/var")
1104 #:phases (modify-phases %standard-phases
1105 (add-before
1106 'configure 'pre-configure
1107 (lambda _
1108 ;; Simple hack to avoid installing in /etc
1109 (substitute* '("doc/Makefile.in"
1110 "doc/example-config/Makefile.in")
1111 (("pkgsysconfdir = .*")
1112 "pkgsysconfdir = /tmp/etc"))
1113 #t))
1114 (add-after
1115 'unpack 'patch-other-shebangs
1116 (lambda _
1117 (substitute*
1118 "src/lib-program-client/test-program-client-local.c"
1119 (("/bin/echo") (which "echo"))
1120 (("/bin/cat") (which "cat"))
1121 (("/bin/false") (which "false")))
1122 #t)))))
1123 (home-page "https://www.dovecot.org")
1124 (synopsis "Secure POP3/IMAP server")
1125 (description
1126 "Dovecot is a mail server whose major goals are security and reliability.
1127 It supports mbox/Maildir and its own dbox/mdbox formats.")
1128 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
1129 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
1130 ;; Unicode, Inc. License Agreement for Data Files and Software.
1131 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
1132
1133 (define-public dovecot-trees
1134 (let ((commit "006059c8a47d68f14f73c09743e45b9a73014dbf")
1135 (revision "1"))
1136 (package
1137 (name "dovecot-trees")
1138 (version (string-append "2.0.0-" revision "." (string-take commit 7)))
1139 (source
1140 (origin
1141 (method git-fetch)
1142 (uri (git-reference
1143 (url "https://0xacab.org/riseuplabs/trees.git")
1144 (commit commit)))
1145 (file-name (string-append name "-" version "-checkout"))
1146 (sha256
1147 (base32
1148 "0ax90bzc66x179wi1m7ywqwa8nssyhjngs7ij109hqqxg5ymfp73"))))
1149 (build-system gnu-build-system)
1150 (native-inputs
1151 `(("automake" ,automake)
1152 ("autoconf" ,autoconf)
1153 ("libtool" ,libtool)
1154 ("dovecot" ,dovecot)
1155 ("pkg-config" ,pkg-config)))
1156 (inputs
1157 `(("libsodium" ,libsodium)))
1158 (arguments
1159 `(#:tests? #f ;No tests exist.
1160 #:configure-flags (list (string-append "--with-dovecot="
1161 (assoc-ref %build-inputs "dovecot")
1162 "/lib/dovecot"))
1163 #:phases
1164 (modify-phases %standard-phases
1165 (add-before 'configure 'autogen
1166 (lambda _
1167 (zero? (system* "./autogen.sh")))))))
1168 (home-page "https://0xacab.org/riseuplabs/trees")
1169 (synopsis "NaCL-based Dovecot email storage encryption plugin")
1170 (description
1171 "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
1172 Dovecot encryption plugin. This plugin adds individually encrypted mail
1173 storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
1174 which uses OpenSSL and RSA keypairs. TREES works in a similar way, but uses
1175 the Sodium crypto library (based on NaCL).
1176
1177 How it works:
1178 @enumerate
1179 @item On IMAP log in, the user's cleartext password is passed to the plugin.
1180 @item The plugin creates an argon2 digest from the password.
1181 @item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
1182 @item Inside the secretbox is stored a Curve25519 private key.
1183 @item The Curve25519 private key is used to decrypt each individual message,
1184 using lidsodium sealed boxes.
1185 @item New mail is encrypted as it arrives using the Curve25519 public key.
1186 @end enumerate\n")
1187 (license agpl3))))
1188
1189 (define-public dovecot-libsodium-plugin
1190 (let ((commit "044de73c01c35385df0105f6b387bec5d5317ce7")
1191 (revision "1"))
1192 (package
1193 (name "dovecot-libsodium-plugin")
1194 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
1195 (source
1196 (origin
1197 (method git-fetch)
1198 (uri (git-reference
1199 (url "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1200 (commit commit)))
1201 (file-name (string-append name "-" version "-checkout"))
1202 (sha256
1203 (base32
1204 "13h07l7xy713zchnj2p9fhvq7fdl4zy1ai94li3ygkqjjj8hrgas"))))
1205 (build-system gnu-build-system)
1206 (native-inputs
1207 `(("automake" ,automake)
1208 ("autoconf" ,autoconf)
1209 ("libtool" ,libtool)
1210 ("dovecot" ,dovecot)
1211 ("pkg-config" ,pkg-config)))
1212 (inputs
1213 `(("libsodium" ,libsodium)))
1214 (arguments
1215 `(#:tests? #f ;No tests exist.
1216 #:configure-flags (list (string-append "--with-dovecot="
1217 (assoc-ref %build-inputs "dovecot")
1218 "/lib/dovecot"))
1219 #:phases
1220 (modify-phases %standard-phases
1221 (add-before 'configure 'autogen
1222 (lambda _
1223 (zero? (system* "./autogen.sh")))))))
1224 (home-page "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1225 (synopsis "Libsodium password hashing schemes plugin for Dovecot")
1226 (description
1227 "@code{dovecot-libsodium-plugin} provides libsodium password
1228 hashing schemes plugin for @code{Dovecot}.")
1229 (license gpl3+))))
1230
1231 (define-public isync
1232 (package
1233 (name "isync")
1234 (version "1.2.1")
1235 (source
1236 (origin
1237 (method url-fetch)
1238 (uri (string-append "mirror://sourceforge/isync/isync/"
1239 version "/isync-" version ".tar.gz"))
1240 (sha256 (base32
1241 "1bij6nm06ghkg98n2pdyacam2fyg5y8f7ajw0d5653m0r4ldw5p7"))))
1242 (build-system gnu-build-system)
1243 (inputs
1244 `(("bdb" ,bdb)
1245 ("openssl" ,openssl)))
1246 (home-page "http://isync.sourceforge.net/")
1247 (synopsis "Mailbox synchronization program")
1248 (description
1249 "isync/mbsync is command line tool for two-way synchronization of
1250 mailboxes. Currently Maildir and IMAP are supported types.")
1251 (license gpl2+)))
1252
1253 (define-public perl-email-abstract
1254 (package
1255 (name "perl-email-abstract")
1256 (version "3.008")
1257 (source
1258 (origin
1259 (method url-fetch)
1260 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1261 "Email-Abstract-" version ".tar.gz"))
1262 (sha256
1263 (base32
1264 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
1265 (build-system perl-build-system)
1266 (propagated-inputs
1267 `(("perl-email-simple" ,perl-email-simple)
1268 ("perl-module-pluggable" ,perl-module-pluggable)
1269 ("perl-mro-compat" ,perl-mro-compat)))
1270 (home-page "http://search.cpan.org/dist/Email-Abstract")
1271 (synopsis "Interface to mail representations")
1272 (description "Email::Abstract provides module writers with the ability to
1273 write simple, representation-independent mail handling code.")
1274 (license (package-license perl))))
1275
1276 (define-public perl-email-address
1277 (package
1278 (name "perl-email-address")
1279 (version "1.908")
1280 (source
1281 (origin
1282 (method url-fetch)
1283 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1284 "Email-Address-" version ".tar.gz"))
1285 (sha256
1286 (base32
1287 "0i6ljdvpy279hpbqf6lgv4figr376rb2sh4yphj86xkdzsyn1y75"))))
1288 (build-system perl-build-system)
1289 (home-page "http://search.cpan.org/dist/Email-Address")
1290 (synopsis "Email address parsing and creation")
1291 (description "Email::Address implements a regex-based RFC 2822 parser that
1292 locates email addresses in strings and returns a list of Email::Address
1293 objects found. Alternatively you may construct objects manually.")
1294 (license (package-license perl))))
1295
1296 (define-public perl-email-date-format
1297 (package
1298 (name "perl-email-date-format")
1299 (version "1.005")
1300 (source
1301 (origin
1302 (method url-fetch)
1303 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1304 "Email-Date-Format-" version ".tar.gz"))
1305 (sha256
1306 (base32
1307 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
1308 (build-system perl-build-system)
1309 (home-page "http://search.cpan.org/dist/Email-Date-Format")
1310 (synopsis "Produce RFC 2822 date strings")
1311 (description "Email::Date::Format provides a means for generating an RFC
1312 2822 compliant datetime string.")
1313 (license (package-license perl))))
1314
1315 (define-public perl-email-messageid
1316 (package
1317 (name "perl-email-messageid")
1318 (version "1.406")
1319 (source
1320 (origin
1321 (method url-fetch)
1322 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1323 "Email-MessageID-" version ".tar.gz"))
1324 (sha256
1325 (base32
1326 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
1327 (build-system perl-build-system)
1328 (home-page "http://search.cpan.org/dist/Email-MessageID")
1329 (synopsis "Generate world unique message-ids")
1330 (description "Email::MessageID generates recommended message-ids to
1331 identify a message uniquely.")
1332 (license (package-license perl))))
1333
1334 (define-public perl-email-mime
1335 (package
1336 (name "perl-email-mime")
1337 (version "1.937")
1338 (source
1339 (origin
1340 (method url-fetch)
1341 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1342 "Email-MIME-" version ".tar.gz"))
1343 (sha256
1344 (base32
1345 "0s50i3nxi9dr81p4rn017nrarc40yrwz0qcw34q8k3pvdf46fr9n"))))
1346 (build-system perl-build-system)
1347 (propagated-inputs
1348 `(("perl-email-address" ,perl-email-address)
1349 ("perl-email-messageid" ,perl-email-messageid)
1350 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1351 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1352 ("perl-email-simple" ,perl-email-simple)
1353 ("perl-mime-types" ,perl-mime-types)))
1354 (home-page "http://search.cpan.org/dist/Email-MIME")
1355 (synopsis "MIME message handling")
1356 (description "Email::MIME is an extension of the Email::Simple module, to
1357 handle MIME encoded messages. It takes a message as a string, splits it up
1358 into its constituent parts, and allows you access to various parts of the
1359 message. Headers are decoded from MIME encoding.")
1360 (license (package-license perl))))
1361
1362 (define-public perl-email-mime-contenttype
1363 (package
1364 (name "perl-email-mime-contenttype")
1365 (version "1.018")
1366 (source
1367 (origin
1368 (method url-fetch)
1369 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1370 "Email-MIME-ContentType-" version ".tar.gz"))
1371 (sha256
1372 (base32
1373 "1y8hpwm7p5a9y2azy0cgvlv2i2d0nj66ajfa0fj51wdq4w9cs23m"))))
1374 (build-system perl-build-system)
1375 (native-inputs
1376 `(("perl-capture-tiny" ,perl-capture-tiny)))
1377 (home-page "http://search.cpan.org/dist/Email-MIME-ContentType")
1378 (synopsis "Parse MIME Content-Type headers")
1379 (description "Email::MIME::ContentType parses a MIME Content-Type
1380 header.")
1381 (license (package-license perl))))
1382
1383 (define-public perl-email-mime-encodings
1384 (package
1385 (name "perl-email-mime-encodings")
1386 (version "1.315")
1387 (source
1388 (origin
1389 (method url-fetch)
1390 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1391 "Email-MIME-Encodings-" version ".tar.gz"))
1392 (sha256
1393 (base32
1394 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1395 (build-system perl-build-system)
1396 (native-inputs
1397 `(("perl-capture-tiny" ,perl-capture-tiny)))
1398 (home-page "http://search.cpan.org/dist/Email-MIME-Encodings")
1399 (synopsis "Unified interface to MIME encoding and decoding")
1400 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
1401 (license (package-license perl))))
1402
1403 (define-public perl-email-sender
1404 (package
1405 (name "perl-email-sender")
1406 (version "1.300028")
1407 (source
1408 (origin
1409 (method url-fetch)
1410 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1411 "Email-Sender-" version ".tar.gz"))
1412 (sha256
1413 (base32
1414 "0c5dv1x9856nryj5mcbgb67a4irmadz80g0qnf4van3bd8wbj72a"))))
1415 (build-system perl-build-system)
1416 (native-inputs
1417 `(("perl-capture-tiny" ,perl-capture-tiny)))
1418 (propagated-inputs
1419 `(("perl-email-abstract" ,perl-email-abstract)
1420 ("perl-email-address" ,perl-email-address)
1421 ("perl-email-simple" ,perl-email-simple)
1422 ("perl-list-moreutils" ,perl-list-moreutils)
1423 ("perl-module-runtime" ,perl-module-runtime)
1424 ("perl-moo" ,perl-moo)
1425 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1426 ("perl-sub-exporter" ,perl-sub-exporter)
1427 ("perl-throwable" ,perl-throwable)
1428 ("perl-try-tiny" ,perl-try-tiny)))
1429 (home-page "http://search.cpan.org/dist/Email-Sender")
1430 (synopsis "Perl library for sending email")
1431 (description "Email::Sender replaces the old and sometimes problematic
1432 Email::Send library.")
1433 (license (package-license perl))))
1434
1435 (define-public perl-email-simple
1436 (package
1437 (name "perl-email-simple")
1438 (version "2.211")
1439 (source
1440 (origin
1441 (method url-fetch)
1442 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1443 "Email-Simple-" version ".tar.gz"))
1444 (sha256
1445 (base32
1446 "1if4a2wh4iwlcycqrd2fhkx04ngmd75q444gh43w0r9p15ym5f8w"))))
1447 (build-system perl-build-system)
1448 (propagated-inputs
1449 `(("perl-email-date-format" ,perl-email-date-format)))
1450 (home-page "http://search.cpan.org/dist/Email-Simple")
1451 (synopsis "Parsing of RFC 2822 messages")
1452 (description "Email::Simple provides simple parsing of RFC 2822 message
1453 format and headers.")
1454 (license (package-license perl))))
1455
1456 (define-public libesmtp
1457 (package
1458 (name "libesmtp")
1459 (version "1.0.6")
1460 (source
1461 (origin
1462 (method url-fetch)
1463 (uri (list (string-append "https://pkgs.fedoraproject.org/repo/pkgs/"
1464 "libesmtp/libesmtp-" version ".tar.bz2/"
1465 "bf3915e627fd8f35524a8fdfeed979c8/libesmtp-"
1466 version ".tar.bz2")
1467 ;; XXX This site is offline, so we fetch Fedora's cached copy
1468 ;; of the source tarball.
1469 (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1470 version ".tar.bz2")))
1471 (sha256
1472 (base32
1473 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1474 (build-system gnu-build-system)
1475 (propagated-inputs
1476 `(("openssl" ,openssl)))
1477 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1478 (synopsis "Library for sending mail via remote hosts using SMTP")
1479 (description "libESMTP is an SMTP client which manages posting (or
1480 submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1481 It may be used as part of a Mail User Agent (MUA) or other program that must
1482 be able to post electronic mail where mail functionality may not be that
1483 program's primary purpose.")
1484 (license (list lgpl2.1+ gpl2+))))
1485
1486 (define-public esmtp
1487 (package
1488 (name "esmtp")
1489 (version "1.2")
1490 (source
1491 (origin
1492 (method git-fetch)
1493 (uri (git-reference
1494 (url "https://github.com/andywingo/esmtp.git")
1495 (commit "01bf9fc")))
1496 (sha256
1497 (base32
1498 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1499 (file-name (string-append name "-" version "-checkout"))))
1500 (arguments
1501 `(#:phases (modify-phases %standard-phases
1502 (add-before
1503 'configure 'autoconf
1504 (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
1505 (build-system gnu-build-system)
1506 (native-inputs
1507 `(("bison" ,bison)
1508 ("flex" ,flex)
1509 ("autoconf" ,autoconf)
1510 ("automake" ,automake)
1511 ("libtool" ,libtool)))
1512 (inputs
1513 `(("libesmtp" ,libesmtp)))
1514 (home-page "https://sourceforge.net/projects/esmtp/")
1515 (synopsis "Relay-only mail transfer agent (MTA)")
1516 (description "Esmtp is a simple relay-only mail transfer agent built using
1517 libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1518 user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1519 page for more on configuration. This package also provides minimal
1520 compatibility shims for the @command{sendmail}, @command{mailq}, and
1521 @command{newaliases} commands.")
1522 (license gpl2+)))
1523
1524 (define-public fdm
1525 (package
1526 (name "fdm")
1527 (version "1.9")
1528 (source (origin
1529 (method url-fetch)
1530 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1531 version "/fdm-"
1532 version ".tar.gz"))
1533 (file-name (string-append name "-" version ".tar.gz"))
1534 (sha256
1535 (base32 "054rscijahiza5f9qha79rg3siji3bk5mk10f8c2vqx7m4w6qh8n"))))
1536 (build-system gnu-build-system)
1537 (inputs
1538 `(("tdb" ,tdb)
1539 ("openssl" ,openssl)
1540 ("zlib" ,zlib)))
1541 (home-page "https://github.com/nicm/fdm")
1542 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1543 (description "fdm is a program designed to fetch mail from POP3
1544 or IMAP servers, or receive local mail from stdin, and
1545 deliver it in various ways.")
1546 (license
1547 ;; Why point to a source file? Well, all the individual files have a
1548 ;; copy of this license in their headers, but there's no seprate file
1549 ;; with that information.
1550 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
1551
1552
1553 (define-public procmail
1554 (package
1555 (name "procmail")
1556 (version "3.22")
1557 (source
1558 (origin
1559 (method url-fetch)
1560 (uri (string-append
1561 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1562 version
1563 ".tar.gz"))
1564 (sha256
1565 (base32
1566 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1567 ;; The following patch fixes an ambiguous definition of
1568 ;; getline() in formail.c. The patch is provided by Debian as
1569 ;; patch 24.
1570 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
1571 "procmail-CVE-2014-3618.patch"))))
1572 (arguments
1573 `(#:phases (modify-phases %standard-phases
1574 (replace 'configure
1575 (lambda _
1576 (substitute* "Makefile"
1577 (("/bin/sh")
1578 (which "sh"))
1579 (("/usr")
1580 (assoc-ref %outputs "out"))
1581 (("/bin/rm")
1582 (which "rm")))
1583 #t)))
1584 #:tests? #f)) ;; There are no tests indicating a successful
1585 ;; build. Some tests of basic locking mechanisms provided by the
1586 ;; file system are performed during 'make install'. However, these
1587 ;; are performed before the actual build process.
1588 (build-system gnu-build-system)
1589 (inputs `(("exim" ,exim)))
1590 (home-page "http://www.procmail.org/")
1591 (synopsis "Versatile mail delivery agent (MDA)")
1592 (description "Procmail is a mail delivery agent (MDA) featuring support
1593 for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1594 can be sorted into separate files/directories and arbitrary commands can be
1595 executed on mail arrival. Procmail is considered stable, but is no longer
1596 maintained.")
1597 (license gpl2+))) ;; procmail allows to choose the
1598 ;; nonfree Artistic License 1.0
1599 ;; as alternative to the GPL2+.
1600 ;; This option is not listed here.
1601
1602 (define-public khard
1603 (package
1604 (name "khard")
1605 (version "0.11.3")
1606 (source (origin
1607 (method url-fetch)
1608 (uri (pypi-uri name version))
1609 (sha256
1610 (base32
1611 "1v66khq5w17xdbkpb00pf9xbl84dlzx4lq286fvzskb949b3y4yn"))))
1612 (build-system python-build-system)
1613 (arguments
1614 `(#:phases
1615 (modify-phases %standard-phases
1616 (add-after 'install 'install-doc
1617 (lambda* (#:key outputs #:allow-other-keys)
1618 (let* ((out (assoc-ref outputs "out"))
1619 (doc (string-append out "/share/doc/khard")))
1620 (copy-recursively "misc/khard" doc)
1621 #t))))
1622 ;; FIXME: check phase fails with
1623 ;; "Config file /tmp/.config/khard/khard.conf not available"
1624 #:tests? #f))
1625 (propagated-inputs
1626 `(("python-vobject" ,python-vobject)
1627 ("python-pyyaml" ,python-pyyaml)
1628 ("python-atomicwrites" ,python-atomicwrites)
1629 ("python-configobj" ,python-configobj)))
1630 (synopsis "Console address book using CardDAV")
1631 (description "Khard is an address book for the console. It creates, reads,
1632 modifies and removes CardDAV address book entries at your local machine. For
1633 synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1634 Khard can also be used from within the email client @command{mutt}.")
1635 (home-page "https://github.com/scheibler/khard")
1636 (license gpl3+)))
1637
1638 (define-public perl-mail-spf
1639 (package
1640 (name "perl-mail-spf")
1641 (version "v2.9.0")
1642 (source
1643 (origin
1644 (method url-fetch)
1645 (uri (string-append
1646 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-"
1647 version
1648 ".tar.gz"))
1649 (sha256
1650 (base32
1651 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1652 (build-system perl-build-system)
1653 (native-inputs
1654 `(("perl-module-build" ,perl-module-build)
1655 ("perl-net-dns-resolver-programmable"
1656 ,perl-net-dns-resolver-programmable)))
1657 (arguments
1658 `(#:phases (modify-phases %standard-phases
1659 (add-before 'configure 'modify-Build.PL
1660 (lambda* (#:key outputs #:allow-other-keys)
1661 (substitute* "Build.PL"
1662 (("'/usr/sbin'") (string-append "'"
1663 (assoc-ref outputs "out")
1664 "/sbin'")))
1665 #t)))))
1666 (inputs
1667 `(("perl-error" ,perl-error)
1668 ("perl-net-dns" ,perl-net-dns)
1669 ("perl-netaddr-ip" ,perl-netaddr-ip)
1670 ("perl-uri" ,perl-uri)))
1671 (home-page
1672 "http://search.cpan.org/dist/Mail-SPF")
1673 (synopsis
1674 "Perl implementation of Sender Policy Framework")
1675 (description "Mail::SPF is the Sender Policy Framework implemented
1676 in Perl.")
1677 (license bsd-3)))
1678
1679 (define-public mb2md
1680 (package
1681 (name "mb2md")
1682 (version "3.20")
1683 (source (origin
1684 (method url-fetch)
1685 (uri (string-append
1686 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
1687 version ".pl.gz"))
1688 (sha256
1689 (base32
1690 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
1691 (build-system trivial-build-system)
1692 (arguments
1693 '(#:modules ((guix build utils))
1694 #:builder
1695 (begin
1696 (use-modules (guix build utils))
1697 (let* ((source (assoc-ref %build-inputs "source"))
1698 (out (assoc-ref %outputs "out"))
1699 (bin (string-append out "/bin"))
1700 (perl (assoc-ref %build-inputs "perl"))
1701 (gzip (assoc-ref %build-inputs "gzip"))
1702 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
1703 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
1704 (mkdir-p bin)
1705 (with-directory-excursion bin
1706 (copy-file source "mb2md.gz")
1707 (system* (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
1708 (substitute* "mb2md"
1709 (("#!/usr/bin/perl")
1710 (string-append "#!/usr/bin/perl -I " perl5lib)))
1711 (patch-shebang "mb2md" (list (string-append perl "/bin")))
1712 (chmod "mb2md" #o555))
1713 #t))))
1714 (native-inputs `(("gzip", gzip)))
1715 (inputs `(("perl" ,perl)
1716 ("perl-timedate" ,perl-timedate)))
1717 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
1718 (synopsis "Mbox to maildir converter")
1719 (description
1720 "Mb2md is a Perl script that takes one or more mbox format files and
1721 converts them to maildir format directories.")
1722 (license public-domain)))
1723
1724 (define-public mpop
1725 (package
1726 (name "mpop")
1727 (version "1.2.6")
1728 (source
1729 (origin
1730 (method url-fetch)
1731 (uri (string-append "mirror://sourceforge/mpop/mpop/" version
1732 "/mpop-" version ".tar.xz"))
1733 (sha256
1734 (base32
1735 "0p1ix63jh64dibrlccch8q7gxl9nn18wd2qpyr5z1h4gs2fpmv4z"))))
1736 (build-system gnu-build-system)
1737 (inputs
1738 `(("gnutls" ,gnutls)
1739 ("libidn" ,libidn)))
1740 (native-inputs
1741 `(("pkg-config" ,pkg-config)))
1742 (arguments
1743 `(#:configure-flags (list "--with-tls=gnutls")))
1744 (home-page "http://mpop.sourceforge.net/")
1745 (synopsis "POP3 mail client")
1746 (description "mpop is a small and fast POP3 client suitable as a
1747 fetchmail replacement.
1748
1749 mpop supports multiple accounts, header based mail filtering, delivery
1750 to mbox files, maildir folders or a Mail Delivery Agent (MDA),
1751 TLS/SSL, several authentication methods, Internationalized Domain
1752 Names (IDN) and SOCKS proxies.")
1753 (license gpl3+)))
1754
1755 (define-public mhonarc
1756 (package
1757 (name "mhonarc")
1758 (version "2.6.19")
1759 (source
1760 (origin
1761 (method url-fetch)
1762 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
1763 version ".tar.gz"))
1764 (sha256
1765 (base32
1766 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
1767 (build-system perl-build-system)
1768 (home-page "https://www.mhonarc.org/")
1769 (synopsis "Create HTML archives of mail/news messages")
1770 (description
1771 "MHonArc is a Perl mail-to-HTML converter. MHonArc
1772 provides HTML mail archiving with index, mail thread linking,
1773 etc; plus other capabilities including support for MIME and
1774 powerful user customization features.")
1775 (license gpl2+)))
1776
1777
1778 (define-public sendmail
1779 (package
1780 (name "sendmail")
1781 (version "8.15.2")
1782 (source
1783 (origin
1784 (method url-fetch)
1785 (uri (string-append
1786 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
1787 version ".tar.gz"))
1788 (sha256
1789 (base32
1790 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
1791 (build-system gnu-build-system)
1792 (arguments
1793 `(#:phases
1794 (modify-phases %standard-phases
1795 (add-before 'build 'replace-/bin/sh
1796 (lambda _
1797 (substitute*
1798 (append
1799 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
1800 "contrib/mmuegel" "devtools/bin/configure.sh")
1801 (find-files "." ".*\\.m4")
1802 (find-files "." ".*\\.cf"))
1803 (("/bin/sh") (which "sh")))
1804
1805 (substitute* "devtools/bin/Build"
1806 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
1807 #t))
1808 (replace 'configure
1809 (lambda _
1810
1811 ;; Render harmless any attempts to chown or chgrp
1812 (substitute* "devtools/bin/install.sh"
1813 (("owner=\\$2") "owner=''")
1814 (("group=\\$2") "group=''"))
1815
1816 (with-output-to-file "devtools/Site/site.config.m4"
1817 (lambda ()
1818 (format #t "
1819 define(`confCC', `gcc')
1820 define(`confOPTIMIZE', `-g -O2')
1821 define(`confLIBS', `-lresolv')
1822 define(`confINSTALL', `~a/devtools/bin/install.sh')
1823 define(`confDEPEND_TYPE', `CC-M')
1824 define(`confINST_DEP', `')
1825 " (getcwd))))))
1826 (replace 'build
1827 (lambda _
1828 (and (zero? (system* "sh" "Build"))
1829 (with-directory-excursion "cf/cf"
1830 (begin
1831 (copy-file "generic-linux.mc" "sendmail.mc")
1832 (zero? (system* "sh" "Build" "sendmail.cf")))))))
1833 (add-before 'install 'pre-install
1834 (lambda _
1835 (let ((out (assoc-ref %outputs "out")))
1836 (mkdir-p (string-append out "/usr/bin"))
1837 (mkdir-p (string-append out "/usr/sbin"))
1838 (mkdir-p (string-append out "/etc/mail"))
1839 (setenv "DESTDIR" out)
1840 (with-directory-excursion "cf/cf"
1841 (zero? (system* "sh" "Build" "install-cf")))))))
1842 ;; There is no make check. There are some post installation tests, but those
1843 ;; require root privileges
1844 #:tests? #f))
1845 (inputs
1846 `(("m4" ,m4)
1847 ("perl" ,perl)))
1848 (home-page "http://sendmail.org")
1849 (synopsis
1850 "Highly configurable Mail Transfer Agent (MTA)")
1851 (description
1852 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
1853 Allman. It is highly configurable and supports many delivery methods and many
1854 transfer protocols.")
1855 (license (non-copyleft "file://LICENSE"
1856 "See LICENSE in the distribution."))))
1857
1858 (define-public opensmtpd
1859 (package
1860 (name "opensmtpd")
1861 (version "6.0.2p1")
1862 (source (origin
1863 (method url-fetch)
1864 (uri (string-append "https://www.opensmtpd.org/archives/"
1865 name "-" version ".tar.gz"))
1866 (sha256
1867 (base32
1868 "1b4h64w45hpmfq5721smhg4s0shs64gbcjqjpx3fbiw4hz8bdy9a"))))
1869 (build-system gnu-build-system)
1870 (inputs
1871 `(("bdb" ,bdb)
1872 ("libressl" ,libressl)
1873 ("libevent" ,libevent)
1874 ("libasr" ,libasr)
1875 ("linux-pam" ,linux-pam)
1876 ("zlib" ,zlib)))
1877 (native-inputs
1878 `(("bison" ,bison)
1879 ("groff" ,groff)))
1880 (arguments
1881 `(#:configure-flags
1882 (list "--with-table-db" "--localstatedir=/var"
1883 "--with-user-smtpd=smtpd" "--with-user-queue=smtpq"
1884 "--with-group-queue=smtpq"
1885 "--with-path-socket=/var/run"
1886 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt")
1887 #:phases
1888 (modify-phases %standard-phases
1889 ;; OpenSMTPD provides a single utility smtpctl to control the daemon and
1890 ;; the local submission subsystem. To accomodate systems that require
1891 ;; historical interfaces such as sendmail, newaliases or makemap, the
1892 ;; smtpctl utility can operate in compatibility mode if called with the
1893 ;; historical name.
1894 (add-after 'install 'install-compabilitymode
1895 (lambda _
1896 (let* ((out (assoc-ref %outputs "out"))
1897 (sbin (string-append out "/sbin/")))
1898 (for-each (lambda (cmd)
1899 (symlink "smtpctl" (string-append sbin cmd)))
1900 '("makemap" "sendmail" "send-mail"
1901 "newaliases" "mailq")))
1902 #t)))))
1903 (synopsis "Lightweight SMTP daemon")
1904 (description
1905 "OpenSMTPD is an implementation of the server-side SMTP protocol, with
1906 some additional standard extensions. It allows ordinary machines to exchange
1907 e-mails with other systems speaking the SMTP protocol.")
1908 (home-page "https://www.opensmtpd.org")
1909 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
1910 public-domain isc license:openssl))))
1911
1912 (define-public opensmtpd-extras
1913 (package
1914 (name "opensmtpd-extras")
1915 (version "5.7.1")
1916 (source (origin
1917 (method url-fetch)
1918 (uri (string-append "https://www.opensmtpd.org/archives/"
1919 name "-" version ".tar.gz"))
1920 (sha256
1921 (base32
1922 "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm"))))
1923 (build-system gnu-build-system)
1924 (inputs
1925 `(("libressl" ,libressl)
1926 ("libevent" ,libevent)
1927 ("libasr" ,libasr)
1928 ("python-2" ,python-2)
1929 ("opensmtpd" ,opensmtpd)
1930 ("perl" ,perl)
1931 ("lua" ,lua)
1932 ("postgresql" ,postgresql)
1933 ("sqlite" ,sqlite)
1934 ("linux-pam" ,linux-pam)))
1935 (native-inputs
1936 `(("bison" ,bison)
1937 ("pkg-config" ,pkg-config)
1938 ("groff" ,groff)
1939 ("automake" ,automake)
1940 ("autoconf" ,autoconf)))
1941 (arguments
1942 `(;; We have to configure it like this because the default checks for for example
1943 ;; python in /usr/local/bin, /usr/bin and fails otherwise.
1944 #:configure-flags (list
1945 "--with-filter-clamav" "--with-filter-dkim-signer"
1946 "--with-filter-dnsbl" "--with-filter-lua"
1947 "--with-filter-monkey" "--with-filter-pause"
1948 "--with-filter-perl" "--with-filter-python"
1949 "--with-filter-regex" "--with-filter-spamassassin"
1950 "--with-filter-stub" "--with-filter-trace"
1951 "--with-filter-void"
1952
1953 "--with-queue-null" "--with-queue-python"
1954 "--with-queue-ram" "--with-queue-stub"
1955
1956 "--with-scheduler-python" "--with-scheduler-ram"
1957 "--with-scheduler-stub"
1958
1959 "--with-table-ldap" ; "--with-table-mysql"
1960 "--with-table-passwd" "--with-table-postgres"
1961 "--with-table-python" "--with-table-socketmap"
1962 "--with-table-sqlite" "--with-table-stub"
1963 ;;"--with-table-redis" ; TODO: package hiredis
1964
1965 "--with-user=smtpd" "--with-privsep-user=smtpd"
1966 "--localstatedir=/var" "--sysconfdir=/etc"
1967 "--with-lua-type=lua" ; can use lua or luajit
1968
1969 (string-append "--with-python="
1970 (assoc-ref %build-inputs "python-2"))
1971 (string-append "--with-lua="
1972 (assoc-ref %build-inputs "lua")))))
1973 (license (list bsd-2 bsd-3 bsd-4
1974 public-domain isc license:openssl))
1975 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
1976 (description
1977 "This package provides extra tables, filters, and various other addons
1978 for OpenSMTPD to extend its functionality.")
1979 (home-page "https://www.opensmtpd.org")))
1980
1981 (define-public python-mailmanclient
1982 (package
1983 (name "python-mailmanclient")
1984 (version "1.0.1")
1985 (source
1986 (origin
1987 (method url-fetch)
1988 (uri (pypi-uri "mailmanclient" version))
1989 (sha256
1990 (base32
1991 "1cfjh45fgbsax5hjj2inq9nk33dhdvh63xhysc8dhnqidgqgm8c5"))))
1992 (build-system python-build-system)
1993 (arguments
1994 `(#:tests? #f)) ; Requires mailman running
1995 (propagated-inputs
1996 `(("python-six" ,python-six)
1997 ("python-httplib2" ,python-httplib2)))
1998 (home-page "https://launchpad.net/mailman.client")
1999 (synopsis "Python bindings for the Mailman 3 REST API")
2000 (description
2001 "The mailmanclient library provides official Python bindings for
2002 the GNU Mailman 3 REST API.")
2003 (license lgpl3+)))
2004
2005 (define-public python2-mailmanclient
2006 (package-with-python2 python-mailmanclient))
2007
2008 (define-public mlmmj
2009 (package
2010 (name "mlmmj")
2011 (version "1.2.19.0")
2012 (source
2013 (origin
2014 (method url-fetch)
2015 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
2016 version ".tar.bz2"))
2017 (sha256
2018 (base32
2019 "1piwvcxkqadjwk5x8jicaiyz9nngmaj3w13ghdqgaki32xd7zk9v"))))
2020 (build-system gnu-build-system)
2021 (inputs
2022 `(("perl" ,perl))) ; For "contrib/web/"
2023 (native-inputs
2024 `(("pkg-config" ,pkg-config)))
2025 (arguments
2026 `(#:configure-flags
2027 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
2028 ;; It opens the files control/mimedeny and control/mimestrip to get a list
2029 ;; of mimetypes for parts of multipart/mime messages that should be denied
2030 ;; or stripped. The parts then get stripped directly when the mail is
2031 ;; received. mlmmj-receive-strip also appends an extra header
2032 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
2033 ;; mime parts
2034 (list "--enable-receive-strip")
2035 #:phases
2036 (modify-phases %standard-phases
2037 (add-before 'install 'install-contrib
2038 (lambda* (#:key outputs #:allow-other-keys)
2039 (let* ((out (assoc-ref outputs "out"))
2040 (share (string-append out "/share/mlmmj"))
2041 (contrib (string-append share "/contrib/web"))
2042 (texts (string-append share "/listtexts")))
2043 (copy-recursively "contrib/web/" contrib)
2044 (copy-recursively "listtexts" texts)
2045 (rename-file texts (string-append share "/texts"))
2046 #t))))))
2047 (home-page "http://mlmmj.org")
2048 (synopsis "Mailing list managing made joyful")
2049 (description
2050 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
2051 It works with many different Mail Transport Agents (MTAs) and is simple for a
2052 system adminstrator to install, configure and integrate with other software.
2053 As it uses very few resources, and requires no daemons, it is ideal for
2054 installation on systems where resources are limited. Its features include:
2055 @enumerate
2056 @item Archive, Custom headers / footer,
2057 @item Fully automated bounce handling (similar to ezmlm),
2058 @item Complete requeueing functionality, Moderation functionality, Subject prefix,
2059 @item Subscribers only posting, Regular expression access control,
2060 @item Functionality to retrieve old posts, Web interface, Digests,
2061 @item No-mail subscription, VERP support,
2062 @item Delivery Status Notification (RFC1891) support,
2063 @item Rich and customisable texts for automated operations.
2064 @end enumerate\n")
2065 (license license:expat)))
2066
2067 (define-public blists
2068 (package
2069 (name "blists")
2070 (version "1.0")
2071 (source
2072 (origin
2073 (method url-fetch)
2074 (uri (string-append "http://download.openwall.net/pub/projects/"
2075 "blists/blists-" version ".tar.gz"))
2076 (sha256
2077 (base32
2078 "1gp51kmb8yv8d693wcpdslmwlbw5w2kgz4kxhrcaf7y89w8wy4qd"))))
2079 (build-system gnu-build-system)
2080 (arguments
2081 `(#:tests? #f ; No tests
2082 #:phases
2083 (modify-phases %standard-phases
2084 (delete 'configure)
2085 (replace 'install
2086 (lambda* (#:key outputs #:allow-other-keys)
2087 (let* ((out (assoc-ref outputs "out"))
2088 (bin (string-append out "/bin")))
2089 (install-file "bindex" bin)
2090 (install-file "bit" bin)
2091 #t))))))
2092 (home-page "http://www.openwall.com/blists/")
2093 (synopsis "Web interface to mailing list archives")
2094 (description
2095 "Blists is a web interface to mailing list archives that works off
2096 indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
2097 @code{bindex} generates or updates the index file (incremental updates
2098 are supported). @code{bit} is a CGI/SSI program that generates web pages
2099 on the fly. Both programs are written in C and are very fast.")
2100 (license license:expat)))
2101
2102 (define-public swaks
2103 (package
2104 (name "swaks")
2105 (version "20170101.0")
2106 (source
2107 (origin
2108 (method url-fetch)
2109 (uri (string-append
2110 "http://jetmore.org/john/code/swaks/files/swaks-"
2111 version ".tar.gz"))
2112 (sha256
2113 (base32
2114 "0pli4mlhasnqqxmmxalwyg3x7n2vhcbgsnp2xgddamjavv82vrl4"))))
2115 (build-system perl-build-system)
2116 (inputs
2117 `(("perl-net-dns" ,perl-net-dns)
2118 ("perl-net-ssleay" ,perl-net-ssleay)))
2119 (arguments
2120 `(#:tests? #f ; No tests
2121 #:phases
2122 (modify-phases %standard-phases
2123 (delete 'configure)
2124 (replace 'build
2125 (lambda _
2126 (zero? (system* "pod2man" "doc/ref.pod" "swaks.1"))))
2127 (replace 'install
2128 (lambda* (#:key outputs #:allow-other-keys)
2129 (let ((out (assoc-ref outputs "out")))
2130 (install-file "swaks" (string-append out "/bin"))
2131 (install-file "swaks.1" (string-append out "/share/man/man1")))
2132 #t))
2133 (add-after 'install 'wrap-program
2134 (lambda* (#:key outputs #:allow-other-keys)
2135 (wrap-program (string-append (assoc-ref outputs "out")
2136 "/bin/swaks")
2137 `("PERL5LIB" ":" = (,(getenv "PERL5LIB"))))
2138 #t)))))
2139 (home-page "http://jetmore.org/john/code/swaks/")
2140 (synopsis "Featureful SMTP test tool")
2141 (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
2142 test tool. It handles SMTP features and extensions such as TLS,
2143 authentication, and pipelining; multiple versions of the SMTP protocol
2144 including SMTP, ESMTP, and LMTP; and multiple transport methods including
2145 unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
2146 Options can be specified in environment variables, configuration files, and
2147 the command line allowing maximum configurability and ease of use for
2148 operators and scripters.")
2149 (license gpl2+)))