gnu: dovecot: Update to 2.2.28.
[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 (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1464 version ".tar.bz2"))
1465 (sha256
1466 (base32
1467 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1468 (build-system gnu-build-system)
1469 (propagated-inputs
1470 `(("openssl" ,openssl)))
1471 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1472 (synopsis "Library for sending mail via remote hosts using SMTP")
1473 (description "libESMTP is an SMTP client which manages posting (or
1474 submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1475 It may be used as part of a Mail User Agent (MUA) or other program that must
1476 be able to post electronic mail where mail functionality may not be that
1477 program's primary purpose.")
1478 (license (list lgpl2.1+ gpl2+))))
1479
1480 (define-public esmtp
1481 (package
1482 (name "esmtp")
1483 (version "1.2")
1484 (source
1485 (origin
1486 (method git-fetch)
1487 (uri (git-reference
1488 (url "https://github.com/andywingo/esmtp.git")
1489 (commit "01bf9fc")))
1490 (sha256
1491 (base32
1492 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1493 (file-name (string-append name "-" version "-checkout"))))
1494 (arguments
1495 `(#:phases (modify-phases %standard-phases
1496 (add-before
1497 'configure 'autoconf
1498 (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
1499 (build-system gnu-build-system)
1500 (native-inputs
1501 `(("bison" ,bison)
1502 ("flex" ,flex)
1503 ("autoconf" ,autoconf)
1504 ("automake" ,automake)
1505 ("libtool" ,libtool)))
1506 (inputs
1507 `(("libesmtp" ,libesmtp)))
1508 (home-page "https://sourceforge.net/projects/esmtp/")
1509 (synopsis "Relay-only mail transfer agent (MTA)")
1510 (description "Esmtp is a simple relay-only mail transfer agent built using
1511 libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1512 user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1513 page for more on configuration. This package also provides minimal
1514 compatibility shims for the @command{sendmail}, @command{mailq}, and
1515 @command{newaliases} commands.")
1516 (license gpl2+)))
1517
1518 (define-public fdm
1519 (package
1520 (name "fdm")
1521 (version "1.9")
1522 (source (origin
1523 (method url-fetch)
1524 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1525 version "/fdm-"
1526 version ".tar.gz"))
1527 (file-name (string-append name "-" version ".tar.gz"))
1528 (sha256
1529 (base32 "054rscijahiza5f9qha79rg3siji3bk5mk10f8c2vqx7m4w6qh8n"))))
1530 (build-system gnu-build-system)
1531 (inputs
1532 `(("tdb" ,tdb)
1533 ("openssl" ,openssl)
1534 ("zlib" ,zlib)))
1535 (home-page "https://github.com/nicm/fdm")
1536 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1537 (description "fdm is a program designed to fetch mail from POP3
1538 or IMAP servers, or receive local mail from stdin, and
1539 deliver it in various ways.")
1540 (license
1541 ;; Why point to a source file? Well, all the individual files have a
1542 ;; copy of this license in their headers, but there's no seprate file
1543 ;; with that information.
1544 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
1545
1546
1547 (define-public procmail
1548 (package
1549 (name "procmail")
1550 (version "3.22")
1551 (source
1552 (origin
1553 (method url-fetch)
1554 (uri (string-append
1555 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1556 version
1557 ".tar.gz"))
1558 (sha256
1559 (base32
1560 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1561 ;; The following patch fixes an ambiguous definition of
1562 ;; getline() in formail.c. The patch is provided by Debian as
1563 ;; patch 24.
1564 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
1565 "procmail-CVE-2014-3618.patch"))))
1566 (arguments
1567 `(#:phases (modify-phases %standard-phases
1568 (replace 'configure
1569 (lambda _
1570 (substitute* "Makefile"
1571 (("/bin/sh")
1572 (which "sh"))
1573 (("/usr")
1574 (assoc-ref %outputs "out"))
1575 (("/bin/rm")
1576 (which "rm")))
1577 #t)))
1578 #:tests? #f)) ;; There are no tests indicating a successful
1579 ;; build. Some tests of basic locking mechanisms provided by the
1580 ;; file system are performed during 'make install'. However, these
1581 ;; are performed before the actual build process.
1582 (build-system gnu-build-system)
1583 (inputs `(("exim" ,exim)))
1584 (home-page "http://www.procmail.org/")
1585 (synopsis "Versatile mail delivery agent (MDA)")
1586 (description "Procmail is a mail delivery agent (MDA) featuring support
1587 for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1588 can be sorted into separate files/directories and arbitrary commands can be
1589 executed on mail arrival. Procmail is considered stable, but is no longer
1590 maintained.")
1591 (license gpl2+))) ;; procmail allows to choose the
1592 ;; nonfree Artistic License 1.0
1593 ;; as alternative to the GPL2+.
1594 ;; This option is not listed here.
1595
1596 (define-public khard
1597 (package
1598 (name "khard")
1599 (version "0.11.3")
1600 (source (origin
1601 (method url-fetch)
1602 (uri (pypi-uri name version))
1603 (sha256
1604 (base32
1605 "1v66khq5w17xdbkpb00pf9xbl84dlzx4lq286fvzskb949b3y4yn"))))
1606 (build-system python-build-system)
1607 (arguments
1608 `(#:phases
1609 (modify-phases %standard-phases
1610 (add-after 'install 'install-doc
1611 (lambda* (#:key outputs #:allow-other-keys)
1612 (let* ((out (assoc-ref outputs "out"))
1613 (doc (string-append out "/share/doc/khard")))
1614 (copy-recursively "misc/khard" doc)
1615 #t))))
1616 ;; FIXME: check phase fails with
1617 ;; "Config file /tmp/.config/khard/khard.conf not available"
1618 #:tests? #f))
1619 (propagated-inputs
1620 `(("python-vobject" ,python-vobject)
1621 ("python-pyyaml" ,python-pyyaml)
1622 ("python-atomicwrites" ,python-atomicwrites)
1623 ("python-configobj" ,python-configobj)))
1624 (synopsis "Console address book using CardDAV")
1625 (description "Khard is an address book for the console. It creates, reads,
1626 modifies and removes CardDAV address book entries at your local machine. For
1627 synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1628 Khard can also be used from within the email client @command{mutt}.")
1629 (home-page "https://github.com/scheibler/khard")
1630 (license gpl3+)))
1631
1632 (define-public perl-mail-spf
1633 (package
1634 (name "perl-mail-spf")
1635 (version "v2.9.0")
1636 (source
1637 (origin
1638 (method url-fetch)
1639 (uri (string-append
1640 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-"
1641 version
1642 ".tar.gz"))
1643 (sha256
1644 (base32
1645 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1646 (build-system perl-build-system)
1647 (native-inputs
1648 `(("perl-module-build" ,perl-module-build)
1649 ("perl-net-dns-resolver-programmable"
1650 ,perl-net-dns-resolver-programmable)))
1651 (arguments
1652 `(#:phases (modify-phases %standard-phases
1653 (add-before 'configure 'modify-Build.PL
1654 (lambda* (#:key outputs #:allow-other-keys)
1655 (substitute* "Build.PL"
1656 (("'/usr/sbin'") (string-append "'"
1657 (assoc-ref outputs "out")
1658 "/sbin'")))
1659 #t)))))
1660 (inputs
1661 `(("perl-error" ,perl-error)
1662 ("perl-net-dns" ,perl-net-dns)
1663 ("perl-netaddr-ip" ,perl-netaddr-ip)
1664 ("perl-uri" ,perl-uri)))
1665 (home-page
1666 "http://search.cpan.org/dist/Mail-SPF")
1667 (synopsis
1668 "Perl implementation of Sender Policy Framework")
1669 (description "Mail::SPF is the Sender Policy Framework implemented
1670 in Perl.")
1671 (license bsd-3)))
1672
1673 (define-public mb2md
1674 (package
1675 (name "mb2md")
1676 (version "3.20")
1677 (source (origin
1678 (method url-fetch)
1679 (uri (string-append
1680 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
1681 version ".pl.gz"))
1682 (sha256
1683 (base32
1684 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
1685 (build-system trivial-build-system)
1686 (arguments
1687 '(#:modules ((guix build utils))
1688 #:builder
1689 (begin
1690 (use-modules (guix build utils))
1691 (let* ((source (assoc-ref %build-inputs "source"))
1692 (out (assoc-ref %outputs "out"))
1693 (bin (string-append out "/bin"))
1694 (perl (assoc-ref %build-inputs "perl"))
1695 (gzip (assoc-ref %build-inputs "gzip"))
1696 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
1697 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
1698 (mkdir-p bin)
1699 (with-directory-excursion bin
1700 (copy-file source "mb2md.gz")
1701 (system* (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
1702 (substitute* "mb2md"
1703 (("#!/usr/bin/perl")
1704 (string-append "#!/usr/bin/perl -I " perl5lib)))
1705 (patch-shebang "mb2md" (list (string-append perl "/bin")))
1706 (chmod "mb2md" #o555))
1707 #t))))
1708 (native-inputs `(("gzip", gzip)))
1709 (inputs `(("perl" ,perl)
1710 ("perl-timedate" ,perl-timedate)))
1711 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
1712 (synopsis "Mbox to maildir converter")
1713 (description
1714 "Mb2md is a Perl script that takes one or more mbox format files and
1715 converts them to maildir format directories.")
1716 (license public-domain)))
1717
1718 (define-public mpop
1719 (package
1720 (name "mpop")
1721 (version "1.2.6")
1722 (source
1723 (origin
1724 (method url-fetch)
1725 (uri (string-append "mirror://sourceforge/mpop/mpop/" version
1726 "/mpop-" version ".tar.xz"))
1727 (sha256
1728 (base32
1729 "0p1ix63jh64dibrlccch8q7gxl9nn18wd2qpyr5z1h4gs2fpmv4z"))))
1730 (build-system gnu-build-system)
1731 (inputs
1732 `(("gnutls" ,gnutls)
1733 ("libidn" ,libidn)))
1734 (native-inputs
1735 `(("pkg-config" ,pkg-config)))
1736 (arguments
1737 `(#:configure-flags (list "--with-tls=gnutls")))
1738 (home-page "http://mpop.sourceforge.net/")
1739 (synopsis "POP3 mail client")
1740 (description "mpop is a small and fast POP3 client suitable as a
1741 fetchmail replacement.
1742
1743 mpop supports multiple accounts, header based mail filtering, delivery
1744 to mbox files, maildir folders or a Mail Delivery Agent (MDA),
1745 TLS/SSL, several authentication methods, Internationalized Domain
1746 Names (IDN) and SOCKS proxies.")
1747 (license gpl3+)))
1748
1749 (define-public mhonarc
1750 (package
1751 (name "mhonarc")
1752 (version "2.6.19")
1753 (source
1754 (origin
1755 (method url-fetch)
1756 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
1757 version ".tar.gz"))
1758 (sha256
1759 (base32
1760 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
1761 (build-system perl-build-system)
1762 (home-page "https://www.mhonarc.org/")
1763 (synopsis "Create HTML archives of mail/news messages")
1764 (description
1765 "MHonArc is a Perl mail-to-HTML converter. MHonArc
1766 provides HTML mail archiving with index, mail thread linking,
1767 etc; plus other capabilities including support for MIME and
1768 powerful user customization features.")
1769 (license gpl2+)))
1770
1771
1772 (define-public sendmail
1773 (package
1774 (name "sendmail")
1775 (version "8.15.2")
1776 (source
1777 (origin
1778 (method url-fetch)
1779 (uri (string-append
1780 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
1781 version ".tar.gz"))
1782 (sha256
1783 (base32
1784 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
1785 (build-system gnu-build-system)
1786 (arguments
1787 `(#:phases
1788 (modify-phases %standard-phases
1789 (add-before 'build 'replace-/bin/sh
1790 (lambda _
1791 (substitute*
1792 (append
1793 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
1794 "contrib/mmuegel" "devtools/bin/configure.sh")
1795 (find-files "." ".*\\.m4")
1796 (find-files "." ".*\\.cf"))
1797 (("/bin/sh") (which "sh")))
1798
1799 (substitute* "devtools/bin/Build"
1800 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
1801 #t))
1802 (replace 'configure
1803 (lambda _
1804
1805 ;; Render harmless any attempts to chown or chgrp
1806 (substitute* "devtools/bin/install.sh"
1807 (("owner=\\$2") "owner=''")
1808 (("group=\\$2") "group=''"))
1809
1810 (with-output-to-file "devtools/Site/site.config.m4"
1811 (lambda ()
1812 (format #t "
1813 define(`confCC', `gcc')
1814 define(`confOPTIMIZE', `-g -O2')
1815 define(`confLIBS', `-lresolv')
1816 define(`confINSTALL', `~a/devtools/bin/install.sh')
1817 define(`confDEPEND_TYPE', `CC-M')
1818 define(`confINST_DEP', `')
1819 " (getcwd))))))
1820 (replace 'build
1821 (lambda _
1822 (and (zero? (system* "sh" "Build"))
1823 (with-directory-excursion "cf/cf"
1824 (begin
1825 (copy-file "generic-linux.mc" "sendmail.mc")
1826 (zero? (system* "sh" "Build" "sendmail.cf")))))))
1827 (add-before 'install 'pre-install
1828 (lambda _
1829 (let ((out (assoc-ref %outputs "out")))
1830 (mkdir-p (string-append out "/usr/bin"))
1831 (mkdir-p (string-append out "/usr/sbin"))
1832 (mkdir-p (string-append out "/etc/mail"))
1833 (setenv "DESTDIR" out)
1834 (with-directory-excursion "cf/cf"
1835 (zero? (system* "sh" "Build" "install-cf")))))))
1836 ;; There is no make check. There are some post installation tests, but those
1837 ;; require root privileges
1838 #:tests? #f))
1839 (inputs
1840 `(("m4" ,m4)
1841 ("perl" ,perl)))
1842 (home-page "http://sendmail.org")
1843 (synopsis
1844 "Highly configurable Mail Transfer Agent (MTA)")
1845 (description
1846 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
1847 Allman. It is highly configurable and supports many delivery methods and many
1848 transfer protocols.")
1849 (license (non-copyleft "file://LICENSE"
1850 "See LICENSE in the distribution."))))
1851
1852 (define-public opensmtpd
1853 (package
1854 (name "opensmtpd")
1855 (version "6.0.2p1")
1856 (source (origin
1857 (method url-fetch)
1858 (uri (string-append "https://www.opensmtpd.org/archives/"
1859 name "-" version ".tar.gz"))
1860 (sha256
1861 (base32
1862 "1b4h64w45hpmfq5721smhg4s0shs64gbcjqjpx3fbiw4hz8bdy9a"))))
1863 (build-system gnu-build-system)
1864 (inputs
1865 `(("bdb" ,bdb)
1866 ("libressl" ,libressl)
1867 ("libevent" ,libevent)
1868 ("libasr" ,libasr)
1869 ("linux-pam" ,linux-pam)
1870 ("zlib" ,zlib)))
1871 (native-inputs
1872 `(("bison" ,bison)
1873 ("groff" ,groff)))
1874 (arguments
1875 `(#:configure-flags
1876 (list "--with-table-db" "--localstatedir=/var"
1877 "--with-user-smtpd=smtpd" "--with-user-queue=smtpq"
1878 "--with-group-queue=smtpq"
1879 "--with-path-socket=/var/run"
1880 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt")
1881 #:phases
1882 (modify-phases %standard-phases
1883 ;; OpenSMTPD provides a single utility smtpctl to control the daemon and
1884 ;; the local submission subsystem. To accomodate systems that require
1885 ;; historical interfaces such as sendmail, newaliases or makemap, the
1886 ;; smtpctl utility can operate in compatibility mode if called with the
1887 ;; historical name.
1888 (add-after 'install 'install-compabilitymode
1889 (lambda _
1890 (let* ((out (assoc-ref %outputs "out"))
1891 (sbin (string-append out "/sbin/")))
1892 (for-each (lambda (cmd)
1893 (symlink "smtpctl" (string-append sbin cmd)))
1894 '("makemap" "sendmail" "send-mail"
1895 "newaliases" "mailq")))
1896 #t)))))
1897 (synopsis "Lightweight SMTP daemon")
1898 (description
1899 "OpenSMTPD is an implementation of the server-side SMTP protocol, with
1900 some additional standard extensions. It allows ordinary machines to exchange
1901 e-mails with other systems speaking the SMTP protocol.")
1902 (home-page "https://www.opensmtpd.org")
1903 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
1904 public-domain isc license:openssl))))
1905
1906 (define-public opensmtpd-extras
1907 (package
1908 (name "opensmtpd-extras")
1909 (version "5.7.1")
1910 (source (origin
1911 (method url-fetch)
1912 (uri (string-append "https://www.opensmtpd.org/archives/"
1913 name "-" version ".tar.gz"))
1914 (sha256
1915 (base32
1916 "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm"))))
1917 (build-system gnu-build-system)
1918 (inputs
1919 `(("libressl" ,libressl)
1920 ("libevent" ,libevent)
1921 ("libasr" ,libasr)
1922 ("python-2" ,python-2)
1923 ("opensmtpd" ,opensmtpd)
1924 ("perl" ,perl)
1925 ("lua" ,lua)
1926 ("postgresql" ,postgresql)
1927 ("sqlite" ,sqlite)
1928 ("linux-pam" ,linux-pam)))
1929 (native-inputs
1930 `(("bison" ,bison)
1931 ("pkg-config" ,pkg-config)
1932 ("groff" ,groff)
1933 ("automake" ,automake)
1934 ("autoconf" ,autoconf)))
1935 (arguments
1936 `(;; We have to configure it like this because the default checks for for example
1937 ;; python in /usr/local/bin, /usr/bin and fails otherwise.
1938 #:configure-flags (list
1939 "--with-filter-clamav" "--with-filter-dkim-signer"
1940 "--with-filter-dnsbl" "--with-filter-lua"
1941 "--with-filter-monkey" "--with-filter-pause"
1942 "--with-filter-perl" "--with-filter-python"
1943 "--with-filter-regex" "--with-filter-spamassassin"
1944 "--with-filter-stub" "--with-filter-trace"
1945 "--with-filter-void"
1946
1947 "--with-queue-null" "--with-queue-python"
1948 "--with-queue-ram" "--with-queue-stub"
1949
1950 "--with-scheduler-python" "--with-scheduler-ram"
1951 "--with-scheduler-stub"
1952
1953 "--with-table-ldap" ; "--with-table-mysql"
1954 "--with-table-passwd" "--with-table-postgres"
1955 "--with-table-python" "--with-table-socketmap"
1956 "--with-table-sqlite" "--with-table-stub"
1957 ;;"--with-table-redis" ; TODO: package hiredis
1958
1959 "--with-user=smtpd" "--with-privsep-user=smtpd"
1960 "--localstatedir=/var" "--sysconfdir=/etc"
1961 "--with-lua-type=lua" ; can use lua or luajit
1962
1963 (string-append "--with-python="
1964 (assoc-ref %build-inputs "python-2"))
1965 (string-append "--with-lua="
1966 (assoc-ref %build-inputs "lua")))))
1967 (license (list bsd-2 bsd-3 bsd-4
1968 public-domain isc license:openssl))
1969 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
1970 (description
1971 "This package provides extra tables, filters, and various other addons
1972 for OpenSMTPD to extend its functionality.")
1973 (home-page "https://www.opensmtpd.org")))
1974
1975 (define-public python-mailmanclient
1976 (package
1977 (name "python-mailmanclient")
1978 (version "1.0.1")
1979 (source
1980 (origin
1981 (method url-fetch)
1982 (uri (pypi-uri "mailmanclient" version))
1983 (sha256
1984 (base32
1985 "1cfjh45fgbsax5hjj2inq9nk33dhdvh63xhysc8dhnqidgqgm8c5"))))
1986 (build-system python-build-system)
1987 (arguments
1988 `(#:tests? #f)) ; Requires mailman running
1989 (propagated-inputs
1990 `(("python-six" ,python-six)
1991 ("python-httplib2" ,python-httplib2)))
1992 (home-page "https://launchpad.net/mailman.client")
1993 (synopsis "Python bindings for the Mailman 3 REST API")
1994 (description
1995 "The mailmanclient library provides official Python bindings for
1996 the GNU Mailman 3 REST API.")
1997 (license lgpl3+)))
1998
1999 (define-public python2-mailmanclient
2000 (package-with-python2 python-mailmanclient))
2001
2002 (define-public mlmmj
2003 (package
2004 (name "mlmmj")
2005 (version "1.2.19.0")
2006 (source
2007 (origin
2008 (method url-fetch)
2009 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
2010 version ".tar.bz2"))
2011 (sha256
2012 (base32
2013 "1piwvcxkqadjwk5x8jicaiyz9nngmaj3w13ghdqgaki32xd7zk9v"))))
2014 (build-system gnu-build-system)
2015 (inputs
2016 `(("perl" ,perl))) ; For "contrib/web/"
2017 (native-inputs
2018 `(("pkg-config" ,pkg-config)))
2019 (arguments
2020 `(#:configure-flags
2021 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
2022 ;; It opens the files control/mimedeny and control/mimestrip to get a list
2023 ;; of mimetypes for parts of multipart/mime messages that should be denied
2024 ;; or stripped. The parts then get stripped directly when the mail is
2025 ;; received. mlmmj-receive-strip also appends an extra header
2026 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
2027 ;; mime parts
2028 (list "--enable-receive-strip")
2029 #:phases
2030 (modify-phases %standard-phases
2031 (add-before 'install 'install-contrib
2032 (lambda* (#:key outputs #:allow-other-keys)
2033 (let* ((out (assoc-ref outputs "out"))
2034 (share (string-append out "/share/mlmmj"))
2035 (contrib (string-append share "/contrib/web"))
2036 (texts (string-append share "/listtexts")))
2037 (copy-recursively "contrib/web/" contrib)
2038 (copy-recursively "listtexts" texts)
2039 (rename-file texts (string-append share "/texts"))
2040 #t))))))
2041 (home-page "http://mlmmj.org")
2042 (synopsis "Mailing list managing made joyful")
2043 (description
2044 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
2045 It works with many different Mail Transport Agents (MTAs) and is simple for a
2046 system adminstrator to install, configure and integrate with other software.
2047 As it uses very few resources, and requires no daemons, it is ideal for
2048 installation on systems where resources are limited. Its features include:
2049 @enumerate
2050 @item Archive, Custom headers / footer,
2051 @item Fully automated bounce handling (similar to ezmlm),
2052 @item Complete requeueing functionality, Moderation functionality, Subject prefix,
2053 @item Subscribers only posting, Regular expression access control,
2054 @item Functionality to retrieve old posts, Web interface, Digests,
2055 @item No-mail subscription, VERP support,
2056 @item Delivery Status Notification (RFC1891) support,
2057 @item Rich and customisable texts for automated operations.
2058 @end enumerate\n")
2059 (license license:expat)))
2060
2061 (define-public blists
2062 (package
2063 (name "blists")
2064 (version "1.0")
2065 (source
2066 (origin
2067 (method url-fetch)
2068 (uri (string-append "http://download.openwall.net/pub/projects/"
2069 "blists/blists-" version ".tar.gz"))
2070 (sha256
2071 (base32
2072 "1gp51kmb8yv8d693wcpdslmwlbw5w2kgz4kxhrcaf7y89w8wy4qd"))))
2073 (build-system gnu-build-system)
2074 (arguments
2075 `(#:tests? #f ; No tests
2076 #:phases
2077 (modify-phases %standard-phases
2078 (delete 'configure)
2079 (replace 'install
2080 (lambda* (#:key outputs #:allow-other-keys)
2081 (let* ((out (assoc-ref outputs "out"))
2082 (bin (string-append out "/bin")))
2083 (install-file "bindex" bin)
2084 (install-file "bit" bin)
2085 #t))))))
2086 (home-page "http://www.openwall.com/blists/")
2087 (synopsis "Web interface to mailing list archives")
2088 (description
2089 "Blists is a web interface to mailing list archives that works off
2090 indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
2091 @code{bindex} generates or updates the index file (incremental updates
2092 are supported). @code{bit} is a CGI/SSI program that generates web pages
2093 on the fly. Both programs are written in C and are very fast.")
2094 (license license:expat)))
2095
2096 (define-public swaks
2097 (package
2098 (name "swaks")
2099 (version "20170101.0")
2100 (source
2101 (origin
2102 (method url-fetch)
2103 (uri (string-append
2104 "http://jetmore.org/john/code/swaks/files/swaks-"
2105 version ".tar.gz"))
2106 (sha256
2107 (base32
2108 "0pli4mlhasnqqxmmxalwyg3x7n2vhcbgsnp2xgddamjavv82vrl4"))))
2109 (build-system perl-build-system)
2110 (inputs
2111 `(("perl-net-dns" ,perl-net-dns)
2112 ("perl-net-ssleay" ,perl-net-ssleay)))
2113 (arguments
2114 `(#:tests? #f ; No tests
2115 #:phases
2116 (modify-phases %standard-phases
2117 (delete 'configure)
2118 (replace 'build
2119 (lambda _
2120 (zero? (system* "pod2man" "doc/ref.pod" "swaks.1"))))
2121 (replace 'install
2122 (lambda* (#:key outputs #:allow-other-keys)
2123 (let ((out (assoc-ref outputs "out")))
2124 (install-file "swaks" (string-append out "/bin"))
2125 (install-file "swaks.1" (string-append out "/share/man/man1")))
2126 #t))
2127 (add-after 'install 'wrap-program
2128 (lambda* (#:key outputs #:allow-other-keys)
2129 (wrap-program (string-append (assoc-ref outputs "out")
2130 "/bin/swaks")
2131 `("PERL5LIB" ":" = (,(getenv "PERL5LIB"))))
2132 #t)))))
2133 (home-page "http://jetmore.org/john/code/swaks/")
2134 (synopsis "Featureful SMTP test tool")
2135 (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
2136 test tool. It handles SMTP features and extensions such as TLS,
2137 authentication, and pipelining; multiple versions of the SMTP protocol
2138 including SMTP, ESMTP, and LMTP; and multiple transport methods including
2139 unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
2140 Options can be specified in environment variables, configuration files, and
2141 the command line allowing maximum configurability and ease of use for
2142 operators and scripters.")
2143 (license gpl2+)))