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