gnu: Add dovecot-libsodium-plugin.
[jackhill/guix/guix.git] / gnu / packages / mail.scm
CommitLineData
a661e420 1;;; GNU Guix --- Functional package management for GNU
05aa576b 2;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
ee2b2d2f 3;;; Copyright © 2014, 2015, 2017 Mark H Weaver <mhw@netris.org>
29a7c98a 4;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
98e9e22f 5;;; Copyright © 2014 Sou Bunnbu <iyzsong@gmail.com>
f58f767b 6;;; Copyright © 2014 Julien Lepiller <julien@lepiller.eu>
66cc3ab2 7;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
17dd4329 8;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
f6292baf 9;;; Copyright © 2015, 2016 Eric Bavier <bavier@member.fsf.org>
2e88d113 10;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
a047122c 11;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
34dd26af 12;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
8a75c589 13;;; Copyright © 2016 Al McElrath <hello@yrns.org>
823e2ed4 14;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
e90819c4 15;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
99404fff 16;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
a2cb16b0 17;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
3163a289 18;;; Copyright © 2016, 2017 <contact.ng0@cryptolab.net>
24262239 19;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
e0d7b421 20;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
5d87088c 21;;; Copyright © 2016 John Darrington <jmd@gnu.org>
7a6213cb 22;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
3e9750c3 23;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
a661e420
LC
24;;;
25;;; This file is part of GNU Guix.
26;;;
27;;; GNU Guix is free software; you can redistribute it and/or modify it
28;;; under the terms of the GNU General Public License as published by
29;;; the Free Software Foundation; either version 3 of the License, or (at
30;;; your option) any later version.
31;;;
32;;; GNU Guix is distributed in the hope that it will be useful, but
33;;; WITHOUT ANY WARRANTY; without even the implied warranty of
34;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35;;; GNU General Public License for more details.
36;;;
37;;; You should have received a copy of the GNU General Public License
38;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
39
1fdd3ee2 40(define-module (gnu packages mail)
59a43334 41 #:use-module (gnu packages)
d983a14f 42 #:use-module (gnu packages autotools)
d2938d59 43 #:use-module (gnu packages base)
e8435c4d 44 #:use-module (gnu packages backup)
ee886454 45 #:use-module (gnu packages bash)
f8ae32a2 46 #:use-module (gnu packages bison)
944a5cdd 47 #:use-module (gnu packages crypto)
f58f767b 48 #:use-module (gnu packages curl)
4fd6bf53 49 #:use-module (gnu packages cyrus-sasl)
81ce19f4 50 #:use-module (gnu packages databases)
d983a14f 51 #:use-module (gnu packages dejagnu)
8b53366c 52 #:use-module (gnu packages dns)
7a6213cb 53 #:use-module (gnu packages documentation)
d2938d59 54 #:use-module (gnu packages emacs)
e8435c4d 55 #:use-module (gnu packages enchant)
e8435c4d 56 #:use-module (gnu packages ghostscript)
d2938d59 57 #:use-module (gnu packages glib)
e8435c4d 58 #:use-module (gnu packages gnome)
524e1df6 59 #:use-module (gnu packages gnupg)
152ffe7c 60 #:use-module (gnu packages groff)
d6e941bc 61 #:use-module (gnu packages gsasl)
e8435c4d 62 #:use-module (gnu packages gtk)
1ffa7090 63 #:use-module (gnu packages guile)
f8ae32a2 64 #:use-module (gnu packages flex)
e8435c4d 65 #:use-module (gnu packages libcanberra)
8b53366c 66 #:use-module (gnu packages libevent)
d6e941bc 67 #:use-module (gnu packages libidn)
d983a14f 68 #:use-module (gnu packages linux)
152ffe7c 69 #:use-module (gnu packages lua)
d983a14f 70 #:use-module (gnu packages m4)
1ffa7090 71 #:use-module (gnu packages ncurses)
66cc3ab2 72 #:use-module (gnu packages pcre)
13f04f48 73 #:use-module (gnu packages perl)
3919a31a 74 #:use-module (gnu packages python)
1ffa7090 75 #:use-module (gnu packages readline)
d2938d59 76 #:use-module (gnu packages search)
1ffa7090 77 #:use-module (gnu packages texinfo)
681a6588
MW
78 #:use-module (gnu packages compression)
79 #:use-module (gnu packages glib)
80 #:use-module (gnu packages pkg-config)
a7e59c50 81 #:use-module (gnu packages flex)
1bd3f849 82 #:use-module (gnu packages gdb)
6cf27c89 83 #:use-module (gnu packages man)
3e9750c3 84 #:use-module (gnu packages ruby)
1bd3f849 85 #:use-module (gnu packages samba)
6cf27c89 86 #:use-module (gnu packages screen)
a7fd7b68 87 #:use-module (gnu packages tls)
be0c5733
DM
88 #:use-module (gnu packages networking)
89 #:use-module (gnu packages web)
f58f767b 90 #:use-module (gnu packages xml)
e8435c4d 91 #:use-module (gnu packages xorg)
7596ddf3 92 #:use-module (gnu packages docbook)
d983a14f 93 #:use-module ((guix licenses)
61c30e9d 94 #:select (gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+
24262239 95 non-copyleft (expat . license:expat) bsd-3
8b53366c 96 public-domain bsd-4 isc (openssl . license:openssl)
944a5cdd 97 bsd-2 x11-style agpl3))
a661e420
LC
98 #:use-module (guix packages)
99 #:use-module (guix download)
f8ae32a2 100 #:use-module (guix git-download)
29a7c98a 101 #:use-module (guix utils)
681a6588 102 #:use-module (guix build-system gnu)
ebda902f 103 #:use-module (guix build-system perl)
24262239
CL
104 #:use-module (guix build-system python)
105 #:use-module (guix build-system trivial))
a661e420
LC
106
107(define-public mailutils
108 (package
109 (name "mailutils")
abe5d2dc 110 (version "3.1.1")
a661e420
LC
111 (source (origin
112 (method url-fetch)
113 (uri (string-append "mirror://gnu/mailutils/mailutils-"
114 version ".tar.bz2"))
115 (sha256
116 (base32
abe5d2dc 117 "1dpylyg79avi7brpkcmzaq7bqqkz45flp0ws6f2c8b1gyz4hdnzm"))))
a661e420
LC
118 (build-system gnu-build-system)
119 (arguments
de75f0b1
EF
120 '(#:phases
121 (modify-phases %standard-phases
122 (add-before 'build 'pre-build
123 (lambda _
124 ;; Use the right file name for `cat'.
125 (substitute* "testsuite/lib/mailutils.exp"
126 (("/bin/cat")
127 (which "cat")))
14253017 128
de75f0b1
EF
129 ;; Tests try to invoke 'maidag' such that it looks up the
130 ;; 'root' user, which does not exist in the build
131 ;; environment.
132 (substitute* "maidag/tests/testsuite"
133 (("root <") "nobody <")
134 (("spool/root") "spool/nobody")
135 (("root@localhost") "nobody@localhost"))
14253017 136
de75f0b1
EF
137 ;; The 'pipeact.at' tests generate a shell script; make
138 ;; sure it uses the right shell.
139 (substitute* '("sieve/tests/testsuite"
140 "mh/tests/testsuite")
141 (("#! /bin/sh")
142 (string-append "#!" (which "sh"))))
14253017 143
de75f0b1
EF
144 (substitute* "mh/tests/testsuite"
145 (("moreproc: /bin/cat")
146 (string-append "moreproc: " (which "cat"))))
14253017 147
de75f0b1
EF
148 ;; XXX: The comsatd tests rely on being able to open
149 ;; /dev/tty, but that gives ENODEV in the build
150 ;; environment. Thus, ignore test failures here.
151 (substitute* "comsat/tests/Makefile.in"
152 (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
153 (string-append "-" all)))
14253017 154
de75f0b1
EF
155 #t)))
156 ;; TODO: Add `--with-sql'.
abe5d2dc 157 #:configure-flags '("--sysconfdir=/etc")
a661e420
LC
158 #:parallel-tests? #f))
159 (inputs
160 `(("dejagnu" ,dejagnu)
161 ("m4" ,m4)
162 ("texinfo" ,texinfo)
163 ("guile" ,guile-2.0)
164 ("gnutls" ,gnutls)
165 ("ncurses" ,ncurses)
abe5d2dc 166 ("readline" ,readline)
a661e420 167 ("linux-pam" ,linux-pam)
3246cc91 168 ("libltdl" ,libltdl)
01eafd38 169 ("gdbm" ,gdbm)))
abe5d2dc 170 (home-page "https://www.gnu.org/software/mailutils/")
f50d2669 171 (synopsis "Utilities and library for reading and serving mail")
a661e420 172 (description
79c311b8
LC
173 "GNU Mailutils is a collection of programs for managing, viewing and
174processing electronic mail. It contains both utilities and server daemons
175and all operate in a protocol-agnostic way. The underlying libraries are
176also available, simplifying the addition of mail capabilities to new
177software.")
a661e420
LC
178 (license
179 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
180 (list gpl3+ lgpl3+))))
d983a14f
AE
181
182(define-public fetchmail
183 (package
184 (name "fetchmail")
185 (version "6.3.26")
186 (source (origin
187 (method url-fetch)
188 (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-"
189 version ".tar.xz"))
190 (sha256
191 (base32
192 "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r"))))
193 (build-system gnu-build-system)
194 (inputs
195 `(("openssl" ,openssl)))
196 (arguments
197 `(#:configure-flags (list (string-append "--with-ssl="
198 (assoc-ref %build-inputs "openssl")))))
07af3e5e 199 (home-page "http://www.fetchmail.info/")
ae2189a9 200 (synopsis "Remote-mail retrieval and forwarding utility")
d983a14f
AE
201 (description
202 "Fetchmail is a full-featured, robust, well-documented remote-mail
203retrieval and forwarding utility intended to be used over on-demand
204TCP/IP links (such as SLIP or PPP connections). It supports every
205remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
206KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
207and IPSEC.
208
209Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
210so it can then be read by normal mail user agents such as mutt, elm
211or BSD Mail. It allows all your system MTA's filtering, forwarding, and
212aliasing facilities to work just as they would on normal mail.")
213 (license gpl2+))) ; most files are actually public domain or x11
13f04f48
AE
214
215(define-public mutt
216 (package
217 (name "mutt")
a047122c 218 (version "1.8.0")
13f04f48
AE
219 (source (origin
220 (method url-fetch)
d82633d0
AE
221 (uri (string-append "ftp://ftp.mutt.org/pub/mutt/mutt-"
222 version ".tar.gz"))
13f04f48
AE
223 (sha256
224 (base32
a047122c 225 "1axdcylyv0p194y6lj1jx127g5yc74zqzzxdc014cjw02bd1x125"))
fc1adab1 226 (patches (search-patches "mutt-store-references.patch"))))
13f04f48
AE
227 (build-system gnu-build-system)
228 (inputs
4fd6bf53 229 `(("cyrus-sasl" ,cyrus-sasl)
b0bb0136 230 ("gdbm" ,gdbm)
524e1df6 231 ("gpgme" ,gpgme)
4fd6bf53 232 ("ncurses" ,ncurses)
13f04f48
AE
233 ("openssl" ,openssl)
234 ("perl" ,perl)))
235 (arguments
236 `(#:configure-flags '("--enable-smtp"
237 "--enable-imap"
238 "--enable-pop"
524e1df6 239 "--enable-gpgme"
b0bb0136 240 "--enable-hcache" ; for header caching
0323fe80 241 "--enable-sidebar"
13f04f48 242 "--with-ssl"
4fd6bf53 243 "--with-sasl"
13f04f48
AE
244 ;; so that mutt does not check whether the path
245 ;; exists, which it does not in the chroot
246 "--with-mailpath=/var/mail")))
247 (home-page "http://www.mutt.org/")
248 (synopsis "Mail client")
249 (description
250 "Mutt is a small but very powerful text-based mail client for Unix
251operating systems.")
252 (license gpl2+)))
681a6588 253
7596ddf3 254(define-public neomutt
255 (package
256 (inherit mutt)
257 (name "neomutt")
469609a9 258 (version "20170306")
7596ddf3 259 (source
260 (origin
261 (method url-fetch)
262 (uri (string-append "https://github.com/" name "/" name
263 "/archive/" name "-" version ".tar.gz"))
264 (file-name (string-append name "-" version ".tar.gz"))
265 (sha256
266 (base32
469609a9 267 "0qwcbjm9j1hgzmybw15w53pvfbqcdf47d4sw21s6r2yaj8kx1hag"))))
7596ddf3 268 (inputs
269 `(("cyrus-sasl" ,cyrus-sasl)
270 ("gdbm" ,gdbm)
271 ("gpgme" ,gpgme)
272 ("ncurses" ,ncurses)
273 ("gnutls" ,gnutls)
274 ("openssl" ,openssl) ;For smime
275 ("perl" ,perl)
5c95465e 276 ("kyotocabinet" ,kyotocabinet)
7596ddf3 277 ("libxslt" ,libxslt)
278 ("libidn" ,libidn)
279 ("libxml2" ,libxml2)
5c95465e 280 ("lmdb" ,lmdb)
7596ddf3 281 ("docbook-xsl" ,docbook-xsl)
282 ("notmuch" ,notmuch)))
283 (native-inputs
284 `(("autoconf" ,autoconf)
285 ("automake" ,automake)
286 ("pkg-config" ,pkg-config)))
287 (arguments
288 `(#:configure-flags
289 (list "--enable-smtp"
290 "--enable-imap"
291 "--enable-pop"
292 "--enable-gpgme"
293
294 ;; database, implies header caching
91c87241 295 "--without-tokyocabinet"
7596ddf3 296 "--without-qdbm"
297 "--without-bdb"
5c95465e 298 "--with-lmdb"
299 (string-append "--with-kyotocabinet="
300 (assoc-ref %build-inputs "kyotocabinet"))
7596ddf3 301 "--with-gdbm"
302
303 "--with-gnutls"
304 "--without-ssl"
305 "--with-sasl"
306
307 "--with-regex"
308 "--enable-smime"
309 "--enable-notmuch"
310 "--with-idn"
311
312 ;; If we do not set this, neomutt wants to check
313 ;; whether the path exists, which it does not
314 ;; in the chroot. The workaround is this.
315 "--with-mailpath=/var/mail"
316
317 "--with-external-dotlock"
318 "--enable-nntp"
319 "--enable-compressed"
320
321 (string-append "--with-curses="
322 (assoc-ref %build-inputs "ncurses")))
323 #:phases
324 (modify-phases %standard-phases
325 (add-after 'unpack 'autoconf
326 (lambda _
327 (zero? (system* "sh" "autoreconf" "-vfi")))))))
328 (home-page "https://www.neomutt.org/")
329 (synopsis "Command-line mail reader based on Mutt")
330 (description
331 "NeoMutt is a command-line mail reader which is based on mutt.
332It adds a large amount of features to mutt, and they all find their way
333into mutt, so it is not a fork but a large set of feature patches.")))
334
681a6588
MW
335(define-public gmime
336 (package
337 (name "gmime")
ee2b2d2f 338 (version "2.6.22")
681a6588
MW
339 (source (origin
340 (method url-fetch)
75630043 341 (uri (string-append "mirror://gnome/sources/gmime/"
29a7c98a 342 (version-major+minor version)
681a6588
MW
343 "/gmime-" version ".tar.xz"))
344 (sha256
345 (base32
ee2b2d2f 346 "0fjmsphvz8srsmcdl4v13p2z4jp2migaybyny444hal4snbr0py2"))))
681a6588
MW
347 (build-system gnu-build-system)
348 (native-inputs
349 `(("pkg-config" ,pkg-config)
350 ("gnupg" ,gnupg))) ; for tests only
351 (inputs `(("glib" ,glib)
352 ("gpgme" ,gpgme)
353 ("zlib" ,zlib)))
354 (arguments
355 `(#:phases
cc955356
EF
356 (modify-phases %standard-phases
357 (add-after
358 'unpack 'patch-paths-in-tests
359 (lambda _
360 ;; The test programs run several programs using 'system' with
ae83dcf6 361 ;; hard-coded paths. Here we patch them all.
362 ;; We use ISO-8859-1 here because test-iconv.c contains
cc955356
EF
363 ;; raw byte sequences in several different encodings.
364 (with-fluids ((%default-port-encoding #f))
365 (substitute* (find-files "tests" "\\.c$")
366 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
367 (let* ((base (basename prog-path))
ae83dcf6 368 (prog (which base)))
cc955356
EF
369 (string-append pre
370 (or prog (error "not found: " base))))))))))))
681a6588
MW
371 (home-page "http://spruce.sourceforge.net/gmime/")
372 (synopsis "MIME message parser and creator library")
373 (description
374 "GMime provides a core library and set of utilities which may be used for
375the creation and parsing of messages using the Multipurpose Internet Mail
376Extension (MIME).")
377 (license (list lgpl2.1+ gpl2+ gpl3+))))
378
a7e59c50
LC
379(define-public bogofilter
380 (package
381 (name "bogofilter")
382 (version "1.2.4")
383 (source (origin
384 (method url-fetch)
385 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-"
386 version "/bogofilter-"
387 version ".tar.bz2"))
388 (sha256
389 (base32
390 "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1"))))
391 (build-system gnu-build-system)
392 (arguments
c55fa42b
EF
393 '(#:phases
394 (modify-phases %standard-phases
395 (add-before 'check 'pre-check
396 (lambda _
397 (substitute* "src/tests/t.frame"
398 (("GREP=/bin/grep")
399 (string-append "GREP=" (which "grep") "\n")))
400 #t)))))
a7e59c50
LC
401 (native-inputs `(("flex" ,flex)))
402 (inputs `(("bdb" ,bdb)))
403 (home-page "http://bogofilter.sourceforge.net/")
404 (synopsis "Mail classifier based on a Bayesian filter")
405 (description
406 "Bogofilter is a mail filter that classifies mail as spam or ham
407 (non-spam) by a statistical analysis of the message's header and
408content (body). The program is able to learn from the user's classifications
409and corrections. It is based on a Bayesian filter.")
410 (license gpl2)))
411
3919a31a
EB
412(define-public offlineimap
413 (package
414 (name "offlineimap")
301f12ec 415 (version "7.0.14")
3919a31a
EB
416 (source (origin
417 (method url-fetch)
418 (uri (string-append "https://github.com/OfflineIMAP/offlineimap/"
419 "archive/v" version ".tar.gz"))
f586c877 420 (file-name (string-append name "-" version ".tar.gz"))
3919a31a
EB
421 (sha256
422 (base32
301f12ec 423 "0i5dvygps1ai2qwgamab8kngrp0c5m3bgaw0jk34l8ypsk54wj8r"))))
3919a31a 424 (build-system python-build-system)
7a6213cb
MB
425 (native-inputs
426 `(("asciidoc" ,asciidoc)
427 ("libxslt" ,libxslt))) ; for xsltproc
a4ea25d3
EF
428 (inputs `(("python2-pysqlite" ,python2-pysqlite)
429 ("python2-six" ,python2-six)))
3919a31a
EB
430 (arguments
431 ;; The setup.py script expects python-2.
432 `(#:python ,python-2
433 ;; Tests require a modifiable IMAP account.
42aa73b3
EF
434 #:tests? #f
435 #:phases
436 (modify-phases %standard-phases
7a6213cb
MB
437 (add-after 'build 'build-documentation
438 (lambda _
439 (substitute* "docs/Makefile"
440 ;; Prevent xmllint and xsltproc from downloading a DTD file.
441 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
442 (zero? (system* "make" "-C" "docs" "man"))))
443 (add-after 'install 'install-documentation
444 (lambda* (#:key outputs #:allow-other-keys)
445 (let* ((out (assoc-ref outputs "out"))
446 (man (string-append out "/share/man")))
447 (install-file "docs/offlineimap.1" (string-append man "/man1"))
448 (install-file "docs/offlineimapui.7" (string-append man "/man7"))
449 #t)))
450 (add-after 'install-documentation 'wrap-binary
451 (lambda* (#:key outputs #:allow-other-keys)
42aa73b3
EF
452 (let* ((out (assoc-ref outputs "out"))
453 (bin (string-append out "/bin/offlineimap")))
454 (wrap-program bin
455 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
456 #t))))))
3919a31a 457 (home-page "http://www.offlineimap.org")
31e98ca6 458 (synopsis "Sync emails between two repositories")
3919a31a
EB
459 (description
460 "OfflineImap synchronizes emails between two repositories, so that you
461can read the same mailbox from multiple computers. It supports IMAP as REMOTE
462repository and Maildir/IMAP as LOCAL repository.")
7886e23b 463 (license gpl2+)))
3919a31a 464
3e9750c3
TD
465(define-public emacs-mew
466 (package
467 (name "emacs-mew")
468 (version "6.7")
469 (source (origin
470 (method url-fetch)
471 (uri (string-append "http://mew.org/Release/mew-"
472 version ".tar.gz"))
473 (sha256
474 (base32
475 "03fzky2kz73vgx4cbps2psbbnrgqgkk5q7jwfldisymkzr9iz03y"))))
476 (native-inputs
477 `(("emacs" ,emacs)))
478 (propagated-inputs
479 `(("ruby-sqlite3" ,ruby-sqlite3) ; optional for the database of messages
480 ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
481 (build-system gnu-build-system)
482 (arguments
483 (let ((elisp-dir "/share/emacs/site-lisp/guix.d/mew")
484 (icon-dir "/share/mew"))
485 `(#:modules ((guix build gnu-build-system)
486 (guix build utils)
487 (guix build emacs-utils))
488 #:imported-modules (,@%gnu-build-system-modules
489 (guix build emacs-utils))
490 #:configure-flags
491 (list (string-append "--with-elispdir=" %output ,elisp-dir)
492 (string-append "--with-etcdir=" %output ,icon-dir))
493 #:phases
494 (modify-phases %standard-phases
495 (add-after 'configure 'patch-mew-icon-directory
496 (lambda* (#:key outputs #:allow-other-keys)
497 (emacs-substitute-sexps "mew-key.el"
498 ("(def.* mew-icon-directory"
499 `(progn
500 (add-to-list 'image-load-path 'mew-icon-directory)
501 ,(string-append (assoc-ref outputs "out") ,icon-dir))))
502 #t))
503 (add-after 'install 'generate-autoloads
504 (lambda* (#:key outputs #:allow-other-keys)
505 (emacs-generate-autoloads
506 "mew" (string-append (assoc-ref outputs "out") ,elisp-dir))
507 #t)))
508 #:tests? #f)))
509 (home-page "http://www.mew.org")
510 (synopsis "Emacs e-mail client")
511 (description "Mew (Messaging in the Emacs World) is a user interface
512for text messages, multimedia messages (MIME), news articles and
513security functionality including PGP, S/MIME, SSH, and SSL.")
514 (license bsd-3)))
515
d2938d59
EB
516(define-public mu
517 (package
518 (name "mu")
e7b9da24 519 (version "0.9.18")
d2938d59
EB
520 (source (origin
521 (method url-fetch)
e7b9da24
RW
522 (uri (string-append "https://github.com/djcb/mu/releases/"
523 "download/" version "/mu-"
d2938d59
EB
524 version ".tar.gz"))
525 (sha256
526 (base32
e7b9da24 527 "02g82zvxfgn17wzy846bfxj0izjj7yklhwdnhwxy1y2kin4fqnb5"))))
d2938d59
EB
528 (build-system gnu-build-system)
529 (native-inputs
530 `(("pkg-config" ,pkg-config)
9fd571a2 531 ("glib" ,glib "bin") ; for gtester
e62e975b 532 ("emacs" ,emacs-minimal)))
d2938d59
EB
533 ;; TODO: Add webkit and gtk to build the mug GUI.
534 (inputs
535 `(("xapian" ,xapian)
d2938d59
EB
536 ("guile" ,guile-2.0)
537 ("glib" ,glib)
538 ("gmime" ,gmime)
539 ("tzdata" ,tzdata))) ;for mu/test/test-mu-query.c
540 (arguments
704f2196
AK
541 `(#:modules ((guix build gnu-build-system)
542 (guix build utils)
543 (guix build emacs-utils))
544 #:imported-modules (,@%gnu-build-system-modules
545 (guix build emacs-utils))
546 #:phases
99404fff 547 (modify-phases %standard-phases
e62e975b 548 (add-after 'unpack 'patch-configure
789bda83
AK
549 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
550 ;; so our Emacs package can't find it. Setting "--with-lispdir"
551 ;; configure flag doesn't help because "mu4e" will be added to
552 ;; the lispdir anyway, so we have to modify "configure.ac".
553 (lambda _
e62e975b
RW
554 (substitute* "configure"
555 (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") ""))
789bda83 556 #t))
99404fff
AK
557 (add-before 'check 'check-tz-setup
558 (lambda* (#:key inputs #:allow-other-keys)
559 ;; For mu/test/test-mu-query.c
560 (setenv "TZDIR"
561 (string-append (assoc-ref inputs "tzdata")
562 "/share/zoneinfo"))
704f2196
AK
563 #t))
564 (add-after 'install 'install-emacs-autoloads
565 (lambda* (#:key outputs #:allow-other-keys)
566 (emacs-generate-autoloads
567 "mu4e"
568 (string-append (assoc-ref outputs "out")
569 "/share/emacs/site-lisp"))
99404fff 570 #t)))))
d2938d59
EB
571 (home-page "http://www.djcbsoftware.nl/code/mu/")
572 (synopsis "Quickly find emails")
573 (description
574 "Mu is a tool for dealing with e-mail messages stored in the
575Maildir-format. Mu's purpose in life is to help you to quickly find the
576messages you need; in addition, it allows you to view messages, extract
577attachments, create new maildirs, and so on.")
578 (license gpl3+)))
579
a2cb16b0
TS
580(define-public alot
581 (package
582 (name "alot")
fe3b8862 583 (version "0.4")
a2cb16b0
TS
584 (source (origin
585 (method url-fetch)
1b94f182
TS
586 ;; package author intends on distributing via github rather
587 ;; than pypi:
588 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
a2cb16b0
TS
589 (uri (string-append "https://github.com/pazz/alot/archive/"
590 version ".tar.gz"))
591 (file-name (string-append "alot-" version ".tar.gz"))
592 (sha256
593 (base32
fe3b8862 594 "0sl1kl2fhkv208llnbny4blcvrfdk4vx6bcw5pnyh9ylwb0pipi2"))))
a2cb16b0
TS
595 (build-system python-build-system)
596 (arguments
597 `(#:tests? #f ; no tests
fe3b8862
MB
598 ;; python 3 is currently unsupported, more info:
599 ;; https://github.com/pazz/alot/blob/master/docs/source/faq.rst
a2cb16b0
TS
600 #:python ,python-2))
601 (inputs
602 `(("python2-magic" ,python2-magic)
603 ("python2-configobj" ,python2-configobj)
604 ("python2-twisted" ,python2-twisted)
605 ("python2-urwid" ,python2-urwid)
606 ("python2-urwidtrees" ,python2-urwidtrees)
607 ("python2-pygpgme" ,python2-pygpgme)
608 ("python2-notmuch" ,python2-notmuch)))
609 (home-page "https://github.com/pazz/alot")
610 (synopsis "Commandline MUA using notmuch")
611 (description
612 "Alot is an experimental terminal mail user agent (MUA) based on
613@code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
614 (license gpl3+)))
615
0350a8bb
HG
616(define-public notifymuch
617 (let
618 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
619 (revision "1"))
620 (package
621 (name "notifymuch")
622 (version (string-append "0.1-" revision "." (string-take commit 7)))
623 (source
624 (origin
625 (method git-fetch)
626 (uri (git-reference
627 (url "https://github.com/kspi/notifymuch.git")
628 (commit commit)))
629 (sha256
630 (base32
631 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
632 (file-name (string-append name "-" version "-checkout"))))
633 (build-system python-build-system)
634 (inputs
635 `(("python-notmuch" ,python-notmuch)
636 ("python-pygobject" ,python-pygobject)
637 ("gobject-introspection" ,gobject-introspection)
638 ("libnotify" ,libnotify)
639 ("gtk+" ,gtk+)))
640 (arguments
641 `(#:phases
642 (modify-phases %standard-phases
643 (add-after 'install 'wrap-binary
644 (lambda* (#:key outputs #:allow-other-keys)
645 (let* ((out (assoc-ref outputs "out"))
646 (bin (string-append out "/bin/notifymuch")))
647 (wrap-program bin
648 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
649 `("GI_TYPELIB_PATH" ":" prefix
650 (,(getenv "GI_TYPELIB_PATH")
651 ,(string-append out "/lib/girepository-1.0")))))
652 #t)))))
653 (home-page "https://github.com/kspi/notifymuch")
654 (synopsis "Displays notifications for changes in the notmuch email database")
655 (description "notifymuch displays desktop notifications for messages in
656the notmuch database. The notifications are sent using libnotify to a
657notification daemon. The query to find messages to send a notification about
658is configurable, and a notification for the same message will not be send
659within a configurable period (defaults to 48 hours). To use notifymuch, run
660@command{notifymuch} after new mail is indexed, this can be automated by
661invoking @command{notifymuch} from the post-new hook.")
662 (license gpl3))))
663
1bd3f849
DT
664(define-public notmuch
665 (package
666 (name "notmuch")
dd8ecb38 667 (version "0.24")
1bd3f849
DT
668 (source (origin
669 (method url-fetch)
866fade9 670 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
1bd3f849
DT
671 version ".tar.gz"))
672 (sha256
673 (base32
dd8ecb38 674 "1z3m9knsdmchvfjzjhjf2cmdc9yahmvbvzn46wsrsrihfvv4rr7p"))))
1bd3f849
DT
675 (build-system gnu-build-system)
676 (arguments
6cf27c89 677 '(#:make-flags (list "V=1") ; Verbose test output.
eb537f57 678 #:phases (modify-phases %standard-phases
6cf27c89
MB
679 (add-after 'unpack 'patch-notmuch-lib.el
680 (lambda _
681 (substitute* "emacs/notmuch-lib.el"
682 (("/bin/sh") (which "sh")))
683 #t))
eb537f57
DT
684 (replace 'configure
685 (lambda* (#:key outputs #:allow-other-keys)
686 (setenv "CC" "gcc")
687 (setenv "CONFIG_SHELL" (which "sh"))
ee886454 688
eb537f57
DT
689 (let ((out (assoc-ref outputs "out")))
690 (zero? (system* "./configure"
6cf27c89
MB
691 (string-append "--prefix=" out))))))
692 (add-before 'check 'prepare-test-environment
693 (lambda _
694 (setenv "TEST_CC" "gcc")
695 ;; Patch various inline shell invocations.
696 (substitute* (find-files "test" "\\.sh$")
697 (("/bin/sh") (which "sh")))
698 #t)))))
1bd3f849 699 (native-inputs
2c5b91dc 700 `(("bash-completion" ,bash-completion)
6cf27c89 701 ("emacs" ,emacs-no-x) ; Minimal lacks libxml, needed for some tests.
2c5b91dc 702 ("pkg-config" ,pkg-config)
ee886454 703 ("python" ,python-2)
eb537f57 704 ("python-docutils" ,python2-docutils)
6cf27c89
MB
705 ("python-sphinx" ,python2-sphinx)
706
707 ;; The following are required for tests only.
708 ("which" ,which)
709 ("dtach" ,dtach)
710 ("gnupg" ,gnupg)
711 ("man" ,man-db)
712 ("perl" ,perl)))
1bd3f849 713 (inputs
2c5b91dc 714 `(("glib" ,glib)
1bd3f849
DT
715 ("gmime" ,gmime)
716 ("talloc" ,talloc)
717 ("xapian" ,xapian)
718 ("zlib" ,zlib)))
540d6cc7 719 (home-page "https://notmuchmail.org/")
1bd3f849
DT
720 (synopsis "Thread-based email index, search, and tagging")
721 (description
722 "Notmuch is a command-line based program for indexing, searching, read-
723ing, and tagging large collections of email messages.")
724 (license gpl3+)))
725
8a75c589
AM
726(define-public notmuch-addrlookup-c
727 (package
728 (name "notmuch-addrlookup-c")
729 (version "7")
730 (source (origin
731 (method url-fetch)
732 (uri (string-append
733 "https://github.com/aperezdc/" name "/archive/v"
734 version ".tar.gz"))
735 (file-name (string-append name "-" version ".tar.gz"))
736 (sha256
737 (base32
738 "0rslg2ifgyhl6asv3yr1f62m9xjfcinv7i6qb07h2k217jqlmrri"))))
739 (build-system gnu-build-system)
740 (arguments
741 '(#:tests? #f ; no tests
742 #:make-flags (list "CC=gcc"
743 (string-append "PREFIX="
744 (assoc-ref %outputs "out")))
745 #:phases (modify-phases %standard-phases
746 (delete 'configure)
747 ;; Remove vim code completion config, it's not needed to
748 ;; build (or be patched).
749 (add-before 'patch-source-shebangs 'delete-ycm-file
750 (lambda _ (delete-file ".ycm_extra_conf.py")))
751 (replace 'install
752 (lambda* (#:key outputs #:allow-other-keys)
753 (let ((bin (string-append
754 (assoc-ref outputs "out") "/bin")))
755 (install-file "notmuch-addrlookup" bin)))))))
756 (native-inputs
757 `(("pkg-config" ,pkg-config)))
758 (inputs
759 `(("glib" ,glib)
760 ("notmuch" ,notmuch)))
761 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
762 (synopsis "Address lookup tool for Notmuch")
763 (description "This is an address lookup tool using a Notmuch database,
764useful for email address completion.")
765 (license license:expat)))
766
4b6909bc
TS
767(define-public python-notmuch
768 (package
769 (name "python-notmuch")
540d6cc7 770 (version (package-version notmuch))
4b6909bc
TS
771 ;; Notmuch python bindings are now unavailable on pypi. The
772 ;; bindings are distributed via the notmuch release tarball.
773 (source (package-source notmuch))
774 (build-system python-build-system)
775 (inputs `(("notmuch" ,notmuch)))
776 (arguments
777 `(#:tests? #f ; no "test" target
778 #:phases
779 (modify-phases %standard-phases
780 ;; This python package lives in a subdirectory of the notmuch source
781 ;; tree, so chdir into it before building.
782 (add-after 'unpack 'enter-python-dir
783 (lambda _ (chdir "bindings/python") #t))
784 ;; Make sure the correct notmuch shared library gets loaded.
785 (add-before 'build 'set-libnotmuch-file-name
786 (lambda* (#:key inputs #:allow-other-keys)
787 (let ((notmuch (assoc-ref inputs "notmuch")))
788 (substitute* "notmuch/globals.py"
789 (("libnotmuch\\.so\\.")
790 (string-append notmuch "/lib/libnotmuch.so.")))
791 #t))))))
540d6cc7 792 (home-page (package-home-page notmuch))
4b6909bc
TS
793 (synopsis "Python bindings of the Notmuch mail indexing library")
794 (description
795 "This package provides Python bindings to use the Notmuch mail indexing
796and search library.")
797 (license gpl3+)))
798
1c74da21 799(define-public python2-notmuch
caa6fc89 800 (package-with-python2 python-notmuch))
1c74da21 801
98e9e22f
SB
802(define-public getmail
803 (package
804 (name "getmail")
837ca0f0 805 (version "4.52.0")
98e9e22f
SB
806 (source
807 (origin
808 (method url-fetch)
809 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
810 name "-" version ".tar.gz"))
811 (sha256
812 (base32
837ca0f0 813 "0pzplrlxwbxydvfw4kkwn60l40hk1h5sxawaa6pi0k75c220k4ni"))))
98e9e22f
SB
814 (build-system python-build-system)
815 (arguments
816 `(#:tests? #f ; no tests
817 #:python ,python-2))
818 (home-page "http://pyropus.ca/software/getmail/")
819 (synopsis "Mail retriever")
820 (description
821 "A flexible, extensible mail retrieval system with support for
822POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
823arbitrary message filtering, single-user and domain-mailboxes, and many other
824useful features.")
825
826 ;; License is specified in file '__init__.py'.
827 (license gpl2)))
828
f58f767b
JL
829(define-public libetpan
830 (package
831 (name "libetpan")
c1748912 832 (version "1.7.2")
f58f767b
JL
833 (source (origin
834 (method url-fetch)
835 (uri (string-append "https://github.com/dinhviethoa/" name
836 "/archive/" version ".tar.gz"))
f586c877 837 (file-name (string-append name "-" version ".tar.gz"))
f58f767b 838 (sha256
c1748912 839 (base32 "081ixgj3skglq9i7v0jb835lmfx21zi4i5b7997igwr0lj174y9j"))))
f58f767b
JL
840 (build-system gnu-build-system)
841 (native-inputs `(("autoconf" ,(autoconf-wrapper))
842 ("automake" ,automake)
3246cc91 843 ("libtool" ,libtool)
f58f767b
JL
844 ("pkg-config" ,pkg-config)))
845 (propagated-inputs
846 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
847 ;; libraries need to be propagated.
848 `(("cyrus-sasl" ,cyrus-sasl)
849 ("openssl" ,openssl)))
850 (inputs
851 `(("curl" ,curl)
c1748912
EF
852 ("expat" ,expat)
853 ("zlib" ,zlib)))
f58f767b 854 (arguments
602460ea
EF
855 '(#:phases
856 (modify-phases %standard-phases
857 (add-after 'unpack 'autogen
858 (lambda _
859 (setenv "NOCONFIGURE" "true")
860 (zero? (system* "sh" "autogen.sh")))))
f58f767b
JL
861 #:configure-flags
862 '("--disable-static" "--disable-db")))
863 (home-page "http://www.etpan.org/libetpan.html")
864 (synopsis "Portable middleware for email access")
865 (description
866 "The purpose of this mail library is to provide a portable, efficient
867framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
868provides an API for C language. It's the low-level API used by MailCore and
869MailCore 2.")
166191b3 870 (license (non-copyleft "file://COPYING"))))
f58f767b 871
ee6e780b
DM
872(define-public compface
873 (package
874 (name "compface")
875 (version "1.5.2")
876 (source (origin
877 (method url-fetch)
878 (uri (string-append "https://ftp.heanet.ie/mirrors/"
879 "ftp.xemacs.org/aux/"
880 name "-" version ".tar.gz"))
881 (sha256
882 (base32
883 "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
884 (build-system gnu-build-system)
885 (arguments
886 `(#:tests? #f))
887 (synopsis "Portrait image compressor")
888 (description "This packages takes your 48x48x1 portrait image and
889compresses it.")
890 (home-page "http://www.cs.indiana.edu/pub/faces/")
891 (license (x11-style "file://README"))))
892
e8435c4d
JL
893(define-public claws-mail
894 (package
895 (name "claws-mail")
f34284ab 896 (version "3.14.1")
e8435c4d
JL
897 (source (origin
898 (method url-fetch)
899 (uri (string-append
762b1971 900 "http://www.claws-mail.org/releases/" name "-" version
6ea4b094 901 ".tar.xz"))
e8435c4d 902 (sha256
ec92806a 903 (base32
f34284ab 904 "0df34gj4r5cbb92834hph19gnh7ih9rgmmw47rliyg8b9z01v6mp"))))
e8435c4d
JL
905 (build-system gnu-build-system)
906 (native-inputs `(("pkg-config" ,pkg-config)))
907 (inputs `(("bogofilter" ,bogofilter)
908 ("curl" ,curl)
909 ("dbus-glib" ,dbus-glib)
e8435c4d
JL
910 ("enchant" ,enchant)
911 ("expat" ,expat)
912 ("ghostscript" ,ghostscript)
913 ("hicolor-icon-theme" ,hicolor-icon-theme)
914 ("gnupg" ,gnupg)
915 ("gnutls" ,gnutls)
916 ("gpgme" ,gpgme)
917 ("gtk" ,gtk+-2)
918 ("libarchive" ,libarchive)
919 ("libcanberra" ,libcanberra)
920 ("libetpan" ,libetpan)
921 ("libnotify" ,libnotify)
922 ("libsm" ,libsm)
923 ("libxml2" ,libxml2)
924 ("perl" ,perl)
f6292baf
EB
925 ("python-2" ,python-2)
926 ("mime-info" ,shared-mime-info)))
e8435c4d
JL
927 (arguments
928 '(#:configure-flags
f6292baf
EB
929 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant")
930 #:phases (modify-phases %standard-phases
931 (add-before 'build 'patch-mime
932 (lambda* (#:key inputs #:allow-other-keys)
933 (substitute* "src/procmime.c"
934 (("/usr/share/mime/globs")
935 (string-append (assoc-ref inputs "mime-info")
936 "/share/mime/globs"))))))))
e8435c4d
JL
937 (synopsis "GTK-based Email client")
938 (description
939 "Claws-Mail is an email client (and news reader) based on GTK+. The
940appearance and interface are designed to be familiar to new users coming from
941other popular email clients, as well as experienced users. Almost all commands
942are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
943which can add many functionalities to the base client.")
944 (home-page "http://www.claws-mail.org/")
945 (license gpl3+))) ; most files are actually public domain or x11
946
d6e941bc
947(define-public msmtp
948 (package
949 (name "msmtp")
899358d1 950 (version "1.6.6")
d6e941bc
951 (source
952 (origin
953 (method url-fetch)
d23d1ddf
LF
954 (uri (string-append "mirror://sourceforge/msmtp/msmtp/" version
955 "/msmtp-" version ".tar.xz"))
956 (sha256
957 (base32
899358d1 958 "0ppvww0sb09bnsrpqnvlrn8vx231r24xn2iiwpy020mxc8gxn5fs"))))
d6e941bc
959 (build-system gnu-build-system)
960 (inputs
961 `(("libidn" ,libidn)
72d8b5ba 962 ("libsecret" ,libsecret)
d6e941bc
963 ("gnutls" ,gnutls)
964 ("zlib" ,zlib)
965 ("gsasl" ,gsasl)))
966 (native-inputs
967 `(("pkg-config" ,pkg-config)))
968 (home-page "http://msmtp.sourceforge.net/")
969 (arguments
970 `(#:configure-flags (list "--with-libgsasl"
971 "--with-libidn"
823e2ed4
LF
972 "--with-tls=gnutls")
973 #:phases
974 (modify-phases %standard-phases
975 (add-after 'install 'install-msmtpq
976 (lambda* (#:key outputs #:allow-other-keys)
977 (let* ((out (assoc-ref outputs "out"))
978 (bin (string-append out "/bin"))
979 (doc (string-append out "/share/doc/msmtp"))
980 (msmtpq (string-append "scripts/msmtpq")))
981 (install-file (string-append msmtpq "/msmtpq") bin)
982 (install-file (string-append msmtpq "/msmtp-queue") bin)
983 (install-file (string-append msmtpq "/README.msmtpq") doc)
984 #t))))))
d6e941bc
985 (synopsis
986 "Simple and easy to use SMTP client with decent sendmail compatibility")
987 (description
988 "msmtp is an SMTP client. In the default mode, it transmits a mail to
989an SMTP server (for example at a free mail provider) which takes care of further
990delivery.")
991 (license gpl3+)))
992
66cc3ab2
TUBK
993(define-public exim
994 (package
995 (name "exim")
4a95b388 996 (version "4.87.1")
66cc3ab2
TUBK
997 (source
998 (origin
999 (method url-fetch)
fc6fdc05
LF
1000 (uri (list (string-append "ftp://ftp.exim.org/pub/exim/exim4/exim-"
1001 version ".tar.bz2")
1002 (string-append "ftp://ftp.exim.org/pub/exim/exim4/old/exim-"
1003 version ".tar.bz2")))
66cc3ab2 1004 (sha256
513f8ab4 1005 (base32
4a95b388 1006 "050m2gjzpc6vyik458h1j0vi8bxplkzjsyndkyd2y394i569kdyl"))))
66cc3ab2
TUBK
1007 (build-system gnu-build-system)
1008 (inputs
1009 `(("bdb" ,bdb)
1010 ("gnutls" ,gnutls)
1011 ("gzip" ,gzip)
1012 ("bzip2" ,bzip2)
1013 ("xz" ,xz)
66cc3ab2
TUBK
1014 ("perl" ,perl)
1015 ("libxt" ,libxt)
1016 ("libxaw" ,libxaw)))
1017 (native-inputs
42773138
EF
1018 `(("pcre" ,pcre "bin")
1019 ("perl" ,perl)))
66cc3ab2
TUBK
1020 (arguments
1021 '(#:phases
1022 (alist-replace
1023 'configure
1024 ;; We'd use #:make-flags but the top-level Makefile calls others
1025 ;; recursively, so just set all variables this way.
1026 (lambda* (#:key outputs inputs #:allow-other-keys)
1027 (substitute* '("Makefile" "OS/Makefile-Default")
1028 (("(RM_COMMAND=).*" all var)
1029 (string-append var "rm\n")))
1030 (copy-file "src/EDITME" "Local/Makefile")
1031 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
1032 (let ((out (assoc-ref outputs "out"))
1033 (gzip (assoc-ref inputs "gzip"))
1034 (bzip2 (assoc-ref inputs "bzip2"))
1035 (xz (assoc-ref inputs "xz")))
1036 (substitute* '("Local/Makefile")
1037 (("(BIN_DIRECTORY=).*" all var)
1038 (string-append var out "/bin\n"))
1039 (("(CONFIGURE_FILE=).*" all var)
1040 (string-append var out "/etc/exim.conf\n"))
1041 (("(EXIM_USER=).*" all var)
1042 (string-append var "nobody\n"))
1043 (("(FIXED_NEVER_USERS=).*" all var)
1044 (string-append var "\n")) ;XXX no root in build environment
1045 (("(COMPRESS_COMMAND=).*" all var)
1046 (string-append var gzip "/bin/gzip\n"))
1047 (("(ZCAT_COMMAND=).*" all var)
1048 (string-append var gzip "/bin/zcat\n")))
1049 ;; This file has hardcoded names for tools despite the zcat
1050 ;; configuration above.
1051 (substitute* '("src/exigrep.src")
1052 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
1053 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
1054 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
1055 (("'lzma'") (string-append "'" xz "/bin/lzma'")))))
1056 (alist-cons-before
1057 'build 'fix-sh-paths
1058 (lambda* (#:key inputs #:allow-other-keys)
1059 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
1060 (("SHELL=/bin/sh") "SHELL=sh"))
1061 (substitute* '("scripts/Configure-config.h")
1062 (("\\| /bin/sh") "| sh"))
1063 (let ((bash (assoc-ref inputs "bash")))
1064 (substitute* '("scripts/Configure-eximon")
1065 (("#!/bin/sh") (string-append "#!" bash "/bin/sh")))))
1066 %standard-phases))
1067 #:make-flags '("INSTALL_ARG=-no_chown")
1068 ;; No 'check' target.
1069 #:tests? #f))
1070 (home-page "http://www.exim.org/")
1071 (synopsis
1072 "Message Transfer Agent (MTA) developed at the University of Cambridge")
1073 (description
1074 "Exim is a message transfer agent (MTA) developed at the University of
1075Cambridge for use on Unix systems connected to the Internet. In style it is
1076similar to Smail 3, but its facilities are more general. There is a great
1077deal of flexibility in the way mail can be routed, and there are extensive
1078facilities for checking incoming mail.")
1079 (license gpl2+)))
1080
7d2b784b
MW
1081(define-public dovecot
1082 (package
1083 (name "dovecot")
c8608faf 1084 (version "2.2.27")
7d2b784b
MW
1085 (source
1086 (origin
1087 (method url-fetch)
c8608faf 1088 (uri (string-append "https://www.dovecot.org/releases/"
7d2b784b
MW
1089 (version-major+minor version) "/"
1090 name "-" version ".tar.gz"))
1091 (sha256 (base32
c8608faf 1092 "1s8qvr6fa9d0n179kdwgpsi72zkvpbh9q57q8fr2fjysgjl94zw9"))))
7d2b784b
MW
1093 (build-system gnu-build-system)
1094 (native-inputs
1095 `(("pkg-config" ,pkg-config)))
1096 (inputs
1097 `(("openssl" ,openssl)
1098 ("zlib" ,zlib)
1099 ("bzip2" ,bzip2)
fd5c70f8
AW
1100 ("sqlite" ,sqlite)
1101 ("linux-pam" ,linux-pam)))
7d2b784b
MW
1102 (arguments
1103 `(#:configure-flags '("--sysconfdir=/etc"
1104 "--localstatedir=/var")
1105 #:phases (modify-phases %standard-phases
1106 (add-before
1107 'configure 'pre-configure
1108 (lambda _
1109 ;; Simple hack to avoid installing in /etc
1110 (substitute* '("doc/Makefile.in"
1111 "doc/example-config/Makefile.in")
1112 (("pkgsysconfdir = .*")
1113 "pkgsysconfdir = /tmp/etc"))
072f1e22
EF
1114 #t))
1115 (add-after
1116 'unpack 'patch-other-shebangs
1117 (lambda _
1118 (substitute*
1119 "src/lib-program-client/test-program-client-local.c"
1120 (("/bin/echo") (which "echo"))
1121 (("/bin/cat") (which "cat"))
1122 (("/bin/false") (which "false")))
7d2b784b 1123 #t)))))
c8608faf 1124 (home-page "https://www.dovecot.org")
7d2b784b
MW
1125 (synopsis "Secure POP3/IMAP server")
1126 (description
1127 "Dovecot is a mail server whose major goals are security and reliability.
1128It supports mbox/Maildir and its own dbox/mdbox formats.")
1129 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
1130 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
1131 ;; Unicode, Inc. License Agreement for Data Files and Software.
1132 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
1133
944a5cdd 1134(define-public dovecot-trees
1135 (let ((commit "006059c8a47d68f14f73c09743e45b9a73014dbf")
1136 (revision "1"))
1137 (package
1138 (name "dovecot-trees")
1139 (version (string-append "2.0.0-" revision "." (string-take commit 7)))
1140 (source
1141 (origin
1142 (method git-fetch)
1143 (uri (git-reference
1144 (url "https://0xacab.org/riseuplabs/trees.git")
1145 (commit commit)))
1146 (file-name (string-append name "-" version "-checkout"))
1147 (sha256
1148 (base32
1149 "0ax90bzc66x179wi1m7ywqwa8nssyhjngs7ij109hqqxg5ymfp73"))))
1150 (build-system gnu-build-system)
1151 (native-inputs
1152 `(("automake" ,automake)
1153 ("autoconf" ,autoconf)
1154 ("libtool" ,libtool)
1155 ("dovecot" ,dovecot)
1156 ("pkg-config" ,pkg-config)))
1157 (inputs
1158 `(("libsodium" ,libsodium)))
1159 (arguments
1160 `(#:tests? #f ;No tests exist.
1161 #:configure-flags (list (string-append "--with-dovecot="
1162 (assoc-ref %build-inputs "dovecot")
1163 "/lib/dovecot"))
1164 #:phases
1165 (modify-phases %standard-phases
1166 (add-before 'configure 'autogen
1167 (lambda _
1168 (zero? (system* "./autogen.sh")))))))
1169 (home-page "https://0xacab.org/riseuplabs/trees")
1170 (synopsis "NaCL-based Dovecot email storage encryption plugin")
1171 (description
1172 "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
1173Dovecot encryption plugin. This plugin adds individually encrypted mail
1174storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
1175which uses OpenSSL and RSA keypairs. TREES works in a similar way, but uses
1176the Sodium crypto library (based on NaCL).
1177
1178How it works:
1179@enumerate
1180@item On IMAP log in, the user's cleartext password is passed to the plugin.
1181@item The plugin creates an argon2 digest from the password.
1182@item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
1183@item Inside the secretbox is stored a Curve25519 private key.
1184@item The Curve25519 private key is used to decrypt each individual message,
1185using lidsodium sealed boxes.
1186@item New mail is encrypted as it arrives using the Curve25519 public key.
1187@end enumerate\n")
1188 (license agpl3))))
1189
a4651f64 1190(define-public dovecot-libsodium-plugin
1191 (let ((commit "044de73c01c35385df0105f6b387bec5d5317ce7")
1192 (revision "1"))
1193 (package
1194 (name "dovecot-libsodium-plugin")
1195 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
1196 (source
1197 (origin
1198 (method git-fetch)
1199 (uri (git-reference
1200 (url "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1201 (commit commit)))
1202 (file-name (string-append name "-" version "-checkout"))
1203 (sha256
1204 (base32
1205 "13h07l7xy713zchnj2p9fhvq7fdl4zy1ai94li3ygkqjjj8hrgas"))))
1206 (build-system gnu-build-system)
1207 (native-inputs
1208 `(("automake" ,automake)
1209 ("autoconf" ,autoconf)
1210 ("libtool" ,libtool)
1211 ("dovecot" ,dovecot)
1212 ("pkg-config" ,pkg-config)))
1213 (inputs
1214 `(("libsodium" ,libsodium)))
1215 (arguments
1216 `(#:tests? #f ;No tests exist.
1217 #:configure-flags (list (string-append "--with-dovecot="
1218 (assoc-ref %build-inputs "dovecot")
1219 "/lib/dovecot"))
1220 #:phases
1221 (modify-phases %standard-phases
1222 (add-before 'configure 'autogen
1223 (lambda _
1224 (zero? (system* "./autogen.sh")))))))
1225 (home-page "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1226 (synopsis "Libsodium password hashing schemes plugin for Dovecot")
1227 (description
1228 "@code{dovecot-libsodium-plugin} provides libsodium password
1229hashing schemes plugin for @code{Dovecot}.")
1230 (license gpl3+))))
1231
81ce19f4
1232(define-public isync
1233 (package
1234 (name "isync")
2c3d13fe 1235 (version "1.2.1")
81ce19f4
1236 (source
1237 (origin
1238 (method url-fetch)
1239 (uri (string-append "mirror://sourceforge/isync/isync/"
1240 version "/isync-" version ".tar.gz"))
1241 (sha256 (base32
2c3d13fe 1242 "1bij6nm06ghkg98n2pdyacam2fyg5y8f7ajw0d5653m0r4ldw5p7"))))
81ce19f4
1243 (build-system gnu-build-system)
1244 (inputs
1245 `(("bdb" ,bdb)
1246 ("openssl" ,openssl)))
1247 (home-page "http://isync.sourceforge.net/")
1248 (synopsis "Mailbox synchronization program")
1249 (description
1250 "isync/mbsync is command line tool for two-way synchronization of
1251mailboxes. Currently Maildir and IMAP are supported types.")
1252 (license gpl2+)))
1253
26b8de19
EB
1254(define-public perl-email-abstract
1255 (package
1256 (name "perl-email-abstract")
1257 (version "3.008")
1258 (source
1259 (origin
1260 (method url-fetch)
1261 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1262 "Email-Abstract-" version ".tar.gz"))
1263 (sha256
1264 (base32
1265 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
1266 (build-system perl-build-system)
1267 (propagated-inputs
1268 `(("perl-email-simple" ,perl-email-simple)
a2190ccc 1269 ("perl-module-pluggable" ,perl-module-pluggable)
26b8de19
EB
1270 ("perl-mro-compat" ,perl-mro-compat)))
1271 (home-page "http://search.cpan.org/dist/Email-Abstract")
1272 (synopsis "Interface to mail representations")
1273 (description "Email::Abstract provides module writers with the ability to
1274write simple, representation-independent mail handling code.")
1275 (license (package-license perl))))
1276
ebda902f
EB
1277(define-public perl-email-address
1278 (package
1279 (name "perl-email-address")
151bba2b 1280 (version "1.908")
ebda902f
EB
1281 (source
1282 (origin
1283 (method url-fetch)
1284 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1285 "Email-Address-" version ".tar.gz"))
1286 (sha256
1287 (base32
151bba2b 1288 "0i6ljdvpy279hpbqf6lgv4figr376rb2sh4yphj86xkdzsyn1y75"))))
ebda902f
EB
1289 (build-system perl-build-system)
1290 (home-page "http://search.cpan.org/dist/Email-Address")
1291 (synopsis "Email address parsing and creation")
1292 (description "Email::Address implements a regex-based RFC 2822 parser that
1293locates email addresses in strings and returns a list of Email::Address
1294objects found. Alternatively you may construct objects manually.")
1295 (license (package-license perl))))
1296
aa86a3be
EB
1297(define-public perl-email-date-format
1298 (package
1299 (name "perl-email-date-format")
1300 (version "1.005")
1301 (source
1302 (origin
1303 (method url-fetch)
1304 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1305 "Email-Date-Format-" version ".tar.gz"))
1306 (sha256
1307 (base32
1308 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
1309 (build-system perl-build-system)
1310 (home-page "http://search.cpan.org/dist/Email-Date-Format")
1311 (synopsis "Produce RFC 2822 date strings")
1312 (description "Email::Date::Format provides a means for generating an RFC
13132822 compliant datetime string.")
1314 (license (package-license perl))))
1315
08bf7095
EB
1316(define-public perl-email-messageid
1317 (package
1318 (name "perl-email-messageid")
1fb37ef0 1319 (version "1.406")
08bf7095
EB
1320 (source
1321 (origin
1322 (method url-fetch)
1323 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1324 "Email-MessageID-" version ".tar.gz"))
1325 (sha256
1326 (base32
1fb37ef0 1327 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
08bf7095
EB
1328 (build-system perl-build-system)
1329 (home-page "http://search.cpan.org/dist/Email-MessageID")
1330 (synopsis "Generate world unique message-ids")
1331 (description "Email::MessageID generates recommended message-ids to
1332identify a message uniquely.")
1333 (license (package-license perl))))
1334
0a4c49f6
EB
1335(define-public perl-email-mime
1336 (package
1337 (name "perl-email-mime")
b4522b98 1338 (version "1.937")
0a4c49f6
EB
1339 (source
1340 (origin
1341 (method url-fetch)
1342 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1343 "Email-MIME-" version ".tar.gz"))
1344 (sha256
1345 (base32
b4522b98 1346 "0s50i3nxi9dr81p4rn017nrarc40yrwz0qcw34q8k3pvdf46fr9n"))))
0a4c49f6
EB
1347 (build-system perl-build-system)
1348 (propagated-inputs
1349 `(("perl-email-address" ,perl-email-address)
1350 ("perl-email-messageid" ,perl-email-messageid)
1351 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1352 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1353 ("perl-email-simple" ,perl-email-simple)
1354 ("perl-mime-types" ,perl-mime-types)))
1355 (home-page "http://search.cpan.org/dist/Email-MIME")
1356 (synopsis "MIME message handling")
1357 (description "Email::MIME is an extension of the Email::Simple module, to
1358handle MIME encoded messages. It takes a message as a string, splits it up
1359into its constituent parts, and allows you access to various parts of the
1360message. Headers are decoded from MIME encoding.")
1361 (license (package-license perl))))
1362
55025bb5
EB
1363(define-public perl-email-mime-contenttype
1364 (package
1365 (name "perl-email-mime-contenttype")
a883ba02 1366 (version "1.018")
55025bb5
EB
1367 (source
1368 (origin
1369 (method url-fetch)
1370 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1371 "Email-MIME-ContentType-" version ".tar.gz"))
1372 (sha256
1373 (base32
a883ba02 1374 "1y8hpwm7p5a9y2azy0cgvlv2i2d0nj66ajfa0fj51wdq4w9cs23m"))))
55025bb5
EB
1375 (build-system perl-build-system)
1376 (native-inputs
1377 `(("perl-capture-tiny" ,perl-capture-tiny)))
1378 (home-page "http://search.cpan.org/dist/Email-MIME-ContentType")
1379 (synopsis "Parse MIME Content-Type headers")
1380 (description "Email::MIME::ContentType parses a MIME Content-Type
1381header.")
1382 (license (package-license perl))))
1383
02e29936
EB
1384(define-public perl-email-mime-encodings
1385 (package
1386 (name "perl-email-mime-encodings")
1387 (version "1.315")
1388 (source
1389 (origin
1390 (method url-fetch)
1391 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1392 "Email-MIME-Encodings-" version ".tar.gz"))
1393 (sha256
1394 (base32
1395 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1396 (build-system perl-build-system)
1397 (native-inputs
1398 `(("perl-capture-tiny" ,perl-capture-tiny)))
1399 (home-page "http://search.cpan.org/dist/Email-MIME-Encodings")
1400 (synopsis "Unified interface to MIME encoding and decoding")
1401 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
1402 (license (package-license perl))))
1403
a24c5420
EB
1404(define-public perl-email-sender
1405 (package
1406 (name "perl-email-sender")
1b49fc8f 1407 (version "1.300028")
a24c5420
EB
1408 (source
1409 (origin
1410 (method url-fetch)
1411 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1412 "Email-Sender-" version ".tar.gz"))
1413 (sha256
1414 (base32
1b49fc8f 1415 "0c5dv1x9856nryj5mcbgb67a4irmadz80g0qnf4van3bd8wbj72a"))))
a24c5420
EB
1416 (build-system perl-build-system)
1417 (native-inputs
1418 `(("perl-capture-tiny" ,perl-capture-tiny)))
1419 (propagated-inputs
1420 `(("perl-email-abstract" ,perl-email-abstract)
1421 ("perl-email-address" ,perl-email-address)
1422 ("perl-email-simple" ,perl-email-simple)
1423 ("perl-list-moreutils" ,perl-list-moreutils)
1424 ("perl-module-runtime" ,perl-module-runtime)
1425 ("perl-moo" ,perl-moo)
1426 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1427 ("perl-sub-exporter" ,perl-sub-exporter)
1428 ("perl-throwable" ,perl-throwable)
1429 ("perl-try-tiny" ,perl-try-tiny)))
1430 (home-page "http://search.cpan.org/dist/Email-Sender")
1431 (synopsis "Perl library for sending email")
1432 (description "Email::Sender replaces the old and sometimes problematic
1433Email::Send library.")
1434 (license (package-license perl))))
1435
151ef3ed
EB
1436(define-public perl-email-simple
1437 (package
1438 (name "perl-email-simple")
f363d5d8 1439 (version "2.211")
151ef3ed
EB
1440 (source
1441 (origin
1442 (method url-fetch)
1443 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1444 "Email-Simple-" version ".tar.gz"))
1445 (sha256
1446 (base32
f363d5d8 1447 "1if4a2wh4iwlcycqrd2fhkx04ngmd75q444gh43w0r9p15ym5f8w"))))
151ef3ed
EB
1448 (build-system perl-build-system)
1449 (propagated-inputs
1450 `(("perl-email-date-format" ,perl-email-date-format)))
1451 (home-page "http://search.cpan.org/dist/Email-Simple")
1452 (synopsis "Parsing of RFC 2822 messages")
1453 (description "Email::Simple provides simple parsing of RFC 2822 message
1454format and headers.")
1455 (license (package-license perl))))
1456
f5dceecb
AW
1457(define-public libesmtp
1458 (package
1459 (name "libesmtp")
1460 (version "1.0.6")
1461 (source
1462 (origin
1463 (method url-fetch)
1464 (uri (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1465 version ".tar.bz2"))
1466 (sha256
1467 (base32
1468 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1469 (build-system gnu-build-system)
1470 (propagated-inputs
1471 `(("openssl" ,openssl)))
1472 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1473 (synopsis "Library for sending mail via remote hosts using SMTP")
1474 (description "libESMTP is an SMTP client which manages posting (or
1475submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1476It may be used as part of a Mail User Agent (MUA) or other program that must
1477be able to post electronic mail where mail functionality may not be that
1478program's primary purpose.")
1479 (license (list lgpl2.1+ gpl2+))))
1480
f8ae32a2
AW
1481(define-public esmtp
1482 (package
1483 (name "esmtp")
1484 (version "1.2")
1485 (source
1486 (origin
1487 (method git-fetch)
1488 (uri (git-reference
1489 (url "https://github.com/andywingo/esmtp.git")
1490 (commit "01bf9fc")))
1491 (sha256
1492 (base32
1493 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1494 (file-name (string-append name "-" version "-checkout"))))
1495 (arguments
1496 `(#:phases (modify-phases %standard-phases
1497 (add-before
1498 'configure 'autoconf
1499 (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
1500 (build-system gnu-build-system)
1501 (native-inputs
1502 `(("bison" ,bison)
1503 ("flex" ,flex)
1504 ("autoconf" ,autoconf)
1505 ("automake" ,automake)
1506 ("libtool" ,libtool)))
1507 (inputs
718c5dd6 1508 `(("libesmtp" ,libesmtp)))
3b3b60d0 1509 (home-page "https://sourceforge.net/projects/esmtp/")
f8ae32a2
AW
1510 (synopsis "Relay-only mail transfer agent (MTA)")
1511 (description "Esmtp is a simple relay-only mail transfer agent built using
1512libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1513user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1514page for more on configuration. This package also provides minimal
1515compatibility shims for the @command{sendmail}, @command{mailq}, and
1516@command{newaliases} commands.")
1517 (license gpl2+)))
1518
34dd26af
CAW
1519(define-public fdm
1520 (package
1521 (name "fdm")
1522 (version "1.9")
1523 (source (origin
1524 (method url-fetch)
1525 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1526 version "/fdm-"
1527 version ".tar.gz"))
1528 (file-name (string-append name "-" version ".tar.gz"))
1529 (sha256
1530 (base32 "054rscijahiza5f9qha79rg3siji3bk5mk10f8c2vqx7m4w6qh8n"))))
1531 (build-system gnu-build-system)
1532 (inputs
1533 `(("tdb" ,tdb)
1534 ("openssl" ,openssl)
1535 ("zlib" ,zlib)))
1536 (home-page "https://github.com/nicm/fdm")
1537 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1538 (description "fdm is a program designed to fetch mail from POP3
1539or IMAP servers, or receive local mail from stdin, and
1540deliver it in various ways.")
1541 (license
1542 ;; Why point to a source file? Well, all the individual files have a
1543 ;; copy of this license in their headers, but there's no seprate file
1544 ;; with that information.
16966d5b 1545 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
34dd26af 1546
e90819c4
LG
1547
1548(define-public procmail
1549 (package
1550 (name "procmail")
1551 (version "3.22")
1552 (source
1553 (origin
1554 (method url-fetch)
1555 (uri (string-append
1556 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1557 version
1558 ".tar.gz"))
1559 (sha256
1560 (base32
1561 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1562 ;; The following patch fixes an ambiguous definition of
1563 ;; getline() in formail.c. The patch is provided by Debian as
1564 ;; patch 24.
1d982d78
LF
1565 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
1566 "procmail-CVE-2014-3618.patch"))))
e90819c4
LG
1567 (arguments
1568 `(#:phases (modify-phases %standard-phases
1569 (replace 'configure
1570 (lambda _
1571 (substitute* "Makefile"
1572 (("/bin/sh")
1573 (which "sh"))
1574 (("/usr")
1575 (assoc-ref %outputs "out"))
1576 (("/bin/rm")
1577 (which "rm")))
1578 #t)))
1579 #:tests? #f)) ;; There are no tests indicating a successful
1580 ;; build. Some tests of basic locking mechanisms provided by the
8f65585b 1581 ;; file system are performed during 'make install'. However, these
e90819c4
LG
1582 ;; are performed before the actual build process.
1583 (build-system gnu-build-system)
05aa576b 1584 (inputs `(("exim" ,exim)))
e90819c4
LG
1585 (home-page "http://www.procmail.org/")
1586 (synopsis "Versatile mail delivery agent (MDA)")
1587 (description "Procmail is a mail delivery agent (MDA) featuring support
1588for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1589can be sorted into separate files/directories and arbitrary commands can be
1590executed on mail arrival. Procmail is considered stable, but is no longer
1591maintained.")
1592 (license gpl2+))) ;; procmail allows to choose the
1593 ;; nonfree Artistic License 1.0
1594 ;; as alternative to the GPL2+.
1595 ;; This option is not listed here.
e90819c4 1596
61c30e9d
LF
1597(define-public khard
1598 (package
1599 (name "khard")
a57495e2 1600 (version "0.11.3")
61c30e9d
LF
1601 (source (origin
1602 (method url-fetch)
1603 (uri (pypi-uri name version))
1604 (sha256
1605 (base32
a57495e2 1606 "1v66khq5w17xdbkpb00pf9xbl84dlzx4lq286fvzskb949b3y4yn"))))
61c30e9d
LF
1607 (build-system python-build-system)
1608 (arguments
a57495e2 1609 `(#:phases
61c30e9d 1610 (modify-phases %standard-phases
61c30e9d
LF
1611 (add-after 'install 'install-doc
1612 (lambda* (#:key outputs #:allow-other-keys)
1613 (let* ((out (assoc-ref outputs "out"))
1614 (doc (string-append out "/share/doc/khard")))
e9eafae2
MB
1615 (copy-recursively "misc/khard" doc)
1616 #t))))
1617 ;; FIXME: check phase fails with
1618 ;; "Config file /tmp/.config/khard/khard.conf not available"
1619 #:tests? #f))
61c30e9d 1620 (propagated-inputs
a57495e2
LF
1621 `(("python-vobject" ,python-vobject)
1622 ("python-pyyaml" ,python-pyyaml)
1623 ("python-atomicwrites" ,python-atomicwrites)
1624 ("python-configobj" ,python-configobj)))
61c30e9d
LF
1625 (synopsis "Console address book using CardDAV")
1626 (description "Khard is an address book for the console. It creates, reads,
1627modifies and removes CardDAV address book entries at your local machine. For
1628synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1629Khard can also be used from within the email client @command{mutt}.")
1630 (home-page "https://github.com/scheibler/khard")
1631 (license gpl3+)))
be0c5733
DM
1632
1633(define-public perl-mail-spf
1634 (package
1635 (name "perl-mail-spf")
1636 (version "v2.9.0")
1637 (source
1638 (origin
1639 (method url-fetch)
1640 (uri (string-append
1641 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-"
1642 version
1643 ".tar.gz"))
1644 (sha256
1645 (base32
1646 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1647 (build-system perl-build-system)
1648 (native-inputs
1649 `(("perl-module-build" ,perl-module-build)
1650 ("perl-net-dns-resolver-programmable"
1651 ,perl-net-dns-resolver-programmable)))
1652 (arguments
1653 `(#:phases (modify-phases %standard-phases
1654 (add-before 'configure 'modify-Build.PL
1655 (lambda* (#:key outputs #:allow-other-keys)
1656 (substitute* "Build.PL"
1657 (("'/usr/sbin'") (string-append "'"
1658 (assoc-ref outputs "out")
1659 "/sbin'")))
1660 #t)))))
1661 (inputs
1662 `(("perl-error" ,perl-error)
1663 ("perl-net-dns" ,perl-net-dns)
1664 ("perl-netaddr-ip" ,perl-netaddr-ip)
1665 ("perl-uri" ,perl-uri)))
1666 (home-page
1667 "http://search.cpan.org/dist/Mail-SPF")
1668 (synopsis
1669 "Perl implementation of Sender Policy Framework")
1670 (description "Mail::SPF is the Sender Policy Framework implemented
1671in Perl.")
1672 (license bsd-3)))
24262239
CL
1673
1674(define-public mb2md
1675 (package
1676 (name "mb2md")
1677 (version "3.20")
1678 (source (origin
1679 (method url-fetch)
1680 (uri (string-append
1681 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
1682 version ".pl.gz"))
1683 (sha256
1684 (base32
1685 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
1686 (build-system trivial-build-system)
1687 (arguments
1688 '(#:modules ((guix build utils))
1689 #:builder
1690 (begin
1691 (use-modules (guix build utils))
1692 (let* ((source (assoc-ref %build-inputs "source"))
1693 (out (assoc-ref %outputs "out"))
1694 (bin (string-append out "/bin"))
1695 (perl (assoc-ref %build-inputs "perl"))
1696 (gzip (assoc-ref %build-inputs "gzip"))
1697 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
1698 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
1699 (mkdir-p bin)
1700 (with-directory-excursion bin
1701 (copy-file source "mb2md.gz")
1702 (system* (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
1703 (substitute* "mb2md"
1704 (("#!/usr/bin/perl")
1705 (string-append "#!/usr/bin/perl -I " perl5lib)))
1706 (patch-shebang "mb2md" (list (string-append perl "/bin")))
1707 (chmod "mb2md" #o555))
1708 #t))))
1709 (native-inputs `(("gzip", gzip)))
1710 (inputs `(("perl" ,perl)
1711 ("perl-timedate" ,perl-timedate)))
1712 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
1713 (synopsis "Mbox to maildir converter")
1714 (description
1715 "Mb2md is a Perl script that takes one or more mbox format files and
1716converts them to maildir format directories.")
1717 (license public-domain)))
e0d7b421
AI
1718
1719(define-public mpop
1720 (package
1721 (name "mpop")
5837e699 1722 (version "1.2.6")
e0d7b421
AI
1723 (source
1724 (origin
1725 (method url-fetch)
175c9103
LF
1726 (uri (string-append "mirror://sourceforge/mpop/mpop/" version
1727 "/mpop-" version ".tar.xz"))
e0d7b421
AI
1728 (sha256
1729 (base32
5837e699 1730 "0p1ix63jh64dibrlccch8q7gxl9nn18wd2qpyr5z1h4gs2fpmv4z"))))
e0d7b421
AI
1731 (build-system gnu-build-system)
1732 (inputs
1733 `(("gnutls" ,gnutls)
1734 ("libidn" ,libidn)))
1735 (native-inputs
1736 `(("pkg-config" ,pkg-config)))
1737 (arguments
1738 `(#:configure-flags (list "--with-tls=gnutls")))
1739 (home-page "http://mpop.sourceforge.net/")
1740 (synopsis "POP3 mail client")
1741 (description "mpop is a small and fast POP3 client suitable as a
1742fetchmail replacement.
1743
1744mpop supports multiple accounts, header based mail filtering, delivery
1745to mbox files, maildir folders or a Mail Delivery Agent (MDA),
1746TLS/SSL, several authentication methods, Internationalized Domain
1747Names (IDN) and SOCKS proxies.")
1748 (license gpl3+)))
74c0282c 1749
1750(define-public mhonarc
1751 (package
1752 (name "mhonarc")
1753 (version "2.6.19")
1754 (source
1755 (origin
1756 (method url-fetch)
1757 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
1758 version ".tar.gz"))
1759 (sha256
1760 (base32
1761 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
1762 (build-system perl-build-system)
1763 (home-page "https://www.mhonarc.org/")
1764 (synopsis "Create HTML archives of mail/news messages")
1765 (description
1766 "MHonArc is a Perl mail-to-HTML converter. MHonArc
1767provides HTML mail archiving with index, mail thread linking,
1768etc; plus other capabilities including support for MIME and
1769powerful user customization features.")
1770 (license gpl2+)))
5d87088c
JD
1771
1772
1773(define-public sendmail
1774 (package
1775 (name "sendmail")
1776 (version "8.15.2")
1777 (source
1778 (origin
1779 (method url-fetch)
1780 (uri (string-append
1781 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
1782 version ".tar.gz"))
1783 (sha256
1784 (base32
1785 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
1786 (build-system gnu-build-system)
1787 (arguments
1788 `(#:phases
1789 (modify-phases %standard-phases
1790 (add-before 'build 'replace-/bin/sh
1791 (lambda _
1792 (substitute*
1793 (append
1794 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
1795 "contrib/mmuegel" "devtools/bin/configure.sh")
1796 (find-files "." ".*\\.m4")
1797 (find-files "." ".*\\.cf"))
19527952 1798 (("/bin/sh") (which "sh")))
5d87088c
JD
1799
1800 (substitute* "devtools/bin/Build"
19527952 1801 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
5d87088c
JD
1802 #t))
1803 (replace 'configure
1804 (lambda _
1805
1806 ;; Render harmless any attempts to chown or chgrp
1807 (substitute* "devtools/bin/install.sh"
1808 (("owner=\\$2") "owner=''")
1809 (("group=\\$2") "group=''"))
1810
1811 (with-output-to-file "devtools/Site/site.config.m4"
1812 (lambda ()
1813 (format #t "
1814define(`confCC', `gcc')
1815define(`confOPTIMIZE', `-g -O2')
1816define(`confLIBS', `-lresolv')
1817define(`confINSTALL', `~a/devtools/bin/install.sh')
1818define(`confDEPEND_TYPE', `CC-M')
1819define(`confINST_DEP', `')
1820" (getcwd))))))
1821 (replace 'build
1822 (lambda _
1823 (and (zero? (system* "sh" "Build"))
1824 (with-directory-excursion "cf/cf"
1825 (begin
1826 (copy-file "generic-linux.mc" "sendmail.mc")
1827 (zero? (system* "sh" "Build" "sendmail.cf")))))))
1828 (add-before 'install 'pre-install
1829 (lambda _
1830 (let ((out (assoc-ref %outputs "out")))
1831 (mkdir-p (string-append out "/usr/bin"))
1832 (mkdir-p (string-append out "/usr/sbin"))
1833 (mkdir-p (string-append out "/etc/mail"))
1834 (setenv "DESTDIR" out)
1835 (with-directory-excursion "cf/cf"
1836 (zero? (system* "sh" "Build" "install-cf")))))))
1837 ;; There is no make check. There are some post installation tests, but those
1838 ;; require root privileges
1839 #:tests? #f))
1840 (inputs
1841 `(("m4" ,m4)
1842 ("perl" ,perl)))
1843 (home-page "http://sendmail.org")
1844 (synopsis
1845 "Highly configurable Mail Transfer Agent (MTA)")
1846 (description
1847 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
1848Allman. It is highly configurable and supports many delivery methods and many
1849transfer protocols.")
1850 (license (non-copyleft "file://LICENSE"
1851 "See LICENSE in the distribution."))))
1852
8b53366c 1853(define-public opensmtpd
1854 (package
1855 (name "opensmtpd")
eb4b3e4b 1856 (version "6.0.2p1")
8b53366c 1857 (source (origin
1858 (method url-fetch)
1859 (uri (string-append "https://www.opensmtpd.org/archives/"
1860 name "-" version ".tar.gz"))
1861 (sha256
1862 (base32
eb4b3e4b 1863 "1b4h64w45hpmfq5721smhg4s0shs64gbcjqjpx3fbiw4hz8bdy9a"))))
8b53366c 1864 (build-system gnu-build-system)
1865 (inputs
1866 `(("bdb" ,bdb)
1867 ("libressl" ,libressl)
1868 ("libevent" ,libevent)
1869 ("libasr" ,libasr)
1870 ("linux-pam" ,linux-pam)
1871 ("zlib" ,zlib)))
1872 (native-inputs
d7da7604
SB
1873 `(("bison" ,bison)
1874 ("groff" ,groff)))
8b53366c 1875 (arguments
ae1e2133
SB
1876 `(#:configure-flags
1877 (list "--with-table-db" "--localstatedir=/var"
1878 "--with-user-smtpd=smtpd" "--with-user-queue=smtpq"
1879 "--with-group-queue=smtpq"
1880 "--with-path-socket=/var/run"
1881 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt")
8b53366c 1882 #:phases
1883 (modify-phases %standard-phases
1884 ;; OpenSMTPD provides a single utility smtpctl to control the daemon and
1885 ;; the local submission subsystem. To accomodate systems that require
1886 ;; historical interfaces such as sendmail, newaliases or makemap, the
1887 ;; smtpctl utility can operate in compatibility mode if called with the
1888 ;; historical name.
1889 (add-after 'install 'install-compabilitymode
1890 (lambda _
1891 (let* ((out (assoc-ref %outputs "out"))
1892 (sbin (string-append out "/sbin/")))
1893 (for-each (lambda (cmd)
1894 (symlink "smtpctl" (string-append sbin cmd)))
1895 '("makemap" "sendmail" "send-mail"
1896 "newaliases" "mailq")))
1897 #t)))))
1898 (synopsis "Lightweight SMTP daemon")
1899 (description
1900 "OpenSMTPD is an implementation of the server-side SMTP protocol, with
1901some additional standard extensions. It allows ordinary machines to exchange
1902e-mails with other systems speaking the SMTP protocol.")
1903 (home-page "https://www.opensmtpd.org")
1904 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
19262a71 1905 public-domain isc license:openssl))))
152ffe7c 1906
1907(define-public opensmtpd-extras
1908 (package
1909 (name "opensmtpd-extras")
1910 (version "5.7.1")
1911 (source (origin
1912 (method url-fetch)
1913 (uri (string-append "https://www.opensmtpd.org/archives/"
1914 name "-" version ".tar.gz"))
1915 (sha256
1916 (base32
1917 "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm"))))
1918 (build-system gnu-build-system)
1919 (inputs
1920 `(("libressl" ,libressl)
1921 ("libevent" ,libevent)
1922 ("libasr" ,libasr)
1923 ("python-2" ,python-2)
1924 ("opensmtpd" ,opensmtpd)
1925 ("perl" ,perl)
1926 ("lua" ,lua)
1927 ("postgresql" ,postgresql)
1928 ("sqlite" ,sqlite)
1929 ("linux-pam" ,linux-pam)))
1930 (native-inputs
1931 `(("bison" ,bison)
1932 ("pkg-config" ,pkg-config)
1933 ("groff" ,groff)
1934 ("automake" ,automake)
1935 ("autoconf" ,autoconf)))
1936 (arguments
1937 `(;; We have to configure it like this because the default checks for for example
1938 ;; python in /usr/local/bin, /usr/bin and fails otherwise.
1939 #:configure-flags (list
1940 "--with-filter-clamav" "--with-filter-dkim-signer"
1941 "--with-filter-dnsbl" "--with-filter-lua"
1942 "--with-filter-monkey" "--with-filter-pause"
1943 "--with-filter-perl" "--with-filter-python"
1944 "--with-filter-regex" "--with-filter-spamassassin"
1945 "--with-filter-stub" "--with-filter-trace"
1946 "--with-filter-void"
1947
1948 "--with-queue-null" "--with-queue-python"
1949 "--with-queue-ram" "--with-queue-stub"
1950
1951 "--with-scheduler-python" "--with-scheduler-ram"
1952 "--with-scheduler-stub"
1953
1954 "--with-table-ldap" ; "--with-table-mysql"
1955 "--with-table-passwd" "--with-table-postgres"
1956 "--with-table-python" "--with-table-socketmap"
1957 "--with-table-sqlite" "--with-table-stub"
1958 ;;"--with-table-redis" ; TODO: package hiredis
1959
1960 "--with-user=smtpd" "--with-privsep-user=smtpd"
1961 "--localstatedir=/var" "--sysconfdir=/etc"
1962 "--with-lua-type=lua" ; can use lua or luajit
1963
1964 (string-append "--with-python="
1965 (assoc-ref %build-inputs "python-2"))
1966 (string-append "--with-lua="
1967 (assoc-ref %build-inputs "lua")))))
19262a71
LC
1968 (license (list bsd-2 bsd-3 bsd-4
1969 public-domain isc license:openssl))
152ffe7c 1970 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
1971 (description
1972 "This package provides extra tables, filters, and various other addons
1973for OpenSMTPD to extend its functionality.")
1974 (home-page "https://www.opensmtpd.org")))
6d3dda4f 1975
1976(define-public python-mailmanclient
1977 (package
1978 (name "python-mailmanclient")
1979 (version "1.0.1")
1980 (source
1981 (origin
1982 (method url-fetch)
1983 (uri (pypi-uri "mailmanclient" version))
1984 (sha256
1985 (base32
1986 "1cfjh45fgbsax5hjj2inq9nk33dhdvh63xhysc8dhnqidgqgm8c5"))))
1987 (build-system python-build-system)
1988 (arguments
1989 `(#:tests? #f)) ; Requires mailman running
f22efa01 1990 (propagated-inputs
6d3dda4f 1991 `(("python-six" ,python-six)
1992 ("python-httplib2" ,python-httplib2)))
1993 (home-page "https://launchpad.net/mailman.client")
1994 (synopsis "Python bindings for the Mailman 3 REST API")
1995 (description
1996 "The mailmanclient library provides official Python bindings for
1997the GNU Mailman 3 REST API.")
6d3dda4f 1998 (license lgpl3+)))
1999
2000(define-public python2-mailmanclient
5c31f4aa 2001 (package-with-python2 python-mailmanclient))
3163a289 2002
2003(define-public mlmmj
2004 (package
2005 (name "mlmmj")
2006 (version "1.2.19.0")
2007 (source
2008 (origin
2009 (method url-fetch)
2010 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
2011 version ".tar.bz2"))
2012 (sha256
2013 (base32
2014 "1piwvcxkqadjwk5x8jicaiyz9nngmaj3w13ghdqgaki32xd7zk9v"))))
2015 (build-system gnu-build-system)
2016 (inputs
2017 `(("perl" ,perl))) ; For "contrib/web/"
2018 (native-inputs
2019 `(("pkg-config" ,pkg-config)))
2020 (arguments
2021 `(#:configure-flags
2022 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
2023 ;; It opens the files control/mimedeny and control/mimestrip to get a list
2024 ;; of mimetypes for parts of multipart/mime messages that should be denied
2025 ;; or stripped. The parts then get stripped directly when the mail is
2026 ;; received. mlmmj-receive-strip also appends an extra header
2027 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
2028 ;; mime parts
2029 (list "--enable-receive-strip")
2030 #:phases
2031 (modify-phases %standard-phases
2032 (add-before 'install 'install-contrib
2033 (lambda* (#:key outputs #:allow-other-keys)
2034 (let* ((out (assoc-ref outputs "out"))
2035 (share (string-append out "/share/mlmmj"))
2036 (contrib (string-append share "/contrib/web"))
2037 (texts (string-append share "/listtexts")))
2038 (copy-recursively "contrib/web/" contrib)
2039 (copy-recursively "listtexts" texts)
2040 (rename-file texts (string-append share "/texts"))
2041 #t))))))
2042 (home-page "http://mlmmj.org")
2043 (synopsis "Mailing list managing made joyful")
2044 (description
2045 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
2046It works with many different Mail Transport Agents (MTAs) and is simple for a
2047system adminstrator to install, configure and integrate with other software.
2048As it uses very few resources, and requires no daemons, it is ideal for
2049installation on systems where resources are limited. Its features include:
2050@enumerate
2051@item Archive, Custom headers / footer,
2052@item Fully automated bounce handling (similar to ezmlm),
2053@item Complete requeueing functionality, Moderation functionality, Subject prefix,
2054@item Subscribers only posting, Regular expression access control,
2055@item Functionality to retrieve old posts, Web interface, Digests,
2056@item No-mail subscription, VERP support,
2057@item Delivery Status Notification (RFC1891) support,
2058@item Rich and customisable texts for automated operations.
2059@end enumerate\n")
2060 (license license:expat)))
3a263368 2061
2062(define-public blists
2063 (package
2064 (name "blists")
2065 (version "1.0")
2066 (source
2067 (origin
2068 (method url-fetch)
2069 (uri (string-append "http://download.openwall.net/pub/projects/"
2070 "blists/blists-" version ".tar.gz"))
2071 (sha256
2072 (base32
2073 "1gp51kmb8yv8d693wcpdslmwlbw5w2kgz4kxhrcaf7y89w8wy4qd"))))
2074 (build-system gnu-build-system)
2075 (arguments
2076 `(#:tests? #f ; No tests
2077 #:phases
2078 (modify-phases %standard-phases
2079 (delete 'configure)
2080 (replace 'install
2081 (lambda* (#:key outputs #:allow-other-keys)
2082 (let* ((out (assoc-ref outputs "out"))
2083 (bin (string-append out "/bin")))
2084 (install-file "bindex" bin)
2085 (install-file "bit" bin)
2086 #t))))))
2087 (home-page "http://www.openwall.com/blists/")
2088 (synopsis "Web interface to mailing list archives")
2089 (description
2090 "Blists is a web interface to mailing list archives that works off
2091indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
2092@code{bindex} generates or updates the index file (incremental updates
2093are supported). @code{bit} is a CGI/SSI program that generates web pages
2094on the fly. Both programs are written in C and are very fast.")
2095 (license license:expat)))