1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014, 2015 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 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 ng0 <ngillmann@runbox.com>
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>
24 ;;; This file is part of GNU Guix.
26 ;;; GNU Guix is free software; you can redistribute it and/or modify it
27 ;;; under the terms of the GNU General Public License as published by
28 ;;; the Free Software Foundation; either version 3 of the License, or (at
29 ;;; your option) any later version.
31 ;;; GNU Guix is distributed in the hope that it will be useful, but
32 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
33 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 ;;; GNU General Public License for more details.
36 ;;; You should have received a copy of the GNU General Public License
37 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
39 (define-module (gnu packages mail)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages autotools)
42 #:use-module (gnu packages base)
43 #:use-module (gnu packages backup)
44 #:use-module (gnu packages bash)
45 #:use-module (gnu packages bison)
46 #:use-module (gnu packages curl)
47 #:use-module (gnu packages cyrus-sasl)
48 #:use-module (gnu packages databases)
49 #:use-module (gnu packages dejagnu)
50 #:use-module (gnu packages dns)
51 #:use-module (gnu packages documentation)
52 #:use-module (gnu packages emacs)
53 #:use-module (gnu packages enchant)
54 #:use-module (gnu packages ghostscript)
55 #:use-module (gnu packages glib)
56 #:use-module (gnu packages gnome)
57 #:use-module (gnu packages gnupg)
58 #:use-module (gnu packages groff)
59 #:use-module (gnu packages gsasl)
60 #:use-module (gnu packages gtk)
61 #:use-module (gnu packages guile)
62 #:use-module (gnu packages flex)
63 #:use-module (gnu packages libcanberra)
64 #:use-module (gnu packages libevent)
65 #:use-module (gnu packages libidn)
66 #:use-module (gnu packages linux)
67 #:use-module (gnu packages lua)
68 #:use-module (gnu packages m4)
69 #:use-module (gnu packages ncurses)
70 #:use-module (gnu packages pcre)
71 #:use-module (gnu packages perl)
72 #:use-module (gnu packages python)
73 #:use-module (gnu packages readline)
74 #:use-module (gnu packages search)
75 #:use-module (gnu packages texinfo)
76 #:use-module (gnu packages compression)
77 #:use-module (gnu packages glib)
78 #:use-module (gnu packages pkg-config)
79 #:use-module (gnu packages flex)
80 #:use-module (gnu packages gdb)
81 #:use-module (gnu packages man)
82 #:use-module (gnu packages samba)
83 #:use-module (gnu packages screen)
84 #:use-module (gnu packages tls)
85 #:use-module (gnu packages networking)
86 #:use-module (gnu packages web)
87 #:use-module (gnu packages xml)
88 #:use-module (gnu packages xorg)
89 #:use-module ((guix licenses)
90 #:select (gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+
91 non-copyleft (expat . license:expat) bsd-3
92 public-domain bsd-4 isc (openssl . license:openssl)
94 #:use-module (guix packages)
95 #:use-module (guix download)
96 #:use-module (guix git-download)
97 #:use-module (guix utils)
98 #:use-module (guix build-system gnu)
99 #:use-module (guix build-system perl)
100 #:use-module (guix build-system python)
101 #:use-module (guix build-system trivial))
103 (define-public mailutils
109 (uri (string-append "mirror://gnu/mailutils/mailutils-"
113 "1dpylyg79avi7brpkcmzaq7bqqkz45flp0ws6f2c8b1gyz4hdnzm"))))
114 (build-system gnu-build-system)
117 (modify-phases %standard-phases
118 (add-before 'build 'pre-build
120 ;; Use the right file name for `cat'.
121 (substitute* "testsuite/lib/mailutils.exp"
125 ;; Tests try to invoke 'maidag' such that it looks up the
126 ;; 'root' user, which does not exist in the build
128 (substitute* "maidag/tests/testsuite"
129 (("root <") "nobody <")
130 (("spool/root") "spool/nobody")
131 (("root@localhost") "nobody@localhost"))
133 ;; The 'pipeact.at' tests generate a shell script; make
134 ;; sure it uses the right shell.
135 (substitute* '("sieve/tests/testsuite"
136 "mh/tests/testsuite")
138 (string-append "#!" (which "sh"))))
140 (substitute* "mh/tests/testsuite"
141 (("moreproc: /bin/cat")
142 (string-append "moreproc: " (which "cat"))))
144 ;; XXX: The comsatd tests rely on being able to open
145 ;; /dev/tty, but that gives ENODEV in the build
146 ;; environment. Thus, ignore test failures here.
147 (substitute* "comsat/tests/Makefile.in"
148 (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
149 (string-append "-" all)))
152 ;; TODO: Add `--with-sql'.
153 #:configure-flags '("--sysconfdir=/etc")
154 #:parallel-tests? #f))
156 `(("dejagnu" ,dejagnu)
162 ("readline" ,readline)
163 ("linux-pam" ,linux-pam)
166 (home-page "https://www.gnu.org/software/mailutils/")
167 (synopsis "Utilities and library for reading and serving mail")
169 "GNU Mailutils is a collection of programs for managing, viewing and
170 processing electronic mail. It contains both utilities and server daemons
171 and all operate in a protocol-agnostic way. The underlying libraries are
172 also available, simplifying the addition of mail capabilities to new
175 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
176 (list gpl3+ lgpl3+))))
178 (define-public fetchmail
184 (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-"
188 "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r"))))
189 (build-system gnu-build-system)
191 `(("openssl" ,openssl)))
193 `(#:configure-flags (list (string-append "--with-ssl="
194 (assoc-ref %build-inputs "openssl")))))
195 (home-page "http://www.fetchmail.info/")
196 (synopsis "Remote-mail retrieval and forwarding utility")
198 "Fetchmail is a full-featured, robust, well-documented remote-mail
199 retrieval and forwarding utility intended to be used over on-demand
200 TCP/IP links (such as SLIP or PPP connections). It supports every
201 remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
202 KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
205 Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
206 so it can then be read by normal mail user agents such as mutt, elm
207 or BSD Mail. It allows all your system MTA's filtering, forwarding, and
208 aliasing facilities to work just as they would on normal mail.")
209 (license gpl2+))) ; most files are actually public domain or x11
217 (uri (string-append "ftp://ftp.mutt.org/pub/mutt/mutt-"
221 "1yazrl82s9fxmamnlvwmsxhwrxnwv6kwakgfmawda8ndhwb50lqm"))
222 (patches (search-patches "mutt-store-references.patch"))))
223 (build-system gnu-build-system)
225 `(("cyrus-sasl" ,cyrus-sasl)
232 `(#:configure-flags '("--enable-smtp"
236 "--enable-hcache" ; for header caching
240 ;; so that mutt does not check whether the path
241 ;; exists, which it does not in the chroot
242 "--with-mailpath=/var/mail")))
243 (home-page "http://www.mutt.org/")
244 (synopsis "Mail client")
246 "Mutt is a small but very powerful text-based mail client for Unix
256 (uri (string-append "mirror://gnome/sources/gmime/"
257 (version-major+minor version)
258 "/gmime-" version ".tar.xz"))
261 "0rfzbgsh8ira5p76kdghygl5i3fvmmx4wbw5rp7f8ajc4vxp18g0"))))
262 (build-system gnu-build-system)
264 `(("pkg-config" ,pkg-config)
265 ("gnupg" ,gnupg))) ; for tests only
266 (inputs `(("glib" ,glib)
271 (modify-phases %standard-phases
273 'unpack 'patch-paths-in-tests
275 ;; The test programs run several programs using 'system' with
276 ;; hard-coded paths. Here we patch them all.
277 ;; We use ISO-8859-1 here because test-iconv.c contains
278 ;; raw byte sequences in several different encodings.
279 (with-fluids ((%default-port-encoding #f))
280 (substitute* (find-files "tests" "\\.c$")
281 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
282 (let* ((base (basename prog-path))
285 (or prog (error "not found: " base))))))))))))
286 (home-page "http://spruce.sourceforge.net/gmime/")
287 (synopsis "MIME message parser and creator library")
289 "GMime provides a core library and set of utilities which may be used for
290 the creation and parsing of messages using the Multipurpose Internet Mail
292 (license (list lgpl2.1+ gpl2+ gpl3+))))
294 (define-public bogofilter
300 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-"
301 version "/bogofilter-"
305 "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1"))))
306 (build-system gnu-build-system)
309 (modify-phases %standard-phases
310 (add-before 'check 'pre-check
312 (substitute* "src/tests/t.frame"
314 (string-append "GREP=" (which "grep") "\n")))
316 (native-inputs `(("flex" ,flex)))
317 (inputs `(("bdb" ,bdb)))
318 (home-page "http://bogofilter.sourceforge.net/")
319 (synopsis "Mail classifier based on a Bayesian filter")
321 "Bogofilter is a mail filter that classifies mail as spam or ham
322 (non-spam) by a statistical analysis of the message's header and
323 content (body). The program is able to learn from the user's classifications
324 and corrections. It is based on a Bayesian filter.")
327 (define-public offlineimap
333 (uri (string-append "https://github.com/OfflineIMAP/offlineimap/"
334 "archive/v" version ".tar.gz"))
335 (file-name (string-append name "-" version ".tar.gz"))
338 "1m1lp7wxnra8k7lsqc8xlm5giy3i89wvmp35jjb1gf4yslpddnkz"))))
339 (build-system python-build-system)
341 `(("asciidoc" ,asciidoc)
342 ("libxslt" ,libxslt))) ; for xsltproc
343 (inputs `(("python2-pysqlite" ,python2-pysqlite)
344 ("python2-six" ,python2-six)))
346 ;; The setup.py script expects python-2.
348 ;; Tests require a modifiable IMAP account.
351 (modify-phases %standard-phases
352 (add-after 'build 'build-documentation
354 (substitute* "docs/Makefile"
355 ;; Prevent xmllint and xsltproc from downloading a DTD file.
356 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
357 (zero? (system* "make" "-C" "docs" "man"))))
358 (add-after 'install 'install-documentation
359 (lambda* (#:key outputs #:allow-other-keys)
360 (let* ((out (assoc-ref outputs "out"))
361 (man (string-append out "/share/man")))
362 (install-file "docs/offlineimap.1" (string-append man "/man1"))
363 (install-file "docs/offlineimapui.7" (string-append man "/man7"))
365 (add-after 'install-documentation 'wrap-binary
366 (lambda* (#:key outputs #:allow-other-keys)
367 (let* ((out (assoc-ref outputs "out"))
368 (bin (string-append out "/bin/offlineimap")))
370 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
372 (home-page "http://www.offlineimap.org")
373 (synopsis "Sync emails between two repositories")
375 "OfflineImap synchronizes emails between two repositories, so that you
376 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
377 repository and Maildir/IMAP as LOCAL repository.")
386 (uri (string-append "https://github.com/djcb/mu/releases/"
387 "download/" version "/mu-"
391 "02g82zvxfgn17wzy846bfxj0izjj7yklhwdnhwxy1y2kin4fqnb5"))))
392 (build-system gnu-build-system)
394 `(("pkg-config" ,pkg-config)
395 ("glib" ,glib "bin") ; for gtester
396 ("emacs" ,emacs-minimal)))
397 ;; TODO: Add webkit and gtk to build the mug GUI.
403 ("tzdata" ,tzdata))) ;for mu/test/test-mu-query.c
405 `(#:modules ((guix build gnu-build-system)
407 (guix build emacs-utils))
408 #:imported-modules (,@%gnu-build-system-modules
409 (guix build emacs-utils))
411 (modify-phases %standard-phases
412 (add-after 'unpack 'patch-configure
413 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
414 ;; so our Emacs package can't find it. Setting "--with-lispdir"
415 ;; configure flag doesn't help because "mu4e" will be added to
416 ;; the lispdir anyway, so we have to modify "configure.ac".
418 (substitute* "configure"
419 (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") ""))
421 (add-before 'check 'check-tz-setup
422 (lambda* (#:key inputs #:allow-other-keys)
423 ;; For mu/test/test-mu-query.c
425 (string-append (assoc-ref inputs "tzdata")
428 (add-after 'install 'install-emacs-autoloads
429 (lambda* (#:key outputs #:allow-other-keys)
430 (emacs-generate-autoloads
432 (string-append (assoc-ref outputs "out")
433 "/share/emacs/site-lisp"))
435 (home-page "http://www.djcbsoftware.nl/code/mu/")
436 (synopsis "Quickly find emails")
438 "Mu is a tool for dealing with e-mail messages stored in the
439 Maildir-format. Mu's purpose in life is to help you to quickly find the
440 messages you need; in addition, it allows you to view messages, extract
441 attachments, create new maildirs, and so on.")
450 ;; package author intends on distributing via github rather
452 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
453 (uri (string-append "https://github.com/pazz/alot/archive/"
455 (file-name (string-append "alot-" version ".tar.gz"))
458 "0sl1kl2fhkv208llnbny4blcvrfdk4vx6bcw5pnyh9ylwb0pipi2"))))
459 (build-system python-build-system)
461 `(#:tests? #f ; no tests
462 ;; python 3 is currently unsupported, more info:
463 ;; https://github.com/pazz/alot/blob/master/docs/source/faq.rst
466 `(("python2-magic" ,python2-magic)
467 ("python2-configobj" ,python2-configobj)
468 ("python2-twisted" ,python2-twisted)
469 ("python2-urwid" ,python2-urwid)
470 ("python2-urwidtrees" ,python2-urwidtrees)
471 ("python2-pygpgme" ,python2-pygpgme)
472 ("python2-notmuch" ,python2-notmuch)))
473 (home-page "https://github.com/pazz/alot")
474 (synopsis "Commandline MUA using notmuch")
476 "Alot is an experimental terminal mail user agent (MUA) based on
477 @code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
480 (define-public notifymuch
482 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
486 (version (string-append "0.1-" revision "." (string-take commit 7)))
491 (url "https://github.com/kspi/notifymuch.git")
495 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
496 (file-name (string-append name "-" version "-checkout"))))
497 (build-system python-build-system)
499 `(("python-notmuch" ,python-notmuch)
500 ("python-pygobject" ,python-pygobject)
501 ("gobject-introspection" ,gobject-introspection)
502 ("libnotify" ,libnotify)
506 (modify-phases %standard-phases
507 (add-after 'install 'wrap-binary
508 (lambda* (#:key outputs #:allow-other-keys)
509 (let* ((out (assoc-ref outputs "out"))
510 (bin (string-append out "/bin/notifymuch")))
512 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
513 `("GI_TYPELIB_PATH" ":" prefix
514 (,(getenv "GI_TYPELIB_PATH")
515 ,(string-append out "/lib/girepository-1.0")))))
517 (home-page "https://github.com/kspi/notifymuch")
518 (synopsis "Displays notifications for changes in the notmuch email database")
519 (description "notifymuch displays desktop notifications for messages in
520 the notmuch database. The notifications are sent using libnotify to a
521 notification daemon. The query to find messages to send a notification about
522 is configurable, and a notification for the same message will not be send
523 within a configurable period (defaults to 48 hours). To use notifymuch, run
524 @command{notifymuch} after new mail is indexed, this can be automated by
525 invoking @command{notifymuch} from the post-new hook.")
528 (define-public notmuch
534 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
538 "0fs5crf8v3jghc8jnm61cv7wxhclcg88hi5894d8fma9kkixcv8h"))))
539 (build-system gnu-build-system)
541 '(#:make-flags (list "V=1") ; Verbose test output.
542 #:phases (modify-phases %standard-phases
543 (add-after 'unpack 'patch-notmuch-lib.el
545 (substitute* "emacs/notmuch-lib.el"
546 (("/bin/sh") (which "sh")))
549 (lambda* (#:key outputs #:allow-other-keys)
551 (setenv "CONFIG_SHELL" (which "sh"))
553 (let ((out (assoc-ref outputs "out")))
554 (zero? (system* "./configure"
555 (string-append "--prefix=" out))))))
556 (add-before 'check 'prepare-test-environment
558 (setenv "TEST_CC" "gcc")
559 ;; Patch various inline shell invocations.
560 (substitute* (find-files "test" "\\.sh$")
561 (("/bin/sh") (which "sh")))
564 `(("bash-completion" ,bash-completion)
565 ("emacs" ,emacs-no-x) ; Minimal lacks libxml, needed for some tests.
566 ("pkg-config" ,pkg-config)
568 ("python-docutils" ,python2-docutils)
569 ("python-sphinx" ,python2-sphinx)
571 ;; The following are required for tests only.
583 (home-page "https://notmuchmail.org/")
584 (synopsis "Thread-based email index, search, and tagging")
586 "Notmuch is a command-line based program for indexing, searching, read-
587 ing, and tagging large collections of email messages.")
590 (define-public notmuch-addrlookup-c
592 (name "notmuch-addrlookup-c")
597 "https://github.com/aperezdc/" name "/archive/v"
599 (file-name (string-append name "-" version ".tar.gz"))
602 "0rslg2ifgyhl6asv3yr1f62m9xjfcinv7i6qb07h2k217jqlmrri"))))
603 (build-system gnu-build-system)
605 '(#:tests? #f ; no tests
606 #:make-flags (list "CC=gcc"
607 (string-append "PREFIX="
608 (assoc-ref %outputs "out")))
609 #:phases (modify-phases %standard-phases
611 ;; Remove vim code completion config, it's not needed to
612 ;; build (or be patched).
613 (add-before 'patch-source-shebangs 'delete-ycm-file
614 (lambda _ (delete-file ".ycm_extra_conf.py")))
616 (lambda* (#:key outputs #:allow-other-keys)
617 (let ((bin (string-append
618 (assoc-ref outputs "out") "/bin")))
619 (install-file "notmuch-addrlookup" bin)))))))
621 `(("pkg-config" ,pkg-config)))
624 ("notmuch" ,notmuch)))
625 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
626 (synopsis "Address lookup tool for Notmuch")
627 (description "This is an address lookup tool using a Notmuch database,
628 useful for email address completion.")
629 (license license:expat)))
631 (define-public python-notmuch
633 (name "python-notmuch")
634 (version (package-version notmuch))
635 ;; Notmuch python bindings are now unavailable on pypi. The
636 ;; bindings are distributed via the notmuch release tarball.
637 (source (package-source notmuch))
638 (build-system python-build-system)
639 (inputs `(("notmuch" ,notmuch)))
641 `(#:tests? #f ; no "test" target
643 (modify-phases %standard-phases
644 ;; This python package lives in a subdirectory of the notmuch source
645 ;; tree, so chdir into it before building.
646 (add-after 'unpack 'enter-python-dir
647 (lambda _ (chdir "bindings/python") #t))
648 ;; Make sure the correct notmuch shared library gets loaded.
649 (add-before 'build 'set-libnotmuch-file-name
650 (lambda* (#:key inputs #:allow-other-keys)
651 (let ((notmuch (assoc-ref inputs "notmuch")))
652 (substitute* "notmuch/globals.py"
653 (("libnotmuch\\.so\\.")
654 (string-append notmuch "/lib/libnotmuch.so.")))
656 (home-page (package-home-page notmuch))
657 (synopsis "Python bindings of the Notmuch mail indexing library")
659 "This package provides Python bindings to use the Notmuch mail indexing
660 and search library.")
663 (define-public python2-notmuch
664 (package-with-python2 python-notmuch))
666 (define-public getmail
673 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
674 name "-" version ".tar.gz"))
677 "0pzplrlxwbxydvfw4kkwn60l40hk1h5sxawaa6pi0k75c220k4ni"))))
678 (build-system python-build-system)
680 `(#:tests? #f ; no tests
682 (home-page "http://pyropus.ca/software/getmail/")
683 (synopsis "Mail retriever")
685 "A flexible, extensible mail retrieval system with support for
686 POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
687 arbitrary message filtering, single-user and domain-mailboxes, and many other
690 ;; License is specified in file '__init__.py'.
693 (define-public libetpan
699 (uri (string-append "https://github.com/dinhviethoa/" name
700 "/archive/" version ".tar.gz"))
701 (file-name (string-append name "-" version ".tar.gz"))
703 (base32 "081ixgj3skglq9i7v0jb835lmfx21zi4i5b7997igwr0lj174y9j"))))
704 (build-system gnu-build-system)
705 (native-inputs `(("autoconf" ,(autoconf-wrapper))
706 ("automake" ,automake)
708 ("pkg-config" ,pkg-config)))
710 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
711 ;; libraries need to be propagated.
712 `(("cyrus-sasl" ,cyrus-sasl)
713 ("openssl" ,openssl)))
720 (modify-phases %standard-phases
721 (add-after 'unpack 'autogen
723 (setenv "NOCONFIGURE" "true")
724 (zero? (system* "sh" "autogen.sh")))))
726 '("--disable-static" "--disable-db")))
727 (home-page "http://www.etpan.org/libetpan.html")
728 (synopsis "Portable middleware for email access")
730 "The purpose of this mail library is to provide a portable, efficient
731 framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
732 provides an API for C language. It's the low-level API used by MailCore and
734 (license (non-copyleft "file://COPYING"))))
736 (define-public claws-mail
743 "http://www.claws-mail.org/releases/" name "-" version
747 "0df34gj4r5cbb92834hph19gnh7ih9rgmmw47rliyg8b9z01v6mp"))))
748 (build-system gnu-build-system)
749 (native-inputs `(("pkg-config" ,pkg-config)))
750 (inputs `(("bogofilter" ,bogofilter)
752 ("dbus-glib" ,dbus-glib)
755 ("ghostscript" ,ghostscript)
756 ("hicolor-icon-theme" ,hicolor-icon-theme)
761 ("libarchive" ,libarchive)
762 ("libcanberra" ,libcanberra)
763 ("libetpan" ,libetpan)
764 ("libnotify" ,libnotify)
768 ("python-2" ,python-2)
769 ("mime-info" ,shared-mime-info)))
772 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant")
773 #:phases (modify-phases %standard-phases
774 (add-before 'build 'patch-mime
775 (lambda* (#:key inputs #:allow-other-keys)
776 (substitute* "src/procmime.c"
777 (("/usr/share/mime/globs")
778 (string-append (assoc-ref inputs "mime-info")
779 "/share/mime/globs"))))))))
780 (synopsis "GTK-based Email client")
782 "Claws-Mail is an email client (and news reader) based on GTK+. The
783 appearance and interface are designed to be familiar to new users coming from
784 other popular email clients, as well as experienced users. Almost all commands
785 are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
786 which can add many functionalities to the base client.")
787 (home-page "http://www.claws-mail.org/")
788 (license gpl3+))) ; most files are actually public domain or x11
797 (uri (string-append "mirror://sourceforge/msmtp/msmtp/" version
798 "/msmtp-" version ".tar.xz"))
801 "0ppvww0sb09bnsrpqnvlrn8vx231r24xn2iiwpy020mxc8gxn5fs"))))
802 (build-system gnu-build-system)
805 ("libsecret" ,libsecret)
810 `(("pkg-config" ,pkg-config)))
811 (home-page "http://msmtp.sourceforge.net/")
813 `(#:configure-flags (list "--with-libgsasl"
817 (modify-phases %standard-phases
818 (add-after 'install 'install-msmtpq
819 (lambda* (#:key outputs #:allow-other-keys)
820 (let* ((out (assoc-ref outputs "out"))
821 (bin (string-append out "/bin"))
822 (doc (string-append out "/share/doc/msmtp"))
823 (msmtpq (string-append "scripts/msmtpq")))
824 (install-file (string-append msmtpq "/msmtpq") bin)
825 (install-file (string-append msmtpq "/msmtp-queue") bin)
826 (install-file (string-append msmtpq "/README.msmtpq") doc)
829 "Simple and easy to use SMTP client with decent sendmail compatibility")
831 "msmtp is an SMTP client. In the default mode, it transmits a mail to
832 an SMTP server (for example at a free mail provider) which takes care of further
843 (uri (list (string-append "ftp://ftp.exim.org/pub/exim/exim4/exim-"
845 (string-append "ftp://ftp.exim.org/pub/exim/exim4/old/exim-"
846 version ".tar.bz2")))
849 "050m2gjzpc6vyik458h1j0vi8bxplkzjsyndkyd2y394i569kdyl"))))
850 (build-system gnu-build-system)
861 `(("pcre" ,pcre "bin")
867 ;; We'd use #:make-flags but the top-level Makefile calls others
868 ;; recursively, so just set all variables this way.
869 (lambda* (#:key outputs inputs #:allow-other-keys)
870 (substitute* '("Makefile" "OS/Makefile-Default")
871 (("(RM_COMMAND=).*" all var)
872 (string-append var "rm\n")))
873 (copy-file "src/EDITME" "Local/Makefile")
874 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
875 (let ((out (assoc-ref outputs "out"))
876 (gzip (assoc-ref inputs "gzip"))
877 (bzip2 (assoc-ref inputs "bzip2"))
878 (xz (assoc-ref inputs "xz")))
879 (substitute* '("Local/Makefile")
880 (("(BIN_DIRECTORY=).*" all var)
881 (string-append var out "/bin\n"))
882 (("(CONFIGURE_FILE=).*" all var)
883 (string-append var out "/etc/exim.conf\n"))
884 (("(EXIM_USER=).*" all var)
885 (string-append var "nobody\n"))
886 (("(FIXED_NEVER_USERS=).*" all var)
887 (string-append var "\n")) ;XXX no root in build environment
888 (("(COMPRESS_COMMAND=).*" all var)
889 (string-append var gzip "/bin/gzip\n"))
890 (("(ZCAT_COMMAND=).*" all var)
891 (string-append var gzip "/bin/zcat\n")))
892 ;; This file has hardcoded names for tools despite the zcat
893 ;; configuration above.
894 (substitute* '("src/exigrep.src")
895 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
896 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
897 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
898 (("'lzma'") (string-append "'" xz "/bin/lzma'")))))
901 (lambda* (#:key inputs #:allow-other-keys)
902 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
903 (("SHELL=/bin/sh") "SHELL=sh"))
904 (substitute* '("scripts/Configure-config.h")
905 (("\\| /bin/sh") "| sh"))
906 (let ((bash (assoc-ref inputs "bash")))
907 (substitute* '("scripts/Configure-eximon")
908 (("#!/bin/sh") (string-append "#!" bash "/bin/sh")))))
910 #:make-flags '("INSTALL_ARG=-no_chown")
911 ;; No 'check' target.
913 (home-page "http://www.exim.org/")
915 "Message Transfer Agent (MTA) developed at the University of Cambridge")
917 "Exim is a message transfer agent (MTA) developed at the University of
918 Cambridge for use on Unix systems connected to the Internet. In style it is
919 similar to Smail 3, but its facilities are more general. There is a great
920 deal of flexibility in the way mail can be routed, and there are extensive
921 facilities for checking incoming mail.")
924 (define-public dovecot
931 (uri (string-append "https://www.dovecot.org/releases/"
932 (version-major+minor version) "/"
933 name "-" version ".tar.gz"))
935 "1s8qvr6fa9d0n179kdwgpsi72zkvpbh9q57q8fr2fjysgjl94zw9"))))
936 (build-system gnu-build-system)
938 `(("pkg-config" ,pkg-config)))
940 `(("openssl" ,openssl)
944 ("linux-pam" ,linux-pam)))
946 `(#:configure-flags '("--sysconfdir=/etc"
947 "--localstatedir=/var")
948 #:phases (modify-phases %standard-phases
950 'configure 'pre-configure
952 ;; Simple hack to avoid installing in /etc
953 (substitute* '("doc/Makefile.in"
954 "doc/example-config/Makefile.in")
955 (("pkgsysconfdir = .*")
956 "pkgsysconfdir = /tmp/etc"))
959 'unpack 'patch-other-shebangs
962 "src/lib-program-client/test-program-client-local.c"
963 (("/bin/echo") (which "echo"))
964 (("/bin/cat") (which "cat"))
965 (("/bin/false") (which "false")))
967 (home-page "https://www.dovecot.org")
968 (synopsis "Secure POP3/IMAP server")
970 "Dovecot is a mail server whose major goals are security and reliability.
971 It supports mbox/Maildir and its own dbox/mdbox formats.")
972 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
973 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
974 ;; Unicode, Inc. License Agreement for Data Files and Software.
975 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
984 (uri (string-append "mirror://sourceforge/isync/isync/"
985 version "/isync-" version ".tar.gz"))
987 "1bij6nm06ghkg98n2pdyacam2fyg5y8f7ajw0d5653m0r4ldw5p7"))))
988 (build-system gnu-build-system)
991 ("openssl" ,openssl)))
992 (home-page "http://isync.sourceforge.net/")
993 (synopsis "Mailbox synchronization program")
995 "isync/mbsync is command line tool for two-way synchronization of
996 mailboxes. Currently Maildir and IMAP are supported types.")
999 (define-public perl-email-abstract
1001 (name "perl-email-abstract")
1006 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1007 "Email-Abstract-" version ".tar.gz"))
1010 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
1011 (build-system perl-build-system)
1013 `(("perl-email-simple" ,perl-email-simple)
1014 ("perl-module-pluggable" ,perl-module-pluggable)
1015 ("perl-mro-compat" ,perl-mro-compat)))
1016 (home-page "http://search.cpan.org/dist/Email-Abstract")
1017 (synopsis "Interface to mail representations")
1018 (description "Email::Abstract provides module writers with the ability to
1019 write simple, representation-independent mail handling code.")
1020 (license (package-license perl))))
1022 (define-public perl-email-address
1024 (name "perl-email-address")
1029 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1030 "Email-Address-" version ".tar.gz"))
1033 "0i6ljdvpy279hpbqf6lgv4figr376rb2sh4yphj86xkdzsyn1y75"))))
1034 (build-system perl-build-system)
1035 (home-page "http://search.cpan.org/dist/Email-Address")
1036 (synopsis "Email address parsing and creation")
1037 (description "Email::Address implements a regex-based RFC 2822 parser that
1038 locates email addresses in strings and returns a list of Email::Address
1039 objects found. Alternatively you may construct objects manually.")
1040 (license (package-license perl))))
1042 (define-public perl-email-date-format
1044 (name "perl-email-date-format")
1049 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1050 "Email-Date-Format-" version ".tar.gz"))
1053 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
1054 (build-system perl-build-system)
1055 (home-page "http://search.cpan.org/dist/Email-Date-Format")
1056 (synopsis "Produce RFC 2822 date strings")
1057 (description "Email::Date::Format provides a means for generating an RFC
1058 2822 compliant datetime string.")
1059 (license (package-license perl))))
1061 (define-public perl-email-messageid
1063 (name "perl-email-messageid")
1068 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1069 "Email-MessageID-" version ".tar.gz"))
1072 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
1073 (build-system perl-build-system)
1074 (home-page "http://search.cpan.org/dist/Email-MessageID")
1075 (synopsis "Generate world unique message-ids")
1076 (description "Email::MessageID generates recommended message-ids to
1077 identify a message uniquely.")
1078 (license (package-license perl))))
1080 (define-public perl-email-mime
1082 (name "perl-email-mime")
1087 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1088 "Email-MIME-" version ".tar.gz"))
1091 "0s50i3nxi9dr81p4rn017nrarc40yrwz0qcw34q8k3pvdf46fr9n"))))
1092 (build-system perl-build-system)
1094 `(("perl-email-address" ,perl-email-address)
1095 ("perl-email-messageid" ,perl-email-messageid)
1096 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1097 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1098 ("perl-email-simple" ,perl-email-simple)
1099 ("perl-mime-types" ,perl-mime-types)))
1100 (home-page "http://search.cpan.org/dist/Email-MIME")
1101 (synopsis "MIME message handling")
1102 (description "Email::MIME is an extension of the Email::Simple module, to
1103 handle MIME encoded messages. It takes a message as a string, splits it up
1104 into its constituent parts, and allows you access to various parts of the
1105 message. Headers are decoded from MIME encoding.")
1106 (license (package-license perl))))
1108 (define-public perl-email-mime-contenttype
1110 (name "perl-email-mime-contenttype")
1115 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1116 "Email-MIME-ContentType-" version ".tar.gz"))
1119 "1y8hpwm7p5a9y2azy0cgvlv2i2d0nj66ajfa0fj51wdq4w9cs23m"))))
1120 (build-system perl-build-system)
1122 `(("perl-capture-tiny" ,perl-capture-tiny)))
1123 (home-page "http://search.cpan.org/dist/Email-MIME-ContentType")
1124 (synopsis "Parse MIME Content-Type headers")
1125 (description "Email::MIME::ContentType parses a MIME Content-Type
1127 (license (package-license perl))))
1129 (define-public perl-email-mime-encodings
1131 (name "perl-email-mime-encodings")
1136 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1137 "Email-MIME-Encodings-" version ".tar.gz"))
1140 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1141 (build-system perl-build-system)
1143 `(("perl-capture-tiny" ,perl-capture-tiny)))
1144 (home-page "http://search.cpan.org/dist/Email-MIME-Encodings")
1145 (synopsis "Unified interface to MIME encoding and decoding")
1146 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
1147 (license (package-license perl))))
1149 (define-public perl-email-sender
1151 (name "perl-email-sender")
1152 (version "1.300028")
1156 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1157 "Email-Sender-" version ".tar.gz"))
1160 "0c5dv1x9856nryj5mcbgb67a4irmadz80g0qnf4van3bd8wbj72a"))))
1161 (build-system perl-build-system)
1163 `(("perl-capture-tiny" ,perl-capture-tiny)))
1165 `(("perl-email-abstract" ,perl-email-abstract)
1166 ("perl-email-address" ,perl-email-address)
1167 ("perl-email-simple" ,perl-email-simple)
1168 ("perl-list-moreutils" ,perl-list-moreutils)
1169 ("perl-module-runtime" ,perl-module-runtime)
1170 ("perl-moo" ,perl-moo)
1171 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1172 ("perl-sub-exporter" ,perl-sub-exporter)
1173 ("perl-throwable" ,perl-throwable)
1174 ("perl-try-tiny" ,perl-try-tiny)))
1175 (home-page "http://search.cpan.org/dist/Email-Sender")
1176 (synopsis "Perl library for sending email")
1177 (description "Email::Sender replaces the old and sometimes problematic
1178 Email::Send library.")
1179 (license (package-license perl))))
1181 (define-public perl-email-simple
1183 (name "perl-email-simple")
1188 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1189 "Email-Simple-" version ".tar.gz"))
1192 "1if4a2wh4iwlcycqrd2fhkx04ngmd75q444gh43w0r9p15ym5f8w"))))
1193 (build-system perl-build-system)
1195 `(("perl-email-date-format" ,perl-email-date-format)))
1196 (home-page "http://search.cpan.org/dist/Email-Simple")
1197 (synopsis "Parsing of RFC 2822 messages")
1198 (description "Email::Simple provides simple parsing of RFC 2822 message
1199 format and headers.")
1200 (license (package-license perl))))
1202 (define-public libesmtp
1209 (uri (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1210 version ".tar.bz2"))
1213 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1214 (build-system gnu-build-system)
1216 `(("openssl" ,openssl)))
1217 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1218 (synopsis "Library for sending mail via remote hosts using SMTP")
1219 (description "libESMTP is an SMTP client which manages posting (or
1220 submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1221 It may be used as part of a Mail User Agent (MUA) or other program that must
1222 be able to post electronic mail where mail functionality may not be that
1223 program's primary purpose.")
1224 (license (list lgpl2.1+ gpl2+))))
1226 (define-public esmtp
1234 (url "https://github.com/andywingo/esmtp.git")
1235 (commit "01bf9fc")))
1238 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1239 (file-name (string-append name "-" version "-checkout"))))
1241 `(#:phases (modify-phases %standard-phases
1243 'configure 'autoconf
1244 (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
1245 (build-system gnu-build-system)
1249 ("autoconf" ,autoconf)
1250 ("automake" ,automake)
1251 ("libtool" ,libtool)))
1253 `(("libesmtp" ,libesmtp)))
1254 (home-page "https://sourceforge.net/projects/esmtp/")
1255 (synopsis "Relay-only mail transfer agent (MTA)")
1256 (description "Esmtp is a simple relay-only mail transfer agent built using
1257 libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1258 user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1259 page for more on configuration. This package also provides minimal
1260 compatibility shims for the @command{sendmail}, @command{mailq}, and
1261 @command{newaliases} commands.")
1270 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1273 (file-name (string-append name "-" version ".tar.gz"))
1275 (base32 "054rscijahiza5f9qha79rg3siji3bk5mk10f8c2vqx7m4w6qh8n"))))
1276 (build-system gnu-build-system)
1279 ("openssl" ,openssl)
1281 (home-page "https://github.com/nicm/fdm")
1282 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1283 (description "fdm is a program designed to fetch mail from POP3
1284 or IMAP servers, or receive local mail from stdin, and
1285 deliver it in various ways.")
1287 ;; Why point to a source file? Well, all the individual files have a
1288 ;; copy of this license in their headers, but there's no seprate file
1289 ;; with that information.
1290 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
1293 (define-public procmail
1301 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1306 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1307 ;; The following patch fixes an ambiguous definition of
1308 ;; getline() in formail.c. The patch is provided by Debian as
1310 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
1311 "procmail-CVE-2014-3618.patch"))))
1313 `(#:phases (modify-phases %standard-phases
1316 (substitute* "Makefile"
1320 (assoc-ref %outputs "out"))
1324 #:tests? #f)) ;; There are no tests indicating a successful
1325 ;; build. Some tests of basic locking mechanisms provided by the
1326 ;; file system are performed during 'make install'. However, these
1327 ;; are performed before the actual build process.
1328 (build-system gnu-build-system)
1329 (inputs `(("exim" ,exim)))
1330 (home-page "http://www.procmail.org/")
1331 (synopsis "Versatile mail delivery agent (MDA)")
1332 (description "Procmail is a mail delivery agent (MDA) featuring support
1333 for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1334 can be sorted into separate files/directories and arbitrary commands can be
1335 executed on mail arrival. Procmail is considered stable, but is no longer
1337 (license gpl2+))) ;; procmail allows to choose the
1338 ;; nonfree Artistic License 1.0
1339 ;; as alternative to the GPL2+.
1340 ;; This option is not listed here.
1342 (define-public khard
1348 (uri (pypi-uri name version))
1351 "1v66khq5w17xdbkpb00pf9xbl84dlzx4lq286fvzskb949b3y4yn"))))
1352 (build-system python-build-system)
1355 (modify-phases %standard-phases
1356 (add-after 'install 'install-doc
1357 (lambda* (#:key outputs #:allow-other-keys)
1358 (let* ((out (assoc-ref outputs "out"))
1359 (doc (string-append out "/share/doc/khard")))
1360 (copy-recursively "misc/khard" doc)))))))
1362 `(("python-vobject" ,python-vobject)
1363 ("python-pyyaml" ,python-pyyaml)
1364 ("python-atomicwrites" ,python-atomicwrites)
1365 ("python-configobj" ,python-configobj)))
1366 (synopsis "Console address book using CardDAV")
1367 (description "Khard is an address book for the console. It creates, reads,
1368 modifies and removes CardDAV address book entries at your local machine. For
1369 synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1370 Khard can also be used from within the email client @command{mutt}.")
1371 (home-page "https://github.com/scheibler/khard")
1374 (define-public perl-mail-spf
1376 (name "perl-mail-spf")
1382 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-"
1387 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1388 (build-system perl-build-system)
1390 `(("perl-module-build" ,perl-module-build)
1391 ("perl-net-dns-resolver-programmable"
1392 ,perl-net-dns-resolver-programmable)))
1394 `(#:phases (modify-phases %standard-phases
1395 (add-before 'configure 'modify-Build.PL
1396 (lambda* (#:key outputs #:allow-other-keys)
1397 (substitute* "Build.PL"
1398 (("'/usr/sbin'") (string-append "'"
1399 (assoc-ref outputs "out")
1403 `(("perl-error" ,perl-error)
1404 ("perl-net-dns" ,perl-net-dns)
1405 ("perl-netaddr-ip" ,perl-netaddr-ip)
1406 ("perl-uri" ,perl-uri)))
1408 "http://search.cpan.org/dist/Mail-SPF")
1410 "Perl implementation of Sender Policy Framework")
1411 (description "Mail::SPF is the Sender Policy Framework implemented
1415 (define-public mb2md
1422 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
1426 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
1427 (build-system trivial-build-system)
1429 '(#:modules ((guix build utils))
1432 (use-modules (guix build utils))
1433 (let* ((source (assoc-ref %build-inputs "source"))
1434 (out (assoc-ref %outputs "out"))
1435 (bin (string-append out "/bin"))
1436 (perl (assoc-ref %build-inputs "perl"))
1437 (gzip (assoc-ref %build-inputs "gzip"))
1438 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
1439 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
1441 (with-directory-excursion bin
1442 (copy-file source "mb2md.gz")
1443 (system* (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
1444 (substitute* "mb2md"
1445 (("#!/usr/bin/perl")
1446 (string-append "#!/usr/bin/perl -I " perl5lib)))
1447 (patch-shebang "mb2md" (list (string-append perl "/bin")))
1448 (chmod "mb2md" #o555))
1450 (native-inputs `(("gzip", gzip)))
1451 (inputs `(("perl" ,perl)
1452 ("perl-timedate" ,perl-timedate)))
1453 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
1454 (synopsis "Mbox to maildir converter")
1456 "Mb2md is a Perl script that takes one or more mbox format files and
1457 converts them to maildir format directories.")
1458 (license public-domain)))
1467 (uri (string-append "mirror://sourceforge/mpop/mpop/" version
1468 "/mpop-" version ".tar.xz"))
1471 "0p1ix63jh64dibrlccch8q7gxl9nn18wd2qpyr5z1h4gs2fpmv4z"))))
1472 (build-system gnu-build-system)
1474 `(("gnutls" ,gnutls)
1475 ("libidn" ,libidn)))
1477 `(("pkg-config" ,pkg-config)))
1479 `(#:configure-flags (list "--with-tls=gnutls")))
1480 (home-page "http://mpop.sourceforge.net/")
1481 (synopsis "POP3 mail client")
1482 (description "mpop is a small and fast POP3 client suitable as a
1483 fetchmail replacement.
1485 mpop supports multiple accounts, header based mail filtering, delivery
1486 to mbox files, maildir folders or a Mail Delivery Agent (MDA),
1487 TLS/SSL, several authentication methods, Internationalized Domain
1488 Names (IDN) and SOCKS proxies.")
1491 (define-public mhonarc
1498 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
1502 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
1503 (build-system perl-build-system)
1504 (home-page "https://www.mhonarc.org/")
1505 (synopsis "Create HTML archives of mail/news messages")
1507 "MHonArc is a Perl mail-to-HTML converter. MHonArc
1508 provides HTML mail archiving with index, mail thread linking,
1509 etc; plus other capabilities including support for MIME and
1510 powerful user customization features.")
1514 (define-public sendmail
1522 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
1526 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
1527 (build-system gnu-build-system)
1530 (modify-phases %standard-phases
1531 (add-before 'build 'replace-/bin/sh
1535 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
1536 "contrib/mmuegel" "devtools/bin/configure.sh")
1537 (find-files "." ".*\\.m4")
1538 (find-files "." ".*\\.cf"))
1539 (("/bin/sh") (which "bash")))
1541 (substitute* "devtools/bin/Build"
1542 (("SHELL=/bin/sh") (string-append "SHELL=" (which "bash"))))
1547 ;; Render harmless any attempts to chown or chgrp
1548 (substitute* "devtools/bin/install.sh"
1549 (("owner=\\$2") "owner=''")
1550 (("group=\\$2") "group=''"))
1552 (with-output-to-file "devtools/Site/site.config.m4"
1555 define(`confCC', `gcc')
1556 define(`confOPTIMIZE', `-g -O2')
1557 define(`confLIBS', `-lresolv')
1558 define(`confINSTALL', `~a/devtools/bin/install.sh')
1559 define(`confDEPEND_TYPE', `CC-M')
1560 define(`confINST_DEP', `')
1564 (and (zero? (system* "sh" "Build"))
1565 (with-directory-excursion "cf/cf"
1567 (copy-file "generic-linux.mc" "sendmail.mc")
1568 (zero? (system* "sh" "Build" "sendmail.cf")))))))
1569 (add-before 'install 'pre-install
1571 (let ((out (assoc-ref %outputs "out")))
1572 (mkdir-p (string-append out "/usr/bin"))
1573 (mkdir-p (string-append out "/usr/sbin"))
1574 (mkdir-p (string-append out "/etc/mail"))
1575 (setenv "DESTDIR" out)
1576 (with-directory-excursion "cf/cf"
1577 (zero? (system* "sh" "Build" "install-cf")))))))
1578 ;; There is no make check. There are some post installation tests, but those
1579 ;; require root privileges
1584 (home-page "http://sendmail.org")
1586 "Highly configurable Mail Transfer Agent (MTA)")
1588 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
1589 Allman. It is highly configurable and supports many delivery methods and many
1590 transfer protocols.")
1591 (license (non-copyleft "file://LICENSE"
1592 "See LICENSE in the distribution."))))
1594 (define-public opensmtpd
1600 (uri (string-append "https://www.opensmtpd.org/archives/"
1601 name "-" version ".tar.gz"))
1604 "1b4h64w45hpmfq5721smhg4s0shs64gbcjqjpx3fbiw4hz8bdy9a"))))
1605 (build-system gnu-build-system)
1608 ("libressl" ,libressl)
1609 ("libevent" ,libevent)
1611 ("linux-pam" ,linux-pam)
1618 (list "--with-table-db" "--localstatedir=/var"
1619 "--with-user-smtpd=smtpd" "--with-user-queue=smtpq"
1620 "--with-group-queue=smtpq"
1621 "--with-path-socket=/var/run"
1622 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt")
1624 (modify-phases %standard-phases
1625 ;; OpenSMTPD provides a single utility smtpctl to control the daemon and
1626 ;; the local submission subsystem. To accomodate systems that require
1627 ;; historical interfaces such as sendmail, newaliases or makemap, the
1628 ;; smtpctl utility can operate in compatibility mode if called with the
1630 (add-after 'install 'install-compabilitymode
1632 (let* ((out (assoc-ref %outputs "out"))
1633 (sbin (string-append out "/sbin/")))
1634 (for-each (lambda (cmd)
1635 (symlink "smtpctl" (string-append sbin cmd)))
1636 '("makemap" "sendmail" "send-mail"
1637 "newaliases" "mailq")))
1639 (synopsis "Lightweight SMTP daemon")
1641 "OpenSMTPD is an implementation of the server-side SMTP protocol, with
1642 some additional standard extensions. It allows ordinary machines to exchange
1643 e-mails with other systems speaking the SMTP protocol.")
1644 (home-page "https://www.opensmtpd.org")
1645 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
1646 public-domain isc license:openssl))))
1648 (define-public opensmtpd-extras
1650 (name "opensmtpd-extras")
1654 (uri (string-append "https://www.opensmtpd.org/archives/"
1655 name "-" version ".tar.gz"))
1658 "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm"))))
1659 (build-system gnu-build-system)
1661 `(("libressl" ,libressl)
1662 ("libevent" ,libevent)
1664 ("python-2" ,python-2)
1665 ("opensmtpd" ,opensmtpd)
1668 ("postgresql" ,postgresql)
1670 ("linux-pam" ,linux-pam)))
1673 ("pkg-config" ,pkg-config)
1675 ("automake" ,automake)
1676 ("autoconf" ,autoconf)))
1678 `(;; We have to configure it like this because the default checks for for example
1679 ;; python in /usr/local/bin, /usr/bin and fails otherwise.
1680 #:configure-flags (list
1681 "--with-filter-clamav" "--with-filter-dkim-signer"
1682 "--with-filter-dnsbl" "--with-filter-lua"
1683 "--with-filter-monkey" "--with-filter-pause"
1684 "--with-filter-perl" "--with-filter-python"
1685 "--with-filter-regex" "--with-filter-spamassassin"
1686 "--with-filter-stub" "--with-filter-trace"
1687 "--with-filter-void"
1689 "--with-queue-null" "--with-queue-python"
1690 "--with-queue-ram" "--with-queue-stub"
1692 "--with-scheduler-python" "--with-scheduler-ram"
1693 "--with-scheduler-stub"
1695 "--with-table-ldap" ; "--with-table-mysql"
1696 "--with-table-passwd" "--with-table-postgres"
1697 "--with-table-python" "--with-table-socketmap"
1698 "--with-table-sqlite" "--with-table-stub"
1699 ;;"--with-table-redis" ; TODO: package hiredis
1701 "--with-user=smtpd" "--with-privsep-user=smtpd"
1702 "--localstatedir=/var" "--sysconfdir=/etc"
1703 "--with-lua-type=lua" ; can use lua or luajit
1705 (string-append "--with-python="
1706 (assoc-ref %build-inputs "python-2"))
1707 (string-append "--with-lua="
1708 (assoc-ref %build-inputs "lua")))))
1709 (license (list bsd-2 bsd-3 bsd-4
1710 public-domain isc license:openssl))
1711 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
1713 "This package provides extra tables, filters, and various other addons
1714 for OpenSMTPD to extend its functionality.")
1715 (home-page "https://www.opensmtpd.org")))
1717 (define-public python-mailmanclient
1719 (name "python-mailmanclient")
1724 (uri (pypi-uri "mailmanclient" version))
1727 "1cfjh45fgbsax5hjj2inq9nk33dhdvh63xhysc8dhnqidgqgm8c5"))))
1728 (build-system python-build-system)
1730 `(#:tests? #f)) ; Requires mailman running
1732 `(("python-six" ,python-six)
1733 ("python-httplib2" ,python-httplib2)))
1734 (home-page "https://launchpad.net/mailman.client")
1735 (synopsis "Python bindings for the Mailman 3 REST API")
1737 "The mailmanclient library provides official Python bindings for
1738 the GNU Mailman 3 REST API.")
1741 (define-public python2-mailmanclient
1742 (package-with-python2 python-mailmanclient))