1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 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 Eric Bavier <bavier@member.fsf.org>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages mail)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages autotools)
29 #:use-module (gnu packages base)
30 #:use-module (gnu packages backup)
31 #:use-module (gnu packages curl)
32 #:use-module (gnu packages cyrus-sasl)
33 #:use-module (gnu packages databases)
34 #:use-module (gnu packages dejagnu)
35 #:use-module (gnu packages emacs)
36 #:use-module (gnu packages enchant)
37 #:use-module (gnu packages gdbm)
38 #:use-module (gnu packages ghostscript)
39 #:use-module (gnu packages glib)
40 #:use-module (gnu packages gnome)
41 #:use-module (gnu packages gnupg)
42 #:use-module (gnu packages gnutls)
43 #:use-module (gnu packages gsasl)
44 #:use-module (gnu packages gtk)
45 #:use-module (gnu packages guile)
46 #:use-module (gnu packages libcanberra)
47 #:use-module (gnu packages libidn)
48 #:use-module (gnu packages linux)
49 #:use-module (gnu packages m4)
50 #:use-module (gnu packages databases)
51 #:use-module (gnu packages ncurses)
52 #:use-module (gnu packages openssl)
53 #:use-module (gnu packages pcre)
54 #:use-module (gnu packages perl)
55 #:use-module (gnu packages python)
56 #:use-module (gnu packages readline)
57 #:use-module (gnu packages search)
58 #:use-module (gnu packages texinfo)
59 #:use-module (gnu packages compression)
60 #:use-module (gnu packages glib)
61 #:use-module (gnu packages pkg-config)
62 #:use-module (gnu packages flex)
63 #:use-module (gnu packages gdb)
64 #:use-module (gnu packages samba)
65 #:use-module (gnu packages xml)
66 #:use-module (gnu packages xorg)
67 #:use-module ((guix licenses)
68 #:select (gpl2 gpl2+ gpl3+ lgpl2.1+ lgpl3+ non-copyleft))
69 #:use-module (guix packages)
70 #:use-module (guix download)
71 #:use-module (guix utils)
72 #:use-module (guix build-system gnu)
73 #:use-module (guix build-system perl)
74 #:use-module (guix build-system python))
76 (define-public mailutils
82 (uri (string-append "mirror://gnu/mailutils/mailutils-"
86 "0szbqa12zqzldqyw97lxqax3ja2adis83i7brdfsxmrfw68iaf65"))
87 (patches (list (search-patch "m4-gets-undeclared.patch")))))
88 (build-system gnu-build-system)
90 '(;; TODO: Add `--with-sql'.
91 #:phases (alist-cons-before
94 ;; Use Guile 2.0's public API.
95 (substitute* "libmu_scm/mu_message.c"
96 (("scm_i_string_length")
97 "scm_c_string_length"))
99 ;; This file should be generated to use the right
100 ;; value of $(libdir) et al.
101 (delete-file "libmu_scm/mailutils.scm")
103 ;; Use the right file name for `cat'.
104 (substitute* "testsuite/lib/mailutils.exp"
108 #:parallel-tests? #f))
110 `(("dejagnu" ,dejagnu)
117 ;; With Readline 6.3, examples/pop3client.c fails to build because it
118 ;; uses the now undefined 'CPPFunction' type.
119 ("readline" ,readline-6.2)
121 ("linux-pam" ,linux-pam)
124 (home-page "http://www.gnu.org/software/mailutils/")
125 (synopsis "Utilities and library for reading and serving mail")
127 "GNU Mailutils is a collection of programs for managing, viewing and
128 processing electronic mail. It contains both utilities and server daemons
129 and all operate in a protocol-agnostic way. The underlying libraries are
130 also available, simplifying the addition of mail capabilities to new
133 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
134 (list gpl3+ lgpl3+))))
136 (define-public fetchmail
142 (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-"
146 "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r"))))
147 (build-system gnu-build-system)
149 `(("openssl" ,openssl)))
151 `(#:configure-flags (list (string-append "--with-ssl="
152 (assoc-ref %build-inputs "openssl")))))
153 (home-page "http://www.fetchmail.info/")
154 (synopsis "Remote-mail retrieval and forwarding utility")
156 "Fetchmail is a full-featured, robust, well-documented remote-mail
157 retrieval and forwarding utility intended to be used over on-demand
158 TCP/IP links (such as SLIP or PPP connections). It supports every
159 remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
160 KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
163 Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
164 so it can then be read by normal mail user agents such as mutt, elm
165 or BSD Mail. It allows all your system MTA's filtering, forwarding, and
166 aliasing facilities to work just as they would on normal mail.")
167 (license gpl2+))) ; most files are actually public domain or x11
175 (uri (list ;; Temporarily put bitbucket first, because
176 ;; ftp.mutt.org has been down for a while.
177 (string-append "https://bitbucket.org/mutt/mutt/downloads/mutt-"
179 (string-append "ftp://ftp.mutt.org/mutt/devel/mutt-"
183 "0dzx4qk50pjfsb6cs5jahng96a52k12f7pm0sc78iqdrawg71w1s"))
184 (patches (list (search-patch "mutt-CVE-2014-9116.patch")))))
185 (build-system gnu-build-system)
187 `(("cyrus-sasl" ,cyrus-sasl)
193 `(#:configure-flags '("--enable-smtp"
199 ;; so that mutt does not check whether the path
200 ;; exists, which it does not in the chroot
201 "--with-mailpath=/var/mail")))
202 (home-page "http://www.mutt.org/")
203 (synopsis "Mail client")
205 "Mutt is a small but very powerful text-based mail client for Unix
215 (uri (string-append "mirror://gnome/sources/gmime/"
216 (version-major+minor version)
217 "/gmime-" version ".tar.xz"))
220 "0jm1fgbjgh496rsc0il2y46qd4bqq2ln9168p4zzh68mk4ml1yxg"))))
221 (build-system gnu-build-system)
223 `(("pkg-config" ,pkg-config)
224 ("gnupg" ,gnupg))) ; for tests only
225 (inputs `(("glib" ,glib)
231 'unpack 'patch-paths-in-tests
233 ;; The test programs run several programs using 'system' with
234 ;; hard-coded paths. Here we patch them all. We also change "gpg"
235 ;; to "gpg2". We use ISO-8859-1 here because test-iconv.c contains
236 ;; raw byte sequences in several different encodings.
237 (with-fluids ((%default-port-encoding #f))
238 (substitute* (find-files "tests" "\\.c$")
239 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
240 (let* ((base (basename prog-path))
241 (prog (which (if (string=? base "gpg") "gpg2" base))))
242 (string-append pre (or prog (error "not found: " base))))))))
244 (home-page "http://spruce.sourceforge.net/gmime/")
245 (synopsis "MIME message parser and creator library")
247 "GMime provides a core library and set of utilities which may be used for
248 the creation and parsing of messages using the Multipurpose Internet Mail
250 (license (list lgpl2.1+ gpl2+ gpl3+))))
252 (define-public bogofilter
258 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-"
259 version "/bogofilter-"
263 "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1"))))
264 (build-system gnu-build-system)
266 '(#:phases (alist-cons-before
269 (substitute* "src/tests/t.frame"
271 (string-append "GREP=" (which "grep") "\n"))))
273 (native-inputs `(("flex" ,flex)))
274 (inputs `(("bdb" ,bdb)))
275 (home-page "http://bogofilter.sourceforge.net/")
276 (synopsis "Mail classifier based on a Bayesian filter")
278 "Bogofilter is a mail filter that classifies mail as spam or ham
279 (non-spam) by a statistical analysis of the message's header and
280 content (body). The program is able to learn from the user's classifications
281 and corrections. It is based on a Bayesian filter.")
284 (define-public offlineimap
290 (uri (string-append "https://github.com/OfflineIMAP/offlineimap/"
291 "archive/v" version ".tar.gz"))
292 (file-name (string-append name "-" version ".tar.gz"))
295 "00k84qagph3xnxss6rkxm61x07ngz8fvffx4z9jyw5baf3cdd32p"))))
296 (build-system python-build-system)
297 (native-inputs `(("python" ,python-2)))
299 ;; The setup.py script expects python-2.
301 ;; Tests require a modifiable IMAP account.
303 (home-page "http://www.offlineimap.org")
304 (synopsis "Synch emails between two repositories")
306 "OfflineImap synchronizes emails between two repositories, so that you
307 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
308 repository and Maildir/IMAP as LOCAL repository.")
317 (uri (string-append "https://github.com/djcb/mu/archive/v"
319 (file-name (string-append "mu-" version ".tar.gz"))
322 "1bxryacmas2llj68m2dv8dr1vwx8f5k2i2azh69jajkpqx7i4wdq"))))
323 (build-system gnu-build-system)
325 `(("pkg-config" ,pkg-config)
326 ("glib" ,glib "bin") ; for gtester
327 ("autoconf" ,autoconf)
328 ("automake" ,automake)
330 ("texinfo" ,texinfo)))
331 ;; TODO: Add webkit and gtk to build the mug GUI.
334 ("emacs" ,emacs-no-x)
338 ("tzdata" ,tzdata))) ;for mu/test/test-mu-query.c
340 '(#:phases (alist-cons-after
343 (zero? (system* "autoreconf" "-vi")))
345 'check 'check-tz-setup
346 (lambda* (#:key inputs #:allow-other-keys)
347 ;; For mu/test/test-mu-query.c
349 (string-append (assoc-ref inputs "tzdata")
352 (home-page "http://www.djcbsoftware.nl/code/mu/")
353 (synopsis "Quickly find emails")
355 "Mu is a tool for dealing with e-mail messages stored in the
356 Maildir-format. Mu's purpose in life is to help you to quickly find the
357 messages you need; in addition, it allows you to view messages, extract
358 attachments, create new maildirs, and so on.")
361 (define-public notmuch
367 (uri (string-append "http://notmuchmail.org/releases/notmuch-"
371 "1pdp9l7yv71d3fjb30qyccva8h03hvg88q4a00yi50v2j70kvmgj"))))
372 (build-system gnu-build-system)
374 '(#:tests? #f ;; FIXME: Test suite hangs and times out.
375 #:phases (alist-replace
377 (lambda* (#:key outputs #:allow-other-keys)
378 (setenv "CONFIG_SHELL" (which "sh"))
379 (let ((out (assoc-ref outputs "out")))
380 (zero? (system* "./configure"
381 (string-append "--prefix=" out)))))
384 `(("pkg-config" ,pkg-config)))
392 (home-page "http://notmuchmail.org/")
393 (synopsis "Thread-based email index, search, and tagging")
395 "Notmuch is a command-line based program for indexing, searching, read-
396 ing, and tagging large collections of email messages.")
399 (define-public getmail
406 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
407 name "-" version ".tar.gz"))
410 "15rqmm25pq6ll8aaqh8h6pfdkpqs7y6yismb3h3w1bz8j292c8zl"))))
411 (build-system python-build-system)
413 `(#:tests? #f ; no tests
415 (home-page "http://pyropus.ca/software/getmail/")
416 (synopsis "Mail retriever")
418 "A flexible, extensible mail retrieval system with support for
419 POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
420 arbitrary message filtering, single-user and domain-mailboxes, and many other
423 ;; License is specified in file '__init__.py'.
426 (define-public libetpan
432 (uri (string-append "https://github.com/dinhviethoa/" name
433 "/archive/" version ".tar.gz"))
434 (file-name (string-append name "-" version ".tar.gz"))
436 (base32 "05qyqx2c1ppb1jnrs3m52i60f9xlxfxdmb9dnwg4vqjv8kwv2qkr"))))
437 (build-system gnu-build-system)
438 (native-inputs `(("autoconf" ,(autoconf-wrapper))
439 ("automake" ,automake)
441 ("pkg-config" ,pkg-config)))
443 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
444 ;; libraries need to be propagated.
445 `(("cyrus-sasl" ,cyrus-sasl)
446 ("openssl" ,openssl)))
451 '(#:phases (alist-cons-after
454 (setenv "NOCONFIGURE" "true")
455 (zero? (system* "sh" "autogen.sh")))
458 '("--disable-static" "--disable-db")))
459 (home-page "http://www.etpan.org/libetpan.html")
460 (synopsis "Portable middleware for email access")
462 "The purpose of this mail library is to provide a portable, efficient
463 framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
464 provides an API for C language. It's the low-level API used by MailCore and
466 (license (non-copyleft "file://COPYING"))))
468 (define-public claws-mail
475 "mirror://sourceforge/claws-mail/claws-mail-" version
478 (base32 "0cyixz1jgfpi8abh9fbb8ylx9mcvw4jqj81cms666wpqr6v828yp"))))
479 (build-system gnu-build-system)
480 (native-inputs `(("pkg-config" ,pkg-config)))
481 (inputs `(("bogofilter" ,bogofilter)
483 ("dbus-glib" ,dbus-glib)
487 ("ghostscript" ,ghostscript)
488 ("hicolor-icon-theme" ,hicolor-icon-theme)
493 ("libarchive" ,libarchive)
494 ("libcanberra" ,libcanberra)
495 ("libetpan" ,libetpan)
496 ("libnotify" ,libnotify)
500 ("python-2" ,python-2)))
503 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant")))
504 (synopsis "GTK-based Email client")
506 "Claws-Mail is an email client (and news reader) based on GTK+. The
507 appearance and interface are designed to be familiar to new users coming from
508 other popular email clients, as well as experienced users. Almost all commands
509 are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
510 which can add many functionalities to the base client.")
511 (home-page "http://www.claws-mail.org/")
512 (license gpl3+))) ; most files are actually public domain or x11
522 "mirror://sourceforge/msmtp/msmtp-" version ".tar.bz2"))
524 "122z38pv4q03w3mbnhrhg4w85a51258sfdg2ips0b6cgwz3wbw1b"))))
525 (build-system gnu-build-system)
532 `(("pkg-config" ,pkg-config)))
533 (home-page "http://msmtp.sourceforge.net/")
535 `(#:configure-flags (list "--with-libgsasl"
537 "--with-ssl=gnutls")))
539 "Simple and easy to use SMTP client with decent sendmail compatibility")
541 "msmtp is an SMTP client. In the default mode, it transmits a mail to
542 an SMTP server (for example at a free mail provider) which takes care of further
554 "ftp://ftp.exim.org/pub/exim/exim4/exim-" version ".tar.bz2"))
556 (base32 "195a3ll5ck9viazf9pvgcyc0sziln5g0ggmlm6ax002lphmiy88k"))))
557 (build-system gnu-build-system)
574 ;; We'd use #:make-flags but the top-level Makefile calls others
575 ;; recursively, so just set all variables this way.
576 (lambda* (#:key outputs inputs #:allow-other-keys)
577 (substitute* '("Makefile" "OS/Makefile-Default")
578 (("(RM_COMMAND=).*" all var)
579 (string-append var "rm\n")))
580 (copy-file "src/EDITME" "Local/Makefile")
581 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
582 (let ((out (assoc-ref outputs "out"))
583 (gzip (assoc-ref inputs "gzip"))
584 (bzip2 (assoc-ref inputs "bzip2"))
585 (xz (assoc-ref inputs "xz")))
586 (substitute* '("Local/Makefile")
587 (("(BIN_DIRECTORY=).*" all var)
588 (string-append var out "/bin\n"))
589 (("(CONFIGURE_FILE=).*" all var)
590 (string-append var out "/etc/exim.conf\n"))
591 (("(EXIM_USER=).*" all var)
592 (string-append var "nobody\n"))
593 (("(FIXED_NEVER_USERS=).*" all var)
594 (string-append var "\n")) ;XXX no root in build environment
595 (("(COMPRESS_COMMAND=).*" all var)
596 (string-append var gzip "/bin/gzip\n"))
597 (("(ZCAT_COMMAND=).*" all var)
598 (string-append var gzip "/bin/zcat\n")))
599 ;; This file has hardcoded names for tools despite the zcat
600 ;; configuration above.
601 (substitute* '("src/exigrep.src")
602 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
603 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
604 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
605 (("'lzma'") (string-append "'" xz "/bin/lzma'")))))
608 (lambda* (#:key inputs #:allow-other-keys)
609 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
610 (("SHELL=/bin/sh") "SHELL=sh"))
611 (substitute* '("scripts/Configure-config.h")
612 (("\\| /bin/sh") "| sh"))
613 (let ((bash (assoc-ref inputs "bash")))
614 (substitute* '("scripts/Configure-eximon")
615 (("#!/bin/sh") (string-append "#!" bash "/bin/sh")))))
617 #:make-flags '("INSTALL_ARG=-no_chown")
618 ;; No 'check' target.
620 (home-page "http://www.exim.org/")
622 "Message Transfer Agent (MTA) developed at the University of Cambridge")
624 "Exim is a message transfer agent (MTA) developed at the University of
625 Cambridge for use on Unix systems connected to the Internet. In style it is
626 similar to Smail 3, but its facilities are more general. There is a great
627 deal of flexibility in the way mail can be routed, and there are extensive
628 facilities for checking incoming mail.")
638 (uri (string-append "mirror://sourceforge/isync/isync/"
639 version "/isync-" version ".tar.gz"))
641 "1960ah3fmp75cakd06lcx50n5q0yvfsadjh3lffhyvjvj7ava9d2"))))
642 (build-system gnu-build-system)
645 ("openssl" ,openssl)))
646 (home-page "http://isync.sourceforge.net/")
647 (synopsis "Mailbox synchronization program")
649 "isync/mbsync is command line tool for two-way synchronization of
650 mailboxes. Currently Maildir and IMAP are supported types.")
653 (define-public perl-email-address
655 (name "perl-email-address")
660 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
661 "Email-Address-" version ".tar.gz"))
664 "1ai4r149pzjv9dc2vddir8zylj0z1pii93rm4g591lx7avim71hx"))))
665 (build-system perl-build-system)
666 (home-page "http://search.cpan.org/dist/Email-Address")
667 (synopsis "Email address parsing and creation")
668 (description "Email::Address implements a regex-based RFC 2822 parser that
669 locates email addresses in strings and returns a list of Email::Address
670 objects found. Alternatively you may construct objects manually.")
671 (license (package-license perl))))
673 (define-public perl-email-messageid
675 (name "perl-email-messageid")
680 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
681 "Email-MessageID-" version ".tar.gz"))
684 "09216naz21x99ff33wdm3j3zq1zhdbxhrsmx8bvavjrw3gjsvrq3"))))
685 (build-system perl-build-system)
686 (home-page "http://search.cpan.org/dist/Email-MessageID")
687 (synopsis "Generate world unique message-ids")
688 (description "Email::MessageID generates recommended message-ids to
689 identify a message uniquely.")
690 (license (package-license perl))))
692 ;;; mail.scm ends here