gnu: Add opensmtpd-extras.
[jackhill/guix/guix.git] / gnu / packages / mail.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 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, 2016 Eric Bavier <bavier@member.fsf.org>
10 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
11 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
12 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
13 ;;; Copyright © 2016 Al McElrath <hello@yrns.org>
14 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
16 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
17 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
18 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
19 ;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
20 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
21 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
22 ;;;
23 ;;; This file is part of GNU Guix.
24 ;;;
25 ;;; GNU Guix is free software; you can redistribute it and/or modify it
26 ;;; under the terms of the GNU General Public License as published by
27 ;;; the Free Software Foundation; either version 3 of the License, or (at
28 ;;; your option) any later version.
29 ;;;
30 ;;; GNU Guix is distributed in the hope that it will be useful, but
31 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
32 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 ;;; GNU General Public License for more details.
34 ;;;
35 ;;; You should have received a copy of the GNU General Public License
36 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
37
38 (define-module (gnu packages mail)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages autotools)
41 #:use-module (gnu packages base)
42 #:use-module (gnu packages backup)
43 #:use-module (gnu packages bash)
44 #:use-module (gnu packages bison)
45 #:use-module (gnu packages curl)
46 #:use-module (gnu packages cyrus-sasl)
47 #:use-module (gnu packages databases)
48 #:use-module (gnu packages dejagnu)
49 #:use-module (gnu packages dns)
50 #:use-module (gnu packages emacs)
51 #:use-module (gnu packages enchant)
52 #:use-module (gnu packages ghostscript)
53 #:use-module (gnu packages glib)
54 #:use-module (gnu packages gnome)
55 #:use-module (gnu packages gnupg)
56 #:use-module (gnu packages groff)
57 #:use-module (gnu packages gsasl)
58 #:use-module (gnu packages gtk)
59 #:use-module (gnu packages guile)
60 #:use-module (gnu packages flex)
61 #:use-module (gnu packages libcanberra)
62 #:use-module (gnu packages libevent)
63 #:use-module (gnu packages libidn)
64 #:use-module (gnu packages linux)
65 #:use-module (gnu packages lua)
66 #:use-module (gnu packages m4)
67 #:use-module (gnu packages ncurses)
68 #:use-module (gnu packages pcre)
69 #:use-module (gnu packages perl)
70 #:use-module (gnu packages python)
71 #:use-module (gnu packages readline)
72 #:use-module (gnu packages search)
73 #:use-module (gnu packages texinfo)
74 #:use-module (gnu packages compression)
75 #:use-module (gnu packages glib)
76 #:use-module (gnu packages pkg-config)
77 #:use-module (gnu packages flex)
78 #:use-module (gnu packages gdb)
79 #:use-module (gnu packages samba)
80 #:use-module (gnu packages tls)
81 #:use-module (gnu packages networking)
82 #:use-module (gnu packages web)
83 #:use-module (gnu packages xml)
84 #:use-module (gnu packages xorg)
85 #:use-module ((guix licenses)
86 #:select (gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+
87 non-copyleft (expat . license:expat) bsd-3
88 public-domain bsd-4 isc (openssl . license:openssl)
89 bsd-2))
90 #:use-module (guix packages)
91 #:use-module (guix download)
92 #:use-module (guix git-download)
93 #:use-module (guix utils)
94 #:use-module (guix build-system gnu)
95 #:use-module (guix build-system perl)
96 #:use-module (guix build-system python)
97 #:use-module (guix build-system trivial))
98
99 (define-public mailutils
100 (package
101 (name "mailutils")
102 (version "2.2")
103 (source (origin
104 (method url-fetch)
105 (uri (string-append "mirror://gnu/mailutils/mailutils-"
106 version ".tar.bz2"))
107 (sha256
108 (base32
109 "0szbqa12zqzldqyw97lxqax3ja2adis83i7brdfsxmrfw68iaf65"))
110 (patches (search-patches "m4-gets-undeclared.patch"))))
111 (build-system gnu-build-system)
112 (arguments
113 '(;; TODO: Add `--with-sql'.
114 #:phases (alist-cons-before
115 'build 'pre-build
116 (lambda _
117 ;; Use Guile 2.0's public API.
118 (substitute* "libmu_scm/mu_message.c"
119 (("scm_i_string_length")
120 "scm_c_string_length"))
121
122 ;; This file should be generated to use the right
123 ;; value of $(libdir) et al.
124 (delete-file "libmu_scm/mailutils.scm")
125
126 ;; Use the right file name for `cat'.
127 (substitute* "testsuite/lib/mailutils.exp"
128 (("/bin/cat")
129 (which "cat"))))
130 %standard-phases)
131 #:parallel-tests? #f))
132 (inputs
133 `(("dejagnu" ,dejagnu)
134 ("m4" ,m4)
135 ("texinfo" ,texinfo)
136 ("guile" ,guile-2.0)
137 ("gnutls" ,gnutls)
138 ("ncurses" ,ncurses)
139
140 ;; With Readline 6.3, examples/pop3client.c fails to build because it
141 ;; uses the now undefined 'CPPFunction' type.
142 ("readline" ,readline-6.2)
143
144 ("linux-pam" ,linux-pam)
145 ("libltdl" ,libltdl)
146 ("gdbm" ,gdbm)))
147 (home-page "http://www.gnu.org/software/mailutils/")
148 (synopsis "Utilities and library for reading and serving mail")
149 (description
150 "GNU Mailutils is a collection of programs for managing, viewing and
151 processing electronic mail. It contains both utilities and server daemons
152 and all operate in a protocol-agnostic way. The underlying libraries are
153 also available, simplifying the addition of mail capabilities to new
154 software.")
155 (license
156 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
157 (list gpl3+ lgpl3+))))
158
159 (define-public fetchmail
160 (package
161 (name "fetchmail")
162 (version "6.3.26")
163 (source (origin
164 (method url-fetch)
165 (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-"
166 version ".tar.xz"))
167 (sha256
168 (base32
169 "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r"))))
170 (build-system gnu-build-system)
171 (inputs
172 `(("openssl" ,openssl)))
173 (arguments
174 `(#:configure-flags (list (string-append "--with-ssl="
175 (assoc-ref %build-inputs "openssl")))))
176 (home-page "http://www.fetchmail.info/")
177 (synopsis "Remote-mail retrieval and forwarding utility")
178 (description
179 "Fetchmail is a full-featured, robust, well-documented remote-mail
180 retrieval and forwarding utility intended to be used over on-demand
181 TCP/IP links (such as SLIP or PPP connections). It supports every
182 remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
183 KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
184 and IPSEC.
185
186 Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
187 so it can then be read by normal mail user agents such as mutt, elm
188 or BSD Mail. It allows all your system MTA's filtering, forwarding, and
189 aliasing facilities to work just as they would on normal mail.")
190 (license gpl2+))) ; most files are actually public domain or x11
191
192 (define-public mutt
193 (package
194 (name "mutt")
195 (version "1.7.0")
196 (source (origin
197 (method url-fetch)
198 (uri (string-append "ftp://ftp.mutt.org/pub/mutt/mutt-"
199 version ".tar.gz"))
200 (sha256
201 (base32
202 "0idkamdiwj9fgqaz1vzkfg78cnmkzp74skv0ibw2xjfq6ds9hghx"))
203 (patches (search-patches "mutt-store-references.patch"))))
204 (build-system gnu-build-system)
205 (inputs
206 `(("cyrus-sasl" ,cyrus-sasl)
207 ("gdbm" ,gdbm)
208 ("gpgme" ,gpgme)
209 ("ncurses" ,ncurses)
210 ("openssl" ,openssl)
211 ("perl" ,perl)))
212 (arguments
213 `(#:configure-flags '("--enable-smtp"
214 "--enable-imap"
215 "--enable-pop"
216 "--enable-gpgme"
217 "--enable-hcache" ; for header caching
218 "--enable-sidebar"
219 "--with-ssl"
220 "--with-sasl"
221 ;; so that mutt does not check whether the path
222 ;; exists, which it does not in the chroot
223 "--with-mailpath=/var/mail")))
224 (home-page "http://www.mutt.org/")
225 (synopsis "Mail client")
226 (description
227 "Mutt is a small but very powerful text-based mail client for Unix
228 operating systems.")
229 (license gpl2+)))
230
231 (define-public gmime
232 (package
233 (name "gmime")
234 (version "2.6.20")
235 (source (origin
236 (method url-fetch)
237 (uri (string-append "mirror://gnome/sources/gmime/"
238 (version-major+minor version)
239 "/gmime-" version ".tar.xz"))
240 (sha256
241 (base32
242 "0rfzbgsh8ira5p76kdghygl5i3fvmmx4wbw5rp7f8ajc4vxp18g0"))))
243 (build-system gnu-build-system)
244 (native-inputs
245 `(("pkg-config" ,pkg-config)
246 ("gnupg" ,gnupg))) ; for tests only
247 (inputs `(("glib" ,glib)
248 ("gpgme" ,gpgme)
249 ("zlib" ,zlib)))
250 (arguments
251 `(#:phases
252 (modify-phases %standard-phases
253 (add-after
254 'unpack 'patch-paths-in-tests
255 (lambda _
256 ;; The test programs run several programs using 'system' with
257 ;; hard-coded paths. Here we patch them all.
258 ;; We use ISO-8859-1 here because test-iconv.c contains
259 ;; raw byte sequences in several different encodings.
260 (with-fluids ((%default-port-encoding #f))
261 (substitute* (find-files "tests" "\\.c$")
262 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
263 (let* ((base (basename prog-path))
264 (prog (which base)))
265 (string-append pre
266 (or prog (error "not found: " base))))))))))))
267 (home-page "http://spruce.sourceforge.net/gmime/")
268 (synopsis "MIME message parser and creator library")
269 (description
270 "GMime provides a core library and set of utilities which may be used for
271 the creation and parsing of messages using the Multipurpose Internet Mail
272 Extension (MIME).")
273 (license (list lgpl2.1+ gpl2+ gpl3+))))
274
275 (define-public bogofilter
276 (package
277 (name "bogofilter")
278 (version "1.2.4")
279 (source (origin
280 (method url-fetch)
281 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-"
282 version "/bogofilter-"
283 version ".tar.bz2"))
284 (sha256
285 (base32
286 "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1"))))
287 (build-system gnu-build-system)
288 (arguments
289 '(#:phases (alist-cons-before
290 'check 'pre-check
291 (lambda _
292 (substitute* "src/tests/t.frame"
293 (("GREP=/bin/grep")
294 (string-append "GREP=" (which "grep") "\n"))))
295 %standard-phases)))
296 (native-inputs `(("flex" ,flex)))
297 (inputs `(("bdb" ,bdb)))
298 (home-page "http://bogofilter.sourceforge.net/")
299 (synopsis "Mail classifier based on a Bayesian filter")
300 (description
301 "Bogofilter is a mail filter that classifies mail as spam or ham
302 (non-spam) by a statistical analysis of the message's header and
303 content (body). The program is able to learn from the user's classifications
304 and corrections. It is based on a Bayesian filter.")
305 (license gpl2)))
306
307 (define-public offlineimap
308 (package
309 (name "offlineimap")
310 (version "7.0.8")
311 (source (origin
312 (method url-fetch)
313 (uri (string-append "https://github.com/OfflineIMAP/offlineimap/"
314 "archive/v" version ".tar.gz"))
315 (file-name (string-append name "-" version ".tar.gz"))
316 (sha256
317 (base32
318 "0smxh5ag3cbn92kp49jq950j5m2pivs9kr04prpd1lw62hy7gnhr"))))
319 (build-system python-build-system)
320 (inputs `(("python2-pysqlite" ,python2-pysqlite)
321 ("python2-six" ,python2-six)))
322 (arguments
323 ;; The setup.py script expects python-2.
324 `(#:python ,python-2
325 ;; Tests require a modifiable IMAP account.
326 #:tests? #f
327 #:phases
328 (modify-phases %standard-phases
329 (add-after 'install 'wrap-binary
330 (lambda* (#:key inputs outputs #:allow-other-keys)
331 (let* ((out (assoc-ref outputs "out"))
332 (bin (string-append out "/bin/offlineimap")))
333 (wrap-program bin
334 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
335 #t))))))
336 (home-page "http://www.offlineimap.org")
337 (synopsis "Sync emails between two repositories")
338 (description
339 "OfflineImap synchronizes emails between two repositories, so that you
340 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
341 repository and Maildir/IMAP as LOCAL repository.")
342 (license gpl2+)))
343
344 (define-public mu
345 (package
346 (name "mu")
347 (version "0.9.16")
348 (source (origin
349 (method url-fetch)
350 (uri (string-append "https://github.com/djcb/mu/archive/v"
351 version ".tar.gz"))
352 (file-name (string-append "mu-" version ".tar.gz"))
353 (sha256
354 (base32
355 "0p7hqri1r1x6750x138cc29mh81kdav2dcim26y58s8an206h25g"))))
356 (build-system gnu-build-system)
357 (native-inputs
358 `(("pkg-config" ,pkg-config)
359 ("glib" ,glib "bin") ; for gtester
360 ("autoconf" ,autoconf)
361 ("automake" ,automake)
362 ("emacs" ,emacs-minimal)
363 ("libtool" ,libtool)
364 ("texinfo" ,texinfo)))
365 ;; TODO: Add webkit and gtk to build the mug GUI.
366 (inputs
367 `(("xapian" ,xapian)
368 ("guile" ,guile-2.0)
369 ("glib" ,glib)
370 ("gmime" ,gmime)
371 ("tzdata" ,tzdata))) ;for mu/test/test-mu-query.c
372 (arguments
373 `(#:modules ((guix build gnu-build-system)
374 (guix build utils)
375 (guix build emacs-utils))
376 #:imported-modules (,@%gnu-build-system-modules
377 (guix build emacs-utils))
378 #:phases
379 (modify-phases %standard-phases
380 (add-after 'unpack 'patch-configure.ac
381 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
382 ;; so our Emacs package can't find it. Setting "--with-lispdir"
383 ;; configure flag doesn't help because "mu4e" will be added to
384 ;; the lispdir anyway, so we have to modify "configure.ac".
385 (lambda _
386 (substitute* "configure.ac"
387 (("^ +lispdir=.*") ""))
388 #t))
389 (add-after 'patch-configure.ac 'autoreconf
390 (lambda _
391 (zero? (system* "autoreconf" "-vi"))))
392 (add-before 'check 'check-tz-setup
393 (lambda* (#:key inputs #:allow-other-keys)
394 ;; For mu/test/test-mu-query.c
395 (setenv "TZDIR"
396 (string-append (assoc-ref inputs "tzdata")
397 "/share/zoneinfo"))
398 #t))
399 (add-after 'install 'install-emacs-autoloads
400 (lambda* (#:key outputs #:allow-other-keys)
401 (emacs-generate-autoloads
402 "mu4e"
403 (string-append (assoc-ref outputs "out")
404 "/share/emacs/site-lisp"))
405 #t)))))
406 (home-page "http://www.djcbsoftware.nl/code/mu/")
407 (synopsis "Quickly find emails")
408 (description
409 "Mu is a tool for dealing with e-mail messages stored in the
410 Maildir-format. Mu's purpose in life is to help you to quickly find the
411 messages you need; in addition, it allows you to view messages, extract
412 attachments, create new maildirs, and so on.")
413 (license gpl3+)))
414
415 (define-public alot
416 (package
417 (name "alot")
418 (version "0.3.7")
419 (source (origin
420 (method url-fetch)
421 ;; package author intends on distributing via github rather
422 ;; than pypi:
423 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
424 (uri (string-append "https://github.com/pazz/alot/archive/"
425 version ".tar.gz"))
426 (file-name (string-append "alot-" version ".tar.gz"))
427 (sha256
428 (base32
429 "09md9llg38r6xby8l0y0zf8nhlh91cr4xs0r15b294hhp8hl2bgx"))))
430 (build-system python-build-system)
431 (arguments
432 `(#:tests? #f ; no tests
433 ;; python 3 is unsupported, more info:
434 ;; https://github.com/pazz/alot/blob/0.3.7/docs/source/faq.rst
435 #:python ,python-2))
436 (inputs
437 `(("python2-magic" ,python2-magic)
438 ("python2-configobj" ,python2-configobj)
439 ("python2-twisted" ,python2-twisted)
440 ("python2-urwid" ,python2-urwid)
441 ("python2-urwidtrees" ,python2-urwidtrees)
442 ("python2-pygpgme" ,python2-pygpgme)
443 ("python2-notmuch" ,python2-notmuch)))
444 (home-page "https://github.com/pazz/alot")
445 (synopsis "Commandline MUA using notmuch")
446 (description
447 "Alot is an experimental terminal mail user agent (MUA) based on
448 @code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
449 (license gpl3+)))
450
451 (define-public notifymuch
452 (let
453 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
454 (revision "1"))
455 (package
456 (name "notifymuch")
457 (version (string-append "0.1-" revision "." (string-take commit 7)))
458 (source
459 (origin
460 (method git-fetch)
461 (uri (git-reference
462 (url "https://github.com/kspi/notifymuch.git")
463 (commit commit)))
464 (sha256
465 (base32
466 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
467 (file-name (string-append name "-" version "-checkout"))))
468 (build-system python-build-system)
469 (inputs
470 `(("python-notmuch" ,python-notmuch)
471 ("python-pygobject" ,python-pygobject)
472 ("gobject-introspection" ,gobject-introspection)
473 ("libnotify" ,libnotify)
474 ("gtk+" ,gtk+)))
475 (arguments
476 `(#:phases
477 (modify-phases %standard-phases
478 (add-after 'install 'wrap-binary
479 (lambda* (#:key outputs #:allow-other-keys)
480 (let* ((out (assoc-ref outputs "out"))
481 (bin (string-append out "/bin/notifymuch")))
482 (wrap-program bin
483 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
484 `("GI_TYPELIB_PATH" ":" prefix
485 (,(getenv "GI_TYPELIB_PATH")
486 ,(string-append out "/lib/girepository-1.0")))))
487 #t)))))
488 (home-page "https://github.com/kspi/notifymuch")
489 (synopsis "Displays notifications for changes in the notmuch email database")
490 (description "notifymuch displays desktop notifications for messages in
491 the notmuch database. The notifications are sent using libnotify to a
492 notification daemon. The query to find messages to send a notification about
493 is configurable, and a notification for the same message will not be send
494 within a configurable period (defaults to 48 hours). To use notifymuch, run
495 @command{notifymuch} after new mail is indexed, this can be automated by
496 invoking @command{notifymuch} from the post-new hook.")
497 (license gpl3))))
498
499 (define-public notmuch
500 (package
501 (name "notmuch")
502 (version "0.22.1")
503 (source (origin
504 (method url-fetch)
505 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
506 version ".tar.gz"))
507 (sha256
508 (base32
509 "0jwpda3q023dn3sp41n8648951i7iagfv8zzpriv7hpkjivlafg7"))))
510 (build-system gnu-build-system)
511 (arguments
512 '(#:tests? #f ; FIXME: 694 tests; 170 fail and 100 are skipped
513 ; with perl input: 50 fail and 100 are skipped
514 #:phases (modify-phases %standard-phases
515 (replace 'configure
516 (lambda* (#:key outputs #:allow-other-keys)
517 (setenv "CC" "gcc")
518 (setenv "CONFIG_SHELL" (which "sh"))
519
520 (let ((out (assoc-ref outputs "out")))
521 (zero? (system* "./configure"
522 (string-append "--prefix=" out)))))))))
523 (native-inputs
524 `(("bash-completion" ,bash-completion)
525 ("emacs" ,emacs-minimal)
526 ("pkg-config" ,pkg-config)
527 ("python" ,python-2)
528 ("python-docutils" ,python2-docutils)
529 ("python-sphinx" ,python2-sphinx)))
530 (inputs
531 `(("glib" ,glib)
532 ("gmime" ,gmime)
533 ("talloc" ,talloc)
534 ("xapian" ,xapian)
535 ("zlib" ,zlib)))
536 (home-page "http://notmuchmail.org/")
537 (synopsis "Thread-based email index, search, and tagging")
538 (description
539 "Notmuch is a command-line based program for indexing, searching, read-
540 ing, and tagging large collections of email messages.")
541 (license gpl3+)))
542
543 (define-public notmuch-addrlookup-c
544 (package
545 (name "notmuch-addrlookup-c")
546 (version "7")
547 (source (origin
548 (method url-fetch)
549 (uri (string-append
550 "https://github.com/aperezdc/" name "/archive/v"
551 version ".tar.gz"))
552 (file-name (string-append name "-" version ".tar.gz"))
553 (sha256
554 (base32
555 "0rslg2ifgyhl6asv3yr1f62m9xjfcinv7i6qb07h2k217jqlmrri"))))
556 (build-system gnu-build-system)
557 (arguments
558 '(#:tests? #f ; no tests
559 #:make-flags (list "CC=gcc"
560 (string-append "PREFIX="
561 (assoc-ref %outputs "out")))
562 #:phases (modify-phases %standard-phases
563 (delete 'configure)
564 ;; Remove vim code completion config, it's not needed to
565 ;; build (or be patched).
566 (add-before 'patch-source-shebangs 'delete-ycm-file
567 (lambda _ (delete-file ".ycm_extra_conf.py")))
568 (replace 'install
569 (lambda* (#:key outputs #:allow-other-keys)
570 (let ((bin (string-append
571 (assoc-ref outputs "out") "/bin")))
572 (install-file "notmuch-addrlookup" bin)))))))
573 (native-inputs
574 `(("pkg-config" ,pkg-config)))
575 (inputs
576 `(("glib" ,glib)
577 ("notmuch" ,notmuch)))
578 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
579 (synopsis "Address lookup tool for Notmuch")
580 (description "This is an address lookup tool using a Notmuch database,
581 useful for email address completion.")
582 (license license:expat)))
583
584 (define-public python-notmuch
585 (package
586 (name "python-notmuch")
587 (version "0.22.1")
588 ;; Notmuch python bindings are now unavailable on pypi. The
589 ;; bindings are distributed via the notmuch release tarball.
590 (source (package-source notmuch))
591 (build-system python-build-system)
592 (inputs `(("notmuch" ,notmuch)))
593 (arguments
594 `(#:tests? #f ; no "test" target
595 #:phases
596 (modify-phases %standard-phases
597 ;; This python package lives in a subdirectory of the notmuch source
598 ;; tree, so chdir into it before building.
599 (add-after 'unpack 'enter-python-dir
600 (lambda _ (chdir "bindings/python") #t))
601 ;; Make sure the correct notmuch shared library gets loaded.
602 (add-before 'build 'set-libnotmuch-file-name
603 (lambda* (#:key inputs #:allow-other-keys)
604 (let ((notmuch (assoc-ref inputs "notmuch")))
605 (substitute* "notmuch/globals.py"
606 (("libnotmuch\\.so\\.")
607 (string-append notmuch "/lib/libnotmuch.so.")))
608 #t))))))
609 (home-page "http://notmuchmail.org/")
610 (synopsis "Python bindings of the Notmuch mail indexing library")
611 (description
612 "This package provides Python bindings to use the Notmuch mail indexing
613 and search library.")
614 (license gpl3+)))
615
616 (define-public python2-notmuch
617 (package-with-python2 python-notmuch))
618
619 (define-public getmail
620 (package
621 (name "getmail")
622 (version "4.49.0")
623 (source
624 (origin
625 (method url-fetch)
626 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
627 name "-" version ".tar.gz"))
628 (sha256
629 (base32
630 "1m0yzxd05fklwbmjj1n2q4sx397c1j5qi9a0r5fv3h8pplz4lv0w"))))
631 (build-system python-build-system)
632 (arguments
633 `(#:tests? #f ; no tests
634 #:python ,python-2))
635 (home-page "http://pyropus.ca/software/getmail/")
636 (synopsis "Mail retriever")
637 (description
638 "A flexible, extensible mail retrieval system with support for
639 POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
640 arbitrary message filtering, single-user and domain-mailboxes, and many other
641 useful features.")
642
643 ;; License is specified in file '__init__.py'.
644 (license gpl2)))
645
646 (define-public libetpan
647 (package
648 (name "libetpan")
649 (version "1.7.2")
650 (source (origin
651 (method url-fetch)
652 (uri (string-append "https://github.com/dinhviethoa/" name
653 "/archive/" version ".tar.gz"))
654 (file-name (string-append name "-" version ".tar.gz"))
655 (sha256
656 (base32 "081ixgj3skglq9i7v0jb835lmfx21zi4i5b7997igwr0lj174y9j"))))
657 (build-system gnu-build-system)
658 (native-inputs `(("autoconf" ,(autoconf-wrapper))
659 ("automake" ,automake)
660 ("libtool" ,libtool)
661 ("pkg-config" ,pkg-config)))
662 (propagated-inputs
663 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
664 ;; libraries need to be propagated.
665 `(("cyrus-sasl" ,cyrus-sasl)
666 ("openssl" ,openssl)))
667 (inputs
668 `(("curl" ,curl)
669 ("expat" ,expat)
670 ("zlib" ,zlib)))
671 (arguments
672 '(#:phases
673 (modify-phases %standard-phases
674 (add-after 'unpack 'autogen
675 (lambda _
676 (setenv "NOCONFIGURE" "true")
677 (zero? (system* "sh" "autogen.sh")))))
678 #:configure-flags
679 '("--disable-static" "--disable-db")))
680 (home-page "http://www.etpan.org/libetpan.html")
681 (synopsis "Portable middleware for email access")
682 (description
683 "The purpose of this mail library is to provide a portable, efficient
684 framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
685 provides an API for C language. It's the low-level API used by MailCore and
686 MailCore 2.")
687 (license (non-copyleft "file://COPYING"))))
688
689 (define-public claws-mail
690 (package
691 (name "claws-mail")
692 (version "3.14.0")
693 (source (origin
694 (method url-fetch)
695 (uri (string-append
696 "http://www.claws-mail.org/releases/" name "-" version
697 ".tar.xz"))
698 (sha256
699 (base32
700 "0nfchgga3ir91s8rky0a0vnz8cgj2f6h716wh3cmb466a01xfss6"))))
701 (build-system gnu-build-system)
702 (native-inputs `(("pkg-config" ,pkg-config)))
703 (inputs `(("bogofilter" ,bogofilter)
704 ("curl" ,curl)
705 ("dbus-glib" ,dbus-glib)
706 ("enchant" ,enchant)
707 ("expat" ,expat)
708 ("ghostscript" ,ghostscript)
709 ("hicolor-icon-theme" ,hicolor-icon-theme)
710 ("gnupg" ,gnupg)
711 ("gnutls" ,gnutls)
712 ("gpgme" ,gpgme)
713 ("gtk" ,gtk+-2)
714 ("libarchive" ,libarchive)
715 ("libcanberra" ,libcanberra)
716 ("libetpan" ,libetpan)
717 ("libnotify" ,libnotify)
718 ("libsm" ,libsm)
719 ("libxml2" ,libxml2)
720 ("perl" ,perl)
721 ("python-2" ,python-2)
722 ("mime-info" ,shared-mime-info)))
723 (arguments
724 '(#:configure-flags
725 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant")
726 #:phases (modify-phases %standard-phases
727 (add-before 'build 'patch-mime
728 (lambda* (#:key inputs #:allow-other-keys)
729 (substitute* "src/procmime.c"
730 (("/usr/share/mime/globs")
731 (string-append (assoc-ref inputs "mime-info")
732 "/share/mime/globs"))))))))
733 (synopsis "GTK-based Email client")
734 (description
735 "Claws-Mail is an email client (and news reader) based on GTK+. The
736 appearance and interface are designed to be familiar to new users coming from
737 other popular email clients, as well as experienced users. Almost all commands
738 are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
739 which can add many functionalities to the base client.")
740 (home-page "http://www.claws-mail.org/")
741 (license gpl3+))) ; most files are actually public domain or x11
742
743 (define-public msmtp
744 (package
745 (name "msmtp")
746 (version "1.6.5")
747 (source
748 (origin
749 (method url-fetch)
750 (uri (string-append "mirror://sourceforge/msmtp/msmtp/" version
751 "/msmtp-" version ".tar.xz"))
752 (sha256
753 (base32
754 "01jh9ba49bih8zsh40myw6qq1ll210q1vw0jg865vrn7jc3dd83n"))))
755 (build-system gnu-build-system)
756 (inputs
757 `(("libidn" ,libidn)
758 ("libsecret" ,libsecret)
759 ("gnutls" ,gnutls)
760 ("zlib" ,zlib)
761 ("gsasl" ,gsasl)))
762 (native-inputs
763 `(("pkg-config" ,pkg-config)))
764 (home-page "http://msmtp.sourceforge.net/")
765 (arguments
766 `(#:configure-flags (list "--with-libgsasl"
767 "--with-libidn"
768 "--with-tls=gnutls")
769 #:phases
770 (modify-phases %standard-phases
771 (add-after 'install 'install-msmtpq
772 (lambda* (#:key outputs #:allow-other-keys)
773 (let* ((out (assoc-ref outputs "out"))
774 (bin (string-append out "/bin"))
775 (doc (string-append out "/share/doc/msmtp"))
776 (msmtpq (string-append "scripts/msmtpq")))
777 (install-file (string-append msmtpq "/msmtpq") bin)
778 (install-file (string-append msmtpq "/msmtp-queue") bin)
779 (install-file (string-append msmtpq "/README.msmtpq") doc)
780 #t))))))
781 (synopsis
782 "Simple and easy to use SMTP client with decent sendmail compatibility")
783 (description
784 "msmtp is an SMTP client. In the default mode, it transmits a mail to
785 an SMTP server (for example at a free mail provider) which takes care of further
786 delivery.")
787 (license gpl3+)))
788
789 (define-public exim
790 (package
791 (name "exim")
792 (version "4.87")
793 (source
794 (origin
795 (method url-fetch)
796 (uri (list (string-append "ftp://ftp.exim.org/pub/exim/exim4/exim-"
797 version ".tar.bz2")
798 (string-append "ftp://ftp.exim.org/pub/exim/exim4/old/exim-"
799 version ".tar.bz2")))
800 (sha256
801 (base32
802 "1jbxn13shq90kpn0s73qpjnx5xm8jrpwhcwwgqw5s6sdzw6iwsbl"))))
803 (build-system gnu-build-system)
804 (inputs
805 `(("bdb" ,bdb)
806 ("gnutls" ,gnutls)
807 ("gzip" ,gzip)
808 ("bzip2" ,bzip2)
809 ("xz" ,xz)
810 ("perl" ,perl)
811 ("libxt" ,libxt)
812 ("libxaw" ,libxaw)))
813 (native-inputs
814 `(("pcre" ,pcre "bin")
815 ("perl" ,perl)))
816 (arguments
817 '(#:phases
818 (alist-replace
819 'configure
820 ;; We'd use #:make-flags but the top-level Makefile calls others
821 ;; recursively, so just set all variables this way.
822 (lambda* (#:key outputs inputs #:allow-other-keys)
823 (substitute* '("Makefile" "OS/Makefile-Default")
824 (("(RM_COMMAND=).*" all var)
825 (string-append var "rm\n")))
826 (copy-file "src/EDITME" "Local/Makefile")
827 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
828 (let ((out (assoc-ref outputs "out"))
829 (gzip (assoc-ref inputs "gzip"))
830 (bzip2 (assoc-ref inputs "bzip2"))
831 (xz (assoc-ref inputs "xz")))
832 (substitute* '("Local/Makefile")
833 (("(BIN_DIRECTORY=).*" all var)
834 (string-append var out "/bin\n"))
835 (("(CONFIGURE_FILE=).*" all var)
836 (string-append var out "/etc/exim.conf\n"))
837 (("(EXIM_USER=).*" all var)
838 (string-append var "nobody\n"))
839 (("(FIXED_NEVER_USERS=).*" all var)
840 (string-append var "\n")) ;XXX no root in build environment
841 (("(COMPRESS_COMMAND=).*" all var)
842 (string-append var gzip "/bin/gzip\n"))
843 (("(ZCAT_COMMAND=).*" all var)
844 (string-append var gzip "/bin/zcat\n")))
845 ;; This file has hardcoded names for tools despite the zcat
846 ;; configuration above.
847 (substitute* '("src/exigrep.src")
848 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
849 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
850 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
851 (("'lzma'") (string-append "'" xz "/bin/lzma'")))))
852 (alist-cons-before
853 'build 'fix-sh-paths
854 (lambda* (#:key inputs #:allow-other-keys)
855 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
856 (("SHELL=/bin/sh") "SHELL=sh"))
857 (substitute* '("scripts/Configure-config.h")
858 (("\\| /bin/sh") "| sh"))
859 (let ((bash (assoc-ref inputs "bash")))
860 (substitute* '("scripts/Configure-eximon")
861 (("#!/bin/sh") (string-append "#!" bash "/bin/sh")))))
862 %standard-phases))
863 #:make-flags '("INSTALL_ARG=-no_chown")
864 ;; No 'check' target.
865 #:tests? #f))
866 (home-page "http://www.exim.org/")
867 (synopsis
868 "Message Transfer Agent (MTA) developed at the University of Cambridge")
869 (description
870 "Exim is a message transfer agent (MTA) developed at the University of
871 Cambridge for use on Unix systems connected to the Internet. In style it is
872 similar to Smail 3, but its facilities are more general. There is a great
873 deal of flexibility in the way mail can be routed, and there are extensive
874 facilities for checking incoming mail.")
875 (license gpl2+)))
876
877 (define-public dovecot
878 (package
879 (name "dovecot")
880 (version "2.2.25")
881 (source
882 (origin
883 (method url-fetch)
884 (uri (string-append "http://www.dovecot.org/releases/"
885 (version-major+minor version) "/"
886 name "-" version ".tar.gz"))
887 (sha256 (base32
888 "0rwn5wc5b8j9fzqcjggdgpzmb77myrf4ra294z1gg5v3hhng7nfq"))))
889 (build-system gnu-build-system)
890 (native-inputs
891 `(("pkg-config" ,pkg-config)))
892 (inputs
893 `(("openssl" ,openssl)
894 ("zlib" ,zlib)
895 ("bzip2" ,bzip2)
896 ("sqlite" ,sqlite)
897 ("linux-pam" ,linux-pam)))
898 (arguments
899 `(#:configure-flags '("--sysconfdir=/etc"
900 "--localstatedir=/var")
901 #:phases (modify-phases %standard-phases
902 (add-before
903 'configure 'pre-configure
904 (lambda _
905 ;; Simple hack to avoid installing in /etc
906 (substitute* '("doc/Makefile.in"
907 "doc/example-config/Makefile.in")
908 (("pkgsysconfdir = .*")
909 "pkgsysconfdir = /tmp/etc"))
910 #t)))))
911 (home-page "http://www.dovecot.org")
912 (synopsis "Secure POP3/IMAP server")
913 (description
914 "Dovecot is a mail server whose major goals are security and reliability.
915 It supports mbox/Maildir and its own dbox/mdbox formats.")
916 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
917 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
918 ;; Unicode, Inc. License Agreement for Data Files and Software.
919 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
920
921 (define-public isync
922 (package
923 (name "isync")
924 (version "1.2.1")
925 (source
926 (origin
927 (method url-fetch)
928 (uri (string-append "mirror://sourceforge/isync/isync/"
929 version "/isync-" version ".tar.gz"))
930 (sha256 (base32
931 "1bij6nm06ghkg98n2pdyacam2fyg5y8f7ajw0d5653m0r4ldw5p7"))))
932 (build-system gnu-build-system)
933 (inputs
934 `(("bdb" ,bdb)
935 ("openssl" ,openssl)))
936 (home-page "http://isync.sourceforge.net/")
937 (synopsis "Mailbox synchronization program")
938 (description
939 "isync/mbsync is command line tool for two-way synchronization of
940 mailboxes. Currently Maildir and IMAP are supported types.")
941 (license gpl2+)))
942
943 (define-public perl-email-abstract
944 (package
945 (name "perl-email-abstract")
946 (version "3.008")
947 (source
948 (origin
949 (method url-fetch)
950 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
951 "Email-Abstract-" version ".tar.gz"))
952 (sha256
953 (base32
954 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
955 (build-system perl-build-system)
956 (propagated-inputs
957 `(("perl-email-simple" ,perl-email-simple)
958 ("perl-module-pluggable" ,perl-module-pluggable)
959 ("perl-mro-compat" ,perl-mro-compat)))
960 (home-page "http://search.cpan.org/dist/Email-Abstract")
961 (synopsis "Interface to mail representations")
962 (description "Email::Abstract provides module writers with the ability to
963 write simple, representation-independent mail handling code.")
964 (license (package-license perl))))
965
966 (define-public perl-email-address
967 (package
968 (name "perl-email-address")
969 (version "1.907")
970 (source
971 (origin
972 (method url-fetch)
973 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
974 "Email-Address-" version ".tar.gz"))
975 (sha256
976 (base32
977 "1ai4r149pzjv9dc2vddir8zylj0z1pii93rm4g591lx7avim71hx"))))
978 (build-system perl-build-system)
979 (home-page "http://search.cpan.org/dist/Email-Address")
980 (synopsis "Email address parsing and creation")
981 (description "Email::Address implements a regex-based RFC 2822 parser that
982 locates email addresses in strings and returns a list of Email::Address
983 objects found. Alternatively you may construct objects manually.")
984 (license (package-license perl))))
985
986 (define-public perl-email-date-format
987 (package
988 (name "perl-email-date-format")
989 (version "1.005")
990 (source
991 (origin
992 (method url-fetch)
993 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
994 "Email-Date-Format-" version ".tar.gz"))
995 (sha256
996 (base32
997 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
998 (build-system perl-build-system)
999 (home-page "http://search.cpan.org/dist/Email-Date-Format")
1000 (synopsis "Produce RFC 2822 date strings")
1001 (description "Email::Date::Format provides a means for generating an RFC
1002 2822 compliant datetime string.")
1003 (license (package-license perl))))
1004
1005 (define-public perl-email-messageid
1006 (package
1007 (name "perl-email-messageid")
1008 (version "1.405")
1009 (source
1010 (origin
1011 (method url-fetch)
1012 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1013 "Email-MessageID-" version ".tar.gz"))
1014 (sha256
1015 (base32
1016 "09216naz21x99ff33wdm3j3zq1zhdbxhrsmx8bvavjrw3gjsvrq3"))))
1017 (build-system perl-build-system)
1018 (home-page "http://search.cpan.org/dist/Email-MessageID")
1019 (synopsis "Generate world unique message-ids")
1020 (description "Email::MessageID generates recommended message-ids to
1021 identify a message uniquely.")
1022 (license (package-license perl))))
1023
1024 (define-public perl-email-mime
1025 (package
1026 (name "perl-email-mime")
1027 (version "1.929")
1028 (source
1029 (origin
1030 (method url-fetch)
1031 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1032 "Email-MIME-" version ".tar.gz"))
1033 (sha256
1034 (base32
1035 "1sf7dldg4dvicyw6dl1vx6s1gjq3fcppi0103ikl0vi6v5xjdjdh"))))
1036 (build-system perl-build-system)
1037 (propagated-inputs
1038 `(("perl-email-address" ,perl-email-address)
1039 ("perl-email-messageid" ,perl-email-messageid)
1040 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1041 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1042 ("perl-email-simple" ,perl-email-simple)
1043 ("perl-mime-types" ,perl-mime-types)))
1044 (home-page "http://search.cpan.org/dist/Email-MIME")
1045 (synopsis "MIME message handling")
1046 (description "Email::MIME is an extension of the Email::Simple module, to
1047 handle MIME encoded messages. It takes a message as a string, splits it up
1048 into its constituent parts, and allows you access to various parts of the
1049 message. Headers are decoded from MIME encoding.")
1050 (license (package-license perl))))
1051
1052 (define-public perl-email-mime-contenttype
1053 (package
1054 (name "perl-email-mime-contenttype")
1055 (version "1.017")
1056 (source
1057 (origin
1058 (method url-fetch)
1059 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1060 "Email-MIME-ContentType-" version ".tar.gz"))
1061 (sha256
1062 (base32
1063 "1cl1l97lg690dh7i704hqi7yhxalq1chy7ylld5yc5v38jqa6gcn"))))
1064 (build-system perl-build-system)
1065 (native-inputs
1066 `(("perl-capture-tiny" ,perl-capture-tiny)))
1067 (home-page "http://search.cpan.org/dist/Email-MIME-ContentType")
1068 (synopsis "Parse MIME Content-Type headers")
1069 (description "Email::MIME::ContentType parses a MIME Content-Type
1070 header.")
1071 (license (package-license perl))))
1072
1073 (define-public perl-email-mime-encodings
1074 (package
1075 (name "perl-email-mime-encodings")
1076 (version "1.315")
1077 (source
1078 (origin
1079 (method url-fetch)
1080 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1081 "Email-MIME-Encodings-" version ".tar.gz"))
1082 (sha256
1083 (base32
1084 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1085 (build-system perl-build-system)
1086 (native-inputs
1087 `(("perl-capture-tiny" ,perl-capture-tiny)))
1088 (home-page "http://search.cpan.org/dist/Email-MIME-Encodings")
1089 (synopsis "Unified interface to MIME encoding and decoding")
1090 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
1091 (license (package-license perl))))
1092
1093 (define-public perl-email-sender
1094 (package
1095 (name "perl-email-sender")
1096 (version "1.300016")
1097 (source
1098 (origin
1099 (method url-fetch)
1100 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1101 "Email-Sender-" version ".tar.gz"))
1102 (sha256
1103 (base32
1104 "18x26fjh399q3s2g8dajb9r10633c46jrnbvycpnpclgnzhjs100"))))
1105 (build-system perl-build-system)
1106 (native-inputs
1107 `(("perl-capture-tiny" ,perl-capture-tiny)))
1108 (propagated-inputs
1109 `(("perl-email-abstract" ,perl-email-abstract)
1110 ("perl-email-address" ,perl-email-address)
1111 ("perl-email-simple" ,perl-email-simple)
1112 ("perl-list-moreutils" ,perl-list-moreutils)
1113 ("perl-module-runtime" ,perl-module-runtime)
1114 ("perl-moo" ,perl-moo)
1115 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1116 ("perl-sub-exporter" ,perl-sub-exporter)
1117 ("perl-throwable" ,perl-throwable)
1118 ("perl-try-tiny" ,perl-try-tiny)))
1119 (home-page "http://search.cpan.org/dist/Email-Sender")
1120 (synopsis "Perl library for sending email")
1121 (description "Email::Sender replaces the old and sometimes problematic
1122 Email::Send library.")
1123 (license (package-license perl))))
1124
1125 (define-public perl-email-simple
1126 (package
1127 (name "perl-email-simple")
1128 (version "2.206")
1129 (source
1130 (origin
1131 (method url-fetch)
1132 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1133 "Email-Simple-" version ".tar.gz"))
1134 (sha256
1135 (base32
1136 "19dpy3j5na2k9qw1jcpc8ia25038068r9j1bn34f9yyrisz7s522"))))
1137 (build-system perl-build-system)
1138 (propagated-inputs
1139 `(("perl-email-date-format" ,perl-email-date-format)))
1140 (home-page "http://search.cpan.org/dist/Email-Simple")
1141 (synopsis "Parsing of RFC 2822 messages")
1142 (description "Email::Simple provides simple parsing of RFC 2822 message
1143 format and headers.")
1144 (license (package-license perl))))
1145
1146 (define-public libesmtp
1147 (package
1148 (name "libesmtp")
1149 (version "1.0.6")
1150 (source
1151 (origin
1152 (method url-fetch)
1153 (uri (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1154 version ".tar.bz2"))
1155 (sha256
1156 (base32
1157 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1158 (build-system gnu-build-system)
1159 (propagated-inputs
1160 `(("openssl" ,openssl)))
1161 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1162 (synopsis "Library for sending mail via remote hosts using SMTP")
1163 (description "libESMTP is an SMTP client which manages posting (or
1164 submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1165 It may be used as part of a Mail User Agent (MUA) or other program that must
1166 be able to post electronic mail where mail functionality may not be that
1167 program's primary purpose.")
1168 (license (list lgpl2.1+ gpl2+))))
1169
1170 (define-public esmtp
1171 (package
1172 (name "esmtp")
1173 (version "1.2")
1174 (source
1175 (origin
1176 (method git-fetch)
1177 (uri (git-reference
1178 (url "https://github.com/andywingo/esmtp.git")
1179 (commit "01bf9fc")))
1180 (sha256
1181 (base32
1182 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1183 (file-name (string-append name "-" version "-checkout"))))
1184 (arguments
1185 `(#:phases (modify-phases %standard-phases
1186 (add-before
1187 'configure 'autoconf
1188 (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
1189 (build-system gnu-build-system)
1190 (native-inputs
1191 `(("bison" ,bison)
1192 ("flex" ,flex)
1193 ("autoconf" ,autoconf)
1194 ("automake" ,automake)
1195 ("libtool" ,libtool)))
1196 (inputs
1197 `(("libesmtp" ,libesmtp)))
1198 (home-page "http://sourceforge.net/projects/esmtp/")
1199 (synopsis "Relay-only mail transfer agent (MTA)")
1200 (description "Esmtp is a simple relay-only mail transfer agent built using
1201 libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1202 user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1203 page for more on configuration. This package also provides minimal
1204 compatibility shims for the @command{sendmail}, @command{mailq}, and
1205 @command{newaliases} commands.")
1206 (license gpl2+)))
1207
1208 (define-public fdm
1209 (package
1210 (name "fdm")
1211 (version "1.9")
1212 (source (origin
1213 (method url-fetch)
1214 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1215 version "/fdm-"
1216 version ".tar.gz"))
1217 (file-name (string-append name "-" version ".tar.gz"))
1218 (sha256
1219 (base32 "054rscijahiza5f9qha79rg3siji3bk5mk10f8c2vqx7m4w6qh8n"))))
1220 (build-system gnu-build-system)
1221 (inputs
1222 `(("tdb" ,tdb)
1223 ("openssl" ,openssl)
1224 ("zlib" ,zlib)))
1225 (home-page "https://github.com/nicm/fdm")
1226 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1227 (description "fdm is a program designed to fetch mail from POP3
1228 or IMAP servers, or receive local mail from stdin, and
1229 deliver it in various ways.")
1230 (license
1231 ;; Why point to a source file? Well, all the individual files have a
1232 ;; copy of this license in their headers, but there's no seprate file
1233 ;; with that information.
1234 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
1235
1236
1237 (define-public procmail
1238 (package
1239 (name "procmail")
1240 (version "3.22")
1241 (source
1242 (origin
1243 (method url-fetch)
1244 (uri (string-append
1245 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1246 version
1247 ".tar.gz"))
1248 (sha256
1249 (base32
1250 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1251 ;; The following patch fixes an ambiguous definition of
1252 ;; getline() in formail.c. The patch is provided by Debian as
1253 ;; patch 24.
1254 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
1255 "procmail-CVE-2014-3618.patch"))))
1256 (arguments
1257 `(#:phases (modify-phases %standard-phases
1258 (replace 'configure
1259 (lambda _
1260 (substitute* "Makefile"
1261 (("/bin/sh")
1262 (which "sh"))
1263 (("/usr")
1264 (assoc-ref %outputs "out"))
1265 (("/bin/rm")
1266 (which "rm")))
1267 #t)))
1268 #:tests? #f)) ;; There are no tests indicating a successful
1269 ;; build. Some tests of basic locking mechanisms provided by the
1270 ;; file system are performed during 'make install'. However, these
1271 ;; are performed before the actual build process.
1272 (build-system gnu-build-system)
1273 (inputs `(("exim" ,exim)))
1274 (home-page "http://www.procmail.org/")
1275 (synopsis "Versatile mail delivery agent (MDA)")
1276 (description "Procmail is a mail delivery agent (MDA) featuring support
1277 for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1278 can be sorted into separate files/directories and arbitrary commands can be
1279 executed on mail arrival. Procmail is considered stable, but is no longer
1280 maintained.")
1281 (license gpl2+))) ;; procmail allows to choose the
1282 ;; nonfree Artistic License 1.0
1283 ;; as alternative to the GPL2+.
1284 ;; This option is not listed here.
1285
1286 (define-public khard
1287 (package
1288 (name "khard")
1289 (version "0.9.0")
1290 (source (origin
1291 (method url-fetch)
1292 (uri (pypi-uri name version))
1293 (sha256
1294 (base32
1295 "0y83rji4f270hbb41m4jpr0z3yzvpvbsl32mpg9d38hlydw8fk1s"))))
1296 (build-system python-build-system)
1297 (arguments
1298 `(#:python ,python-2 ; only python-2 is supported.
1299 #:phases
1300 (modify-phases %standard-phases
1301 (add-before 'build 'disable-egg-compression
1302 ;; Do not compress the egg.
1303 (lambda _
1304 (let ((port (open-file "setup.cfg" "a")))
1305 (display "\n[easy_install]\nzip_ok = 0\n"
1306 port)
1307 (close-port port)
1308 #t)))
1309 (add-after 'install 'install-doc
1310 (lambda* (#:key outputs #:allow-other-keys)
1311 (let* ((out (assoc-ref outputs "out"))
1312 (doc (string-append out "/share/doc/khard")))
1313 (copy-recursively "misc/khard" doc)))))))
1314 (native-inputs
1315 `(("python2-setuptools" ,python2-setuptools)))
1316 (propagated-inputs
1317 `(("python2-vobject" ,python2-vobject)
1318 ("python2-pyyaml" ,python2-pyyaml)
1319 ("python2-atomicwrites" ,python2-atomicwrites)
1320 ("python2-configobj" ,python2-configobj)))
1321 (synopsis "Console address book using CardDAV")
1322 (description "Khard is an address book for the console. It creates, reads,
1323 modifies and removes CardDAV address book entries at your local machine. For
1324 synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1325 Khard can also be used from within the email client @command{mutt}.")
1326 (home-page "https://github.com/scheibler/khard")
1327 (license gpl3+)))
1328
1329 (define-public perl-mail-spf
1330 (package
1331 (name "perl-mail-spf")
1332 (version "v2.9.0")
1333 (source
1334 (origin
1335 (method url-fetch)
1336 (uri (string-append
1337 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-"
1338 version
1339 ".tar.gz"))
1340 (sha256
1341 (base32
1342 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1343 (build-system perl-build-system)
1344 (native-inputs
1345 `(("perl-module-build" ,perl-module-build)
1346 ("perl-net-dns-resolver-programmable"
1347 ,perl-net-dns-resolver-programmable)))
1348 (arguments
1349 `(#:phases (modify-phases %standard-phases
1350 (add-before 'configure 'modify-Build.PL
1351 (lambda* (#:key outputs #:allow-other-keys)
1352 (substitute* "Build.PL"
1353 (("'/usr/sbin'") (string-append "'"
1354 (assoc-ref outputs "out")
1355 "/sbin'")))
1356 #t)))))
1357 (inputs
1358 `(("perl-error" ,perl-error)
1359 ("perl-net-dns" ,perl-net-dns)
1360 ("perl-netaddr-ip" ,perl-netaddr-ip)
1361 ("perl-uri" ,perl-uri)))
1362 (home-page
1363 "http://search.cpan.org/dist/Mail-SPF")
1364 (synopsis
1365 "Perl implementation of Sender Policy Framework")
1366 (description "Mail::SPF is the Sender Policy Framework implemented
1367 in Perl.")
1368 (license bsd-3)))
1369
1370 (define-public mb2md
1371 (package
1372 (name "mb2md")
1373 (version "3.20")
1374 (source (origin
1375 (method url-fetch)
1376 (uri (string-append
1377 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
1378 version ".pl.gz"))
1379 (sha256
1380 (base32
1381 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
1382 (build-system trivial-build-system)
1383 (arguments
1384 '(#:modules ((guix build utils))
1385 #:builder
1386 (begin
1387 (use-modules (guix build utils))
1388 (let* ((source (assoc-ref %build-inputs "source"))
1389 (out (assoc-ref %outputs "out"))
1390 (bin (string-append out "/bin"))
1391 (perl (assoc-ref %build-inputs "perl"))
1392 (gzip (assoc-ref %build-inputs "gzip"))
1393 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
1394 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
1395 (mkdir-p bin)
1396 (with-directory-excursion bin
1397 (copy-file source "mb2md.gz")
1398 (system* (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
1399 (substitute* "mb2md"
1400 (("#!/usr/bin/perl")
1401 (string-append "#!/usr/bin/perl -I " perl5lib)))
1402 (patch-shebang "mb2md" (list (string-append perl "/bin")))
1403 (chmod "mb2md" #o555))
1404 #t))))
1405 (native-inputs `(("gzip", gzip)))
1406 (inputs `(("perl" ,perl)
1407 ("perl-timedate" ,perl-timedate)))
1408 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
1409 (synopsis "Mbox to maildir converter")
1410 (description
1411 "Mb2md is a Perl script that takes one or more mbox format files and
1412 converts them to maildir format directories.")
1413 (license public-domain)))
1414
1415 (define-public mpop
1416 (package
1417 (name "mpop")
1418 (version "1.2.5")
1419 (source
1420 (origin
1421 (method url-fetch)
1422 (uri (string-append "http://downloads.sourceforge.net/mpop/mpop-"
1423 version ".tar.xz"))
1424 (sha256
1425 (base32
1426 "0n0ij258kn8lfa6nyr6l6plc4hf1wvyf1hkwicvdbjqdqrgjnq81"))))
1427 (build-system gnu-build-system)
1428 (inputs
1429 `(("gnutls" ,gnutls)
1430 ("libidn" ,libidn)))
1431 (native-inputs
1432 `(("pkg-config" ,pkg-config)))
1433 (arguments
1434 `(#:configure-flags (list "--with-tls=gnutls")))
1435 (home-page "http://mpop.sourceforge.net/")
1436 (synopsis "POP3 mail client")
1437 (description "mpop is a small and fast POP3 client suitable as a
1438 fetchmail replacement.
1439
1440 mpop supports multiple accounts, header based mail filtering, delivery
1441 to mbox files, maildir folders or a Mail Delivery Agent (MDA),
1442 TLS/SSL, several authentication methods, Internationalized Domain
1443 Names (IDN) and SOCKS proxies.")
1444 (license gpl3+)))
1445
1446 (define-public mhonarc
1447 (package
1448 (name "mhonarc")
1449 (version "2.6.19")
1450 (source
1451 (origin
1452 (method url-fetch)
1453 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
1454 version ".tar.gz"))
1455 (sha256
1456 (base32
1457 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
1458 (build-system perl-build-system)
1459 (home-page "https://www.mhonarc.org/")
1460 (synopsis "Create HTML archives of mail/news messages")
1461 (description
1462 "MHonArc is a Perl mail-to-HTML converter. MHonArc
1463 provides HTML mail archiving with index, mail thread linking,
1464 etc; plus other capabilities including support for MIME and
1465 powerful user customization features.")
1466 (license gpl2+)))
1467
1468
1469 (define-public sendmail
1470 (package
1471 (name "sendmail")
1472 (version "8.15.2")
1473 (source
1474 (origin
1475 (method url-fetch)
1476 (uri (string-append
1477 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
1478 version ".tar.gz"))
1479 (sha256
1480 (base32
1481 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
1482 (build-system gnu-build-system)
1483 (arguments
1484 `(#:phases
1485 (modify-phases %standard-phases
1486 (add-before 'build 'replace-/bin/sh
1487 (lambda _
1488 (substitute*
1489 (append
1490 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
1491 "contrib/mmuegel" "devtools/bin/configure.sh")
1492 (find-files "." ".*\\.m4")
1493 (find-files "." ".*\\.cf"))
1494 (("/bin/sh") (which "bash")))
1495
1496 (substitute* "devtools/bin/Build"
1497 (("SHELL=/bin/sh") (string-append "SHELL=" (which "bash"))))
1498 #t))
1499 (replace 'configure
1500 (lambda _
1501
1502 ;; Render harmless any attempts to chown or chgrp
1503 (substitute* "devtools/bin/install.sh"
1504 (("owner=\\$2") "owner=''")
1505 (("group=\\$2") "group=''"))
1506
1507 (with-output-to-file "devtools/Site/site.config.m4"
1508 (lambda ()
1509 (format #t "
1510 define(`confCC', `gcc')
1511 define(`confOPTIMIZE', `-g -O2')
1512 define(`confLIBS', `-lresolv')
1513 define(`confINSTALL', `~a/devtools/bin/install.sh')
1514 define(`confDEPEND_TYPE', `CC-M')
1515 define(`confINST_DEP', `')
1516 " (getcwd))))))
1517 (replace 'build
1518 (lambda _
1519 (and (zero? (system* "sh" "Build"))
1520 (with-directory-excursion "cf/cf"
1521 (begin
1522 (copy-file "generic-linux.mc" "sendmail.mc")
1523 (zero? (system* "sh" "Build" "sendmail.cf")))))))
1524 (add-before 'install 'pre-install
1525 (lambda _
1526 (let ((out (assoc-ref %outputs "out")))
1527 (mkdir-p (string-append out "/usr/bin"))
1528 (mkdir-p (string-append out "/usr/sbin"))
1529 (mkdir-p (string-append out "/etc/mail"))
1530 (setenv "DESTDIR" out)
1531 (with-directory-excursion "cf/cf"
1532 (zero? (system* "sh" "Build" "install-cf")))))))
1533 ;; There is no make check. There are some post installation tests, but those
1534 ;; require root privileges
1535 #:tests? #f))
1536 (inputs
1537 `(("m4" ,m4)
1538 ("perl" ,perl)))
1539 (home-page "http://sendmail.org")
1540 (synopsis
1541 "Highly configurable Mail Transfer Agent (MTA)")
1542 (description
1543 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
1544 Allman. It is highly configurable and supports many delivery methods and many
1545 transfer protocols.")
1546 (license (non-copyleft "file://LICENSE"
1547 "See LICENSE in the distribution."))))
1548
1549 (define-public opensmtpd
1550 (package
1551 (name "opensmtpd")
1552 (version "5.9.2p1")
1553 (source (origin
1554 (method url-fetch)
1555 (uri (string-append "https://www.opensmtpd.org/archives/"
1556 name "-" version ".tar.gz"))
1557 (sha256
1558 (base32
1559 "07d7f1m5sxyz6mkk228rcm7fsf7350994ayvmhgph333q5rz48im"))))
1560 (build-system gnu-build-system)
1561 (inputs
1562 `(("bdb" ,bdb)
1563 ("libressl" ,libressl)
1564 ("libevent" ,libevent)
1565 ("libasr" ,libasr)
1566 ("linux-pam" ,linux-pam)
1567 ("zlib" ,zlib)))
1568 (native-inputs
1569 `(("bison" ,bison)))
1570 (arguments
1571 `(#:configure-flags (list "--with-table-db" "--localstatedir=/var"
1572 "--with-user-smtpd=smtpd" "--with-user-queue=smtpq"
1573 "--with-group-queue=smtpq")
1574 #:phases
1575 (modify-phases %standard-phases
1576 ;; OpenSMTPD provides a single utility smtpctl to control the daemon and
1577 ;; the local submission subsystem. To accomodate systems that require
1578 ;; historical interfaces such as sendmail, newaliases or makemap, the
1579 ;; smtpctl utility can operate in compatibility mode if called with the
1580 ;; historical name.
1581 (add-after 'install 'install-compabilitymode
1582 (lambda _
1583 (let* ((out (assoc-ref %outputs "out"))
1584 (sbin (string-append out "/sbin/")))
1585 (for-each (lambda (cmd)
1586 (symlink "smtpctl" (string-append sbin cmd)))
1587 '("makemap" "sendmail" "send-mail"
1588 "newaliases" "mailq")))
1589 #t)))))
1590 (synopsis "Lightweight SMTP daemon")
1591 (description
1592 "OpenSMTPD is an implementation of the server-side SMTP protocol, with
1593 some additional standard extensions. It allows ordinary machines to exchange
1594 e-mails with other systems speaking the SMTP protocol.")
1595 (home-page "https://www.opensmtpd.org")
1596 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
1597 public-domain isc openssl))))
1598
1599 (define-public opensmtpd-extras
1600 (package
1601 (name "opensmtpd-extras")
1602 (version "5.7.1")
1603 (source (origin
1604 (method url-fetch)
1605 (uri (string-append "https://www.opensmtpd.org/archives/"
1606 name "-" version ".tar.gz"))
1607 (sha256
1608 (base32
1609 "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm"))))
1610 (build-system gnu-build-system)
1611 (inputs
1612 `(("libressl" ,libressl)
1613 ("libevent" ,libevent)
1614 ("libasr" ,libasr)
1615 ("python-2" ,python-2)
1616 ("opensmtpd" ,opensmtpd)
1617 ("perl" ,perl)
1618 ("lua" ,lua)
1619 ("postgresql" ,postgresql)
1620 ("sqlite" ,sqlite)
1621 ("linux-pam" ,linux-pam)))
1622 (native-inputs
1623 `(("bison" ,bison)
1624 ("pkg-config" ,pkg-config)
1625 ("groff" ,groff)
1626 ("automake" ,automake)
1627 ("autoconf" ,autoconf)))
1628 (arguments
1629 `(;; We have to configure it like this because the default checks for for example
1630 ;; python in /usr/local/bin, /usr/bin and fails otherwise.
1631 #:configure-flags (list
1632 "--with-filter-clamav" "--with-filter-dkim-signer"
1633 "--with-filter-dnsbl" "--with-filter-lua"
1634 "--with-filter-monkey" "--with-filter-pause"
1635 "--with-filter-perl" "--with-filter-python"
1636 "--with-filter-regex" "--with-filter-spamassassin"
1637 "--with-filter-stub" "--with-filter-trace"
1638 "--with-filter-void"
1639
1640 "--with-queue-null" "--with-queue-python"
1641 "--with-queue-ram" "--with-queue-stub"
1642
1643 "--with-scheduler-python" "--with-scheduler-ram"
1644 "--with-scheduler-stub"
1645
1646 "--with-table-ldap" ; "--with-table-mysql"
1647 "--with-table-passwd" "--with-table-postgres"
1648 "--with-table-python" "--with-table-socketmap"
1649 "--with-table-sqlite" "--with-table-stub"
1650 ;;"--with-table-redis" ; TODO: package hiredis
1651
1652 "--with-user=smtpd" "--with-privsep-user=smtpd"
1653 "--localstatedir=/var" "--sysconfdir=/etc"
1654 "--with-lua-type=lua" ; can use lua or luajit
1655
1656 (string-append "--with-python="
1657 (assoc-ref %build-inputs "python-2"))
1658 (string-append "--with-lua="
1659 (assoc-ref %build-inputs "lua")))))
1660 (license (list bsd-2 bsd-3 bsd-4 non-copyleft
1661 public-domain isc openssl))
1662 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
1663 (description
1664 "This package provides extra tables, filters, and various other addons
1665 for OpenSMTPD to extend its functionality.")
1666 (home-page "https://www.opensmtpd.org")))