gnu: Add dovecot-trees.
[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 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.1.1")
111 (source (origin
112 (method url-fetch)
113 (uri (string-append "mirror://gnu/mailutils/mailutils-"
114 version ".tar.bz2"))
115 (sha256
116 (base32
117 "1dpylyg79avi7brpkcmzaq7bqqkz45flp0ws6f2c8b1gyz4hdnzm"))))
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 ("libxslt" ,libxslt))) ; for xsltproc
428 (inputs `(("python2-pysqlite" ,python2-pysqlite)
429 ("python2-six" ,python2-six)))
430 (arguments
431 ;; The setup.py script expects python-2.
432 `(#:python ,python-2
433 ;; Tests require a modifiable IMAP account.
434 #:tests? #f
435 #:phases
436 (modify-phases %standard-phases
437 (add-after 'build 'build-documentation
438 (lambda _
439 (substitute* "docs/Makefile"
440 ;; Prevent xmllint and xsltproc from downloading a DTD file.
441 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
442 (zero? (system* "make" "-C" "docs" "man"))))
443 (add-after 'install 'install-documentation
444 (lambda* (#:key outputs #:allow-other-keys)
445 (let* ((out (assoc-ref outputs "out"))
446 (man (string-append out "/share/man")))
447 (install-file "docs/offlineimap.1" (string-append man "/man1"))
448 (install-file "docs/offlineimapui.7" (string-append man "/man7"))
449 #t)))
450 (add-after 'install-documentation 'wrap-binary
451 (lambda* (#:key outputs #:allow-other-keys)
452 (let* ((out (assoc-ref outputs "out"))
453 (bin (string-append out "/bin/offlineimap")))
454 (wrap-program bin
455 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
456 #t))))))
457 (home-page "http://www.offlineimap.org")
458 (synopsis "Sync emails between two repositories")
459 (description
460 "OfflineImap synchronizes emails between two repositories, so that you
461 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
462 repository and Maildir/IMAP as LOCAL repository.")
463 (license gpl2+)))
464
465 (define-public emacs-mew
466 (package
467 (name "emacs-mew")
468 (version "6.7")
469 (source (origin
470 (method url-fetch)
471 (uri (string-append "http://mew.org/Release/mew-"
472 version ".tar.gz"))
473 (sha256
474 (base32
475 "03fzky2kz73vgx4cbps2psbbnrgqgkk5q7jwfldisymkzr9iz03y"))))
476 (native-inputs
477 `(("emacs" ,emacs)))
478 (propagated-inputs
479 `(("ruby-sqlite3" ,ruby-sqlite3) ; optional for the database of messages
480 ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
481 (build-system gnu-build-system)
482 (arguments
483 (let ((elisp-dir "/share/emacs/site-lisp/guix.d/mew")
484 (icon-dir "/share/mew"))
485 `(#:modules ((guix build gnu-build-system)
486 (guix build utils)
487 (guix build emacs-utils))
488 #:imported-modules (,@%gnu-build-system-modules
489 (guix build emacs-utils))
490 #:configure-flags
491 (list (string-append "--with-elispdir=" %output ,elisp-dir)
492 (string-append "--with-etcdir=" %output ,icon-dir))
493 #:phases
494 (modify-phases %standard-phases
495 (add-after 'configure 'patch-mew-icon-directory
496 (lambda* (#:key outputs #:allow-other-keys)
497 (emacs-substitute-sexps "mew-key.el"
498 ("(def.* mew-icon-directory"
499 `(progn
500 (add-to-list 'image-load-path 'mew-icon-directory)
501 ,(string-append (assoc-ref outputs "out") ,icon-dir))))
502 #t))
503 (add-after 'install 'generate-autoloads
504 (lambda* (#:key outputs #:allow-other-keys)
505 (emacs-generate-autoloads
506 "mew" (string-append (assoc-ref outputs "out") ,elisp-dir))
507 #t)))
508 #:tests? #f)))
509 (home-page "http://www.mew.org")
510 (synopsis "Emacs e-mail client")
511 (description "Mew (Messaging in the Emacs World) is a user interface
512 for text messages, multimedia messages (MIME), news articles and
513 security functionality including PGP, S/MIME, SSH, and SSL.")
514 (license bsd-3)))
515
516 (define-public mu
517 (package
518 (name "mu")
519 (version "0.9.18")
520 (source (origin
521 (method url-fetch)
522 (uri (string-append "https://github.com/djcb/mu/releases/"
523 "download/" version "/mu-"
524 version ".tar.gz"))
525 (sha256
526 (base32
527 "02g82zvxfgn17wzy846bfxj0izjj7yklhwdnhwxy1y2kin4fqnb5"))))
528 (build-system gnu-build-system)
529 (native-inputs
530 `(("pkg-config" ,pkg-config)
531 ("glib" ,glib "bin") ; for gtester
532 ("emacs" ,emacs-minimal)))
533 ;; TODO: Add webkit and gtk to build the mug GUI.
534 (inputs
535 `(("xapian" ,xapian)
536 ("guile" ,guile-2.0)
537 ("glib" ,glib)
538 ("gmime" ,gmime)
539 ("tzdata" ,tzdata))) ;for mu/test/test-mu-query.c
540 (arguments
541 `(#:modules ((guix build gnu-build-system)
542 (guix build utils)
543 (guix build emacs-utils))
544 #:imported-modules (,@%gnu-build-system-modules
545 (guix build emacs-utils))
546 #:phases
547 (modify-phases %standard-phases
548 (add-after 'unpack 'patch-configure
549 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
550 ;; so our Emacs package can't find it. Setting "--with-lispdir"
551 ;; configure flag doesn't help because "mu4e" will be added to
552 ;; the lispdir anyway, so we have to modify "configure.ac".
553 (lambda _
554 (substitute* "configure"
555 (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") ""))
556 #t))
557 (add-before 'check 'check-tz-setup
558 (lambda* (#:key inputs #:allow-other-keys)
559 ;; For mu/test/test-mu-query.c
560 (setenv "TZDIR"
561 (string-append (assoc-ref inputs "tzdata")
562 "/share/zoneinfo"))
563 #t))
564 (add-after 'install 'install-emacs-autoloads
565 (lambda* (#:key outputs #:allow-other-keys)
566 (emacs-generate-autoloads
567 "mu4e"
568 (string-append (assoc-ref outputs "out")
569 "/share/emacs/site-lisp"))
570 #t)))))
571 (home-page "http://www.djcbsoftware.nl/code/mu/")
572 (synopsis "Quickly find emails")
573 (description
574 "Mu is a tool for dealing with e-mail messages stored in the
575 Maildir-format. Mu's purpose in life is to help you to quickly find the
576 messages you need; in addition, it allows you to view messages, extract
577 attachments, create new maildirs, and so on.")
578 (license gpl3+)))
579
580 (define-public alot
581 (package
582 (name "alot")
583 (version "0.4")
584 (source (origin
585 (method url-fetch)
586 ;; package author intends on distributing via github rather
587 ;; than pypi:
588 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
589 (uri (string-append "https://github.com/pazz/alot/archive/"
590 version ".tar.gz"))
591 (file-name (string-append "alot-" version ".tar.gz"))
592 (sha256
593 (base32
594 "0sl1kl2fhkv208llnbny4blcvrfdk4vx6bcw5pnyh9ylwb0pipi2"))))
595 (build-system python-build-system)
596 (arguments
597 `(#:tests? #f ; no tests
598 ;; python 3 is currently unsupported, more info:
599 ;; https://github.com/pazz/alot/blob/master/docs/source/faq.rst
600 #:python ,python-2))
601 (inputs
602 `(("python2-magic" ,python2-magic)
603 ("python2-configobj" ,python2-configobj)
604 ("python2-twisted" ,python2-twisted)
605 ("python2-urwid" ,python2-urwid)
606 ("python2-urwidtrees" ,python2-urwidtrees)
607 ("python2-pygpgme" ,python2-pygpgme)
608 ("python2-notmuch" ,python2-notmuch)))
609 (home-page "https://github.com/pazz/alot")
610 (synopsis "Commandline MUA using notmuch")
611 (description
612 "Alot is an experimental terminal mail user agent (MUA) based on
613 @code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
614 (license gpl3+)))
615
616 (define-public notifymuch
617 (let
618 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
619 (revision "1"))
620 (package
621 (name "notifymuch")
622 (version (string-append "0.1-" revision "." (string-take commit 7)))
623 (source
624 (origin
625 (method git-fetch)
626 (uri (git-reference
627 (url "https://github.com/kspi/notifymuch.git")
628 (commit commit)))
629 (sha256
630 (base32
631 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
632 (file-name (string-append name "-" version "-checkout"))))
633 (build-system python-build-system)
634 (inputs
635 `(("python-notmuch" ,python-notmuch)
636 ("python-pygobject" ,python-pygobject)
637 ("gobject-introspection" ,gobject-introspection)
638 ("libnotify" ,libnotify)
639 ("gtk+" ,gtk+)))
640 (arguments
641 `(#:phases
642 (modify-phases %standard-phases
643 (add-after 'install 'wrap-binary
644 (lambda* (#:key outputs #:allow-other-keys)
645 (let* ((out (assoc-ref outputs "out"))
646 (bin (string-append out "/bin/notifymuch")))
647 (wrap-program bin
648 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
649 `("GI_TYPELIB_PATH" ":" prefix
650 (,(getenv "GI_TYPELIB_PATH")
651 ,(string-append out "/lib/girepository-1.0")))))
652 #t)))))
653 (home-page "https://github.com/kspi/notifymuch")
654 (synopsis "Displays notifications for changes in the notmuch email database")
655 (description "notifymuch displays desktop notifications for messages in
656 the notmuch database. The notifications are sent using libnotify to a
657 notification daemon. The query to find messages to send a notification about
658 is configurable, and a notification for the same message will not be send
659 within a configurable period (defaults to 48 hours). To use notifymuch, run
660 @command{notifymuch} after new mail is indexed, this can be automated by
661 invoking @command{notifymuch} from the post-new hook.")
662 (license gpl3))))
663
664 (define-public notmuch
665 (package
666 (name "notmuch")
667 (version "0.24")
668 (source (origin
669 (method url-fetch)
670 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
671 version ".tar.gz"))
672 (sha256
673 (base32
674 "1z3m9knsdmchvfjzjhjf2cmdc9yahmvbvzn46wsrsrihfvv4rr7p"))))
675 (build-system gnu-build-system)
676 (arguments
677 '(#:make-flags (list "V=1") ; Verbose test output.
678 #:phases (modify-phases %standard-phases
679 (add-after 'unpack 'patch-notmuch-lib.el
680 (lambda _
681 (substitute* "emacs/notmuch-lib.el"
682 (("/bin/sh") (which "sh")))
683 #t))
684 (replace 'configure
685 (lambda* (#:key outputs #:allow-other-keys)
686 (setenv "CC" "gcc")
687 (setenv "CONFIG_SHELL" (which "sh"))
688
689 (let ((out (assoc-ref outputs "out")))
690 (zero? (system* "./configure"
691 (string-append "--prefix=" out))))))
692 (add-before 'check 'prepare-test-environment
693 (lambda _
694 (setenv "TEST_CC" "gcc")
695 ;; Patch various inline shell invocations.
696 (substitute* (find-files "test" "\\.sh$")
697 (("/bin/sh") (which "sh")))
698 #t)))))
699 (native-inputs
700 `(("bash-completion" ,bash-completion)
701 ("emacs" ,emacs-no-x) ; Minimal lacks libxml, needed for some tests.
702 ("pkg-config" ,pkg-config)
703 ("python" ,python-2)
704 ("python-docutils" ,python2-docutils)
705 ("python-sphinx" ,python2-sphinx)
706
707 ;; The following are required for tests only.
708 ("which" ,which)
709 ("dtach" ,dtach)
710 ("gnupg" ,gnupg)
711 ("man" ,man-db)
712 ("perl" ,perl)))
713 (inputs
714 `(("glib" ,glib)
715 ("gmime" ,gmime)
716 ("talloc" ,talloc)
717 ("xapian" ,xapian)
718 ("zlib" ,zlib)))
719 (home-page "https://notmuchmail.org/")
720 (synopsis "Thread-based email index, search, and tagging")
721 (description
722 "Notmuch is a command-line based program for indexing, searching, read-
723 ing, and tagging large collections of email messages.")
724 (license gpl3+)))
725
726 (define-public notmuch-addrlookup-c
727 (package
728 (name "notmuch-addrlookup-c")
729 (version "7")
730 (source (origin
731 (method url-fetch)
732 (uri (string-append
733 "https://github.com/aperezdc/" name "/archive/v"
734 version ".tar.gz"))
735 (file-name (string-append name "-" version ".tar.gz"))
736 (sha256
737 (base32
738 "0rslg2ifgyhl6asv3yr1f62m9xjfcinv7i6qb07h2k217jqlmrri"))))
739 (build-system gnu-build-system)
740 (arguments
741 '(#:tests? #f ; no tests
742 #:make-flags (list "CC=gcc"
743 (string-append "PREFIX="
744 (assoc-ref %outputs "out")))
745 #:phases (modify-phases %standard-phases
746 (delete 'configure)
747 ;; Remove vim code completion config, it's not needed to
748 ;; build (or be patched).
749 (add-before 'patch-source-shebangs 'delete-ycm-file
750 (lambda _ (delete-file ".ycm_extra_conf.py")))
751 (replace 'install
752 (lambda* (#:key outputs #:allow-other-keys)
753 (let ((bin (string-append
754 (assoc-ref outputs "out") "/bin")))
755 (install-file "notmuch-addrlookup" bin)))))))
756 (native-inputs
757 `(("pkg-config" ,pkg-config)))
758 (inputs
759 `(("glib" ,glib)
760 ("notmuch" ,notmuch)))
761 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
762 (synopsis "Address lookup tool for Notmuch")
763 (description "This is an address lookup tool using a Notmuch database,
764 useful for email address completion.")
765 (license license:expat)))
766
767 (define-public python-notmuch
768 (package
769 (name "python-notmuch")
770 (version (package-version notmuch))
771 ;; Notmuch python bindings are now unavailable on pypi. The
772 ;; bindings are distributed via the notmuch release tarball.
773 (source (package-source notmuch))
774 (build-system python-build-system)
775 (inputs `(("notmuch" ,notmuch)))
776 (arguments
777 `(#:tests? #f ; no "test" target
778 #:phases
779 (modify-phases %standard-phases
780 ;; This python package lives in a subdirectory of the notmuch source
781 ;; tree, so chdir into it before building.
782 (add-after 'unpack 'enter-python-dir
783 (lambda _ (chdir "bindings/python") #t))
784 ;; Make sure the correct notmuch shared library gets loaded.
785 (add-before 'build 'set-libnotmuch-file-name
786 (lambda* (#:key inputs #:allow-other-keys)
787 (let ((notmuch (assoc-ref inputs "notmuch")))
788 (substitute* "notmuch/globals.py"
789 (("libnotmuch\\.so\\.")
790 (string-append notmuch "/lib/libnotmuch.so.")))
791 #t))))))
792 (home-page (package-home-page notmuch))
793 (synopsis "Python bindings of the Notmuch mail indexing library")
794 (description
795 "This package provides Python bindings to use the Notmuch mail indexing
796 and search library.")
797 (license gpl3+)))
798
799 (define-public python2-notmuch
800 (package-with-python2 python-notmuch))
801
802 (define-public getmail
803 (package
804 (name "getmail")
805 (version "4.52.0")
806 (source
807 (origin
808 (method url-fetch)
809 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
810 name "-" version ".tar.gz"))
811 (sha256
812 (base32
813 "0pzplrlxwbxydvfw4kkwn60l40hk1h5sxawaa6pi0k75c220k4ni"))))
814 (build-system python-build-system)
815 (arguments
816 `(#:tests? #f ; no tests
817 #:python ,python-2))
818 (home-page "http://pyropus.ca/software/getmail/")
819 (synopsis "Mail retriever")
820 (description
821 "A flexible, extensible mail retrieval system with support for
822 POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
823 arbitrary message filtering, single-user and domain-mailboxes, and many other
824 useful features.")
825
826 ;; License is specified in file '__init__.py'.
827 (license gpl2)))
828
829 (define-public libetpan
830 (package
831 (name "libetpan")
832 (version "1.7.2")
833 (source (origin
834 (method url-fetch)
835 (uri (string-append "https://github.com/dinhviethoa/" name
836 "/archive/" version ".tar.gz"))
837 (file-name (string-append name "-" version ".tar.gz"))
838 (sha256
839 (base32 "081ixgj3skglq9i7v0jb835lmfx21zi4i5b7997igwr0lj174y9j"))))
840 (build-system gnu-build-system)
841 (native-inputs `(("autoconf" ,(autoconf-wrapper))
842 ("automake" ,automake)
843 ("libtool" ,libtool)
844 ("pkg-config" ,pkg-config)))
845 (propagated-inputs
846 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
847 ;; libraries need to be propagated.
848 `(("cyrus-sasl" ,cyrus-sasl)
849 ("openssl" ,openssl)))
850 (inputs
851 `(("curl" ,curl)
852 ("expat" ,expat)
853 ("zlib" ,zlib)))
854 (arguments
855 '(#:phases
856 (modify-phases %standard-phases
857 (add-after 'unpack 'autogen
858 (lambda _
859 (setenv "NOCONFIGURE" "true")
860 (zero? (system* "sh" "autogen.sh")))))
861 #:configure-flags
862 '("--disable-static" "--disable-db")))
863 (home-page "http://www.etpan.org/libetpan.html")
864 (synopsis "Portable middleware for email access")
865 (description
866 "The purpose of this mail library is to provide a portable, efficient
867 framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
868 provides an API for C language. It's the low-level API used by MailCore and
869 MailCore 2.")
870 (license (non-copyleft "file://COPYING"))))
871
872 (define-public compface
873 (package
874 (name "compface")
875 (version "1.5.2")
876 (source (origin
877 (method url-fetch)
878 (uri (string-append "https://ftp.heanet.ie/mirrors/"
879 "ftp.xemacs.org/aux/"
880 name "-" version ".tar.gz"))
881 (sha256
882 (base32
883 "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
884 (build-system gnu-build-system)
885 (arguments
886 `(#:tests? #f))
887 (synopsis "Portrait image compressor")
888 (description "This packages takes your 48x48x1 portrait image and
889 compresses it.")
890 (home-page "http://www.cs.indiana.edu/pub/faces/")
891 (license (x11-style "file://README"))))
892
893 (define-public claws-mail
894 (package
895 (name "claws-mail")
896 (version "3.14.1")
897 (source (origin
898 (method url-fetch)
899 (uri (string-append
900 "http://www.claws-mail.org/releases/" name "-" version
901 ".tar.xz"))
902 (sha256
903 (base32
904 "0df34gj4r5cbb92834hph19gnh7ih9rgmmw47rliyg8b9z01v6mp"))))
905 (build-system gnu-build-system)
906 (native-inputs `(("pkg-config" ,pkg-config)))
907 (inputs `(("bogofilter" ,bogofilter)
908 ("curl" ,curl)
909 ("dbus-glib" ,dbus-glib)
910 ("enchant" ,enchant)
911 ("expat" ,expat)
912 ("ghostscript" ,ghostscript)
913 ("hicolor-icon-theme" ,hicolor-icon-theme)
914 ("gnupg" ,gnupg)
915 ("gnutls" ,gnutls)
916 ("gpgme" ,gpgme)
917 ("gtk" ,gtk+-2)
918 ("libarchive" ,libarchive)
919 ("libcanberra" ,libcanberra)
920 ("libetpan" ,libetpan)
921 ("libnotify" ,libnotify)
922 ("libsm" ,libsm)
923 ("libxml2" ,libxml2)
924 ("perl" ,perl)
925 ("python-2" ,python-2)
926 ("mime-info" ,shared-mime-info)))
927 (arguments
928 '(#:configure-flags
929 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant")
930 #:phases (modify-phases %standard-phases
931 (add-before 'build 'patch-mime
932 (lambda* (#:key inputs #:allow-other-keys)
933 (substitute* "src/procmime.c"
934 (("/usr/share/mime/globs")
935 (string-append (assoc-ref inputs "mime-info")
936 "/share/mime/globs"))))))))
937 (synopsis "GTK-based Email client")
938 (description
939 "Claws-Mail is an email client (and news reader) based on GTK+. The
940 appearance and interface are designed to be familiar to new users coming from
941 other popular email clients, as well as experienced users. Almost all commands
942 are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
943 which can add many functionalities to the base client.")
944 (home-page "http://www.claws-mail.org/")
945 (license gpl3+))) ; most files are actually public domain or x11
946
947 (define-public msmtp
948 (package
949 (name "msmtp")
950 (version "1.6.6")
951 (source
952 (origin
953 (method url-fetch)
954 (uri (string-append "mirror://sourceforge/msmtp/msmtp/" version
955 "/msmtp-" version ".tar.xz"))
956 (sha256
957 (base32
958 "0ppvww0sb09bnsrpqnvlrn8vx231r24xn2iiwpy020mxc8gxn5fs"))))
959 (build-system gnu-build-system)
960 (inputs
961 `(("libidn" ,libidn)
962 ("libsecret" ,libsecret)
963 ("gnutls" ,gnutls)
964 ("zlib" ,zlib)
965 ("gsasl" ,gsasl)))
966 (native-inputs
967 `(("pkg-config" ,pkg-config)))
968 (home-page "http://msmtp.sourceforge.net/")
969 (arguments
970 `(#:configure-flags (list "--with-libgsasl"
971 "--with-libidn"
972 "--with-tls=gnutls")
973 #:phases
974 (modify-phases %standard-phases
975 (add-after 'install 'install-msmtpq
976 (lambda* (#:key outputs #:allow-other-keys)
977 (let* ((out (assoc-ref outputs "out"))
978 (bin (string-append out "/bin"))
979 (doc (string-append out "/share/doc/msmtp"))
980 (msmtpq (string-append "scripts/msmtpq")))
981 (install-file (string-append msmtpq "/msmtpq") bin)
982 (install-file (string-append msmtpq "/msmtp-queue") bin)
983 (install-file (string-append msmtpq "/README.msmtpq") doc)
984 #t))))))
985 (synopsis
986 "Simple and easy to use SMTP client with decent sendmail compatibility")
987 (description
988 "msmtp is an SMTP client. In the default mode, it transmits a mail to
989 an SMTP server (for example at a free mail provider) which takes care of further
990 delivery.")
991 (license gpl3+)))
992
993 (define-public exim
994 (package
995 (name "exim")
996 (version "4.87.1")
997 (source
998 (origin
999 (method url-fetch)
1000 (uri (list (string-append "ftp://ftp.exim.org/pub/exim/exim4/exim-"
1001 version ".tar.bz2")
1002 (string-append "ftp://ftp.exim.org/pub/exim/exim4/old/exim-"
1003 version ".tar.bz2")))
1004 (sha256
1005 (base32
1006 "050m2gjzpc6vyik458h1j0vi8bxplkzjsyndkyd2y394i569kdyl"))))
1007 (build-system gnu-build-system)
1008 (inputs
1009 `(("bdb" ,bdb)
1010 ("gnutls" ,gnutls)
1011 ("gzip" ,gzip)
1012 ("bzip2" ,bzip2)
1013 ("xz" ,xz)
1014 ("perl" ,perl)
1015 ("libxt" ,libxt)
1016 ("libxaw" ,libxaw)))
1017 (native-inputs
1018 `(("pcre" ,pcre "bin")
1019 ("perl" ,perl)))
1020 (arguments
1021 '(#:phases
1022 (alist-replace
1023 'configure
1024 ;; We'd use #:make-flags but the top-level Makefile calls others
1025 ;; recursively, so just set all variables this way.
1026 (lambda* (#:key outputs inputs #:allow-other-keys)
1027 (substitute* '("Makefile" "OS/Makefile-Default")
1028 (("(RM_COMMAND=).*" all var)
1029 (string-append var "rm\n")))
1030 (copy-file "src/EDITME" "Local/Makefile")
1031 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
1032 (let ((out (assoc-ref outputs "out"))
1033 (gzip (assoc-ref inputs "gzip"))
1034 (bzip2 (assoc-ref inputs "bzip2"))
1035 (xz (assoc-ref inputs "xz")))
1036 (substitute* '("Local/Makefile")
1037 (("(BIN_DIRECTORY=).*" all var)
1038 (string-append var out "/bin\n"))
1039 (("(CONFIGURE_FILE=).*" all var)
1040 (string-append var out "/etc/exim.conf\n"))
1041 (("(EXIM_USER=).*" all var)
1042 (string-append var "nobody\n"))
1043 (("(FIXED_NEVER_USERS=).*" all var)
1044 (string-append var "\n")) ;XXX no root in build environment
1045 (("(COMPRESS_COMMAND=).*" all var)
1046 (string-append var gzip "/bin/gzip\n"))
1047 (("(ZCAT_COMMAND=).*" all var)
1048 (string-append var gzip "/bin/zcat\n")))
1049 ;; This file has hardcoded names for tools despite the zcat
1050 ;; configuration above.
1051 (substitute* '("src/exigrep.src")
1052 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
1053 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
1054 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
1055 (("'lzma'") (string-append "'" xz "/bin/lzma'")))))
1056 (alist-cons-before
1057 'build 'fix-sh-paths
1058 (lambda* (#:key inputs #:allow-other-keys)
1059 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
1060 (("SHELL=/bin/sh") "SHELL=sh"))
1061 (substitute* '("scripts/Configure-config.h")
1062 (("\\| /bin/sh") "| sh"))
1063 (let ((bash (assoc-ref inputs "bash")))
1064 (substitute* '("scripts/Configure-eximon")
1065 (("#!/bin/sh") (string-append "#!" bash "/bin/sh")))))
1066 %standard-phases))
1067 #:make-flags '("INSTALL_ARG=-no_chown")
1068 ;; No 'check' target.
1069 #:tests? #f))
1070 (home-page "http://www.exim.org/")
1071 (synopsis
1072 "Message Transfer Agent (MTA) developed at the University of Cambridge")
1073 (description
1074 "Exim is a message transfer agent (MTA) developed at the University of
1075 Cambridge for use on Unix systems connected to the Internet. In style it is
1076 similar to Smail 3, but its facilities are more general. There is a great
1077 deal of flexibility in the way mail can be routed, and there are extensive
1078 facilities for checking incoming mail.")
1079 (license gpl2+)))
1080
1081 (define-public dovecot
1082 (package
1083 (name "dovecot")
1084 (version "2.2.27")
1085 (source
1086 (origin
1087 (method url-fetch)
1088 (uri (string-append "https://www.dovecot.org/releases/"
1089 (version-major+minor version) "/"
1090 name "-" version ".tar.gz"))
1091 (sha256 (base32
1092 "1s8qvr6fa9d0n179kdwgpsi72zkvpbh9q57q8fr2fjysgjl94zw9"))))
1093 (build-system gnu-build-system)
1094 (native-inputs
1095 `(("pkg-config" ,pkg-config)))
1096 (inputs
1097 `(("openssl" ,openssl)
1098 ("zlib" ,zlib)
1099 ("bzip2" ,bzip2)
1100 ("sqlite" ,sqlite)
1101 ("linux-pam" ,linux-pam)))
1102 (arguments
1103 `(#:configure-flags '("--sysconfdir=/etc"
1104 "--localstatedir=/var")
1105 #:phases (modify-phases %standard-phases
1106 (add-before
1107 'configure 'pre-configure
1108 (lambda _
1109 ;; Simple hack to avoid installing in /etc
1110 (substitute* '("doc/Makefile.in"
1111 "doc/example-config/Makefile.in")
1112 (("pkgsysconfdir = .*")
1113 "pkgsysconfdir = /tmp/etc"))
1114 #t))
1115 (add-after
1116 'unpack 'patch-other-shebangs
1117 (lambda _
1118 (substitute*
1119 "src/lib-program-client/test-program-client-local.c"
1120 (("/bin/echo") (which "echo"))
1121 (("/bin/cat") (which "cat"))
1122 (("/bin/false") (which "false")))
1123 #t)))))
1124 (home-page "https://www.dovecot.org")
1125 (synopsis "Secure POP3/IMAP server")
1126 (description
1127 "Dovecot is a mail server whose major goals are security and reliability.
1128 It supports mbox/Maildir and its own dbox/mdbox formats.")
1129 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
1130 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
1131 ;; Unicode, Inc. License Agreement for Data Files and Software.
1132 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
1133
1134 (define-public dovecot-trees
1135 (let ((commit "006059c8a47d68f14f73c09743e45b9a73014dbf")
1136 (revision "1"))
1137 (package
1138 (name "dovecot-trees")
1139 (version (string-append "2.0.0-" revision "." (string-take commit 7)))
1140 (source
1141 (origin
1142 (method git-fetch)
1143 (uri (git-reference
1144 (url "https://0xacab.org/riseuplabs/trees.git")
1145 (commit commit)))
1146 (file-name (string-append name "-" version "-checkout"))
1147 (sha256
1148 (base32
1149 "0ax90bzc66x179wi1m7ywqwa8nssyhjngs7ij109hqqxg5ymfp73"))))
1150 (build-system gnu-build-system)
1151 (native-inputs
1152 `(("automake" ,automake)
1153 ("autoconf" ,autoconf)
1154 ("libtool" ,libtool)
1155 ("dovecot" ,dovecot)
1156 ("pkg-config" ,pkg-config)))
1157 (inputs
1158 `(("libsodium" ,libsodium)))
1159 (arguments
1160 `(#:tests? #f ;No tests exist.
1161 #:configure-flags (list (string-append "--with-dovecot="
1162 (assoc-ref %build-inputs "dovecot")
1163 "/lib/dovecot"))
1164 #:phases
1165 (modify-phases %standard-phases
1166 (add-before 'configure 'autogen
1167 (lambda _
1168 (zero? (system* "./autogen.sh")))))))
1169 (home-page "https://0xacab.org/riseuplabs/trees")
1170 (synopsis "NaCL-based Dovecot email storage encryption plugin")
1171 (description
1172 "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
1173 Dovecot encryption plugin. This plugin adds individually encrypted mail
1174 storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
1175 which uses OpenSSL and RSA keypairs. TREES works in a similar way, but uses
1176 the Sodium crypto library (based on NaCL).
1177
1178 How it works:
1179 @enumerate
1180 @item On IMAP log in, the user's cleartext password is passed to the plugin.
1181 @item The plugin creates an argon2 digest from the password.
1182 @item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
1183 @item Inside the secretbox is stored a Curve25519 private key.
1184 @item The Curve25519 private key is used to decrypt each individual message,
1185 using lidsodium sealed boxes.
1186 @item New mail is encrypted as it arrives using the Curve25519 public key.
1187 @end enumerate\n")
1188 (license agpl3))))
1189
1190 (define-public isync
1191 (package
1192 (name "isync")
1193 (version "1.2.1")
1194 (source
1195 (origin
1196 (method url-fetch)
1197 (uri (string-append "mirror://sourceforge/isync/isync/"
1198 version "/isync-" version ".tar.gz"))
1199 (sha256 (base32
1200 "1bij6nm06ghkg98n2pdyacam2fyg5y8f7ajw0d5653m0r4ldw5p7"))))
1201 (build-system gnu-build-system)
1202 (inputs
1203 `(("bdb" ,bdb)
1204 ("openssl" ,openssl)))
1205 (home-page "http://isync.sourceforge.net/")
1206 (synopsis "Mailbox synchronization program")
1207 (description
1208 "isync/mbsync is command line tool for two-way synchronization of
1209 mailboxes. Currently Maildir and IMAP are supported types.")
1210 (license gpl2+)))
1211
1212 (define-public perl-email-abstract
1213 (package
1214 (name "perl-email-abstract")
1215 (version "3.008")
1216 (source
1217 (origin
1218 (method url-fetch)
1219 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1220 "Email-Abstract-" version ".tar.gz"))
1221 (sha256
1222 (base32
1223 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
1224 (build-system perl-build-system)
1225 (propagated-inputs
1226 `(("perl-email-simple" ,perl-email-simple)
1227 ("perl-module-pluggable" ,perl-module-pluggable)
1228 ("perl-mro-compat" ,perl-mro-compat)))
1229 (home-page "http://search.cpan.org/dist/Email-Abstract")
1230 (synopsis "Interface to mail representations")
1231 (description "Email::Abstract provides module writers with the ability to
1232 write simple, representation-independent mail handling code.")
1233 (license (package-license perl))))
1234
1235 (define-public perl-email-address
1236 (package
1237 (name "perl-email-address")
1238 (version "1.908")
1239 (source
1240 (origin
1241 (method url-fetch)
1242 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1243 "Email-Address-" version ".tar.gz"))
1244 (sha256
1245 (base32
1246 "0i6ljdvpy279hpbqf6lgv4figr376rb2sh4yphj86xkdzsyn1y75"))))
1247 (build-system perl-build-system)
1248 (home-page "http://search.cpan.org/dist/Email-Address")
1249 (synopsis "Email address parsing and creation")
1250 (description "Email::Address implements a regex-based RFC 2822 parser that
1251 locates email addresses in strings and returns a list of Email::Address
1252 objects found. Alternatively you may construct objects manually.")
1253 (license (package-license perl))))
1254
1255 (define-public perl-email-date-format
1256 (package
1257 (name "perl-email-date-format")
1258 (version "1.005")
1259 (source
1260 (origin
1261 (method url-fetch)
1262 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1263 "Email-Date-Format-" version ".tar.gz"))
1264 (sha256
1265 (base32
1266 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
1267 (build-system perl-build-system)
1268 (home-page "http://search.cpan.org/dist/Email-Date-Format")
1269 (synopsis "Produce RFC 2822 date strings")
1270 (description "Email::Date::Format provides a means for generating an RFC
1271 2822 compliant datetime string.")
1272 (license (package-license perl))))
1273
1274 (define-public perl-email-messageid
1275 (package
1276 (name "perl-email-messageid")
1277 (version "1.406")
1278 (source
1279 (origin
1280 (method url-fetch)
1281 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1282 "Email-MessageID-" version ".tar.gz"))
1283 (sha256
1284 (base32
1285 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
1286 (build-system perl-build-system)
1287 (home-page "http://search.cpan.org/dist/Email-MessageID")
1288 (synopsis "Generate world unique message-ids")
1289 (description "Email::MessageID generates recommended message-ids to
1290 identify a message uniquely.")
1291 (license (package-license perl))))
1292
1293 (define-public perl-email-mime
1294 (package
1295 (name "perl-email-mime")
1296 (version "1.937")
1297 (source
1298 (origin
1299 (method url-fetch)
1300 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1301 "Email-MIME-" version ".tar.gz"))
1302 (sha256
1303 (base32
1304 "0s50i3nxi9dr81p4rn017nrarc40yrwz0qcw34q8k3pvdf46fr9n"))))
1305 (build-system perl-build-system)
1306 (propagated-inputs
1307 `(("perl-email-address" ,perl-email-address)
1308 ("perl-email-messageid" ,perl-email-messageid)
1309 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1310 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1311 ("perl-email-simple" ,perl-email-simple)
1312 ("perl-mime-types" ,perl-mime-types)))
1313 (home-page "http://search.cpan.org/dist/Email-MIME")
1314 (synopsis "MIME message handling")
1315 (description "Email::MIME is an extension of the Email::Simple module, to
1316 handle MIME encoded messages. It takes a message as a string, splits it up
1317 into its constituent parts, and allows you access to various parts of the
1318 message. Headers are decoded from MIME encoding.")
1319 (license (package-license perl))))
1320
1321 (define-public perl-email-mime-contenttype
1322 (package
1323 (name "perl-email-mime-contenttype")
1324 (version "1.018")
1325 (source
1326 (origin
1327 (method url-fetch)
1328 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1329 "Email-MIME-ContentType-" version ".tar.gz"))
1330 (sha256
1331 (base32
1332 "1y8hpwm7p5a9y2azy0cgvlv2i2d0nj66ajfa0fj51wdq4w9cs23m"))))
1333 (build-system perl-build-system)
1334 (native-inputs
1335 `(("perl-capture-tiny" ,perl-capture-tiny)))
1336 (home-page "http://search.cpan.org/dist/Email-MIME-ContentType")
1337 (synopsis "Parse MIME Content-Type headers")
1338 (description "Email::MIME::ContentType parses a MIME Content-Type
1339 header.")
1340 (license (package-license perl))))
1341
1342 (define-public perl-email-mime-encodings
1343 (package
1344 (name "perl-email-mime-encodings")
1345 (version "1.315")
1346 (source
1347 (origin
1348 (method url-fetch)
1349 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1350 "Email-MIME-Encodings-" version ".tar.gz"))
1351 (sha256
1352 (base32
1353 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1354 (build-system perl-build-system)
1355 (native-inputs
1356 `(("perl-capture-tiny" ,perl-capture-tiny)))
1357 (home-page "http://search.cpan.org/dist/Email-MIME-Encodings")
1358 (synopsis "Unified interface to MIME encoding and decoding")
1359 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
1360 (license (package-license perl))))
1361
1362 (define-public perl-email-sender
1363 (package
1364 (name "perl-email-sender")
1365 (version "1.300028")
1366 (source
1367 (origin
1368 (method url-fetch)
1369 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1370 "Email-Sender-" version ".tar.gz"))
1371 (sha256
1372 (base32
1373 "0c5dv1x9856nryj5mcbgb67a4irmadz80g0qnf4van3bd8wbj72a"))))
1374 (build-system perl-build-system)
1375 (native-inputs
1376 `(("perl-capture-tiny" ,perl-capture-tiny)))
1377 (propagated-inputs
1378 `(("perl-email-abstract" ,perl-email-abstract)
1379 ("perl-email-address" ,perl-email-address)
1380 ("perl-email-simple" ,perl-email-simple)
1381 ("perl-list-moreutils" ,perl-list-moreutils)
1382 ("perl-module-runtime" ,perl-module-runtime)
1383 ("perl-moo" ,perl-moo)
1384 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1385 ("perl-sub-exporter" ,perl-sub-exporter)
1386 ("perl-throwable" ,perl-throwable)
1387 ("perl-try-tiny" ,perl-try-tiny)))
1388 (home-page "http://search.cpan.org/dist/Email-Sender")
1389 (synopsis "Perl library for sending email")
1390 (description "Email::Sender replaces the old and sometimes problematic
1391 Email::Send library.")
1392 (license (package-license perl))))
1393
1394 (define-public perl-email-simple
1395 (package
1396 (name "perl-email-simple")
1397 (version "2.211")
1398 (source
1399 (origin
1400 (method url-fetch)
1401 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1402 "Email-Simple-" version ".tar.gz"))
1403 (sha256
1404 (base32
1405 "1if4a2wh4iwlcycqrd2fhkx04ngmd75q444gh43w0r9p15ym5f8w"))))
1406 (build-system perl-build-system)
1407 (propagated-inputs
1408 `(("perl-email-date-format" ,perl-email-date-format)))
1409 (home-page "http://search.cpan.org/dist/Email-Simple")
1410 (synopsis "Parsing of RFC 2822 messages")
1411 (description "Email::Simple provides simple parsing of RFC 2822 message
1412 format and headers.")
1413 (license (package-license perl))))
1414
1415 (define-public libesmtp
1416 (package
1417 (name "libesmtp")
1418 (version "1.0.6")
1419 (source
1420 (origin
1421 (method url-fetch)
1422 (uri (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1423 version ".tar.bz2"))
1424 (sha256
1425 (base32
1426 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1427 (build-system gnu-build-system)
1428 (propagated-inputs
1429 `(("openssl" ,openssl)))
1430 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1431 (synopsis "Library for sending mail via remote hosts using SMTP")
1432 (description "libESMTP is an SMTP client which manages posting (or
1433 submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1434 It may be used as part of a Mail User Agent (MUA) or other program that must
1435 be able to post electronic mail where mail functionality may not be that
1436 program's primary purpose.")
1437 (license (list lgpl2.1+ gpl2+))))
1438
1439 (define-public esmtp
1440 (package
1441 (name "esmtp")
1442 (version "1.2")
1443 (source
1444 (origin
1445 (method git-fetch)
1446 (uri (git-reference
1447 (url "https://github.com/andywingo/esmtp.git")
1448 (commit "01bf9fc")))
1449 (sha256
1450 (base32
1451 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1452 (file-name (string-append name "-" version "-checkout"))))
1453 (arguments
1454 `(#:phases (modify-phases %standard-phases
1455 (add-before
1456 'configure 'autoconf
1457 (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
1458 (build-system gnu-build-system)
1459 (native-inputs
1460 `(("bison" ,bison)
1461 ("flex" ,flex)
1462 ("autoconf" ,autoconf)
1463 ("automake" ,automake)
1464 ("libtool" ,libtool)))
1465 (inputs
1466 `(("libesmtp" ,libesmtp)))
1467 (home-page "https://sourceforge.net/projects/esmtp/")
1468 (synopsis "Relay-only mail transfer agent (MTA)")
1469 (description "Esmtp is a simple relay-only mail transfer agent built using
1470 libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1471 user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1472 page for more on configuration. This package also provides minimal
1473 compatibility shims for the @command{sendmail}, @command{mailq}, and
1474 @command{newaliases} commands.")
1475 (license gpl2+)))
1476
1477 (define-public fdm
1478 (package
1479 (name "fdm")
1480 (version "1.9")
1481 (source (origin
1482 (method url-fetch)
1483 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1484 version "/fdm-"
1485 version ".tar.gz"))
1486 (file-name (string-append name "-" version ".tar.gz"))
1487 (sha256
1488 (base32 "054rscijahiza5f9qha79rg3siji3bk5mk10f8c2vqx7m4w6qh8n"))))
1489 (build-system gnu-build-system)
1490 (inputs
1491 `(("tdb" ,tdb)
1492 ("openssl" ,openssl)
1493 ("zlib" ,zlib)))
1494 (home-page "https://github.com/nicm/fdm")
1495 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1496 (description "fdm is a program designed to fetch mail from POP3
1497 or IMAP servers, or receive local mail from stdin, and
1498 deliver it in various ways.")
1499 (license
1500 ;; Why point to a source file? Well, all the individual files have a
1501 ;; copy of this license in their headers, but there's no seprate file
1502 ;; with that information.
1503 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
1504
1505
1506 (define-public procmail
1507 (package
1508 (name "procmail")
1509 (version "3.22")
1510 (source
1511 (origin
1512 (method url-fetch)
1513 (uri (string-append
1514 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1515 version
1516 ".tar.gz"))
1517 (sha256
1518 (base32
1519 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1520 ;; The following patch fixes an ambiguous definition of
1521 ;; getline() in formail.c. The patch is provided by Debian as
1522 ;; patch 24.
1523 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
1524 "procmail-CVE-2014-3618.patch"))))
1525 (arguments
1526 `(#:phases (modify-phases %standard-phases
1527 (replace 'configure
1528 (lambda _
1529 (substitute* "Makefile"
1530 (("/bin/sh")
1531 (which "sh"))
1532 (("/usr")
1533 (assoc-ref %outputs "out"))
1534 (("/bin/rm")
1535 (which "rm")))
1536 #t)))
1537 #:tests? #f)) ;; There are no tests indicating a successful
1538 ;; build. Some tests of basic locking mechanisms provided by the
1539 ;; file system are performed during 'make install'. However, these
1540 ;; are performed before the actual build process.
1541 (build-system gnu-build-system)
1542 (inputs `(("exim" ,exim)))
1543 (home-page "http://www.procmail.org/")
1544 (synopsis "Versatile mail delivery agent (MDA)")
1545 (description "Procmail is a mail delivery agent (MDA) featuring support
1546 for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1547 can be sorted into separate files/directories and arbitrary commands can be
1548 executed on mail arrival. Procmail is considered stable, but is no longer
1549 maintained.")
1550 (license gpl2+))) ;; procmail allows to choose the
1551 ;; nonfree Artistic License 1.0
1552 ;; as alternative to the GPL2+.
1553 ;; This option is not listed here.
1554
1555 (define-public khard
1556 (package
1557 (name "khard")
1558 (version "0.11.3")
1559 (source (origin
1560 (method url-fetch)
1561 (uri (pypi-uri name version))
1562 (sha256
1563 (base32
1564 "1v66khq5w17xdbkpb00pf9xbl84dlzx4lq286fvzskb949b3y4yn"))))
1565 (build-system python-build-system)
1566 (arguments
1567 `(#:phases
1568 (modify-phases %standard-phases
1569 (add-after 'install 'install-doc
1570 (lambda* (#:key outputs #:allow-other-keys)
1571 (let* ((out (assoc-ref outputs "out"))
1572 (doc (string-append out "/share/doc/khard")))
1573 (copy-recursively "misc/khard" doc)
1574 #t))))
1575 ;; FIXME: check phase fails with
1576 ;; "Config file /tmp/.config/khard/khard.conf not available"
1577 #:tests? #f))
1578 (propagated-inputs
1579 `(("python-vobject" ,python-vobject)
1580 ("python-pyyaml" ,python-pyyaml)
1581 ("python-atomicwrites" ,python-atomicwrites)
1582 ("python-configobj" ,python-configobj)))
1583 (synopsis "Console address book using CardDAV")
1584 (description "Khard is an address book for the console. It creates, reads,
1585 modifies and removes CardDAV address book entries at your local machine. For
1586 synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1587 Khard can also be used from within the email client @command{mutt}.")
1588 (home-page "https://github.com/scheibler/khard")
1589 (license gpl3+)))
1590
1591 (define-public perl-mail-spf
1592 (package
1593 (name "perl-mail-spf")
1594 (version "v2.9.0")
1595 (source
1596 (origin
1597 (method url-fetch)
1598 (uri (string-append
1599 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-"
1600 version
1601 ".tar.gz"))
1602 (sha256
1603 (base32
1604 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1605 (build-system perl-build-system)
1606 (native-inputs
1607 `(("perl-module-build" ,perl-module-build)
1608 ("perl-net-dns-resolver-programmable"
1609 ,perl-net-dns-resolver-programmable)))
1610 (arguments
1611 `(#:phases (modify-phases %standard-phases
1612 (add-before 'configure 'modify-Build.PL
1613 (lambda* (#:key outputs #:allow-other-keys)
1614 (substitute* "Build.PL"
1615 (("'/usr/sbin'") (string-append "'"
1616 (assoc-ref outputs "out")
1617 "/sbin'")))
1618 #t)))))
1619 (inputs
1620 `(("perl-error" ,perl-error)
1621 ("perl-net-dns" ,perl-net-dns)
1622 ("perl-netaddr-ip" ,perl-netaddr-ip)
1623 ("perl-uri" ,perl-uri)))
1624 (home-page
1625 "http://search.cpan.org/dist/Mail-SPF")
1626 (synopsis
1627 "Perl implementation of Sender Policy Framework")
1628 (description "Mail::SPF is the Sender Policy Framework implemented
1629 in Perl.")
1630 (license bsd-3)))
1631
1632 (define-public mb2md
1633 (package
1634 (name "mb2md")
1635 (version "3.20")
1636 (source (origin
1637 (method url-fetch)
1638 (uri (string-append
1639 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
1640 version ".pl.gz"))
1641 (sha256
1642 (base32
1643 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
1644 (build-system trivial-build-system)
1645 (arguments
1646 '(#:modules ((guix build utils))
1647 #:builder
1648 (begin
1649 (use-modules (guix build utils))
1650 (let* ((source (assoc-ref %build-inputs "source"))
1651 (out (assoc-ref %outputs "out"))
1652 (bin (string-append out "/bin"))
1653 (perl (assoc-ref %build-inputs "perl"))
1654 (gzip (assoc-ref %build-inputs "gzip"))
1655 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
1656 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
1657 (mkdir-p bin)
1658 (with-directory-excursion bin
1659 (copy-file source "mb2md.gz")
1660 (system* (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
1661 (substitute* "mb2md"
1662 (("#!/usr/bin/perl")
1663 (string-append "#!/usr/bin/perl -I " perl5lib)))
1664 (patch-shebang "mb2md" (list (string-append perl "/bin")))
1665 (chmod "mb2md" #o555))
1666 #t))))
1667 (native-inputs `(("gzip", gzip)))
1668 (inputs `(("perl" ,perl)
1669 ("perl-timedate" ,perl-timedate)))
1670 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
1671 (synopsis "Mbox to maildir converter")
1672 (description
1673 "Mb2md is a Perl script that takes one or more mbox format files and
1674 converts them to maildir format directories.")
1675 (license public-domain)))
1676
1677 (define-public mpop
1678 (package
1679 (name "mpop")
1680 (version "1.2.6")
1681 (source
1682 (origin
1683 (method url-fetch)
1684 (uri (string-append "mirror://sourceforge/mpop/mpop/" version
1685 "/mpop-" version ".tar.xz"))
1686 (sha256
1687 (base32
1688 "0p1ix63jh64dibrlccch8q7gxl9nn18wd2qpyr5z1h4gs2fpmv4z"))))
1689 (build-system gnu-build-system)
1690 (inputs
1691 `(("gnutls" ,gnutls)
1692 ("libidn" ,libidn)))
1693 (native-inputs
1694 `(("pkg-config" ,pkg-config)))
1695 (arguments
1696 `(#:configure-flags (list "--with-tls=gnutls")))
1697 (home-page "http://mpop.sourceforge.net/")
1698 (synopsis "POP3 mail client")
1699 (description "mpop is a small and fast POP3 client suitable as a
1700 fetchmail replacement.
1701
1702 mpop supports multiple accounts, header based mail filtering, delivery
1703 to mbox files, maildir folders or a Mail Delivery Agent (MDA),
1704 TLS/SSL, several authentication methods, Internationalized Domain
1705 Names (IDN) and SOCKS proxies.")
1706 (license gpl3+)))
1707
1708 (define-public mhonarc
1709 (package
1710 (name "mhonarc")
1711 (version "2.6.19")
1712 (source
1713 (origin
1714 (method url-fetch)
1715 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
1716 version ".tar.gz"))
1717 (sha256
1718 (base32
1719 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
1720 (build-system perl-build-system)
1721 (home-page "https://www.mhonarc.org/")
1722 (synopsis "Create HTML archives of mail/news messages")
1723 (description
1724 "MHonArc is a Perl mail-to-HTML converter. MHonArc
1725 provides HTML mail archiving with index, mail thread linking,
1726 etc; plus other capabilities including support for MIME and
1727 powerful user customization features.")
1728 (license gpl2+)))
1729
1730
1731 (define-public sendmail
1732 (package
1733 (name "sendmail")
1734 (version "8.15.2")
1735 (source
1736 (origin
1737 (method url-fetch)
1738 (uri (string-append
1739 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
1740 version ".tar.gz"))
1741 (sha256
1742 (base32
1743 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
1744 (build-system gnu-build-system)
1745 (arguments
1746 `(#:phases
1747 (modify-phases %standard-phases
1748 (add-before 'build 'replace-/bin/sh
1749 (lambda _
1750 (substitute*
1751 (append
1752 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
1753 "contrib/mmuegel" "devtools/bin/configure.sh")
1754 (find-files "." ".*\\.m4")
1755 (find-files "." ".*\\.cf"))
1756 (("/bin/sh") (which "sh")))
1757
1758 (substitute* "devtools/bin/Build"
1759 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
1760 #t))
1761 (replace 'configure
1762 (lambda _
1763
1764 ;; Render harmless any attempts to chown or chgrp
1765 (substitute* "devtools/bin/install.sh"
1766 (("owner=\\$2") "owner=''")
1767 (("group=\\$2") "group=''"))
1768
1769 (with-output-to-file "devtools/Site/site.config.m4"
1770 (lambda ()
1771 (format #t "
1772 define(`confCC', `gcc')
1773 define(`confOPTIMIZE', `-g -O2')
1774 define(`confLIBS', `-lresolv')
1775 define(`confINSTALL', `~a/devtools/bin/install.sh')
1776 define(`confDEPEND_TYPE', `CC-M')
1777 define(`confINST_DEP', `')
1778 " (getcwd))))))
1779 (replace 'build
1780 (lambda _
1781 (and (zero? (system* "sh" "Build"))
1782 (with-directory-excursion "cf/cf"
1783 (begin
1784 (copy-file "generic-linux.mc" "sendmail.mc")
1785 (zero? (system* "sh" "Build" "sendmail.cf")))))))
1786 (add-before 'install 'pre-install
1787 (lambda _
1788 (let ((out (assoc-ref %outputs "out")))
1789 (mkdir-p (string-append out "/usr/bin"))
1790 (mkdir-p (string-append out "/usr/sbin"))
1791 (mkdir-p (string-append out "/etc/mail"))
1792 (setenv "DESTDIR" out)
1793 (with-directory-excursion "cf/cf"
1794 (zero? (system* "sh" "Build" "install-cf")))))))
1795 ;; There is no make check. There are some post installation tests, but those
1796 ;; require root privileges
1797 #:tests? #f))
1798 (inputs
1799 `(("m4" ,m4)
1800 ("perl" ,perl)))
1801 (home-page "http://sendmail.org")
1802 (synopsis
1803 "Highly configurable Mail Transfer Agent (MTA)")
1804 (description
1805 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
1806 Allman. It is highly configurable and supports many delivery methods and many
1807 transfer protocols.")
1808 (license (non-copyleft "file://LICENSE"
1809 "See LICENSE in the distribution."))))
1810
1811 (define-public opensmtpd
1812 (package
1813 (name "opensmtpd")
1814 (version "6.0.2p1")
1815 (source (origin
1816 (method url-fetch)
1817 (uri (string-append "https://www.opensmtpd.org/archives/"
1818 name "-" version ".tar.gz"))
1819 (sha256
1820 (base32
1821 "1b4h64w45hpmfq5721smhg4s0shs64gbcjqjpx3fbiw4hz8bdy9a"))))
1822 (build-system gnu-build-system)
1823 (inputs
1824 `(("bdb" ,bdb)
1825 ("libressl" ,libressl)
1826 ("libevent" ,libevent)
1827 ("libasr" ,libasr)
1828 ("linux-pam" ,linux-pam)
1829 ("zlib" ,zlib)))
1830 (native-inputs
1831 `(("bison" ,bison)
1832 ("groff" ,groff)))
1833 (arguments
1834 `(#:configure-flags
1835 (list "--with-table-db" "--localstatedir=/var"
1836 "--with-user-smtpd=smtpd" "--with-user-queue=smtpq"
1837 "--with-group-queue=smtpq"
1838 "--with-path-socket=/var/run"
1839 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt")
1840 #:phases
1841 (modify-phases %standard-phases
1842 ;; OpenSMTPD provides a single utility smtpctl to control the daemon and
1843 ;; the local submission subsystem. To accomodate systems that require
1844 ;; historical interfaces such as sendmail, newaliases or makemap, the
1845 ;; smtpctl utility can operate in compatibility mode if called with the
1846 ;; historical name.
1847 (add-after 'install 'install-compabilitymode
1848 (lambda _
1849 (let* ((out (assoc-ref %outputs "out"))
1850 (sbin (string-append out "/sbin/")))
1851 (for-each (lambda (cmd)
1852 (symlink "smtpctl" (string-append sbin cmd)))
1853 '("makemap" "sendmail" "send-mail"
1854 "newaliases" "mailq")))
1855 #t)))))
1856 (synopsis "Lightweight SMTP daemon")
1857 (description
1858 "OpenSMTPD is an implementation of the server-side SMTP protocol, with
1859 some additional standard extensions. It allows ordinary machines to exchange
1860 e-mails with other systems speaking the SMTP protocol.")
1861 (home-page "https://www.opensmtpd.org")
1862 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
1863 public-domain isc license:openssl))))
1864
1865 (define-public opensmtpd-extras
1866 (package
1867 (name "opensmtpd-extras")
1868 (version "5.7.1")
1869 (source (origin
1870 (method url-fetch)
1871 (uri (string-append "https://www.opensmtpd.org/archives/"
1872 name "-" version ".tar.gz"))
1873 (sha256
1874 (base32
1875 "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm"))))
1876 (build-system gnu-build-system)
1877 (inputs
1878 `(("libressl" ,libressl)
1879 ("libevent" ,libevent)
1880 ("libasr" ,libasr)
1881 ("python-2" ,python-2)
1882 ("opensmtpd" ,opensmtpd)
1883 ("perl" ,perl)
1884 ("lua" ,lua)
1885 ("postgresql" ,postgresql)
1886 ("sqlite" ,sqlite)
1887 ("linux-pam" ,linux-pam)))
1888 (native-inputs
1889 `(("bison" ,bison)
1890 ("pkg-config" ,pkg-config)
1891 ("groff" ,groff)
1892 ("automake" ,automake)
1893 ("autoconf" ,autoconf)))
1894 (arguments
1895 `(;; We have to configure it like this because the default checks for for example
1896 ;; python in /usr/local/bin, /usr/bin and fails otherwise.
1897 #:configure-flags (list
1898 "--with-filter-clamav" "--with-filter-dkim-signer"
1899 "--with-filter-dnsbl" "--with-filter-lua"
1900 "--with-filter-monkey" "--with-filter-pause"
1901 "--with-filter-perl" "--with-filter-python"
1902 "--with-filter-regex" "--with-filter-spamassassin"
1903 "--with-filter-stub" "--with-filter-trace"
1904 "--with-filter-void"
1905
1906 "--with-queue-null" "--with-queue-python"
1907 "--with-queue-ram" "--with-queue-stub"
1908
1909 "--with-scheduler-python" "--with-scheduler-ram"
1910 "--with-scheduler-stub"
1911
1912 "--with-table-ldap" ; "--with-table-mysql"
1913 "--with-table-passwd" "--with-table-postgres"
1914 "--with-table-python" "--with-table-socketmap"
1915 "--with-table-sqlite" "--with-table-stub"
1916 ;;"--with-table-redis" ; TODO: package hiredis
1917
1918 "--with-user=smtpd" "--with-privsep-user=smtpd"
1919 "--localstatedir=/var" "--sysconfdir=/etc"
1920 "--with-lua-type=lua" ; can use lua or luajit
1921
1922 (string-append "--with-python="
1923 (assoc-ref %build-inputs "python-2"))
1924 (string-append "--with-lua="
1925 (assoc-ref %build-inputs "lua")))))
1926 (license (list bsd-2 bsd-3 bsd-4
1927 public-domain isc license:openssl))
1928 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
1929 (description
1930 "This package provides extra tables, filters, and various other addons
1931 for OpenSMTPD to extend its functionality.")
1932 (home-page "https://www.opensmtpd.org")))
1933
1934 (define-public python-mailmanclient
1935 (package
1936 (name "python-mailmanclient")
1937 (version "1.0.1")
1938 (source
1939 (origin
1940 (method url-fetch)
1941 (uri (pypi-uri "mailmanclient" version))
1942 (sha256
1943 (base32
1944 "1cfjh45fgbsax5hjj2inq9nk33dhdvh63xhysc8dhnqidgqgm8c5"))))
1945 (build-system python-build-system)
1946 (arguments
1947 `(#:tests? #f)) ; Requires mailman running
1948 (propagated-inputs
1949 `(("python-six" ,python-six)
1950 ("python-httplib2" ,python-httplib2)))
1951 (home-page "https://launchpad.net/mailman.client")
1952 (synopsis "Python bindings for the Mailman 3 REST API")
1953 (description
1954 "The mailmanclient library provides official Python bindings for
1955 the GNU Mailman 3 REST API.")
1956 (license lgpl3+)))
1957
1958 (define-public python2-mailmanclient
1959 (package-with-python2 python-mailmanclient))
1960
1961 (define-public mlmmj
1962 (package
1963 (name "mlmmj")
1964 (version "1.2.19.0")
1965 (source
1966 (origin
1967 (method url-fetch)
1968 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
1969 version ".tar.bz2"))
1970 (sha256
1971 (base32
1972 "1piwvcxkqadjwk5x8jicaiyz9nngmaj3w13ghdqgaki32xd7zk9v"))))
1973 (build-system gnu-build-system)
1974 (inputs
1975 `(("perl" ,perl))) ; For "contrib/web/"
1976 (native-inputs
1977 `(("pkg-config" ,pkg-config)))
1978 (arguments
1979 `(#:configure-flags
1980 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
1981 ;; It opens the files control/mimedeny and control/mimestrip to get a list
1982 ;; of mimetypes for parts of multipart/mime messages that should be denied
1983 ;; or stripped. The parts then get stripped directly when the mail is
1984 ;; received. mlmmj-receive-strip also appends an extra header
1985 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
1986 ;; mime parts
1987 (list "--enable-receive-strip")
1988 #:phases
1989 (modify-phases %standard-phases
1990 (add-before 'install 'install-contrib
1991 (lambda* (#:key outputs #:allow-other-keys)
1992 (let* ((out (assoc-ref outputs "out"))
1993 (share (string-append out "/share/mlmmj"))
1994 (contrib (string-append share "/contrib/web"))
1995 (texts (string-append share "/listtexts")))
1996 (copy-recursively "contrib/web/" contrib)
1997 (copy-recursively "listtexts" texts)
1998 (rename-file texts (string-append share "/texts"))
1999 #t))))))
2000 (home-page "http://mlmmj.org")
2001 (synopsis "Mailing list managing made joyful")
2002 (description
2003 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
2004 It works with many different Mail Transport Agents (MTAs) and is simple for a
2005 system adminstrator to install, configure and integrate with other software.
2006 As it uses very few resources, and requires no daemons, it is ideal for
2007 installation on systems where resources are limited. Its features include:
2008 @enumerate
2009 @item Archive, Custom headers / footer,
2010 @item Fully automated bounce handling (similar to ezmlm),
2011 @item Complete requeueing functionality, Moderation functionality, Subject prefix,
2012 @item Subscribers only posting, Regular expression access control,
2013 @item Functionality to retrieve old posts, Web interface, Digests,
2014 @item No-mail subscription, VERP support,
2015 @item Delivery Status Notification (RFC1891) support,
2016 @item Rich and customisable texts for automated operations.
2017 @end enumerate\n")
2018 (license license:expat)))
2019
2020 (define-public blists
2021 (package
2022 (name "blists")
2023 (version "1.0")
2024 (source
2025 (origin
2026 (method url-fetch)
2027 (uri (string-append "http://download.openwall.net/pub/projects/"
2028 "blists/blists-" version ".tar.gz"))
2029 (sha256
2030 (base32
2031 "1gp51kmb8yv8d693wcpdslmwlbw5w2kgz4kxhrcaf7y89w8wy4qd"))))
2032 (build-system gnu-build-system)
2033 (arguments
2034 `(#:tests? #f ; No tests
2035 #:phases
2036 (modify-phases %standard-phases
2037 (delete 'configure)
2038 (replace 'install
2039 (lambda* (#:key outputs #:allow-other-keys)
2040 (let* ((out (assoc-ref outputs "out"))
2041 (bin (string-append out "/bin")))
2042 (install-file "bindex" bin)
2043 (install-file "bit" bin)
2044 #t))))))
2045 (home-page "http://www.openwall.com/blists/")
2046 (synopsis "Web interface to mailing list archives")
2047 (description
2048 "Blists is a web interface to mailing list archives that works off
2049 indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
2050 @code{bindex} generates or updates the index file (incremental updates
2051 are supported). @code{bit} is a CGI/SSI program that generates web pages
2052 on the fly. Both programs are written in C and are very fast.")
2053 (license license:expat)))