build: container: Add #:host-uids argument to call-with-container.
[jackhill/guix/guix.git] / gnu / packages / mail.scm
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>
10 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
11 ;;;
12 ;;; This file is part of GNU Guix.
13 ;;;
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
15 ;;; under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation; either version 3 of the License, or (at
17 ;;; your option) any later version.
18 ;;;
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
20 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
23 ;;;
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27 (define-module (gnu packages mail)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages autotools)
30 #:use-module (gnu packages base)
31 #:use-module (gnu packages backup)
32 #:use-module (gnu packages bash)
33 #:use-module (gnu packages curl)
34 #:use-module (gnu packages cyrus-sasl)
35 #:use-module (gnu packages databases)
36 #:use-module (gnu packages dejagnu)
37 #:use-module (gnu packages emacs)
38 #:use-module (gnu packages enchant)
39 #:use-module (gnu packages gdbm)
40 #:use-module (gnu packages ghostscript)
41 #:use-module (gnu packages glib)
42 #:use-module (gnu packages gnome)
43 #:use-module (gnu packages gnupg)
44 #:use-module (gnu packages gsasl)
45 #:use-module (gnu packages gtk)
46 #:use-module (gnu packages guile)
47 #:use-module (gnu packages libcanberra)
48 #:use-module (gnu packages libidn)
49 #:use-module (gnu packages linux)
50 #:use-module (gnu packages m4)
51 #:use-module (gnu packages databases)
52 #:use-module (gnu packages ncurses)
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 tls)
66 #:use-module (gnu packages xml)
67 #:use-module (gnu packages xorg)
68 #:use-module ((guix licenses)
69 #:select (gpl2 gpl2+ gpl3+ lgpl2.1 lgpl2.1+ lgpl3+ non-copyleft
70 (expat . license:expat)))
71 #:use-module (guix packages)
72 #:use-module (guix download)
73 #:use-module (guix utils)
74 #:use-module (guix build-system gnu)
75 #:use-module (guix build-system perl)
76 #:use-module (guix build-system python))
77
78 (define-public mailutils
79 (package
80 (name "mailutils")
81 (version "2.2")
82 (source (origin
83 (method url-fetch)
84 (uri (string-append "mirror://gnu/mailutils/mailutils-"
85 version ".tar.bz2"))
86 (sha256
87 (base32
88 "0szbqa12zqzldqyw97lxqax3ja2adis83i7brdfsxmrfw68iaf65"))
89 (patches (list (search-patch "m4-gets-undeclared.patch")))))
90 (build-system gnu-build-system)
91 (arguments
92 '(;; TODO: Add `--with-sql'.
93 #:phases (alist-cons-before
94 'build 'pre-build
95 (lambda _
96 ;; Use Guile 2.0's public API.
97 (substitute* "libmu_scm/mu_message.c"
98 (("scm_i_string_length")
99 "scm_c_string_length"))
100
101 ;; This file should be generated to use the right
102 ;; value of $(libdir) et al.
103 (delete-file "libmu_scm/mailutils.scm")
104
105 ;; Use the right file name for `cat'.
106 (substitute* "testsuite/lib/mailutils.exp"
107 (("/bin/cat")
108 (which "cat"))))
109 %standard-phases)
110 #:parallel-tests? #f))
111 (inputs
112 `(("dejagnu" ,dejagnu)
113 ("m4" ,m4)
114 ("texinfo" ,texinfo)
115 ("guile" ,guile-2.0)
116 ("gnutls" ,gnutls)
117 ("ncurses" ,ncurses)
118
119 ;; With Readline 6.3, examples/pop3client.c fails to build because it
120 ;; uses the now undefined 'CPPFunction' type.
121 ("readline" ,readline-6.2)
122
123 ("linux-pam" ,linux-pam)
124 ("libltdl" ,libltdl)
125 ("gdbm" ,gdbm)))
126 (home-page "http://www.gnu.org/software/mailutils/")
127 (synopsis "Utilities and library for reading and serving mail")
128 (description
129 "GNU Mailutils is a collection of programs for managing, viewing and
130 processing electronic mail. It contains both utilities and server daemons
131 and all operate in a protocol-agnostic way. The underlying libraries are
132 also available, simplifying the addition of mail capabilities to new
133 software.")
134 (license
135 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
136 (list gpl3+ lgpl3+))))
137
138 (define-public fetchmail
139 (package
140 (name "fetchmail")
141 (version "6.3.26")
142 (source (origin
143 (method url-fetch)
144 (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-"
145 version ".tar.xz"))
146 (sha256
147 (base32
148 "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r"))))
149 (build-system gnu-build-system)
150 (inputs
151 `(("openssl" ,openssl)))
152 (arguments
153 `(#:configure-flags (list (string-append "--with-ssl="
154 (assoc-ref %build-inputs "openssl")))))
155 (home-page "http://www.fetchmail.info/")
156 (synopsis "Remote-mail retrieval and forwarding utility")
157 (description
158 "Fetchmail is a full-featured, robust, well-documented remote-mail
159 retrieval and forwarding utility intended to be used over on-demand
160 TCP/IP links (such as SLIP or PPP connections). It supports every
161 remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
162 KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
163 and IPSEC.
164
165 Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
166 so it can then be read by normal mail user agents such as mutt, elm
167 or BSD Mail. It allows all your system MTA's filtering, forwarding, and
168 aliasing facilities to work just as they would on normal mail.")
169 (license gpl2+))) ; most files are actually public domain or x11
170
171 (define-public mutt
172 (package
173 (name "mutt")
174 (version "1.5.23")
175 (source (origin
176 (method url-fetch)
177 (uri (list ;; Temporarily put bitbucket first, because
178 ;; ftp.mutt.org has been down for a while.
179 (string-append "https://bitbucket.org/mutt/mutt/downloads/mutt-"
180 version ".tar.gz")
181 (string-append "ftp://ftp.mutt.org/mutt/devel/mutt-"
182 version ".tar.gz")))
183 (sha256
184 (base32
185 "0dzx4qk50pjfsb6cs5jahng96a52k12f7pm0sc78iqdrawg71w1s"))
186 (patches (map search-patch
187 '("mutt-CVE-2014-9116.patch"
188 "mutt-store-references.patch")))))
189 (build-system gnu-build-system)
190 (inputs
191 `(("cyrus-sasl" ,cyrus-sasl)
192 ("gpgme" ,gpgme)
193 ("ncurses" ,ncurses)
194 ("openssl" ,openssl)
195 ("perl" ,perl)))
196 (arguments
197 `(#:configure-flags '("--enable-smtp"
198 "--enable-imap"
199 "--enable-pop"
200 "--enable-gpgme"
201 "--with-ssl"
202 "--with-sasl"
203 ;; so that mutt does not check whether the path
204 ;; exists, which it does not in the chroot
205 "--with-mailpath=/var/mail")))
206 (home-page "http://www.mutt.org/")
207 (synopsis "Mail client")
208 (description
209 "Mutt is a small but very powerful text-based mail client for Unix
210 operating systems.")
211 (license gpl2+)))
212
213 (define-public gmime
214 (package
215 (name "gmime")
216 (version "2.6.19")
217 (source (origin
218 (method url-fetch)
219 (uri (string-append "mirror://gnome/sources/gmime/"
220 (version-major+minor version)
221 "/gmime-" version ".tar.xz"))
222 (sha256
223 (base32
224 "0jm1fgbjgh496rsc0il2y46qd4bqq2ln9168p4zzh68mk4ml1yxg"))))
225 (build-system gnu-build-system)
226 (native-inputs
227 `(("pkg-config" ,pkg-config)
228 ("gnupg" ,gnupg))) ; for tests only
229 (inputs `(("glib" ,glib)
230 ("gpgme" ,gpgme)
231 ("zlib" ,zlib)))
232 (arguments
233 `(#:phases
234 (alist-cons-after
235 'unpack 'patch-paths-in-tests
236 (lambda _
237 ;; The test programs run several programs using 'system' with
238 ;; hard-coded paths. Here we patch them all. We also change "gpg"
239 ;; to "gpg2". We use ISO-8859-1 here because test-iconv.c contains
240 ;; raw byte sequences in several different encodings.
241 (with-fluids ((%default-port-encoding #f))
242 (substitute* (find-files "tests" "\\.c$")
243 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
244 (let* ((base (basename prog-path))
245 (prog (which (if (string=? base "gpg") "gpg2" base))))
246 (string-append pre (or prog (error "not found: " base))))))))
247 %standard-phases)))
248 (home-page "http://spruce.sourceforge.net/gmime/")
249 (synopsis "MIME message parser and creator library")
250 (description
251 "GMime provides a core library and set of utilities which may be used for
252 the creation and parsing of messages using the Multipurpose Internet Mail
253 Extension (MIME).")
254 (license (list lgpl2.1+ gpl2+ gpl3+))))
255
256 (define-public bogofilter
257 (package
258 (name "bogofilter")
259 (version "1.2.4")
260 (source (origin
261 (method url-fetch)
262 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-"
263 version "/bogofilter-"
264 version ".tar.bz2"))
265 (sha256
266 (base32
267 "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1"))))
268 (build-system gnu-build-system)
269 (arguments
270 '(#:phases (alist-cons-before
271 'check 'pre-check
272 (lambda _
273 (substitute* "src/tests/t.frame"
274 (("GREP=/bin/grep")
275 (string-append "GREP=" (which "grep") "\n"))))
276 %standard-phases)))
277 (native-inputs `(("flex" ,flex)))
278 (inputs `(("bdb" ,bdb)))
279 (home-page "http://bogofilter.sourceforge.net/")
280 (synopsis "Mail classifier based on a Bayesian filter")
281 (description
282 "Bogofilter is a mail filter that classifies mail as spam or ham
283 (non-spam) by a statistical analysis of the message's header and
284 content (body). The program is able to learn from the user's classifications
285 and corrections. It is based on a Bayesian filter.")
286 (license gpl2)))
287
288 (define-public offlineimap
289 (package
290 (name "offlineimap")
291 (version "6.5.5")
292 (source (origin
293 (method url-fetch)
294 (uri (string-append "https://github.com/OfflineIMAP/offlineimap/"
295 "archive/v" version ".tar.gz"))
296 (file-name (string-append name "-" version ".tar.gz"))
297 (sha256
298 (base32
299 "00k84qagph3xnxss6rkxm61x07ngz8fvffx4z9jyw5baf3cdd32p"))))
300 (build-system python-build-system)
301 (native-inputs `(("python" ,python-2)))
302 (arguments
303 ;; The setup.py script expects python-2.
304 `(#:python ,python-2
305 ;; Tests require a modifiable IMAP account.
306 #:tests? #f))
307 (home-page "http://www.offlineimap.org")
308 (synopsis "Synch emails between two repositories")
309 (description
310 "OfflineImap synchronizes emails between two repositories, so that you
311 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
312 repository and Maildir/IMAP as LOCAL repository.")
313 (license gpl2+)))
314
315 (define-public mu
316 (package
317 (name "mu")
318 (version "0.9.12")
319 (source (origin
320 (method url-fetch)
321 (uri (string-append "https://github.com/djcb/mu/archive/v"
322 version ".tar.gz"))
323 (file-name (string-append "mu-" version ".tar.gz"))
324 (sha256
325 (base32
326 "1bxryacmas2llj68m2dv8dr1vwx8f5k2i2azh69jajkpqx7i4wdq"))))
327 (build-system gnu-build-system)
328 (native-inputs
329 `(("pkg-config" ,pkg-config)
330 ("glib" ,glib "bin") ; for gtester
331 ("autoconf" ,autoconf)
332 ("automake" ,automake)
333 ("libtool" ,libtool)
334 ("texinfo" ,texinfo)))
335 ;; TODO: Add webkit and gtk to build the mug GUI.
336 (inputs
337 `(("xapian" ,xapian)
338 ("emacs" ,emacs-no-x)
339 ("guile" ,guile-2.0)
340 ("glib" ,glib)
341 ("gmime" ,gmime)
342 ("tzdata" ,tzdata))) ;for mu/test/test-mu-query.c
343 (arguments
344 '(#:phases (alist-cons-after
345 'unpack 'autoreconf
346 (lambda _
347 (zero? (system* "autoreconf" "-vi")))
348 (alist-cons-before
349 'check 'check-tz-setup
350 (lambda* (#:key inputs #:allow-other-keys)
351 ;; For mu/test/test-mu-query.c
352 (setenv "TZDIR"
353 (string-append (assoc-ref inputs "tzdata")
354 "/share/zoneinfo")))
355 %standard-phases))))
356 (home-page "http://www.djcbsoftware.nl/code/mu/")
357 (synopsis "Quickly find emails")
358 (description
359 "Mu is a tool for dealing with e-mail messages stored in the
360 Maildir-format. Mu's purpose in life is to help you to quickly find the
361 messages you need; in addition, it allows you to view messages, extract
362 attachments, create new maildirs, and so on.")
363 (license gpl3+)))
364
365 (define-public notmuch
366 (package
367 (name "notmuch")
368 (version "0.19")
369 (source (origin
370 (method url-fetch)
371 (uri (string-append "http://notmuchmail.org/releases/notmuch-"
372 version ".tar.gz"))
373 (sha256
374 (base32
375 "1szf6c44g209pcjq5nvfhlp3nzcm3lrcwv4spsxmwy13hiaccvrr"))))
376 (build-system gnu-build-system)
377 (arguments
378 '(#:tests? #f ;; FIXME: Test suite hangs and times out.
379 #:phases (alist-replace
380 'configure
381 (lambda* (#:key outputs #:allow-other-keys)
382 (setenv "CC" "gcc")
383 (setenv "CONFIG_SHELL" (which "sh"))
384
385 ;; XXX Should python-docutils make a symlink
386 ;; for "rst2man" and other similar programs?
387 (substitute* '("configure" "doc/prerst2man.py")
388 ((" rst2man ") " rst2man.py "))
389
390 (let ((out (assoc-ref outputs "out")))
391 (zero? (system* "./configure"
392 (string-append "--prefix=" out)))))
393 %standard-phases)))
394 (native-inputs
395 `(("pkg-config" ,pkg-config)
396 ("python" ,python-2)
397 ("python2-docutils" ,python2-docutils)
398 ("bash-completion" ,bash-completion)))
399 (inputs
400 `(("emacs" ,emacs)
401 ("glib" ,glib)
402 ("gmime" ,gmime)
403 ("talloc" ,talloc)
404 ("xapian" ,xapian)
405 ("zlib" ,zlib)))
406 (home-page "http://notmuchmail.org/")
407 (synopsis "Thread-based email index, search, and tagging")
408 (description
409 "Notmuch is a command-line based program for indexing, searching, read-
410 ing, and tagging large collections of email messages.")
411 (license gpl3+)))
412
413 (define-public getmail
414 (package
415 (name "getmail")
416 (version "4.46.0")
417 (source
418 (origin
419 (method url-fetch)
420 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
421 name "-" version ".tar.gz"))
422 (sha256
423 (base32
424 "15rqmm25pq6ll8aaqh8h6pfdkpqs7y6yismb3h3w1bz8j292c8zl"))))
425 (build-system python-build-system)
426 (arguments
427 `(#:tests? #f ; no tests
428 #:python ,python-2))
429 (home-page "http://pyropus.ca/software/getmail/")
430 (synopsis "Mail retriever")
431 (description
432 "A flexible, extensible mail retrieval system with support for
433 POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
434 arbitrary message filtering, single-user and domain-mailboxes, and many other
435 useful features.")
436
437 ;; License is specified in file '__init__.py'.
438 (license gpl2)))
439
440 (define-public libetpan
441 (package
442 (name "libetpan")
443 (version "1.6")
444 (source (origin
445 (method url-fetch)
446 (uri (string-append "https://github.com/dinhviethoa/" name
447 "/archive/" version ".tar.gz"))
448 (file-name (string-append name "-" version ".tar.gz"))
449 (sha256
450 (base32 "05qyqx2c1ppb1jnrs3m52i60f9xlxfxdmb9dnwg4vqjv8kwv2qkr"))))
451 (build-system gnu-build-system)
452 (native-inputs `(("autoconf" ,(autoconf-wrapper))
453 ("automake" ,automake)
454 ("libtool" ,libtool)
455 ("pkg-config" ,pkg-config)))
456 (propagated-inputs
457 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
458 ;; libraries need to be propagated.
459 `(("cyrus-sasl" ,cyrus-sasl)
460 ("openssl" ,openssl)))
461 (inputs
462 `(("curl" ,curl)
463 ("expat" ,expat)))
464 (arguments
465 '(#:phases (alist-cons-after
466 'unpack 'autogen
467 (lambda _
468 (setenv "NOCONFIGURE" "true")
469 (zero? (system* "sh" "autogen.sh")))
470 %standard-phases)
471 #:configure-flags
472 '("--disable-static" "--disable-db")))
473 (home-page "http://www.etpan.org/libetpan.html")
474 (synopsis "Portable middleware for email access")
475 (description
476 "The purpose of this mail library is to provide a portable, efficient
477 framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
478 provides an API for C language. It's the low-level API used by MailCore and
479 MailCore 2.")
480 (license (non-copyleft "file://COPYING"))))
481
482 (define-public claws-mail
483 (package
484 (name "claws-mail")
485 (version "3.11.1")
486 (source (origin
487 (method url-fetch)
488 (uri (string-append
489 "mirror://sourceforge/claws-mail/claws-mail-" version
490 ".tar.xz"))
491 (sha256
492 (base32 "0cyixz1jgfpi8abh9fbb8ylx9mcvw4jqj81cms666wpqr6v828yp"))))
493 (build-system gnu-build-system)
494 (native-inputs `(("pkg-config" ,pkg-config)))
495 (inputs `(("bogofilter" ,bogofilter)
496 ("curl" ,curl)
497 ("dbus-glib" ,dbus-glib)
498 ("enchant" ,enchant)
499 ("expat" ,expat)
500 ("ghostscript" ,ghostscript)
501 ("hicolor-icon-theme" ,hicolor-icon-theme)
502 ("gnupg" ,gnupg)
503 ("gnutls" ,gnutls)
504 ("gpgme" ,gpgme)
505 ("gtk" ,gtk+-2)
506 ("libarchive" ,libarchive)
507 ("libcanberra" ,libcanberra)
508 ("libetpan" ,libetpan)
509 ("libnotify" ,libnotify)
510 ("libsm" ,libsm)
511 ("libxml2" ,libxml2)
512 ("perl" ,perl)
513 ("python-2" ,python-2)))
514 (arguments
515 '(#:configure-flags
516 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant")))
517 (synopsis "GTK-based Email client")
518 (description
519 "Claws-Mail is an email client (and news reader) based on GTK+. The
520 appearance and interface are designed to be familiar to new users coming from
521 other popular email clients, as well as experienced users. Almost all commands
522 are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
523 which can add many functionalities to the base client.")
524 (home-page "http://www.claws-mail.org/")
525 (license gpl3+))) ; most files are actually public domain or x11
526
527 (define-public msmtp
528 (package
529 (name "msmtp")
530 (version "1.4.32")
531 (source
532 (origin
533 (method url-fetch)
534 (uri (string-append
535 "mirror://sourceforge/msmtp/msmtp-" version ".tar.bz2"))
536 (sha256 (base32
537 "122z38pv4q03w3mbnhrhg4w85a51258sfdg2ips0b6cgwz3wbw1b"))))
538 (build-system gnu-build-system)
539 (inputs
540 `(("libidn" ,libidn)
541 ("gnutls" ,gnutls)
542 ("zlib" ,zlib)
543 ("gsasl" ,gsasl)))
544 (native-inputs
545 `(("pkg-config" ,pkg-config)))
546 (home-page "http://msmtp.sourceforge.net/")
547 (arguments
548 `(#:configure-flags (list "--with-libgsasl"
549 "--with-libidn"
550 "--with-ssl=gnutls")))
551 (synopsis
552 "Simple and easy to use SMTP client with decent sendmail compatibility")
553 (description
554 "msmtp is an SMTP client. In the default mode, it transmits a mail to
555 an SMTP server (for example at a free mail provider) which takes care of further
556 delivery.")
557 (license gpl3+)))
558
559 (define-public exim
560 (package
561 (name "exim")
562 (version "4.85")
563 (source
564 (origin
565 (method url-fetch)
566 (uri (string-append
567 "ftp://ftp.exim.org/pub/exim/exim4/exim-" version ".tar.bz2"))
568 (sha256
569 (base32 "195a3ll5ck9viazf9pvgcyc0sziln5g0ggmlm6ax002lphmiy88k"))))
570 (build-system gnu-build-system)
571 (inputs
572 `(("bdb" ,bdb)
573 ("gnutls" ,gnutls)
574 ("gzip" ,gzip)
575 ("bzip2" ,bzip2)
576 ("xz" ,xz)
577 ("pcre" ,pcre)
578 ("perl" ,perl)
579 ("libxt" ,libxt)
580 ("libxaw" ,libxaw)))
581 (native-inputs
582 `(("perl" ,perl)))
583 (arguments
584 '(#:phases
585 (alist-replace
586 'configure
587 ;; We'd use #:make-flags but the top-level Makefile calls others
588 ;; recursively, so just set all variables this way.
589 (lambda* (#:key outputs inputs #:allow-other-keys)
590 (substitute* '("Makefile" "OS/Makefile-Default")
591 (("(RM_COMMAND=).*" all var)
592 (string-append var "rm\n")))
593 (copy-file "src/EDITME" "Local/Makefile")
594 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
595 (let ((out (assoc-ref outputs "out"))
596 (gzip (assoc-ref inputs "gzip"))
597 (bzip2 (assoc-ref inputs "bzip2"))
598 (xz (assoc-ref inputs "xz")))
599 (substitute* '("Local/Makefile")
600 (("(BIN_DIRECTORY=).*" all var)
601 (string-append var out "/bin\n"))
602 (("(CONFIGURE_FILE=).*" all var)
603 (string-append var out "/etc/exim.conf\n"))
604 (("(EXIM_USER=).*" all var)
605 (string-append var "nobody\n"))
606 (("(FIXED_NEVER_USERS=).*" all var)
607 (string-append var "\n")) ;XXX no root in build environment
608 (("(COMPRESS_COMMAND=).*" all var)
609 (string-append var gzip "/bin/gzip\n"))
610 (("(ZCAT_COMMAND=).*" all var)
611 (string-append var gzip "/bin/zcat\n")))
612 ;; This file has hardcoded names for tools despite the zcat
613 ;; configuration above.
614 (substitute* '("src/exigrep.src")
615 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
616 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
617 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
618 (("'lzma'") (string-append "'" xz "/bin/lzma'")))))
619 (alist-cons-before
620 'build 'fix-sh-paths
621 (lambda* (#:key inputs #:allow-other-keys)
622 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
623 (("SHELL=/bin/sh") "SHELL=sh"))
624 (substitute* '("scripts/Configure-config.h")
625 (("\\| /bin/sh") "| sh"))
626 (let ((bash (assoc-ref inputs "bash")))
627 (substitute* '("scripts/Configure-eximon")
628 (("#!/bin/sh") (string-append "#!" bash "/bin/sh")))))
629 %standard-phases))
630 #:make-flags '("INSTALL_ARG=-no_chown")
631 ;; No 'check' target.
632 #:tests? #f))
633 (home-page "http://www.exim.org/")
634 (synopsis
635 "Message Transfer Agent (MTA) developed at the University of Cambridge")
636 (description
637 "Exim is a message transfer agent (MTA) developed at the University of
638 Cambridge for use on Unix systems connected to the Internet. In style it is
639 similar to Smail 3, but its facilities are more general. There is a great
640 deal of flexibility in the way mail can be routed, and there are extensive
641 facilities for checking incoming mail.")
642 (license gpl2+)))
643
644 (define-public dovecot
645 (package
646 (name "dovecot")
647 (version "2.2.16")
648 (source
649 (origin
650 (method url-fetch)
651 (uri (string-append "http://www.dovecot.org/releases/"
652 (version-major+minor version) "/"
653 name "-" version ".tar.gz"))
654 (sha256 (base32
655 "1w6gg4h9mxg3i8faqpmgj19imzyy001b0v8ihch8ma3zl63i5kjn"))))
656 (build-system gnu-build-system)
657 (native-inputs
658 `(("pkg-config" ,pkg-config)))
659 (inputs
660 `(("openssl" ,openssl)
661 ("zlib" ,zlib)
662 ("bzip2" ,bzip2)
663 ("sqlite" ,sqlite)))
664 (arguments
665 `(#:configure-flags '("--sysconfdir=/etc"
666 "--localstatedir=/var")
667 #:phases (modify-phases %standard-phases
668 (add-before
669 'configure 'pre-configure
670 (lambda _
671 ;; Simple hack to avoid installing in /etc
672 (substitute* '("doc/Makefile.in"
673 "doc/example-config/Makefile.in")
674 (("pkgsysconfdir = .*")
675 "pkgsysconfdir = /tmp/etc"))
676 #t)))))
677 (home-page "http://www.dovecot.org")
678 (synopsis "Secure POP3/IMAP server")
679 (description
680 "Dovecot is a mail server whose major goals are security and reliability.
681 It supports mbox/Maildir and its own dbox/mdbox formats.")
682 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
683 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
684 ;; Unicode, Inc. License Agreement for Data Files and Software.
685 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
686
687 (define-public isync
688 (package
689 (name "isync")
690 (version "1.1.2")
691 (source
692 (origin
693 (method url-fetch)
694 (uri (string-append "mirror://sourceforge/isync/isync/"
695 version "/isync-" version ".tar.gz"))
696 (sha256 (base32
697 "1960ah3fmp75cakd06lcx50n5q0yvfsadjh3lffhyvjvj7ava9d2"))))
698 (build-system gnu-build-system)
699 (inputs
700 `(("bdb" ,bdb)
701 ("openssl" ,openssl)))
702 (home-page "http://isync.sourceforge.net/")
703 (synopsis "Mailbox synchronization program")
704 (description
705 "isync/mbsync is command line tool for two-way synchronization of
706 mailboxes. Currently Maildir and IMAP are supported types.")
707 (license gpl2+)))
708
709 (define-public perl-email-abstract
710 (package
711 (name "perl-email-abstract")
712 (version "3.008")
713 (source
714 (origin
715 (method url-fetch)
716 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
717 "Email-Abstract-" version ".tar.gz"))
718 (sha256
719 (base32
720 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
721 (build-system perl-build-system)
722 (propagated-inputs
723 `(("perl-email-simple" ,perl-email-simple)
724 ("perl-mro-compat" ,perl-mro-compat)))
725 (home-page "http://search.cpan.org/dist/Email-Abstract")
726 (synopsis "Interface to mail representations")
727 (description "Email::Abstract provides module writers with the ability to
728 write simple, representation-independent mail handling code.")
729 (license (package-license perl))))
730
731 (define-public perl-email-address
732 (package
733 (name "perl-email-address")
734 (version "1.907")
735 (source
736 (origin
737 (method url-fetch)
738 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
739 "Email-Address-" version ".tar.gz"))
740 (sha256
741 (base32
742 "1ai4r149pzjv9dc2vddir8zylj0z1pii93rm4g591lx7avim71hx"))))
743 (build-system perl-build-system)
744 (home-page "http://search.cpan.org/dist/Email-Address")
745 (synopsis "Email address parsing and creation")
746 (description "Email::Address implements a regex-based RFC 2822 parser that
747 locates email addresses in strings and returns a list of Email::Address
748 objects found. Alternatively you may construct objects manually.")
749 (license (package-license perl))))
750
751 (define-public perl-email-date-format
752 (package
753 (name "perl-email-date-format")
754 (version "1.005")
755 (source
756 (origin
757 (method url-fetch)
758 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
759 "Email-Date-Format-" version ".tar.gz"))
760 (sha256
761 (base32
762 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
763 (build-system perl-build-system)
764 (home-page "http://search.cpan.org/dist/Email-Date-Format")
765 (synopsis "Produce RFC 2822 date strings")
766 (description "Email::Date::Format provides a means for generating an RFC
767 2822 compliant datetime string.")
768 (license (package-license perl))))
769
770 (define-public perl-email-messageid
771 (package
772 (name "perl-email-messageid")
773 (version "1.405")
774 (source
775 (origin
776 (method url-fetch)
777 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
778 "Email-MessageID-" version ".tar.gz"))
779 (sha256
780 (base32
781 "09216naz21x99ff33wdm3j3zq1zhdbxhrsmx8bvavjrw3gjsvrq3"))))
782 (build-system perl-build-system)
783 (home-page "http://search.cpan.org/dist/Email-MessageID")
784 (synopsis "Generate world unique message-ids")
785 (description "Email::MessageID generates recommended message-ids to
786 identify a message uniquely.")
787 (license (package-license perl))))
788
789 (define-public perl-email-mime
790 (package
791 (name "perl-email-mime")
792 (version "1.929")
793 (source
794 (origin
795 (method url-fetch)
796 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
797 "Email-MIME-" version ".tar.gz"))
798 (sha256
799 (base32
800 "1sf7dldg4dvicyw6dl1vx6s1gjq3fcppi0103ikl0vi6v5xjdjdh"))))
801 (build-system perl-build-system)
802 (propagated-inputs
803 `(("perl-email-address" ,perl-email-address)
804 ("perl-email-messageid" ,perl-email-messageid)
805 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
806 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
807 ("perl-email-simple" ,perl-email-simple)
808 ("perl-mime-types" ,perl-mime-types)))
809 (home-page "http://search.cpan.org/dist/Email-MIME")
810 (synopsis "MIME message handling")
811 (description "Email::MIME is an extension of the Email::Simple module, to
812 handle MIME encoded messages. It takes a message as a string, splits it up
813 into its constituent parts, and allows you access to various parts of the
814 message. Headers are decoded from MIME encoding.")
815 (license (package-license perl))))
816
817 (define-public perl-email-mime-contenttype
818 (package
819 (name "perl-email-mime-contenttype")
820 (version "1.017")
821 (source
822 (origin
823 (method url-fetch)
824 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
825 "Email-MIME-ContentType-" version ".tar.gz"))
826 (sha256
827 (base32
828 "1cl1l97lg690dh7i704hqi7yhxalq1chy7ylld5yc5v38jqa6gcn"))))
829 (build-system perl-build-system)
830 (native-inputs
831 `(("perl-capture-tiny" ,perl-capture-tiny)))
832 (home-page "http://search.cpan.org/dist/Email-MIME-ContentType")
833 (synopsis "Parse MIME Content-Type headers")
834 (description "Email::MIME::ContentType parses a MIME Content-Type
835 header.")
836 (license (package-license perl))))
837
838 (define-public perl-email-mime-encodings
839 (package
840 (name "perl-email-mime-encodings")
841 (version "1.315")
842 (source
843 (origin
844 (method url-fetch)
845 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
846 "Email-MIME-Encodings-" version ".tar.gz"))
847 (sha256
848 (base32
849 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
850 (build-system perl-build-system)
851 (native-inputs
852 `(("perl-capture-tiny" ,perl-capture-tiny)))
853 (home-page "http://search.cpan.org/dist/Email-MIME-Encodings")
854 (synopsis "Unified interface to MIME encoding and decoding")
855 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
856 (license (package-license perl))))
857
858 (define-public perl-email-sender
859 (package
860 (name "perl-email-sender")
861 (version "1.300016")
862 (source
863 (origin
864 (method url-fetch)
865 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
866 "Email-Sender-" version ".tar.gz"))
867 (sha256
868 (base32
869 "18x26fjh399q3s2g8dajb9r10633c46jrnbvycpnpclgnzhjs100"))))
870 (build-system perl-build-system)
871 (native-inputs
872 `(("perl-capture-tiny" ,perl-capture-tiny)))
873 (propagated-inputs
874 `(("perl-email-abstract" ,perl-email-abstract)
875 ("perl-email-address" ,perl-email-address)
876 ("perl-email-simple" ,perl-email-simple)
877 ("perl-list-moreutils" ,perl-list-moreutils)
878 ("perl-module-runtime" ,perl-module-runtime)
879 ("perl-moo" ,perl-moo)
880 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
881 ("perl-sub-exporter" ,perl-sub-exporter)
882 ("perl-throwable" ,perl-throwable)
883 ("perl-try-tiny" ,perl-try-tiny)))
884 (home-page "http://search.cpan.org/dist/Email-Sender")
885 (synopsis "Perl library for sending email")
886 (description "Email::Sender replaces the old and sometimes problematic
887 Email::Send library.")
888 (license (package-license perl))))
889
890 (define-public perl-email-simple
891 (package
892 (name "perl-email-simple")
893 (version "2.206")
894 (source
895 (origin
896 (method url-fetch)
897 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
898 "Email-Simple-" version ".tar.gz"))
899 (sha256
900 (base32
901 "19dpy3j5na2k9qw1jcpc8ia25038068r9j1bn34f9yyrisz7s522"))))
902 (build-system perl-build-system)
903 (propagated-inputs
904 `(("perl-email-date-format" ,perl-email-date-format)))
905 (home-page "http://search.cpan.org/dist/Email-Simple")
906 (synopsis "Parsing of RFC 2822 messages")
907 (description "Email::Simple provides simple parsing of RFC 2822 message
908 format and headers.")
909 (license (package-license perl))))
910
911 ;;; mail.scm ends here