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 <ng0@we.make.ritual.n0.is>
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>
23 ;;; This file is part of GNU Guix.
25 ;;; GNU Guix is free software; you can redistribute it and/or modify it
26 ;;; under the terms of the GNU General Public License as published by
27 ;;; the Free Software Foundation; either version 3 of the License, or (at
28 ;;; your option) any later version.
30 ;;; GNU Guix is distributed in the hope that it will be useful, but
31 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
32 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 ;;; GNU General Public License for more details.
35 ;;; You should have received a copy of the GNU General Public License
36 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
38 (define-module (gnu packages mail)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages autotools)
41 #:use-module (gnu packages base)
42 #:use-module (gnu packages backup)
43 #:use-module (gnu packages bash)
44 #:use-module (gnu packages bison)
45 #:use-module (gnu packages curl)
46 #:use-module (gnu packages cyrus-sasl)
47 #:use-module (gnu packages databases)
48 #:use-module (gnu packages dejagnu)
49 #:use-module (gnu packages dns)
50 #:use-module (gnu packages emacs)
51 #:use-module (gnu packages enchant)
52 #:use-module (gnu packages ghostscript)
53 #:use-module (gnu packages glib)
54 #:use-module (gnu packages gnome)
55 #:use-module (gnu packages gnupg)
56 #:use-module (gnu packages groff)
57 #:use-module (gnu packages gsasl)
58 #:use-module (gnu packages gtk)
59 #:use-module (gnu packages guile)
60 #:use-module (gnu packages flex)
61 #:use-module (gnu packages libcanberra)
62 #:use-module (gnu packages libevent)
63 #:use-module (gnu packages libidn)
64 #:use-module (gnu packages linux)
65 #:use-module (gnu packages lua)
66 #:use-module (gnu packages m4)
67 #:use-module (gnu packages ncurses)
68 #:use-module (gnu packages pcre)
69 #:use-module (gnu packages perl)
70 #:use-module (gnu packages python)
71 #:use-module (gnu packages readline)
72 #:use-module (gnu packages search)
73 #:use-module (gnu packages texinfo)
74 #:use-module (gnu packages compression)
75 #:use-module (gnu packages glib)
76 #:use-module (gnu packages pkg-config)
77 #:use-module (gnu packages flex)
78 #:use-module (gnu packages gdb)
79 #:use-module (gnu packages samba)
80 #:use-module (gnu packages tls)
81 #:use-module (gnu packages networking)
82 #:use-module (gnu packages web)
83 #:use-module (gnu packages xml)
84 #:use-module (gnu packages xorg)
85 #:use-module ((guix licenses)
86 #:select (gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+
87 non-copyleft (expat . license:expat) bsd-3
88 public-domain bsd-4 isc (openssl . license:openssl)
90 #:use-module (guix packages)
91 #:use-module (guix download)
92 #:use-module (guix git-download)
93 #:use-module (guix utils)
94 #:use-module (guix build-system gnu)
95 #:use-module (guix build-system perl)
96 #:use-module (guix build-system python)
97 #:use-module (guix build-system trivial))
99 (define-public mailutils
105 (uri (string-append "mirror://gnu/mailutils/mailutils-"
109 "0szbqa12zqzldqyw97lxqax3ja2adis83i7brdfsxmrfw68iaf65"))
110 (patches (search-patches "m4-gets-undeclared.patch"))))
111 (build-system gnu-build-system)
113 '(;; TODO: Add `--with-sql'.
114 #:phases (alist-cons-before
117 ;; Use Guile 2.0's public API.
118 (substitute* "libmu_scm/mu_message.c"
119 (("scm_i_string_length")
120 "scm_c_string_length"))
122 ;; This file should be generated to use the right
123 ;; value of $(libdir) et al.
124 (delete-file "libmu_scm/mailutils.scm")
126 ;; Use the right file name for `cat'.
127 (substitute* "testsuite/lib/mailutils.exp"
131 #:parallel-tests? #f))
133 `(("dejagnu" ,dejagnu)
140 ;; With Readline 6.3, examples/pop3client.c fails to build because it
141 ;; uses the now undefined 'CPPFunction' type.
142 ("readline" ,readline-6.2)
144 ("linux-pam" ,linux-pam)
147 (home-page "http://www.gnu.org/software/mailutils/")
148 (synopsis "Utilities and library for reading and serving mail")
150 "GNU Mailutils is a collection of programs for managing, viewing and
151 processing electronic mail. It contains both utilities and server daemons
152 and all operate in a protocol-agnostic way. The underlying libraries are
153 also available, simplifying the addition of mail capabilities to new
156 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
157 (list gpl3+ lgpl3+))))
159 (define-public fetchmail
165 (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-"
169 "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r"))))
170 (build-system gnu-build-system)
172 `(("openssl" ,openssl)))
174 `(#:configure-flags (list (string-append "--with-ssl="
175 (assoc-ref %build-inputs "openssl")))))
176 (home-page "http://www.fetchmail.info/")
177 (synopsis "Remote-mail retrieval and forwarding utility")
179 "Fetchmail is a full-featured, robust, well-documented remote-mail
180 retrieval and forwarding utility intended to be used over on-demand
181 TCP/IP links (such as SLIP or PPP connections). It supports every
182 remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
183 KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
186 Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
187 so it can then be read by normal mail user agents such as mutt, elm
188 or BSD Mail. It allows all your system MTA's filtering, forwarding, and
189 aliasing facilities to work just as they would on normal mail.")
190 (license gpl2+))) ; most files are actually public domain or x11
198 (uri (string-append "ftp://ftp.mutt.org/pub/mutt/mutt-"
202 "0idkamdiwj9fgqaz1vzkfg78cnmkzp74skv0ibw2xjfq6ds9hghx"))
203 (patches (search-patches "mutt-store-references.patch"))))
204 (build-system gnu-build-system)
206 `(("cyrus-sasl" ,cyrus-sasl)
213 `(#:configure-flags '("--enable-smtp"
217 "--enable-hcache" ; for header caching
221 ;; so that mutt does not check whether the path
222 ;; exists, which it does not in the chroot
223 "--with-mailpath=/var/mail")))
224 (home-page "http://www.mutt.org/")
225 (synopsis "Mail client")
227 "Mutt is a small but very powerful text-based mail client for Unix
237 (uri (string-append "mirror://gnome/sources/gmime/"
238 (version-major+minor version)
239 "/gmime-" version ".tar.xz"))
242 "0rfzbgsh8ira5p76kdghygl5i3fvmmx4wbw5rp7f8ajc4vxp18g0"))))
243 (build-system gnu-build-system)
245 `(("pkg-config" ,pkg-config)
246 ("gnupg" ,gnupg))) ; for tests only
247 (inputs `(("glib" ,glib)
252 (modify-phases %standard-phases
254 'unpack 'patch-paths-in-tests
256 ;; The test programs run several programs using 'system' with
257 ;; hard-coded paths. Here we patch them all.
258 ;; We use ISO-8859-1 here because test-iconv.c contains
259 ;; raw byte sequences in several different encodings.
260 (with-fluids ((%default-port-encoding #f))
261 (substitute* (find-files "tests" "\\.c$")
262 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
263 (let* ((base (basename prog-path))
266 (or prog (error "not found: " base))))))))))))
267 (home-page "http://spruce.sourceforge.net/gmime/")
268 (synopsis "MIME message parser and creator library")
270 "GMime provides a core library and set of utilities which may be used for
271 the creation and parsing of messages using the Multipurpose Internet Mail
273 (license (list lgpl2.1+ gpl2+ gpl3+))))
275 (define-public bogofilter
281 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-"
282 version "/bogofilter-"
286 "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1"))))
287 (build-system gnu-build-system)
289 '(#:phases (alist-cons-before
292 (substitute* "src/tests/t.frame"
294 (string-append "GREP=" (which "grep") "\n"))))
296 (native-inputs `(("flex" ,flex)))
297 (inputs `(("bdb" ,bdb)))
298 (home-page "http://bogofilter.sourceforge.net/")
299 (synopsis "Mail classifier based on a Bayesian filter")
301 "Bogofilter is a mail filter that classifies mail as spam or ham
302 (non-spam) by a statistical analysis of the message's header and
303 content (body). The program is able to learn from the user's classifications
304 and corrections. It is based on a Bayesian filter.")
307 (define-public offlineimap
313 (uri (string-append "https://github.com/OfflineIMAP/offlineimap/"
314 "archive/v" version ".tar.gz"))
315 (file-name (string-append name "-" version ".tar.gz"))
318 "0smxh5ag3cbn92kp49jq950j5m2pivs9kr04prpd1lw62hy7gnhr"))))
319 (build-system python-build-system)
320 (inputs `(("python2-pysqlite" ,python2-pysqlite)
321 ("python2-six" ,python2-six)))
323 ;; The setup.py script expects python-2.
325 ;; Tests require a modifiable IMAP account.
328 (modify-phases %standard-phases
329 (add-after 'install 'wrap-binary
330 (lambda* (#:key inputs outputs #:allow-other-keys)
331 (let* ((out (assoc-ref outputs "out"))
332 (bin (string-append out "/bin/offlineimap")))
334 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
336 (home-page "http://www.offlineimap.org")
337 (synopsis "Sync emails between two repositories")
339 "OfflineImap synchronizes emails between two repositories, so that you
340 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
341 repository and Maildir/IMAP as LOCAL repository.")
350 (uri (string-append "https://github.com/djcb/mu/archive/v"
352 (file-name (string-append "mu-" version ".tar.gz"))
355 "0p7hqri1r1x6750x138cc29mh81kdav2dcim26y58s8an206h25g"))))
356 (build-system gnu-build-system)
358 `(("pkg-config" ,pkg-config)
359 ("glib" ,glib "bin") ; for gtester
360 ("autoconf" ,autoconf)
361 ("automake" ,automake)
362 ("emacs" ,emacs-minimal)
364 ("texinfo" ,texinfo)))
365 ;; TODO: Add webkit and gtk to build the mug GUI.
371 ("tzdata" ,tzdata))) ;for mu/test/test-mu-query.c
373 `(#:modules ((guix build gnu-build-system)
375 (guix build emacs-utils))
376 #:imported-modules (,@%gnu-build-system-modules
377 (guix build emacs-utils))
379 (modify-phases %standard-phases
380 (add-after 'unpack 'patch-configure.ac
381 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
382 ;; so our Emacs package can't find it. Setting "--with-lispdir"
383 ;; configure flag doesn't help because "mu4e" will be added to
384 ;; the lispdir anyway, so we have to modify "configure.ac".
386 (substitute* "configure.ac"
387 (("^ +lispdir=.*") ""))
389 (add-after 'patch-configure.ac 'autoreconf
391 (zero? (system* "autoreconf" "-vi"))))
392 (add-before 'check 'check-tz-setup
393 (lambda* (#:key inputs #:allow-other-keys)
394 ;; For mu/test/test-mu-query.c
396 (string-append (assoc-ref inputs "tzdata")
399 (add-after 'install 'install-emacs-autoloads
400 (lambda* (#:key outputs #:allow-other-keys)
401 (emacs-generate-autoloads
403 (string-append (assoc-ref outputs "out")
404 "/share/emacs/site-lisp"))
406 (home-page "http://www.djcbsoftware.nl/code/mu/")
407 (synopsis "Quickly find emails")
409 "Mu is a tool for dealing with e-mail messages stored in the
410 Maildir-format. Mu's purpose in life is to help you to quickly find the
411 messages you need; in addition, it allows you to view messages, extract
412 attachments, create new maildirs, and so on.")
421 ;; package author intends on distributing via github rather
423 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
424 (uri (string-append "https://github.com/pazz/alot/archive/"
426 (file-name (string-append "alot-" version ".tar.gz"))
429 "09md9llg38r6xby8l0y0zf8nhlh91cr4xs0r15b294hhp8hl2bgx"))))
430 (build-system python-build-system)
432 `(#:tests? #f ; no tests
433 ;; python 3 is unsupported, more info:
434 ;; https://github.com/pazz/alot/blob/0.3.7/docs/source/faq.rst
437 `(("python2-magic" ,python2-magic)
438 ("python2-configobj" ,python2-configobj)
439 ("python2-twisted" ,python2-twisted)
440 ("python2-urwid" ,python2-urwid)
441 ("python2-urwidtrees" ,python2-urwidtrees)
442 ("python2-pygpgme" ,python2-pygpgme)
443 ("python2-notmuch" ,python2-notmuch)))
444 (home-page "https://github.com/pazz/alot")
445 (synopsis "Commandline MUA using notmuch")
447 "Alot is an experimental terminal mail user agent (MUA) based on
448 @code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
451 (define-public notifymuch
453 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
457 (version (string-append "0.1-" revision "." (string-take commit 7)))
462 (url "https://github.com/kspi/notifymuch.git")
466 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
467 (file-name (string-append name "-" version "-checkout"))))
468 (build-system python-build-system)
470 `(("python-notmuch" ,python-notmuch)
471 ("python-pygobject" ,python-pygobject)
472 ("gobject-introspection" ,gobject-introspection)
473 ("libnotify" ,libnotify)
477 (modify-phases %standard-phases
478 (add-after 'install 'wrap-binary
479 (lambda* (#:key outputs #:allow-other-keys)
480 (let* ((out (assoc-ref outputs "out"))
481 (bin (string-append out "/bin/notifymuch")))
483 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
484 `("GI_TYPELIB_PATH" ":" prefix
485 (,(getenv "GI_TYPELIB_PATH")
486 ,(string-append out "/lib/girepository-1.0")))))
488 (home-page "https://github.com/kspi/notifymuch")
489 (synopsis "Displays notifications for changes in the notmuch email database")
490 (description "notifymuch displays desktop notifications for messages in
491 the notmuch database. The notifications are sent using libnotify to a
492 notification daemon. The query to find messages to send a notification about
493 is configurable, and a notification for the same message will not be send
494 within a configurable period (defaults to 48 hours). To use notifymuch, run
495 @command{notifymuch} after new mail is indexed, this can be automated by
496 invoking @command{notifymuch} from the post-new hook.")
499 (define-public notmuch
505 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
509 "0jwpda3q023dn3sp41n8648951i7iagfv8zzpriv7hpkjivlafg7"))))
510 (build-system gnu-build-system)
512 '(#:tests? #f ; FIXME: 694 tests; 170 fail and 100 are skipped
513 ; with perl input: 50 fail and 100 are skipped
514 #:phases (modify-phases %standard-phases
516 (lambda* (#:key outputs #:allow-other-keys)
518 (setenv "CONFIG_SHELL" (which "sh"))
520 (let ((out (assoc-ref outputs "out")))
521 (zero? (system* "./configure"
522 (string-append "--prefix=" out)))))))))
524 `(("bash-completion" ,bash-completion)
525 ("emacs" ,emacs-minimal)
526 ("pkg-config" ,pkg-config)
528 ("python-docutils" ,python2-docutils)
529 ("python-sphinx" ,python2-sphinx)))
536 (home-page "http://notmuchmail.org/")
537 (synopsis "Thread-based email index, search, and tagging")
539 "Notmuch is a command-line based program for indexing, searching, read-
540 ing, and tagging large collections of email messages.")
543 (define-public notmuch-addrlookup-c
545 (name "notmuch-addrlookup-c")
550 "https://github.com/aperezdc/" name "/archive/v"
552 (file-name (string-append name "-" version ".tar.gz"))
555 "0rslg2ifgyhl6asv3yr1f62m9xjfcinv7i6qb07h2k217jqlmrri"))))
556 (build-system gnu-build-system)
558 '(#:tests? #f ; no tests
559 #:make-flags (list "CC=gcc"
560 (string-append "PREFIX="
561 (assoc-ref %outputs "out")))
562 #:phases (modify-phases %standard-phases
564 ;; Remove vim code completion config, it's not needed to
565 ;; build (or be patched).
566 (add-before 'patch-source-shebangs 'delete-ycm-file
567 (lambda _ (delete-file ".ycm_extra_conf.py")))
569 (lambda* (#:key outputs #:allow-other-keys)
570 (let ((bin (string-append
571 (assoc-ref outputs "out") "/bin")))
572 (install-file "notmuch-addrlookup" bin)))))))
574 `(("pkg-config" ,pkg-config)))
577 ("notmuch" ,notmuch)))
578 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
579 (synopsis "Address lookup tool for Notmuch")
580 (description "This is an address lookup tool using a Notmuch database,
581 useful for email address completion.")
582 (license license:expat)))
584 (define-public python-notmuch
586 (name "python-notmuch")
588 ;; Notmuch python bindings are now unavailable on pypi. The
589 ;; bindings are distributed via the notmuch release tarball.
590 (source (package-source notmuch))
591 (build-system python-build-system)
592 (inputs `(("notmuch" ,notmuch)))
594 `(#:tests? #f ; no "test" target
596 (modify-phases %standard-phases
597 ;; This python package lives in a subdirectory of the notmuch source
598 ;; tree, so chdir into it before building.
599 (add-after 'unpack 'enter-python-dir
600 (lambda _ (chdir "bindings/python") #t))
601 ;; Make sure the correct notmuch shared library gets loaded.
602 (add-before 'build 'set-libnotmuch-file-name
603 (lambda* (#:key inputs #:allow-other-keys)
604 (let ((notmuch (assoc-ref inputs "notmuch")))
605 (substitute* "notmuch/globals.py"
606 (("libnotmuch\\.so\\.")
607 (string-append notmuch "/lib/libnotmuch.so.")))
609 (home-page "http://notmuchmail.org/")
610 (synopsis "Python bindings of the Notmuch mail indexing library")
612 "This package provides Python bindings to use the Notmuch mail indexing
613 and search library.")
616 (define-public python2-notmuch
617 (package-with-python2 python-notmuch))
619 (define-public getmail
626 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
627 name "-" version ".tar.gz"))
630 "1m0yzxd05fklwbmjj1n2q4sx397c1j5qi9a0r5fv3h8pplz4lv0w"))))
631 (build-system python-build-system)
633 `(#:tests? #f ; no tests
635 (home-page "http://pyropus.ca/software/getmail/")
636 (synopsis "Mail retriever")
638 "A flexible, extensible mail retrieval system with support for
639 POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
640 arbitrary message filtering, single-user and domain-mailboxes, and many other
643 ;; License is specified in file '__init__.py'.
646 (define-public libetpan
652 (uri (string-append "https://github.com/dinhviethoa/" name
653 "/archive/" version ".tar.gz"))
654 (file-name (string-append name "-" version ".tar.gz"))
656 (base32 "081ixgj3skglq9i7v0jb835lmfx21zi4i5b7997igwr0lj174y9j"))))
657 (build-system gnu-build-system)
658 (native-inputs `(("autoconf" ,(autoconf-wrapper))
659 ("automake" ,automake)
661 ("pkg-config" ,pkg-config)))
663 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
664 ;; libraries need to be propagated.
665 `(("cyrus-sasl" ,cyrus-sasl)
666 ("openssl" ,openssl)))
673 (modify-phases %standard-phases
674 (add-after 'unpack 'autogen
676 (setenv "NOCONFIGURE" "true")
677 (zero? (system* "sh" "autogen.sh")))))
679 '("--disable-static" "--disable-db")))
680 (home-page "http://www.etpan.org/libetpan.html")
681 (synopsis "Portable middleware for email access")
683 "The purpose of this mail library is to provide a portable, efficient
684 framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
685 provides an API for C language. It's the low-level API used by MailCore and
687 (license (non-copyleft "file://COPYING"))))
689 (define-public claws-mail
696 "http://www.claws-mail.org/releases/" name "-" version
700 "0nfchgga3ir91s8rky0a0vnz8cgj2f6h716wh3cmb466a01xfss6"))))
701 (build-system gnu-build-system)
702 (native-inputs `(("pkg-config" ,pkg-config)))
703 (inputs `(("bogofilter" ,bogofilter)
705 ("dbus-glib" ,dbus-glib)
708 ("ghostscript" ,ghostscript)
709 ("hicolor-icon-theme" ,hicolor-icon-theme)
714 ("libarchive" ,libarchive)
715 ("libcanberra" ,libcanberra)
716 ("libetpan" ,libetpan)
717 ("libnotify" ,libnotify)
721 ("python-2" ,python-2)
722 ("mime-info" ,shared-mime-info)))
725 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant")
726 #:phases (modify-phases %standard-phases
727 (add-before 'build 'patch-mime
728 (lambda* (#:key inputs #:allow-other-keys)
729 (substitute* "src/procmime.c"
730 (("/usr/share/mime/globs")
731 (string-append (assoc-ref inputs "mime-info")
732 "/share/mime/globs"))))))))
733 (synopsis "GTK-based Email client")
735 "Claws-Mail is an email client (and news reader) based on GTK+. The
736 appearance and interface are designed to be familiar to new users coming from
737 other popular email clients, as well as experienced users. Almost all commands
738 are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
739 which can add many functionalities to the base client.")
740 (home-page "http://www.claws-mail.org/")
741 (license gpl3+))) ; most files are actually public domain or x11
750 (uri (string-append "mirror://sourceforge/msmtp/msmtp/" version
751 "/msmtp-" version ".tar.xz"))
754 "01jh9ba49bih8zsh40myw6qq1ll210q1vw0jg865vrn7jc3dd83n"))))
755 (build-system gnu-build-system)
758 ("libsecret" ,libsecret)
763 `(("pkg-config" ,pkg-config)))
764 (home-page "http://msmtp.sourceforge.net/")
766 `(#:configure-flags (list "--with-libgsasl"
770 (modify-phases %standard-phases
771 (add-after 'install 'install-msmtpq
772 (lambda* (#:key outputs #:allow-other-keys)
773 (let* ((out (assoc-ref outputs "out"))
774 (bin (string-append out "/bin"))
775 (doc (string-append out "/share/doc/msmtp"))
776 (msmtpq (string-append "scripts/msmtpq")))
777 (install-file (string-append msmtpq "/msmtpq") bin)
778 (install-file (string-append msmtpq "/msmtp-queue") bin)
779 (install-file (string-append msmtpq "/README.msmtpq") doc)
782 "Simple and easy to use SMTP client with decent sendmail compatibility")
784 "msmtp is an SMTP client. In the default mode, it transmits a mail to
785 an SMTP server (for example at a free mail provider) which takes care of further
796 (uri (list (string-append "ftp://ftp.exim.org/pub/exim/exim4/exim-"
798 (string-append "ftp://ftp.exim.org/pub/exim/exim4/old/exim-"
799 version ".tar.bz2")))
802 "1jbxn13shq90kpn0s73qpjnx5xm8jrpwhcwwgqw5s6sdzw6iwsbl"))))
803 (build-system gnu-build-system)
814 `(("pcre" ,pcre "bin")
820 ;; We'd use #:make-flags but the top-level Makefile calls others
821 ;; recursively, so just set all variables this way.
822 (lambda* (#:key outputs inputs #:allow-other-keys)
823 (substitute* '("Makefile" "OS/Makefile-Default")
824 (("(RM_COMMAND=).*" all var)
825 (string-append var "rm\n")))
826 (copy-file "src/EDITME" "Local/Makefile")
827 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
828 (let ((out (assoc-ref outputs "out"))
829 (gzip (assoc-ref inputs "gzip"))
830 (bzip2 (assoc-ref inputs "bzip2"))
831 (xz (assoc-ref inputs "xz")))
832 (substitute* '("Local/Makefile")
833 (("(BIN_DIRECTORY=).*" all var)
834 (string-append var out "/bin\n"))
835 (("(CONFIGURE_FILE=).*" all var)
836 (string-append var out "/etc/exim.conf\n"))
837 (("(EXIM_USER=).*" all var)
838 (string-append var "nobody\n"))
839 (("(FIXED_NEVER_USERS=).*" all var)
840 (string-append var "\n")) ;XXX no root in build environment
841 (("(COMPRESS_COMMAND=).*" all var)
842 (string-append var gzip "/bin/gzip\n"))
843 (("(ZCAT_COMMAND=).*" all var)
844 (string-append var gzip "/bin/zcat\n")))
845 ;; This file has hardcoded names for tools despite the zcat
846 ;; configuration above.
847 (substitute* '("src/exigrep.src")
848 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
849 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
850 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
851 (("'lzma'") (string-append "'" xz "/bin/lzma'")))))
854 (lambda* (#:key inputs #:allow-other-keys)
855 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
856 (("SHELL=/bin/sh") "SHELL=sh"))
857 (substitute* '("scripts/Configure-config.h")
858 (("\\| /bin/sh") "| sh"))
859 (let ((bash (assoc-ref inputs "bash")))
860 (substitute* '("scripts/Configure-eximon")
861 (("#!/bin/sh") (string-append "#!" bash "/bin/sh")))))
863 #:make-flags '("INSTALL_ARG=-no_chown")
864 ;; No 'check' target.
866 (home-page "http://www.exim.org/")
868 "Message Transfer Agent (MTA) developed at the University of Cambridge")
870 "Exim is a message transfer agent (MTA) developed at the University of
871 Cambridge for use on Unix systems connected to the Internet. In style it is
872 similar to Smail 3, but its facilities are more general. There is a great
873 deal of flexibility in the way mail can be routed, and there are extensive
874 facilities for checking incoming mail.")
877 (define-public dovecot
884 (uri (string-append "http://www.dovecot.org/releases/"
885 (version-major+minor version) "/"
886 name "-" version ".tar.gz"))
888 "0rwn5wc5b8j9fzqcjggdgpzmb77myrf4ra294z1gg5v3hhng7nfq"))))
889 (build-system gnu-build-system)
891 `(("pkg-config" ,pkg-config)))
893 `(("openssl" ,openssl)
897 ("linux-pam" ,linux-pam)))
899 `(#:configure-flags '("--sysconfdir=/etc"
900 "--localstatedir=/var")
901 #:phases (modify-phases %standard-phases
903 'configure 'pre-configure
905 ;; Simple hack to avoid installing in /etc
906 (substitute* '("doc/Makefile.in"
907 "doc/example-config/Makefile.in")
908 (("pkgsysconfdir = .*")
909 "pkgsysconfdir = /tmp/etc"))
911 (home-page "http://www.dovecot.org")
912 (synopsis "Secure POP3/IMAP server")
914 "Dovecot is a mail server whose major goals are security and reliability.
915 It supports mbox/Maildir and its own dbox/mdbox formats.")
916 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
917 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
918 ;; Unicode, Inc. License Agreement for Data Files and Software.
919 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
928 (uri (string-append "mirror://sourceforge/isync/isync/"
929 version "/isync-" version ".tar.gz"))
931 "1bij6nm06ghkg98n2pdyacam2fyg5y8f7ajw0d5653m0r4ldw5p7"))))
932 (build-system gnu-build-system)
935 ("openssl" ,openssl)))
936 (home-page "http://isync.sourceforge.net/")
937 (synopsis "Mailbox synchronization program")
939 "isync/mbsync is command line tool for two-way synchronization of
940 mailboxes. Currently Maildir and IMAP are supported types.")
943 (define-public perl-email-abstract
945 (name "perl-email-abstract")
950 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
951 "Email-Abstract-" version ".tar.gz"))
954 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
955 (build-system perl-build-system)
957 `(("perl-email-simple" ,perl-email-simple)
958 ("perl-module-pluggable" ,perl-module-pluggable)
959 ("perl-mro-compat" ,perl-mro-compat)))
960 (home-page "http://search.cpan.org/dist/Email-Abstract")
961 (synopsis "Interface to mail representations")
962 (description "Email::Abstract provides module writers with the ability to
963 write simple, representation-independent mail handling code.")
964 (license (package-license perl))))
966 (define-public perl-email-address
968 (name "perl-email-address")
973 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
974 "Email-Address-" version ".tar.gz"))
977 "1ai4r149pzjv9dc2vddir8zylj0z1pii93rm4g591lx7avim71hx"))))
978 (build-system perl-build-system)
979 (home-page "http://search.cpan.org/dist/Email-Address")
980 (synopsis "Email address parsing and creation")
981 (description "Email::Address implements a regex-based RFC 2822 parser that
982 locates email addresses in strings and returns a list of Email::Address
983 objects found. Alternatively you may construct objects manually.")
984 (license (package-license perl))))
986 (define-public perl-email-date-format
988 (name "perl-email-date-format")
993 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
994 "Email-Date-Format-" version ".tar.gz"))
997 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
998 (build-system perl-build-system)
999 (home-page "http://search.cpan.org/dist/Email-Date-Format")
1000 (synopsis "Produce RFC 2822 date strings")
1001 (description "Email::Date::Format provides a means for generating an RFC
1002 2822 compliant datetime string.")
1003 (license (package-license perl))))
1005 (define-public perl-email-messageid
1007 (name "perl-email-messageid")
1012 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1013 "Email-MessageID-" version ".tar.gz"))
1016 "09216naz21x99ff33wdm3j3zq1zhdbxhrsmx8bvavjrw3gjsvrq3"))))
1017 (build-system perl-build-system)
1018 (home-page "http://search.cpan.org/dist/Email-MessageID")
1019 (synopsis "Generate world unique message-ids")
1020 (description "Email::MessageID generates recommended message-ids to
1021 identify a message uniquely.")
1022 (license (package-license perl))))
1024 (define-public perl-email-mime
1026 (name "perl-email-mime")
1031 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1032 "Email-MIME-" version ".tar.gz"))
1035 "1sf7dldg4dvicyw6dl1vx6s1gjq3fcppi0103ikl0vi6v5xjdjdh"))))
1036 (build-system perl-build-system)
1038 `(("perl-email-address" ,perl-email-address)
1039 ("perl-email-messageid" ,perl-email-messageid)
1040 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1041 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1042 ("perl-email-simple" ,perl-email-simple)
1043 ("perl-mime-types" ,perl-mime-types)))
1044 (home-page "http://search.cpan.org/dist/Email-MIME")
1045 (synopsis "MIME message handling")
1046 (description "Email::MIME is an extension of the Email::Simple module, to
1047 handle MIME encoded messages. It takes a message as a string, splits it up
1048 into its constituent parts, and allows you access to various parts of the
1049 message. Headers are decoded from MIME encoding.")
1050 (license (package-license perl))))
1052 (define-public perl-email-mime-contenttype
1054 (name "perl-email-mime-contenttype")
1059 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1060 "Email-MIME-ContentType-" version ".tar.gz"))
1063 "1cl1l97lg690dh7i704hqi7yhxalq1chy7ylld5yc5v38jqa6gcn"))))
1064 (build-system perl-build-system)
1066 `(("perl-capture-tiny" ,perl-capture-tiny)))
1067 (home-page "http://search.cpan.org/dist/Email-MIME-ContentType")
1068 (synopsis "Parse MIME Content-Type headers")
1069 (description "Email::MIME::ContentType parses a MIME Content-Type
1071 (license (package-license perl))))
1073 (define-public perl-email-mime-encodings
1075 (name "perl-email-mime-encodings")
1080 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1081 "Email-MIME-Encodings-" version ".tar.gz"))
1084 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1085 (build-system perl-build-system)
1087 `(("perl-capture-tiny" ,perl-capture-tiny)))
1088 (home-page "http://search.cpan.org/dist/Email-MIME-Encodings")
1089 (synopsis "Unified interface to MIME encoding and decoding")
1090 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
1091 (license (package-license perl))))
1093 (define-public perl-email-sender
1095 (name "perl-email-sender")
1096 (version "1.300016")
1100 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1101 "Email-Sender-" version ".tar.gz"))
1104 "18x26fjh399q3s2g8dajb9r10633c46jrnbvycpnpclgnzhjs100"))))
1105 (build-system perl-build-system)
1107 `(("perl-capture-tiny" ,perl-capture-tiny)))
1109 `(("perl-email-abstract" ,perl-email-abstract)
1110 ("perl-email-address" ,perl-email-address)
1111 ("perl-email-simple" ,perl-email-simple)
1112 ("perl-list-moreutils" ,perl-list-moreutils)
1113 ("perl-module-runtime" ,perl-module-runtime)
1114 ("perl-moo" ,perl-moo)
1115 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1116 ("perl-sub-exporter" ,perl-sub-exporter)
1117 ("perl-throwable" ,perl-throwable)
1118 ("perl-try-tiny" ,perl-try-tiny)))
1119 (home-page "http://search.cpan.org/dist/Email-Sender")
1120 (synopsis "Perl library for sending email")
1121 (description "Email::Sender replaces the old and sometimes problematic
1122 Email::Send library.")
1123 (license (package-license perl))))
1125 (define-public perl-email-simple
1127 (name "perl-email-simple")
1132 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1133 "Email-Simple-" version ".tar.gz"))
1136 "19dpy3j5na2k9qw1jcpc8ia25038068r9j1bn34f9yyrisz7s522"))))
1137 (build-system perl-build-system)
1139 `(("perl-email-date-format" ,perl-email-date-format)))
1140 (home-page "http://search.cpan.org/dist/Email-Simple")
1141 (synopsis "Parsing of RFC 2822 messages")
1142 (description "Email::Simple provides simple parsing of RFC 2822 message
1143 format and headers.")
1144 (license (package-license perl))))
1146 (define-public libesmtp
1153 (uri (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1154 version ".tar.bz2"))
1157 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1158 (build-system gnu-build-system)
1160 `(("openssl" ,openssl)))
1161 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1162 (synopsis "Library for sending mail via remote hosts using SMTP")
1163 (description "libESMTP is an SMTP client which manages posting (or
1164 submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1165 It may be used as part of a Mail User Agent (MUA) or other program that must
1166 be able to post electronic mail where mail functionality may not be that
1167 program's primary purpose.")
1168 (license (list lgpl2.1+ gpl2+))))
1170 (define-public esmtp
1178 (url "https://github.com/andywingo/esmtp.git")
1179 (commit "01bf9fc")))
1182 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1183 (file-name (string-append name "-" version "-checkout"))))
1185 `(#:phases (modify-phases %standard-phases
1187 'configure 'autoconf
1188 (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
1189 (build-system gnu-build-system)
1193 ("autoconf" ,autoconf)
1194 ("automake" ,automake)
1195 ("libtool" ,libtool)))
1197 `(("libesmtp" ,libesmtp)))
1198 (home-page "http://sourceforge.net/projects/esmtp/")
1199 (synopsis "Relay-only mail transfer agent (MTA)")
1200 (description "Esmtp is a simple relay-only mail transfer agent built using
1201 libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1202 user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1203 page for more on configuration. This package also provides minimal
1204 compatibility shims for the @command{sendmail}, @command{mailq}, and
1205 @command{newaliases} commands.")
1214 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1217 (file-name (string-append name "-" version ".tar.gz"))
1219 (base32 "054rscijahiza5f9qha79rg3siji3bk5mk10f8c2vqx7m4w6qh8n"))))
1220 (build-system gnu-build-system)
1223 ("openssl" ,openssl)
1225 (home-page "https://github.com/nicm/fdm")
1226 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1227 (description "fdm is a program designed to fetch mail from POP3
1228 or IMAP servers, or receive local mail from stdin, and
1229 deliver it in various ways.")
1231 ;; Why point to a source file? Well, all the individual files have a
1232 ;; copy of this license in their headers, but there's no seprate file
1233 ;; with that information.
1234 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
1237 (define-public procmail
1245 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1250 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1251 ;; The following patch fixes an ambiguous definition of
1252 ;; getline() in formail.c. The patch is provided by Debian as
1254 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
1255 "procmail-CVE-2014-3618.patch"))))
1257 `(#:phases (modify-phases %standard-phases
1260 (substitute* "Makefile"
1264 (assoc-ref %outputs "out"))
1268 #:tests? #f)) ;; There are no tests indicating a successful
1269 ;; build. Some tests of basic locking mechanisms provided by the
1270 ;; file system are performed during 'make install'. However, these
1271 ;; are performed before the actual build process.
1272 (build-system gnu-build-system)
1273 (inputs `(("exim" ,exim)))
1274 (home-page "http://www.procmail.org/")
1275 (synopsis "Versatile mail delivery agent (MDA)")
1276 (description "Procmail is a mail delivery agent (MDA) featuring support
1277 for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1278 can be sorted into separate files/directories and arbitrary commands can be
1279 executed on mail arrival. Procmail is considered stable, but is no longer
1281 (license gpl2+))) ;; procmail allows to choose the
1282 ;; nonfree Artistic License 1.0
1283 ;; as alternative to the GPL2+.
1284 ;; This option is not listed here.
1286 (define-public khard
1292 (uri (pypi-uri name version))
1295 "0y83rji4f270hbb41m4jpr0z3yzvpvbsl32mpg9d38hlydw8fk1s"))))
1296 (build-system python-build-system)
1298 `(#:python ,python-2 ; only python-2 is supported.
1300 (modify-phases %standard-phases
1301 (add-before 'build 'disable-egg-compression
1302 ;; Do not compress the egg.
1304 (let ((port (open-file "setup.cfg" "a")))
1305 (display "\n[easy_install]\nzip_ok = 0\n"
1309 (add-after 'install 'install-doc
1310 (lambda* (#:key outputs #:allow-other-keys)
1311 (let* ((out (assoc-ref outputs "out"))
1312 (doc (string-append out "/share/doc/khard")))
1313 (copy-recursively "misc/khard" doc)))))))
1315 `(("python2-setuptools" ,python2-setuptools)))
1317 `(("python2-vobject" ,python2-vobject)
1318 ("python2-pyyaml" ,python2-pyyaml)
1319 ("python2-atomicwrites" ,python2-atomicwrites)
1320 ("python2-configobj" ,python2-configobj)))
1321 (synopsis "Console address book using CardDAV")
1322 (description "Khard is an address book for the console. It creates, reads,
1323 modifies and removes CardDAV address book entries at your local machine. For
1324 synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1325 Khard can also be used from within the email client @command{mutt}.")
1326 (home-page "https://github.com/scheibler/khard")
1329 (define-public perl-mail-spf
1331 (name "perl-mail-spf")
1337 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-"
1342 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1343 (build-system perl-build-system)
1345 `(("perl-module-build" ,perl-module-build)
1346 ("perl-net-dns-resolver-programmable"
1347 ,perl-net-dns-resolver-programmable)))
1349 `(#:phases (modify-phases %standard-phases
1350 (add-before 'configure 'modify-Build.PL
1351 (lambda* (#:key outputs #:allow-other-keys)
1352 (substitute* "Build.PL"
1353 (("'/usr/sbin'") (string-append "'"
1354 (assoc-ref outputs "out")
1358 `(("perl-error" ,perl-error)
1359 ("perl-net-dns" ,perl-net-dns)
1360 ("perl-netaddr-ip" ,perl-netaddr-ip)
1361 ("perl-uri" ,perl-uri)))
1363 "http://search.cpan.org/dist/Mail-SPF")
1365 "Perl implementation of Sender Policy Framework")
1366 (description "Mail::SPF is the Sender Policy Framework implemented
1370 (define-public mb2md
1377 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
1381 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
1382 (build-system trivial-build-system)
1384 '(#:modules ((guix build utils))
1387 (use-modules (guix build utils))
1388 (let* ((source (assoc-ref %build-inputs "source"))
1389 (out (assoc-ref %outputs "out"))
1390 (bin (string-append out "/bin"))
1391 (perl (assoc-ref %build-inputs "perl"))
1392 (gzip (assoc-ref %build-inputs "gzip"))
1393 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
1394 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
1396 (with-directory-excursion bin
1397 (copy-file source "mb2md.gz")
1398 (system* (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
1399 (substitute* "mb2md"
1400 (("#!/usr/bin/perl")
1401 (string-append "#!/usr/bin/perl -I " perl5lib)))
1402 (patch-shebang "mb2md" (list (string-append perl "/bin")))
1403 (chmod "mb2md" #o555))
1405 (native-inputs `(("gzip", gzip)))
1406 (inputs `(("perl" ,perl)
1407 ("perl-timedate" ,perl-timedate)))
1408 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
1409 (synopsis "Mbox to maildir converter")
1411 "Mb2md is a Perl script that takes one or more mbox format files and
1412 converts them to maildir format directories.")
1413 (license public-domain)))
1422 (uri (string-append "http://downloads.sourceforge.net/mpop/mpop-"
1426 "0n0ij258kn8lfa6nyr6l6plc4hf1wvyf1hkwicvdbjqdqrgjnq81"))))
1427 (build-system gnu-build-system)
1429 `(("gnutls" ,gnutls)
1430 ("libidn" ,libidn)))
1432 `(("pkg-config" ,pkg-config)))
1434 `(#:configure-flags (list "--with-tls=gnutls")))
1435 (home-page "http://mpop.sourceforge.net/")
1436 (synopsis "POP3 mail client")
1437 (description "mpop is a small and fast POP3 client suitable as a
1438 fetchmail replacement.
1440 mpop supports multiple accounts, header based mail filtering, delivery
1441 to mbox files, maildir folders or a Mail Delivery Agent (MDA),
1442 TLS/SSL, several authentication methods, Internationalized Domain
1443 Names (IDN) and SOCKS proxies.")
1446 (define-public mhonarc
1453 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
1457 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
1458 (build-system perl-build-system)
1459 (home-page "https://www.mhonarc.org/")
1460 (synopsis "Create HTML archives of mail/news messages")
1462 "MHonArc is a Perl mail-to-HTML converter. MHonArc
1463 provides HTML mail archiving with index, mail thread linking,
1464 etc; plus other capabilities including support for MIME and
1465 powerful user customization features.")
1469 (define-public sendmail
1477 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
1481 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
1482 (build-system gnu-build-system)
1485 (modify-phases %standard-phases
1486 (add-before 'build 'replace-/bin/sh
1490 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
1491 "contrib/mmuegel" "devtools/bin/configure.sh")
1492 (find-files "." ".*\\.m4")
1493 (find-files "." ".*\\.cf"))
1494 (("/bin/sh") (which "bash")))
1496 (substitute* "devtools/bin/Build"
1497 (("SHELL=/bin/sh") (string-append "SHELL=" (which "bash"))))
1502 ;; Render harmless any attempts to chown or chgrp
1503 (substitute* "devtools/bin/install.sh"
1504 (("owner=\\$2") "owner=''")
1505 (("group=\\$2") "group=''"))
1507 (with-output-to-file "devtools/Site/site.config.m4"
1510 define(`confCC', `gcc')
1511 define(`confOPTIMIZE', `-g -O2')
1512 define(`confLIBS', `-lresolv')
1513 define(`confINSTALL', `~a/devtools/bin/install.sh')
1514 define(`confDEPEND_TYPE', `CC-M')
1515 define(`confINST_DEP', `')
1519 (and (zero? (system* "sh" "Build"))
1520 (with-directory-excursion "cf/cf"
1522 (copy-file "generic-linux.mc" "sendmail.mc")
1523 (zero? (system* "sh" "Build" "sendmail.cf")))))))
1524 (add-before 'install 'pre-install
1526 (let ((out (assoc-ref %outputs "out")))
1527 (mkdir-p (string-append out "/usr/bin"))
1528 (mkdir-p (string-append out "/usr/sbin"))
1529 (mkdir-p (string-append out "/etc/mail"))
1530 (setenv "DESTDIR" out)
1531 (with-directory-excursion "cf/cf"
1532 (zero? (system* "sh" "Build" "install-cf")))))))
1533 ;; There is no make check. There are some post installation tests, but those
1534 ;; require root privileges
1539 (home-page "http://sendmail.org")
1541 "Highly configurable Mail Transfer Agent (MTA)")
1543 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
1544 Allman. It is highly configurable and supports many delivery methods and many
1545 transfer protocols.")
1546 (license (non-copyleft "file://LICENSE"
1547 "See LICENSE in the distribution."))))
1549 (define-public opensmtpd
1555 (uri (string-append "https://www.opensmtpd.org/archives/"
1556 name "-" version ".tar.gz"))
1559 "07d7f1m5sxyz6mkk228rcm7fsf7350994ayvmhgph333q5rz48im"))))
1560 (build-system gnu-build-system)
1563 ("libressl" ,libressl)
1564 ("libevent" ,libevent)
1566 ("linux-pam" ,linux-pam)
1569 `(("bison" ,bison)))
1571 `(#:configure-flags (list "--with-table-db" "--localstatedir=/var"
1572 "--with-user-smtpd=smtpd" "--with-user-queue=smtpq"
1573 "--with-group-queue=smtpq")
1575 (modify-phases %standard-phases
1576 ;; OpenSMTPD provides a single utility smtpctl to control the daemon and
1577 ;; the local submission subsystem. To accomodate systems that require
1578 ;; historical interfaces such as sendmail, newaliases or makemap, the
1579 ;; smtpctl utility can operate in compatibility mode if called with the
1581 (add-after 'install 'install-compabilitymode
1583 (let* ((out (assoc-ref %outputs "out"))
1584 (sbin (string-append out "/sbin/")))
1585 (for-each (lambda (cmd)
1586 (symlink "smtpctl" (string-append sbin cmd)))
1587 '("makemap" "sendmail" "send-mail"
1588 "newaliases" "mailq")))
1590 (synopsis "Lightweight SMTP daemon")
1592 "OpenSMTPD is an implementation of the server-side SMTP protocol, with
1593 some additional standard extensions. It allows ordinary machines to exchange
1594 e-mails with other systems speaking the SMTP protocol.")
1595 (home-page "https://www.opensmtpd.org")
1596 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
1597 public-domain isc openssl))))
1599 (define-public opensmtpd-extras
1601 (name "opensmtpd-extras")
1605 (uri (string-append "https://www.opensmtpd.org/archives/"
1606 name "-" version ".tar.gz"))
1609 "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm"))))
1610 (build-system gnu-build-system)
1612 `(("libressl" ,libressl)
1613 ("libevent" ,libevent)
1615 ("python-2" ,python-2)
1616 ("opensmtpd" ,opensmtpd)
1619 ("postgresql" ,postgresql)
1621 ("linux-pam" ,linux-pam)))
1624 ("pkg-config" ,pkg-config)
1626 ("automake" ,automake)
1627 ("autoconf" ,autoconf)))
1629 `(;; We have to configure it like this because the default checks for for example
1630 ;; python in /usr/local/bin, /usr/bin and fails otherwise.
1631 #:configure-flags (list
1632 "--with-filter-clamav" "--with-filter-dkim-signer"
1633 "--with-filter-dnsbl" "--with-filter-lua"
1634 "--with-filter-monkey" "--with-filter-pause"
1635 "--with-filter-perl" "--with-filter-python"
1636 "--with-filter-regex" "--with-filter-spamassassin"
1637 "--with-filter-stub" "--with-filter-trace"
1638 "--with-filter-void"
1640 "--with-queue-null" "--with-queue-python"
1641 "--with-queue-ram" "--with-queue-stub"
1643 "--with-scheduler-python" "--with-scheduler-ram"
1644 "--with-scheduler-stub"
1646 "--with-table-ldap" ; "--with-table-mysql"
1647 "--with-table-passwd" "--with-table-postgres"
1648 "--with-table-python" "--with-table-socketmap"
1649 "--with-table-sqlite" "--with-table-stub"
1650 ;;"--with-table-redis" ; TODO: package hiredis
1652 "--with-user=smtpd" "--with-privsep-user=smtpd"
1653 "--localstatedir=/var" "--sysconfdir=/etc"
1654 "--with-lua-type=lua" ; can use lua or luajit
1656 (string-append "--with-python="
1657 (assoc-ref %build-inputs "python-2"))
1658 (string-append "--with-lua="
1659 (assoc-ref %build-inputs "lua")))))
1660 (license (list bsd-2 bsd-3 bsd-4 non-copyleft
1661 public-domain isc openssl))
1662 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
1664 "This package provides extra tables, filters, and various other addons
1665 for OpenSMTPD to extend its functionality.")
1666 (home-page "https://www.opensmtpd.org")))