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