1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages mail)
21 #:use-module (gnu packages)
22 #:use-module (gnu packages autotools)
23 #:use-module (gnu packages cyrus-sasl)
24 #:use-module (gnu packages dejagnu)
25 #:use-module (gnu packages gdbm)
26 #:use-module (gnu packages gnupg)
27 #:use-module (gnu packages gnutls)
28 #:use-module (gnu packages guile)
29 #:use-module (gnu packages linux)
30 #:use-module (gnu packages m4)
31 #:use-module (gnu packages mysql)
32 #:use-module (gnu packages ncurses)
33 #:use-module (gnu packages openssl)
34 #:use-module (gnu packages perl)
35 #:use-module (gnu packages readline)
36 #:use-module (gnu packages texinfo)
37 #:use-module (gnu packages compression)
38 #:use-module (gnu packages glib)
39 #:use-module (gnu packages pkg-config)
40 #:use-module ((guix licenses)
41 #:select (gpl2+ gpl3+ lgpl2.1+ lgpl3+))
42 #:use-module (guix packages)
43 #:use-module (guix download)
44 #:use-module (guix build-system gnu)
45 #:use-module (srfi srfi-1))
47 (define-public mailutils
53 (uri (string-append "mirror://gnu/mailutils/mailutils-"
57 "0szbqa12zqzldqyw97lxqax3ja2adis83i7brdfsxmrfw68iaf65"))
58 (patches (list (search-patch "m4-gets-undeclared.patch")))))
59 (build-system gnu-build-system)
61 '(;; TODO: Add `--with-sql'.
62 #:phases (alist-cons-before
65 ;; Use Guile 2.0's public API.
66 (substitute* "libmu_scm/mu_message.c"
67 (("scm_i_string_length")
68 "scm_c_string_length"))
70 ;; This file should be generated to use the right
71 ;; value of $(libdir) et al.
72 (delete-file "libmu_scm/mailutils.scm")
74 ;; Use the right file name for `cat'.
75 (substitute* "testsuite/lib/mailutils.exp"
79 #:parallel-tests? #f))
81 `(("dejagnu" ,dejagnu)
87 ("readline" ,readline)
88 ("linux-pam" ,linux-pam)
91 (home-page "http://www.gnu.org/software/mailutils/")
92 (synopsis "Utilities and library for reading and serving mail")
94 "GNU Mailutils is a collection of programs for managing, viewing and
95 processing electronic mail. It contains both utilities and server daemons
96 and all operate in a protocol-agnostic way. The underlying libraries are
97 also available, simplifying the addition of mail capabilities to new
100 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
101 (list gpl3+ lgpl3+))))
103 (define-public fetchmail
109 (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-"
113 "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r"))))
114 (build-system gnu-build-system)
116 `(("openssl" ,openssl)))
118 `(#:configure-flags (list (string-append "--with-ssl="
119 (assoc-ref %build-inputs "openssl")))))
120 (home-page "http://fetchmail.berlios.de/")
121 (synopsis "Remote-mailr etrieval and forwarding utility")
123 "Fetchmail is a full-featured, robust, well-documented remote-mail
124 retrieval and forwarding utility intended to be used over on-demand
125 TCP/IP links (such as SLIP or PPP connections). It supports every
126 remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
127 KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
130 Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
131 so it can then be read by normal mail user agents such as mutt, elm
132 or BSD Mail. It allows all your system MTA's filtering, forwarding, and
133 aliasing facilities to work just as they would on normal mail.")
134 (license gpl2+))) ; most files are actually public domain or x11
142 (uri (string-append "ftp://ftp.mutt.org/mutt/devel/mutt-"
146 "1864cwz240gh0zy56fb47qqzwyf6ghg01037rb4p2kqgimpg6h91"))))
147 (build-system gnu-build-system)
149 `(("cyrus-sasl" ,cyrus-sasl)
155 `(#:configure-flags '("--enable-smtp"
161 ;; so that mutt does not check whether the path
162 ;; exists, which it does not in the chroot
163 "--with-mailpath=/var/mail")))
164 (home-page "http://www.mutt.org/")
165 (synopsis "Mail client")
167 "Mutt is a small but very powerful text-based mail client for Unix
177 (uri (string-append "http://download.gnome.org/sources/gmime/"
178 (string-join (take (string-split version #\.)
181 "/gmime-" version ".tar.xz"))
184 "0jm1fgbjgh496rsc0il2y46qd4bqq2ln9168p4zzh68mk4ml1yxg"))))
185 (build-system gnu-build-system)
187 `(("pkg-config" ,pkg-config)
188 ("gnupg" ,gnupg))) ; for tests only
189 (inputs `(("glib" ,glib)
195 'unpack 'patch-paths-in-tests
197 ;; The test programs run several programs using 'system'
198 ;; with hard-coded paths. Here we patch them all. We also
199 ;; change "gpg" to "gpg2".
200 (substitute* (find-files "tests" "\\.c$")
201 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
202 (let* ((base (basename prog-path))
203 (prog (which (if (string=? base "gpg") "gpg2" base))))
204 (string-append pre (or prog (error "not found: " base)))))))
206 (home-page "http://spruce.sourceforge.net/gmime/")
207 (synopsis "MIME message parser and creator library")
209 "GMime provides a core library and set of utilities which may be used for
210 the creation and parsing of messages using the Multipurpose Internet Mail
212 (license (list lgpl2.1+ gpl2+ gpl3+))))
214 ;;; mail.scm ends here