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>
25 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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 curl)
48 #:use-module (gnu packages cyrus-sasl)
49 #:use-module (gnu packages databases)
50 #:use-module (gnu packages dejagnu)
51 #:use-module (gnu packages dns)
52 #:use-module (gnu packages documentation)
53 #:use-module (gnu packages emacs)
54 #:use-module (gnu packages enchant)
55 #:use-module (gnu packages ghostscript)
56 #:use-module (gnu packages glib)
57 #:use-module (gnu packages gnome)
58 #:use-module (gnu packages gnupg)
59 #:use-module (gnu packages groff)
60 #:use-module (gnu packages gsasl)
61 #:use-module (gnu packages gtk)
62 #:use-module (gnu packages guile)
63 #:use-module (gnu packages flex)
64 #:use-module (gnu packages libcanberra)
65 #:use-module (gnu packages libevent)
66 #:use-module (gnu packages libidn)
67 #:use-module (gnu packages linux)
68 #:use-module (gnu packages lua)
69 #:use-module (gnu packages m4)
70 #:use-module (gnu packages ncurses)
71 #:use-module (gnu packages pcre)
72 #:use-module (gnu packages perl)
73 #:use-module (gnu packages python)
74 #:use-module (gnu packages readline)
75 #:use-module (gnu packages search)
76 #:use-module (gnu packages texinfo)
77 #:use-module (gnu packages compression)
78 #:use-module (gnu packages glib)
79 #:use-module (gnu packages pkg-config)
80 #:use-module (gnu packages flex)
81 #:use-module (gnu packages gdb)
82 #:use-module (gnu packages man)
83 #:use-module (gnu packages ruby)
84 #:use-module (gnu packages samba)
85 #:use-module (gnu packages screen)
86 #:use-module (gnu packages tls)
87 #:use-module (gnu packages networking)
88 #:use-module (gnu packages web)
89 #:use-module (gnu packages xml)
90 #:use-module (gnu packages xorg)
91 #:use-module (gnu packages docbook)
92 #:use-module ((guix licenses)
93 #:select (gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+
94 non-copyleft (expat . license:expat) bsd-3
95 public-domain bsd-4 isc (openssl . license:openssl)
97 #:use-module (guix packages)
98 #:use-module (guix download)
99 #:use-module (guix git-download)
100 #:use-module (guix utils)
101 #:use-module (guix build-system gnu)
102 #:use-module (guix build-system perl)
103 #:use-module (guix build-system python)
104 #:use-module (guix build-system trivial))
106 (define-public mailutils
112 (uri (string-append "mirror://gnu/mailutils/mailutils-"
116 "1dpylyg79avi7brpkcmzaq7bqqkz45flp0ws6f2c8b1gyz4hdnzm"))))
117 (build-system gnu-build-system)
120 (modify-phases %standard-phases
121 (add-before 'build 'pre-build
123 ;; Use the right file name for `cat'.
124 (substitute* "testsuite/lib/mailutils.exp"
128 ;; Tests try to invoke 'maidag' such that it looks up the
129 ;; 'root' user, which does not exist in the build
131 (substitute* "maidag/tests/testsuite"
132 (("root <") "nobody <")
133 (("spool/root") "spool/nobody")
134 (("root@localhost") "nobody@localhost"))
136 ;; The 'pipeact.at' tests generate a shell script; make
137 ;; sure it uses the right shell.
138 (substitute* '("sieve/tests/testsuite"
139 "mh/tests/testsuite")
141 (string-append "#!" (which "sh"))))
143 (substitute* "mh/tests/testsuite"
144 (("moreproc: /bin/cat")
145 (string-append "moreproc: " (which "cat"))))
147 ;; XXX: The comsatd tests rely on being able to open
148 ;; /dev/tty, but that gives ENODEV in the build
149 ;; environment. Thus, ignore test failures here.
150 (substitute* "comsat/tests/Makefile.in"
151 (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
152 (string-append "-" all)))
155 ;; TODO: Add `--with-sql'.
156 #:configure-flags '("--sysconfdir=/etc")
157 #:parallel-tests? #f))
159 `(("dejagnu" ,dejagnu)
165 ("readline" ,readline)
166 ("linux-pam" ,linux-pam)
169 (home-page "https://www.gnu.org/software/mailutils/")
170 (synopsis "Utilities and library for reading and serving mail")
172 "GNU Mailutils is a collection of programs for managing, viewing and
173 processing electronic mail. It contains both utilities and server daemons
174 and all operate in a protocol-agnostic way. The underlying libraries are
175 also available, simplifying the addition of mail capabilities to new
178 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
179 (list gpl3+ lgpl3+))))
181 (define-public fetchmail
187 (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-"
191 "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r"))))
192 (build-system gnu-build-system)
194 `(("openssl" ,openssl)))
196 `(#:configure-flags (list (string-append "--with-ssl="
197 (assoc-ref %build-inputs "openssl")))))
198 (home-page "http://www.fetchmail.info/")
199 (synopsis "Remote-mail retrieval and forwarding utility")
201 "Fetchmail is a full-featured, robust, well-documented remote-mail
202 retrieval and forwarding utility intended to be used over on-demand
203 TCP/IP links (such as SLIP or PPP connections). It supports every
204 remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
205 KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
208 Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
209 so it can then be read by normal mail user agents such as mutt, elm
210 or BSD Mail. It allows all your system MTA's filtering, forwarding, and
211 aliasing facilities to work just as they would on normal mail.")
212 (license gpl2+))) ; most files are actually public domain or x11
220 (uri (string-append "ftp://ftp.mutt.org/pub/mutt/mutt-"
224 "1axdcylyv0p194y6lj1jx127g5yc74zqzzxdc014cjw02bd1x125"))
225 (patches (search-patches "mutt-store-references.patch"))))
226 (build-system gnu-build-system)
228 `(("cyrus-sasl" ,cyrus-sasl)
235 `(#:configure-flags '("--enable-smtp"
239 "--enable-hcache" ; for header caching
243 ;; so that mutt does not check whether the path
244 ;; exists, which it does not in the chroot
245 "--with-mailpath=/var/mail")))
246 (home-page "http://www.mutt.org/")
247 (synopsis "Mail client")
249 "Mutt is a small but very powerful text-based mail client for Unix
253 (define-public neomutt
261 (uri (string-append "https://github.com/" name "/" name
262 "/archive/" name "-" version ".tar.gz"))
263 (file-name (string-append name "-" version ".tar.gz"))
266 "00ll35g9pcanzrxsjp09vrmq6flml249dipcznrq2z4jy2zd386p"))))
268 `(("cyrus-sasl" ,cyrus-sasl)
271 ("tokyocabinet" ,tokyocabinet)
275 ("openssl" ,openssl) ;For smime
280 ("docbook-xsl" ,docbook-xsl)
281 ("notmuch" ,notmuch)))
283 `(("autoconf" ,autoconf)
284 ("automake" ,automake)
285 ("pkg-config" ,pkg-config)))
288 (list "--enable-smtp"
293 ;; database, implies header caching
294 ;; neomutt supports building multiple backends
295 "--with-tokyocabinet"
310 ;; If we do not set this, neomutt wants to check
311 ;; whether the path exists, which it does not
312 ;; in the chroot. The workaround is this.
313 "--with-mailpath=/var/mail"
315 "--with-external-dotlock"
317 "--enable-compressed"
319 (string-append "--with-curses="
320 (assoc-ref %build-inputs "ncurses")))
322 (modify-phases %standard-phases
323 (add-after 'unpack 'autoconf
325 (zero? (system* "sh" "autoreconf" "-vfi")))))))
326 (home-page "https://www.neomutt.org/")
327 (synopsis "Command-line mail reader based on Mutt")
329 "NeoMutt is a command-line mail reader which is based on mutt.
330 It adds a large amount of features to mutt, and they all find their way
331 into mutt, so it is not a fork but a large set of feature patches.")))
339 (uri (string-append "mirror://gnome/sources/gmime/"
340 (version-major+minor version)
341 "/gmime-" version ".tar.xz"))
344 "0fjmsphvz8srsmcdl4v13p2z4jp2migaybyny444hal4snbr0py2"))))
345 (build-system gnu-build-system)
347 `(("pkg-config" ,pkg-config)
348 ("gnupg" ,gnupg))) ; for tests only
349 (inputs `(("glib" ,glib)
354 (modify-phases %standard-phases
356 'unpack 'patch-paths-in-tests
358 ;; The test programs run several programs using 'system' with
359 ;; hard-coded paths. Here we patch them all.
360 ;; We use ISO-8859-1 here because test-iconv.c contains
361 ;; raw byte sequences in several different encodings.
362 (with-fluids ((%default-port-encoding #f))
363 (substitute* (find-files "tests" "\\.c$")
364 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
365 (let* ((base (basename prog-path))
368 (or prog (error "not found: " base))))))))))))
369 (home-page "http://spruce.sourceforge.net/gmime/")
370 (synopsis "MIME message parser and creator library")
372 "GMime provides a core library and set of utilities which may be used for
373 the creation and parsing of messages using the Multipurpose Internet Mail
375 (license (list lgpl2.1+ gpl2+ gpl3+))))
377 (define-public bogofilter
383 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-"
384 version "/bogofilter-"
388 "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1"))))
389 (build-system gnu-build-system)
392 (modify-phases %standard-phases
393 (add-before 'check 'pre-check
395 (substitute* "src/tests/t.frame"
397 (string-append "GREP=" (which "grep") "\n")))
399 (native-inputs `(("flex" ,flex)))
400 (inputs `(("bdb" ,bdb)))
401 (home-page "http://bogofilter.sourceforge.net/")
402 (synopsis "Mail classifier based on a Bayesian filter")
404 "Bogofilter is a mail filter that classifies mail as spam or ham
405 (non-spam) by a statistical analysis of the message's header and
406 content (body). The program is able to learn from the user's classifications
407 and corrections. It is based on a Bayesian filter.")
410 (define-public offlineimap
416 (uri (string-append "https://github.com/OfflineIMAP/offlineimap/"
417 "archive/v" version ".tar.gz"))
418 (file-name (string-append name "-" version ".tar.gz"))
421 "1kl72wcxnxb4y5lm2f7ymwjsisnnpwb4w971ajkxlsiwjhzq8i7p"))))
422 (build-system python-build-system)
424 `(("asciidoc" ,asciidoc)
425 ("libxslt" ,libxslt))) ; for xsltproc
426 (inputs `(("python2-pysqlite" ,python2-pysqlite)
427 ("python2-six" ,python2-six)))
429 ;; The setup.py script expects python-2.
431 ;; Tests require a modifiable IMAP account.
434 (modify-phases %standard-phases
435 (add-after 'build 'build-documentation
437 (substitute* "docs/Makefile"
438 ;; Prevent xmllint and xsltproc from downloading a DTD file.
439 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
440 (zero? (system* "make" "-C" "docs" "man"))))
441 (add-after 'install 'install-documentation
442 (lambda* (#:key outputs #:allow-other-keys)
443 (let* ((out (assoc-ref outputs "out"))
444 (man (string-append out "/share/man")))
445 (install-file "docs/offlineimap.1" (string-append man "/man1"))
446 (install-file "docs/offlineimapui.7" (string-append man "/man7"))
448 (add-after 'install-documentation 'wrap-binary
449 (lambda* (#:key outputs #:allow-other-keys)
450 (let* ((out (assoc-ref outputs "out"))
451 (bin (string-append out "/bin/offlineimap")))
453 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
455 (home-page "http://www.offlineimap.org")
456 (synopsis "Sync emails between two repositories")
458 "OfflineImap synchronizes emails between two repositories, so that you
459 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
460 repository and Maildir/IMAP as LOCAL repository.")
463 (define-public emacs-mew
469 (uri (string-append "http://mew.org/Release/mew-"
473 "03fzky2kz73vgx4cbps2psbbnrgqgkk5q7jwfldisymkzr9iz03y"))))
477 `(("ruby-sqlite3" ,ruby-sqlite3) ; optional for the database of messages
478 ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
479 (build-system gnu-build-system)
481 (let ((elisp-dir "/share/emacs/site-lisp/guix.d/mew")
482 (icon-dir "/share/mew"))
483 `(#:modules ((guix build gnu-build-system)
485 (guix build emacs-utils))
486 #:imported-modules (,@%gnu-build-system-modules
487 (guix build emacs-utils))
489 (list (string-append "--with-elispdir=" %output ,elisp-dir)
490 (string-append "--with-etcdir=" %output ,icon-dir))
492 (modify-phases %standard-phases
493 (add-after 'configure 'patch-mew-icon-directory
494 (lambda* (#:key outputs #:allow-other-keys)
495 (emacs-substitute-sexps "mew-key.el"
496 ("(def.* mew-icon-directory"
498 (add-to-list 'image-load-path 'mew-icon-directory)
499 ,(string-append (assoc-ref outputs "out") ,icon-dir))))
501 (add-after 'install 'generate-autoloads
502 (lambda* (#:key outputs #:allow-other-keys)
503 (emacs-generate-autoloads
504 "mew" (string-append (assoc-ref outputs "out") ,elisp-dir))
507 (home-page "http://www.mew.org")
508 (synopsis "Emacs e-mail client")
509 (description "Mew (Messaging in the Emacs World) is a user interface
510 for text messages, multimedia messages (MIME), news articles and
511 security functionality including PGP, S/MIME, SSH, and SSL.")
520 (uri (string-append "https://github.com/djcb/mu/releases/"
521 "download/" version "/mu-"
525 "02g82zvxfgn17wzy846bfxj0izjj7yklhwdnhwxy1y2kin4fqnb5"))))
526 (build-system gnu-build-system)
528 `(("pkg-config" ,pkg-config)
529 ("glib" ,glib "bin") ; for gtester
530 ("emacs" ,emacs-minimal)))
531 ;; TODO: Add webkit and gtk to build the mug GUI.
537 ("tzdata" ,tzdata))) ;for mu/test/test-mu-query.c
539 `(#:modules ((guix build gnu-build-system)
541 (guix build emacs-utils))
542 #:imported-modules (,@%gnu-build-system-modules
543 (guix build emacs-utils))
545 (modify-phases %standard-phases
546 (add-after 'unpack 'patch-configure
547 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
548 ;; so our Emacs package can't find it. Setting "--with-lispdir"
549 ;; configure flag doesn't help because "mu4e" will be added to
550 ;; the lispdir anyway, so we have to modify "configure.ac".
552 (substitute* "configure"
553 (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") ""))
555 (add-before 'check 'check-tz-setup
556 (lambda* (#:key inputs #:allow-other-keys)
557 ;; For mu/test/test-mu-query.c
559 (string-append (assoc-ref inputs "tzdata")
562 (add-after 'install 'install-emacs-autoloads
563 (lambda* (#:key outputs #:allow-other-keys)
564 (emacs-generate-autoloads
566 (string-append (assoc-ref outputs "out")
567 "/share/emacs/site-lisp"))
569 (home-page "http://www.djcbsoftware.nl/code/mu/")
570 (synopsis "Quickly find emails")
572 "Mu is a tool for dealing with e-mail messages stored in the
573 Maildir-format. Mu's purpose in life is to help you to quickly find the
574 messages you need; in addition, it allows you to view messages, extract
575 attachments, create new maildirs, and so on.")
584 ;; package author intends on distributing via github rather
586 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
587 (uri (string-append "https://github.com/pazz/alot/archive/"
589 (file-name (string-append "alot-" version ".tar.gz"))
592 "0sl1kl2fhkv208llnbny4blcvrfdk4vx6bcw5pnyh9ylwb0pipi2"))))
593 (build-system python-build-system)
595 `(#:tests? #f ; no tests
596 ;; python 3 is currently unsupported, more info:
597 ;; https://github.com/pazz/alot/blob/master/docs/source/faq.rst
600 `(("python2-magic" ,python2-magic)
601 ("python2-configobj" ,python2-configobj)
602 ("python2-twisted" ,python2-twisted)
603 ("python2-urwid" ,python2-urwid)
604 ("python2-urwidtrees" ,python2-urwidtrees)
605 ("python2-pygpgme" ,python2-pygpgme)
606 ("python2-notmuch" ,python2-notmuch)))
607 (home-page "https://github.com/pazz/alot")
608 (synopsis "Commandline MUA using notmuch")
610 "Alot is an experimental terminal mail user agent (MUA) based on
611 @code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
614 (define-public notifymuch
616 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
620 (version (string-append "0.1-" revision "." (string-take commit 7)))
625 (url "https://github.com/kspi/notifymuch.git")
629 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
630 (file-name (string-append name "-" version "-checkout"))))
631 (build-system python-build-system)
633 `(("python-notmuch" ,python-notmuch)
634 ("python-pygobject" ,python-pygobject)
635 ("gobject-introspection" ,gobject-introspection)
636 ("libnotify" ,libnotify)
640 (modify-phases %standard-phases
641 (add-after 'install 'wrap-binary
642 (lambda* (#:key outputs #:allow-other-keys)
643 (let* ((out (assoc-ref outputs "out"))
644 (bin (string-append out "/bin/notifymuch")))
646 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
647 `("GI_TYPELIB_PATH" ":" prefix
648 (,(getenv "GI_TYPELIB_PATH")
649 ,(string-append out "/lib/girepository-1.0")))))
651 (home-page "https://github.com/kspi/notifymuch")
652 (synopsis "Displays notifications for changes in the notmuch email database")
653 (description "notifymuch displays desktop notifications for messages in
654 the notmuch database. The notifications are sent using libnotify to a
655 notification daemon. The query to find messages to send a notification about
656 is configurable, and a notification for the same message will not be send
657 within a configurable period (defaults to 48 hours). To use notifymuch, run
658 @command{notifymuch} after new mail is indexed, this can be automated by
659 invoking @command{notifymuch} from the post-new hook.")
662 (define-public notmuch
668 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
672 "04w90c43zk23pys6prkqb14al408qypifcfj2qznqpwlf46v26zi"))))
673 (build-system gnu-build-system)
675 '(#:make-flags (list "V=1") ; Verbose test output.
676 #:phases (modify-phases %standard-phases
677 (add-after 'unpack 'patch-notmuch-lib.el
679 (substitute* "emacs/notmuch-lib.el"
680 (("/bin/sh") (which "sh")))
683 (lambda* (#:key outputs #:allow-other-keys)
685 (setenv "CONFIG_SHELL" (which "sh"))
687 (let ((out (assoc-ref outputs "out")))
688 (zero? (system* "./configure"
689 (string-append "--prefix=" out))))))
690 (add-before 'check 'prepare-test-environment
692 (setenv "TEST_CC" "gcc")
693 ;; Patch various inline shell invocations.
694 (substitute* (find-files "test" "\\.sh$")
695 (("/bin/sh") (which "sh")))
698 `(("bash-completion" ,bash-completion)
699 ("emacs" ,emacs-no-x) ; Minimal lacks libxml, needed for some tests.
700 ("pkg-config" ,pkg-config)
702 ("python-docutils" ,python2-docutils)
703 ("python-sphinx" ,python2-sphinx)
705 ;; The following are required for tests only.
717 (home-page "https://notmuchmail.org/")
718 (synopsis "Thread-based email index, search, and tagging")
720 "Notmuch is a command-line based program for indexing, searching, read-
721 ing, and tagging large collections of email messages.")
724 (define-public notmuch-addrlookup-c
726 (name "notmuch-addrlookup-c")
731 "https://github.com/aperezdc/" name "/archive/v"
733 (file-name (string-append name "-" version ".tar.gz"))
736 "0rslg2ifgyhl6asv3yr1f62m9xjfcinv7i6qb07h2k217jqlmrri"))))
737 (build-system gnu-build-system)
739 '(#:tests? #f ; no tests
740 #:make-flags (list "CC=gcc"
741 (string-append "PREFIX="
742 (assoc-ref %outputs "out")))
743 #:phases (modify-phases %standard-phases
745 ;; Remove vim code completion config, it's not needed to
746 ;; build (or be patched).
747 (add-before 'patch-source-shebangs 'delete-ycm-file
748 (lambda _ (delete-file ".ycm_extra_conf.py")))
750 (lambda* (#:key outputs #:allow-other-keys)
751 (let ((bin (string-append
752 (assoc-ref outputs "out") "/bin")))
753 (install-file "notmuch-addrlookup" bin)))))))
755 `(("pkg-config" ,pkg-config)))
758 ("notmuch" ,notmuch)))
759 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
760 (synopsis "Address lookup tool for Notmuch")
761 (description "This is an address lookup tool using a Notmuch database,
762 useful for email address completion.")
763 (license license:expat)))
765 (define-public python-notmuch
767 (name "python-notmuch")
768 (version (package-version notmuch))
769 ;; Notmuch python bindings are now unavailable on pypi. The
770 ;; bindings are distributed via the notmuch release tarball.
771 (source (package-source notmuch))
772 (build-system python-build-system)
773 (inputs `(("notmuch" ,notmuch)))
775 `(#:tests? #f ; no "test" target
777 (modify-phases %standard-phases
778 ;; This python package lives in a subdirectory of the notmuch source
779 ;; tree, so chdir into it before building.
780 (add-after 'unpack 'enter-python-dir
781 (lambda _ (chdir "bindings/python") #t))
782 ;; Make sure the correct notmuch shared library gets loaded.
783 (add-before 'build 'set-libnotmuch-file-name
784 (lambda* (#:key inputs #:allow-other-keys)
785 (let ((notmuch (assoc-ref inputs "notmuch")))
786 (substitute* "notmuch/globals.py"
787 (("libnotmuch\\.so\\.")
788 (string-append notmuch "/lib/libnotmuch.so.")))
790 (home-page (package-home-page notmuch))
791 (synopsis "Python bindings of the Notmuch mail indexing library")
793 "This package provides Python bindings to use the Notmuch mail indexing
794 and search library.")
797 (define-public python2-notmuch
798 (package-with-python2 python-notmuch))
800 (define-public getmail
807 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
808 name "-" version ".tar.gz"))
811 "0pzplrlxwbxydvfw4kkwn60l40hk1h5sxawaa6pi0k75c220k4ni"))))
812 (build-system python-build-system)
814 `(#:tests? #f ; no tests
816 (home-page "http://pyropus.ca/software/getmail/")
817 (synopsis "Mail retriever")
819 "A flexible, extensible mail retrieval system with support for
820 POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
821 arbitrary message filtering, single-user and domain-mailboxes, and many other
824 ;; License is specified in file '__init__.py'.
827 (define-public libetpan
833 (uri (string-append "https://github.com/dinhviethoa/" name
834 "/archive/" version ".tar.gz"))
835 (file-name (string-append name "-" version ".tar.gz"))
837 (base32 "081ixgj3skglq9i7v0jb835lmfx21zi4i5b7997igwr0lj174y9j"))))
838 (build-system gnu-build-system)
839 (native-inputs `(("autoconf" ,(autoconf-wrapper))
840 ("automake" ,automake)
842 ("pkg-config" ,pkg-config)))
844 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
845 ;; libraries need to be propagated.
846 `(("cyrus-sasl" ,cyrus-sasl)
847 ("openssl" ,openssl)))
854 (modify-phases %standard-phases
855 (add-after 'unpack 'autogen
857 (setenv "NOCONFIGURE" "true")
858 (zero? (system* "sh" "autogen.sh")))))
860 '("--disable-static" "--disable-db")))
861 (home-page "http://www.etpan.org/libetpan.html")
862 (synopsis "Portable middleware for email access")
864 "The purpose of this mail library is to provide a portable, efficient
865 framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
866 provides an API for C language. It's the low-level API used by MailCore and
868 (license (non-copyleft "file://COPYING"))))
870 (define-public compface
876 (uri (string-append "https://ftp.heanet.ie/mirrors/"
877 "ftp.xemacs.org/aux/"
878 name "-" version ".tar.gz"))
881 "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
882 (build-system gnu-build-system)
885 (synopsis "Portrait image compressor")
886 (description "This packages takes your 48x48x1 portrait image and
888 (home-page "http://www.cs.indiana.edu/pub/faces/")
889 (license (x11-style "file://README"))))
891 (define-public claws-mail
898 "http://www.claws-mail.org/releases/" name "-" version
902 "0df34gj4r5cbb92834hph19gnh7ih9rgmmw47rliyg8b9z01v6mp"))))
903 (build-system gnu-build-system)
904 (native-inputs `(("pkg-config" ,pkg-config)))
905 (inputs `(("bogofilter" ,bogofilter)
907 ("dbus-glib" ,dbus-glib)
910 ("ghostscript" ,ghostscript)
911 ("hicolor-icon-theme" ,hicolor-icon-theme)
916 ("libarchive" ,libarchive)
917 ("libcanberra" ,libcanberra)
918 ("libetpan" ,libetpan)
919 ("libnotify" ,libnotify)
923 ("python-2" ,python-2)
924 ("mime-info" ,shared-mime-info)))
927 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant")
928 #:phases (modify-phases %standard-phases
929 (add-before 'build 'patch-mime
930 (lambda* (#:key inputs #:allow-other-keys)
931 (substitute* "src/procmime.c"
932 (("/usr/share/mime/globs")
933 (string-append (assoc-ref inputs "mime-info")
934 "/share/mime/globs"))))))))
935 (synopsis "GTK-based Email client")
937 "Claws-Mail is an email client (and news reader) based on GTK+. The
938 appearance and interface are designed to be familiar to new users coming from
939 other popular email clients, as well as experienced users. Almost all commands
940 are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
941 which can add many functionalities to the base client.")
942 (home-page "http://www.claws-mail.org/")
943 (license gpl3+))) ; most files are actually public domain or x11
952 (uri (string-append "mirror://sourceforge/msmtp/msmtp/" version
953 "/msmtp-" version ".tar.xz"))
956 "0ppvww0sb09bnsrpqnvlrn8vx231r24xn2iiwpy020mxc8gxn5fs"))))
957 (build-system gnu-build-system)
960 ("libsecret" ,libsecret)
965 `(("pkg-config" ,pkg-config)))
966 (home-page "http://msmtp.sourceforge.net/")
968 `(#:configure-flags (list "--with-libgsasl"
972 (modify-phases %standard-phases
973 (add-after 'install 'install-msmtpq
974 (lambda* (#:key outputs #:allow-other-keys)
975 (let* ((out (assoc-ref outputs "out"))
976 (bin (string-append out "/bin"))
977 (doc (string-append out "/share/doc/msmtp"))
978 (msmtpq (string-append "scripts/msmtpq")))
979 (install-file (string-append msmtpq "/msmtpq") bin)
980 (install-file (string-append msmtpq "/msmtp-queue") bin)
981 (install-file (string-append msmtpq "/README.msmtpq") doc)
984 "Simple and easy to use SMTP client with decent sendmail compatibility")
986 "msmtp is an SMTP client. In the default mode, it transmits a mail to
987 an SMTP server (for example at a free mail provider) which takes care of further
998 (uri (list (string-append "ftp://ftp.exim.org/pub/exim/exim4/exim-"
1000 (string-append "ftp://ftp.exim.org/pub/exim/exim4/old/exim-"
1001 version ".tar.bz2")))
1004 "050m2gjzpc6vyik458h1j0vi8bxplkzjsyndkyd2y394i569kdyl"))))
1005 (build-system gnu-build-system)
1014 ("libxaw" ,libxaw)))
1016 `(("pcre" ,pcre "bin")
1022 ;; We'd use #:make-flags but the top-level Makefile calls others
1023 ;; recursively, so just set all variables this way.
1024 (lambda* (#:key outputs inputs #:allow-other-keys)
1025 (substitute* '("Makefile" "OS/Makefile-Default")
1026 (("(RM_COMMAND=).*" all var)
1027 (string-append var "rm\n")))
1028 (copy-file "src/EDITME" "Local/Makefile")
1029 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
1030 (let ((out (assoc-ref outputs "out"))
1031 (gzip (assoc-ref inputs "gzip"))
1032 (bzip2 (assoc-ref inputs "bzip2"))
1033 (xz (assoc-ref inputs "xz")))
1034 (substitute* '("Local/Makefile")
1035 (("(BIN_DIRECTORY=).*" all var)
1036 (string-append var out "/bin\n"))
1037 (("(CONFIGURE_FILE=).*" all var)
1038 (string-append var out "/etc/exim.conf\n"))
1039 (("(EXIM_USER=).*" all var)
1040 (string-append var "nobody\n"))
1041 (("(FIXED_NEVER_USERS=).*" all var)
1042 (string-append var "\n")) ;XXX no root in build environment
1043 (("(COMPRESS_COMMAND=).*" all var)
1044 (string-append var gzip "/bin/gzip\n"))
1045 (("(ZCAT_COMMAND=).*" all var)
1046 (string-append var gzip "/bin/zcat\n")))
1047 ;; This file has hardcoded names for tools despite the zcat
1048 ;; configuration above.
1049 (substitute* '("src/exigrep.src")
1050 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
1051 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
1052 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
1053 (("'lzma'") (string-append "'" xz "/bin/lzma'")))))
1055 'build 'fix-sh-paths
1056 (lambda* (#:key inputs #:allow-other-keys)
1057 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
1058 (("SHELL=/bin/sh") "SHELL=sh"))
1059 (substitute* '("scripts/Configure-config.h")
1060 (("\\| /bin/sh") "| sh"))
1061 (let ((bash (assoc-ref inputs "bash")))
1062 (substitute* '("scripts/Configure-eximon")
1063 (("#!/bin/sh") (string-append "#!" bash "/bin/sh")))))
1065 #:make-flags '("INSTALL_ARG=-no_chown")
1066 ;; No 'check' target.
1068 (home-page "http://www.exim.org/")
1070 "Message Transfer Agent (MTA) developed at the University of Cambridge")
1072 "Exim is a message transfer agent (MTA) developed at the University of
1073 Cambridge for use on Unix systems connected to the Internet. In style it is
1074 similar to Smail 3, but its facilities are more general. There is a great
1075 deal of flexibility in the way mail can be routed, and there are extensive
1076 facilities for checking incoming mail.")
1079 (define-public dovecot
1086 (uri (string-append "https://www.dovecot.org/releases/"
1087 (version-major+minor version) "/"
1088 name "-" version ".tar.gz"))
1090 "1s8qvr6fa9d0n179kdwgpsi72zkvpbh9q57q8fr2fjysgjl94zw9"))))
1091 (build-system gnu-build-system)
1093 `(("pkg-config" ,pkg-config)))
1095 `(("openssl" ,openssl)
1099 ("linux-pam" ,linux-pam)))
1101 `(#:configure-flags '("--sysconfdir=/etc"
1102 "--localstatedir=/var")
1103 #:phases (modify-phases %standard-phases
1105 'configure 'pre-configure
1107 ;; Simple hack to avoid installing in /etc
1108 (substitute* '("doc/Makefile.in"
1109 "doc/example-config/Makefile.in")
1110 (("pkgsysconfdir = .*")
1111 "pkgsysconfdir = /tmp/etc"))
1114 'unpack 'patch-other-shebangs
1117 "src/lib-program-client/test-program-client-local.c"
1118 (("/bin/echo") (which "echo"))
1119 (("/bin/cat") (which "cat"))
1120 (("/bin/false") (which "false")))
1122 (home-page "https://www.dovecot.org")
1123 (synopsis "Secure POP3/IMAP server")
1125 "Dovecot is a mail server whose major goals are security and reliability.
1126 It supports mbox/Maildir and its own dbox/mdbox formats.")
1127 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
1128 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
1129 ;; Unicode, Inc. License Agreement for Data Files and Software.
1130 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
1132 (define-public isync
1139 (uri (string-append "mirror://sourceforge/isync/isync/"
1140 version "/isync-" version ".tar.gz"))
1142 "1bij6nm06ghkg98n2pdyacam2fyg5y8f7ajw0d5653m0r4ldw5p7"))))
1143 (build-system gnu-build-system)
1146 ("openssl" ,openssl)))
1147 (home-page "http://isync.sourceforge.net/")
1148 (synopsis "Mailbox synchronization program")
1150 "isync/mbsync is command line tool for two-way synchronization of
1151 mailboxes. Currently Maildir and IMAP are supported types.")
1154 (define-public perl-email-abstract
1156 (name "perl-email-abstract")
1161 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1162 "Email-Abstract-" version ".tar.gz"))
1165 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
1166 (build-system perl-build-system)
1168 `(("perl-email-simple" ,perl-email-simple)
1169 ("perl-module-pluggable" ,perl-module-pluggable)
1170 ("perl-mro-compat" ,perl-mro-compat)))
1171 (home-page "http://search.cpan.org/dist/Email-Abstract")
1172 (synopsis "Interface to mail representations")
1173 (description "Email::Abstract provides module writers with the ability to
1174 write simple, representation-independent mail handling code.")
1175 (license (package-license perl))))
1177 (define-public perl-email-address
1179 (name "perl-email-address")
1184 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1185 "Email-Address-" version ".tar.gz"))
1188 "0i6ljdvpy279hpbqf6lgv4figr376rb2sh4yphj86xkdzsyn1y75"))))
1189 (build-system perl-build-system)
1190 (home-page "http://search.cpan.org/dist/Email-Address")
1191 (synopsis "Email address parsing and creation")
1192 (description "Email::Address implements a regex-based RFC 2822 parser that
1193 locates email addresses in strings and returns a list of Email::Address
1194 objects found. Alternatively you may construct objects manually.")
1195 (license (package-license perl))))
1197 (define-public perl-email-date-format
1199 (name "perl-email-date-format")
1204 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1205 "Email-Date-Format-" version ".tar.gz"))
1208 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
1209 (build-system perl-build-system)
1210 (home-page "http://search.cpan.org/dist/Email-Date-Format")
1211 (synopsis "Produce RFC 2822 date strings")
1212 (description "Email::Date::Format provides a means for generating an RFC
1213 2822 compliant datetime string.")
1214 (license (package-license perl))))
1216 (define-public perl-email-messageid
1218 (name "perl-email-messageid")
1223 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1224 "Email-MessageID-" version ".tar.gz"))
1227 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
1228 (build-system perl-build-system)
1229 (home-page "http://search.cpan.org/dist/Email-MessageID")
1230 (synopsis "Generate world unique message-ids")
1231 (description "Email::MessageID generates recommended message-ids to
1232 identify a message uniquely.")
1233 (license (package-license perl))))
1235 (define-public perl-email-mime
1237 (name "perl-email-mime")
1242 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1243 "Email-MIME-" version ".tar.gz"))
1246 "0s50i3nxi9dr81p4rn017nrarc40yrwz0qcw34q8k3pvdf46fr9n"))))
1247 (build-system perl-build-system)
1249 `(("perl-email-address" ,perl-email-address)
1250 ("perl-email-messageid" ,perl-email-messageid)
1251 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1252 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1253 ("perl-email-simple" ,perl-email-simple)
1254 ("perl-mime-types" ,perl-mime-types)))
1255 (home-page "http://search.cpan.org/dist/Email-MIME")
1256 (synopsis "MIME message handling")
1257 (description "Email::MIME is an extension of the Email::Simple module, to
1258 handle MIME encoded messages. It takes a message as a string, splits it up
1259 into its constituent parts, and allows you access to various parts of the
1260 message. Headers are decoded from MIME encoding.")
1261 (license (package-license perl))))
1263 (define-public perl-email-mime-contenttype
1265 (name "perl-email-mime-contenttype")
1270 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1271 "Email-MIME-ContentType-" version ".tar.gz"))
1274 "1y8hpwm7p5a9y2azy0cgvlv2i2d0nj66ajfa0fj51wdq4w9cs23m"))))
1275 (build-system perl-build-system)
1277 `(("perl-capture-tiny" ,perl-capture-tiny)))
1278 (home-page "http://search.cpan.org/dist/Email-MIME-ContentType")
1279 (synopsis "Parse MIME Content-Type headers")
1280 (description "Email::MIME::ContentType parses a MIME Content-Type
1282 (license (package-license perl))))
1284 (define-public perl-email-mime-encodings
1286 (name "perl-email-mime-encodings")
1291 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1292 "Email-MIME-Encodings-" version ".tar.gz"))
1295 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1296 (build-system perl-build-system)
1298 `(("perl-capture-tiny" ,perl-capture-tiny)))
1299 (home-page "http://search.cpan.org/dist/Email-MIME-Encodings")
1300 (synopsis "Unified interface to MIME encoding and decoding")
1301 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
1302 (license (package-license perl))))
1304 (define-public perl-email-sender
1306 (name "perl-email-sender")
1307 (version "1.300028")
1311 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1312 "Email-Sender-" version ".tar.gz"))
1315 "0c5dv1x9856nryj5mcbgb67a4irmadz80g0qnf4van3bd8wbj72a"))))
1316 (build-system perl-build-system)
1318 `(("perl-capture-tiny" ,perl-capture-tiny)))
1320 `(("perl-email-abstract" ,perl-email-abstract)
1321 ("perl-email-address" ,perl-email-address)
1322 ("perl-email-simple" ,perl-email-simple)
1323 ("perl-list-moreutils" ,perl-list-moreutils)
1324 ("perl-module-runtime" ,perl-module-runtime)
1325 ("perl-moo" ,perl-moo)
1326 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1327 ("perl-sub-exporter" ,perl-sub-exporter)
1328 ("perl-throwable" ,perl-throwable)
1329 ("perl-try-tiny" ,perl-try-tiny)))
1330 (home-page "http://search.cpan.org/dist/Email-Sender")
1331 (synopsis "Perl library for sending email")
1332 (description "Email::Sender replaces the old and sometimes problematic
1333 Email::Send library.")
1334 (license (package-license perl))))
1336 (define-public perl-email-simple
1338 (name "perl-email-simple")
1343 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1344 "Email-Simple-" version ".tar.gz"))
1347 "1if4a2wh4iwlcycqrd2fhkx04ngmd75q444gh43w0r9p15ym5f8w"))))
1348 (build-system perl-build-system)
1350 `(("perl-email-date-format" ,perl-email-date-format)))
1351 (home-page "http://search.cpan.org/dist/Email-Simple")
1352 (synopsis "Parsing of RFC 2822 messages")
1353 (description "Email::Simple provides simple parsing of RFC 2822 message
1354 format and headers.")
1355 (license (package-license perl))))
1357 (define-public libesmtp
1364 (uri (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1365 version ".tar.bz2"))
1368 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1369 (build-system gnu-build-system)
1371 `(("openssl" ,openssl)))
1372 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1373 (synopsis "Library for sending mail via remote hosts using SMTP")
1374 (description "libESMTP is an SMTP client which manages posting (or
1375 submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1376 It may be used as part of a Mail User Agent (MUA) or other program that must
1377 be able to post electronic mail where mail functionality may not be that
1378 program's primary purpose.")
1379 (license (list lgpl2.1+ gpl2+))))
1381 (define-public esmtp
1389 (url "https://github.com/andywingo/esmtp.git")
1390 (commit "01bf9fc")))
1393 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1394 (file-name (string-append name "-" version "-checkout"))))
1396 `(#:phases (modify-phases %standard-phases
1398 'configure 'autoconf
1399 (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
1400 (build-system gnu-build-system)
1404 ("autoconf" ,autoconf)
1405 ("automake" ,automake)
1406 ("libtool" ,libtool)))
1408 `(("libesmtp" ,libesmtp)))
1409 (home-page "https://sourceforge.net/projects/esmtp/")
1410 (synopsis "Relay-only mail transfer agent (MTA)")
1411 (description "Esmtp is a simple relay-only mail transfer agent built using
1412 libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1413 user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1414 page for more on configuration. This package also provides minimal
1415 compatibility shims for the @command{sendmail}, @command{mailq}, and
1416 @command{newaliases} commands.")
1425 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1428 (file-name (string-append name "-" version ".tar.gz"))
1430 (base32 "054rscijahiza5f9qha79rg3siji3bk5mk10f8c2vqx7m4w6qh8n"))))
1431 (build-system gnu-build-system)
1434 ("openssl" ,openssl)
1436 (home-page "https://github.com/nicm/fdm")
1437 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1438 (description "fdm is a program designed to fetch mail from POP3
1439 or IMAP servers, or receive local mail from stdin, and
1440 deliver it in various ways.")
1442 ;; Why point to a source file? Well, all the individual files have a
1443 ;; copy of this license in their headers, but there's no seprate file
1444 ;; with that information.
1445 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
1448 (define-public procmail
1456 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1461 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1462 ;; The following patch fixes an ambiguous definition of
1463 ;; getline() in formail.c. The patch is provided by Debian as
1465 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
1466 "procmail-CVE-2014-3618.patch"))))
1468 `(#:phases (modify-phases %standard-phases
1471 (substitute* "Makefile"
1475 (assoc-ref %outputs "out"))
1479 #:tests? #f)) ;; There are no tests indicating a successful
1480 ;; build. Some tests of basic locking mechanisms provided by the
1481 ;; file system are performed during 'make install'. However, these
1482 ;; are performed before the actual build process.
1483 (build-system gnu-build-system)
1484 (inputs `(("exim" ,exim)))
1485 (home-page "http://www.procmail.org/")
1486 (synopsis "Versatile mail delivery agent (MDA)")
1487 (description "Procmail is a mail delivery agent (MDA) featuring support
1488 for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1489 can be sorted into separate files/directories and arbitrary commands can be
1490 executed on mail arrival. Procmail is considered stable, but is no longer
1492 (license gpl2+))) ;; procmail allows to choose the
1493 ;; nonfree Artistic License 1.0
1494 ;; as alternative to the GPL2+.
1495 ;; This option is not listed here.
1497 (define-public khard
1503 (uri (pypi-uri name version))
1506 "1v66khq5w17xdbkpb00pf9xbl84dlzx4lq286fvzskb949b3y4yn"))))
1507 (build-system python-build-system)
1510 (modify-phases %standard-phases
1511 (add-after 'install 'install-doc
1512 (lambda* (#:key outputs #:allow-other-keys)
1513 (let* ((out (assoc-ref outputs "out"))
1514 (doc (string-append out "/share/doc/khard")))
1515 (copy-recursively "misc/khard" doc)
1517 ;; FIXME: check phase fails with
1518 ;; "Config file /tmp/.config/khard/khard.conf not available"
1521 `(("python-vobject" ,python-vobject)
1522 ("python-pyyaml" ,python-pyyaml)
1523 ("python-atomicwrites" ,python-atomicwrites)
1524 ("python-configobj" ,python-configobj)))
1525 (synopsis "Console address book using CardDAV")
1526 (description "Khard is an address book for the console. It creates, reads,
1527 modifies and removes CardDAV address book entries at your local machine. For
1528 synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1529 Khard can also be used from within the email client @command{mutt}.")
1530 (home-page "https://github.com/scheibler/khard")
1533 (define-public perl-mail-spf
1535 (name "perl-mail-spf")
1541 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-"
1546 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1547 (build-system perl-build-system)
1549 `(("perl-module-build" ,perl-module-build)
1550 ("perl-net-dns-resolver-programmable"
1551 ,perl-net-dns-resolver-programmable)))
1553 `(#:phases (modify-phases %standard-phases
1554 (add-before 'configure 'modify-Build.PL
1555 (lambda* (#:key outputs #:allow-other-keys)
1556 (substitute* "Build.PL"
1557 (("'/usr/sbin'") (string-append "'"
1558 (assoc-ref outputs "out")
1562 `(("perl-error" ,perl-error)
1563 ("perl-net-dns" ,perl-net-dns)
1564 ("perl-netaddr-ip" ,perl-netaddr-ip)
1565 ("perl-uri" ,perl-uri)))
1567 "http://search.cpan.org/dist/Mail-SPF")
1569 "Perl implementation of Sender Policy Framework")
1570 (description "Mail::SPF is the Sender Policy Framework implemented
1574 (define-public mb2md
1581 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
1585 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
1586 (build-system trivial-build-system)
1588 '(#:modules ((guix build utils))
1591 (use-modules (guix build utils))
1592 (let* ((source (assoc-ref %build-inputs "source"))
1593 (out (assoc-ref %outputs "out"))
1594 (bin (string-append out "/bin"))
1595 (perl (assoc-ref %build-inputs "perl"))
1596 (gzip (assoc-ref %build-inputs "gzip"))
1597 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
1598 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
1600 (with-directory-excursion bin
1601 (copy-file source "mb2md.gz")
1602 (system* (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
1603 (substitute* "mb2md"
1604 (("#!/usr/bin/perl")
1605 (string-append "#!/usr/bin/perl -I " perl5lib)))
1606 (patch-shebang "mb2md" (list (string-append perl "/bin")))
1607 (chmod "mb2md" #o555))
1609 (native-inputs `(("gzip", gzip)))
1610 (inputs `(("perl" ,perl)
1611 ("perl-timedate" ,perl-timedate)))
1612 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
1613 (synopsis "Mbox to maildir converter")
1615 "Mb2md is a Perl script that takes one or more mbox format files and
1616 converts them to maildir format directories.")
1617 (license public-domain)))
1626 (uri (string-append "mirror://sourceforge/mpop/mpop/" version
1627 "/mpop-" version ".tar.xz"))
1630 "0p1ix63jh64dibrlccch8q7gxl9nn18wd2qpyr5z1h4gs2fpmv4z"))))
1631 (build-system gnu-build-system)
1633 `(("gnutls" ,gnutls)
1634 ("libidn" ,libidn)))
1636 `(("pkg-config" ,pkg-config)))
1638 `(#:configure-flags (list "--with-tls=gnutls")))
1639 (home-page "http://mpop.sourceforge.net/")
1640 (synopsis "POP3 mail client")
1641 (description "mpop is a small and fast POP3 client suitable as a
1642 fetchmail replacement.
1644 mpop supports multiple accounts, header based mail filtering, delivery
1645 to mbox files, maildir folders or a Mail Delivery Agent (MDA),
1646 TLS/SSL, several authentication methods, Internationalized Domain
1647 Names (IDN) and SOCKS proxies.")
1650 (define-public mhonarc
1657 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
1661 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
1662 (build-system perl-build-system)
1663 (home-page "https://www.mhonarc.org/")
1664 (synopsis "Create HTML archives of mail/news messages")
1666 "MHonArc is a Perl mail-to-HTML converter. MHonArc
1667 provides HTML mail archiving with index, mail thread linking,
1668 etc; plus other capabilities including support for MIME and
1669 powerful user customization features.")
1673 (define-public sendmail
1681 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
1685 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
1686 (build-system gnu-build-system)
1689 (modify-phases %standard-phases
1690 (add-before 'build 'replace-/bin/sh
1694 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
1695 "contrib/mmuegel" "devtools/bin/configure.sh")
1696 (find-files "." ".*\\.m4")
1697 (find-files "." ".*\\.cf"))
1698 (("/bin/sh") (which "sh")))
1700 (substitute* "devtools/bin/Build"
1701 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
1706 ;; Render harmless any attempts to chown or chgrp
1707 (substitute* "devtools/bin/install.sh"
1708 (("owner=\\$2") "owner=''")
1709 (("group=\\$2") "group=''"))
1711 (with-output-to-file "devtools/Site/site.config.m4"
1714 define(`confCC', `gcc')
1715 define(`confOPTIMIZE', `-g -O2')
1716 define(`confLIBS', `-lresolv')
1717 define(`confINSTALL', `~a/devtools/bin/install.sh')
1718 define(`confDEPEND_TYPE', `CC-M')
1719 define(`confINST_DEP', `')
1723 (and (zero? (system* "sh" "Build"))
1724 (with-directory-excursion "cf/cf"
1726 (copy-file "generic-linux.mc" "sendmail.mc")
1727 (zero? (system* "sh" "Build" "sendmail.cf")))))))
1728 (add-before 'install 'pre-install
1730 (let ((out (assoc-ref %outputs "out")))
1731 (mkdir-p (string-append out "/usr/bin"))
1732 (mkdir-p (string-append out "/usr/sbin"))
1733 (mkdir-p (string-append out "/etc/mail"))
1734 (setenv "DESTDIR" out)
1735 (with-directory-excursion "cf/cf"
1736 (zero? (system* "sh" "Build" "install-cf")))))))
1737 ;; There is no make check. There are some post installation tests, but those
1738 ;; require root privileges
1743 (home-page "http://sendmail.org")
1745 "Highly configurable Mail Transfer Agent (MTA)")
1747 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
1748 Allman. It is highly configurable and supports many delivery methods and many
1749 transfer protocols.")
1750 (license (non-copyleft "file://LICENSE"
1751 "See LICENSE in the distribution."))))
1753 (define-public opensmtpd
1759 (uri (string-append "https://www.opensmtpd.org/archives/"
1760 name "-" version ".tar.gz"))
1763 "1b4h64w45hpmfq5721smhg4s0shs64gbcjqjpx3fbiw4hz8bdy9a"))))
1764 (build-system gnu-build-system)
1767 ("libressl" ,libressl)
1768 ("libevent" ,libevent)
1770 ("linux-pam" ,linux-pam)
1777 (list "--with-table-db" "--localstatedir=/var"
1778 "--with-user-smtpd=smtpd" "--with-user-queue=smtpq"
1779 "--with-group-queue=smtpq"
1780 "--with-path-socket=/var/run"
1781 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt")
1783 (modify-phases %standard-phases
1784 ;; OpenSMTPD provides a single utility smtpctl to control the daemon and
1785 ;; the local submission subsystem. To accomodate systems that require
1786 ;; historical interfaces such as sendmail, newaliases or makemap, the
1787 ;; smtpctl utility can operate in compatibility mode if called with the
1789 (add-after 'install 'install-compabilitymode
1791 (let* ((out (assoc-ref %outputs "out"))
1792 (sbin (string-append out "/sbin/")))
1793 (for-each (lambda (cmd)
1794 (symlink "smtpctl" (string-append sbin cmd)))
1795 '("makemap" "sendmail" "send-mail"
1796 "newaliases" "mailq")))
1798 (synopsis "Lightweight SMTP daemon")
1800 "OpenSMTPD is an implementation of the server-side SMTP protocol, with
1801 some additional standard extensions. It allows ordinary machines to exchange
1802 e-mails with other systems speaking the SMTP protocol.")
1803 (home-page "https://www.opensmtpd.org")
1804 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
1805 public-domain isc license:openssl))))
1807 (define-public opensmtpd-extras
1809 (name "opensmtpd-extras")
1813 (uri (string-append "https://www.opensmtpd.org/archives/"
1814 name "-" version ".tar.gz"))
1817 "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm"))))
1818 (build-system gnu-build-system)
1820 `(("libressl" ,libressl)
1821 ("libevent" ,libevent)
1823 ("python-2" ,python-2)
1824 ("opensmtpd" ,opensmtpd)
1827 ("postgresql" ,postgresql)
1829 ("linux-pam" ,linux-pam)))
1832 ("pkg-config" ,pkg-config)
1834 ("automake" ,automake)
1835 ("autoconf" ,autoconf)))
1837 `(;; We have to configure it like this because the default checks for for example
1838 ;; python in /usr/local/bin, /usr/bin and fails otherwise.
1839 #:configure-flags (list
1840 "--with-filter-clamav" "--with-filter-dkim-signer"
1841 "--with-filter-dnsbl" "--with-filter-lua"
1842 "--with-filter-monkey" "--with-filter-pause"
1843 "--with-filter-perl" "--with-filter-python"
1844 "--with-filter-regex" "--with-filter-spamassassin"
1845 "--with-filter-stub" "--with-filter-trace"
1846 "--with-filter-void"
1848 "--with-queue-null" "--with-queue-python"
1849 "--with-queue-ram" "--with-queue-stub"
1851 "--with-scheduler-python" "--with-scheduler-ram"
1852 "--with-scheduler-stub"
1854 "--with-table-ldap" ; "--with-table-mysql"
1855 "--with-table-passwd" "--with-table-postgres"
1856 "--with-table-python" "--with-table-socketmap"
1857 "--with-table-sqlite" "--with-table-stub"
1858 ;;"--with-table-redis" ; TODO: package hiredis
1860 "--with-user=smtpd" "--with-privsep-user=smtpd"
1861 "--localstatedir=/var" "--sysconfdir=/etc"
1862 "--with-lua-type=lua" ; can use lua or luajit
1864 (string-append "--with-python="
1865 (assoc-ref %build-inputs "python-2"))
1866 (string-append "--with-lua="
1867 (assoc-ref %build-inputs "lua")))))
1868 (license (list bsd-2 bsd-3 bsd-4
1869 public-domain isc license:openssl))
1870 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
1872 "This package provides extra tables, filters, and various other addons
1873 for OpenSMTPD to extend its functionality.")
1874 (home-page "https://www.opensmtpd.org")))
1876 (define-public python-mailmanclient
1878 (name "python-mailmanclient")
1883 (uri (pypi-uri "mailmanclient" version))
1886 "1cfjh45fgbsax5hjj2inq9nk33dhdvh63xhysc8dhnqidgqgm8c5"))))
1887 (build-system python-build-system)
1889 `(#:tests? #f)) ; Requires mailman running
1891 `(("python-six" ,python-six)
1892 ("python-httplib2" ,python-httplib2)))
1893 (home-page "https://launchpad.net/mailman.client")
1894 (synopsis "Python bindings for the Mailman 3 REST API")
1896 "The mailmanclient library provides official Python bindings for
1897 the GNU Mailman 3 REST API.")
1900 (define-public python2-mailmanclient
1901 (package-with-python2 python-mailmanclient))
1903 (define-public mlmmj
1906 (version "1.2.19.0")
1910 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
1911 version ".tar.bz2"))
1914 "1piwvcxkqadjwk5x8jicaiyz9nngmaj3w13ghdqgaki32xd7zk9v"))))
1915 (build-system gnu-build-system)
1917 `(("perl" ,perl))) ; For "contrib/web/"
1919 `(("pkg-config" ,pkg-config)))
1922 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
1923 ;; It opens the files control/mimedeny and control/mimestrip to get a list
1924 ;; of mimetypes for parts of multipart/mime messages that should be denied
1925 ;; or stripped. The parts then get stripped directly when the mail is
1926 ;; received. mlmmj-receive-strip also appends an extra header
1927 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
1929 (list "--enable-receive-strip")
1931 (modify-phases %standard-phases
1932 (add-before 'install 'install-contrib
1933 (lambda* (#:key outputs #:allow-other-keys)
1934 (let* ((out (assoc-ref outputs "out"))
1935 (share (string-append out "/share/mlmmj"))
1936 (contrib (string-append share "/contrib/web"))
1937 (texts (string-append share "/listtexts")))
1938 (copy-recursively "contrib/web/" contrib)
1939 (copy-recursively "listtexts" texts)
1940 (rename-file texts (string-append share "/texts"))
1942 (home-page "http://mlmmj.org")
1943 (synopsis "Mailing list managing made joyful")
1945 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
1946 It works with many different Mail Transport Agents (MTAs) and is simple for a
1947 system adminstrator to install, configure and integrate with other software.
1948 As it uses very few resources, and requires no daemons, it is ideal for
1949 installation on systems where resources are limited. Its features include:
1951 @item Archive, Custom headers / footer,
1952 @item Fully automated bounce handling (similar to ezmlm),
1953 @item Complete requeueing functionality, Moderation functionality, Subject prefix,
1954 @item Subscribers only posting, Regular expression access control,
1955 @item Functionality to retrieve old posts, Web interface, Digests,
1956 @item No-mail subscription, VERP support,
1957 @item Delivery Status Notification (RFC1891) support,
1958 @item Rich and customisable texts for automated operations.
1960 (license license:expat)))
1962 (define-public blists
1969 (uri (string-append "http://download.openwall.net/pub/projects/"
1970 "blists/blists-" version ".tar.gz"))
1973 "1gp51kmb8yv8d693wcpdslmwlbw5w2kgz4kxhrcaf7y89w8wy4qd"))))
1974 (build-system gnu-build-system)
1976 `(#:tests? #f ; No tests
1978 (modify-phases %standard-phases
1981 (lambda* (#:key outputs #:allow-other-keys)
1982 (let* ((out (assoc-ref outputs "out"))
1983 (bin (string-append out "/bin")))
1984 (install-file "bindex" bin)
1985 (install-file "bit" bin)
1987 (home-page "http://www.openwall.com/blists/")
1988 (synopsis "Web interface to mailing list archives")
1990 "Blists is a web interface to mailing list archives that works off
1991 indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
1992 @code{bindex} generates or updates the index file (incremental updates
1993 are supported). @code{bit} is a CGI/SSI program that generates web pages
1994 on the fly. Both programs are written in C and are very fast.")
1995 (license license:expat)))