gnu: libetpan: Don't use unstable tarball.
[jackhill/guix/guix.git] / gnu / packages / mail.scm
... / ...
CommitLineData
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
3;;; Copyright © 2014, 2015, 2017 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, 2017, 2018 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, 2017 Troy Sankey <sankeytms@gmail.com>
18;;; Copyright © 2016, 2017, 2018 Nils Gillmann <ng0@n0.is>
19;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
20;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
21;;; Copyright © 2016 John Darrington <jmd@gnu.org>
22;;; Copyright © 2016, 2018 Marius Bakke <mbakke@fastmail.com>
23;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
24;;; Copyright © 2017 Kyle Meyer <kyle@kyleam.com>
25;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
26;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
27;;; Copyright © 2018 Pierre Langlois <pierre.langlois@gmx.com>
28;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
29;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
30;;;
31;;; This file is part of GNU Guix.
32;;;
33;;; GNU Guix is free software; you can redistribute it and/or modify it
34;;; under the terms of the GNU General Public License as published by
35;;; the Free Software Foundation; either version 3 of the License, or (at
36;;; your option) any later version.
37;;;
38;;; GNU Guix is distributed in the hope that it will be useful, but
39;;; WITHOUT ANY WARRANTY; without even the implied warranty of
40;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41;;; GNU General Public License for more details.
42;;;
43;;; You should have received a copy of the GNU General Public License
44;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
45
46(define-module (gnu packages mail)
47 #:use-module (gnu packages)
48 #:use-module (gnu packages aspell)
49 #:use-module (gnu packages autotools)
50 #:use-module (gnu packages base)
51 #:use-module (gnu packages backup)
52 #:use-module (gnu packages bash)
53 #:use-module (gnu packages bison)
54 #:use-module (gnu packages calendar)
55 #:use-module (gnu packages check)
56 #:use-module (gnu packages crypto)
57 #:use-module (gnu packages curl)
58 #:use-module (gnu packages cyrus-sasl)
59 #:use-module (gnu packages databases)
60 #:use-module (gnu packages dejagnu)
61 #:use-module (gnu packages django)
62 #:use-module (gnu packages dns)
63 #:use-module (gnu packages documentation)
64 #:use-module (gnu packages emacs)
65 #:use-module (gnu packages enchant)
66 #:use-module (gnu packages ghostscript)
67 #:use-module (gnu packages gettext)
68 #:use-module (gnu packages glib)
69 #:use-module (gnu packages gnome)
70 #:use-module (gnu packages gnupg)
71 #:use-module (gnu packages groff)
72 #:use-module (gnu packages gsasl)
73 #:use-module (gnu packages gtk)
74 #:use-module (gnu packages guile)
75 #:use-module (gnu packages flex)
76 #:use-module (gnu packages kerberos)
77 #:use-module (gnu packages libcanberra)
78 #:use-module (gnu packages libevent)
79 #:use-module (gnu packages libidn)
80 #:use-module (gnu packages linux)
81 #:use-module (gnu packages lua)
82 #:use-module (gnu packages m4)
83 #:use-module (gnu packages ncurses)
84 #:use-module (gnu packages openldap)
85 #:use-module (gnu packages onc-rpc)
86 #:use-module (gnu packages pcre)
87 #:use-module (gnu packages perl)
88 #:use-module (gnu packages python)
89 #:use-module (gnu packages python-web)
90 #:use-module (gnu packages readline)
91 #:use-module (gnu packages search)
92 #:use-module (gnu packages texinfo)
93 #:use-module (gnu packages compression)
94 #:use-module (gnu packages glib)
95 #:use-module (gnu packages pkg-config)
96 #:use-module (gnu packages flex)
97 #:use-module (gnu packages gdb)
98 #:use-module (gnu packages man)
99 #:use-module (gnu packages ruby)
100 #:use-module (gnu packages samba)
101 #:use-module (gnu packages screen)
102 #:use-module (gnu packages tcl)
103 #:use-module (gnu packages time)
104 #:use-module (gnu packages tls)
105 #:use-module (gnu packages networking)
106 #:use-module (gnu packages web)
107 #:use-module (gnu packages webkit)
108 #:use-module (gnu packages w3m)
109 #:use-module (gnu packages xml)
110 #:use-module (gnu packages xorg)
111 #:use-module (gnu packages docbook)
112 #:use-module ((guix licenses)
113 #:select (fdl1.1+ gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+
114 non-copyleft (expat . license:expat) bsd-3
115 public-domain bsd-4 isc (openssl . license:openssl)
116 bsd-2 x11-style agpl3 asl2.0 perl-license))
117 #:use-module (guix packages)
118 #:use-module (guix download)
119 #:use-module (guix git-download)
120 #:use-module (guix utils)
121 #:use-module (guix build-system gnu)
122 #:use-module (guix build-system perl)
123 #:use-module (guix build-system python)
124 #:use-module (guix build-system trivial))
125
126(define-public mailutils
127 (package
128 (name "mailutils")
129 (version "3.4")
130 (source (origin
131 (method url-fetch)
132 (uri (string-append "mirror://gnu/mailutils/mailutils-"
133 version ".tar.bz2"))
134 (sha256
135 (base32
136 "1dn71p85wlyisnwsb485sk3q5v393k3dizsa9fmimskdwjwgk3ch"))
137 (patches
138 (search-patches "mailutils-uninitialized-memory.patch"))
139 (snippet
140 ;; For a rebuild of the Flex/Bison byproducts touched by the
141 ;; patch above.
142 '(begin
143 (for-each delete-file
144 '("mh/mh_alias_lex.c"
145 "libmailutils/cfg/parser.c"))
146 #t))))
147 (build-system gnu-build-system)
148 (arguments
149 '(#:phases
150 (modify-phases %standard-phases
151 (add-before 'check 'prepare-test-suite
152 (lambda _
153 ;; Use the right file name for `cat'.
154 (substitute* "testsuite/lib/mailutils.exp"
155 (("/bin/cat")
156 (which "cat")))
157
158 ;; Tests try to invoke 'maidag' such that it looks up the
159 ;; 'root' user, which does not exist in the build
160 ;; environment.
161 (substitute* "maidag/tests/testsuite"
162 (("root <") "nobody <")
163 (("spool/root") "spool/nobody")
164 (("root@localhost") "nobody@localhost"))
165
166 ;; The 'pipeact.at' tests generate a shell script; make
167 ;; sure it uses the right shell.
168 (substitute* '("sieve/tests/testsuite"
169 "mh/tests/testsuite")
170 (("#! /bin/sh")
171 (string-append "#!" (which "sh"))))
172
173 (substitute* "mh/tests/testsuite"
174 (("moreproc: /bin/cat")
175 (string-append "moreproc: " (which "cat"))))
176
177 ;; XXX: The comsatd tests rely on being able to open
178 ;; /dev/tty, but that gives ENODEV in the build
179 ;; environment. Thus, ignore test failures here.
180 (substitute* "comsat/tests/Makefile.in"
181 (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
182 (string-append "-" all)))
183
184 ;; 'frm' tests expect write access to $HOME.
185 (setenv "HOME" (getcwd))
186
187 ;; Avoid the message "I'm going to create the standard MH path
188 ;; for you", which would lead to one test failure (when diffing
189 ;; stdout of 'fmtcheck'.)
190 (call-with-output-file ".mh_profile"
191 (lambda (port)
192 (format port "Path: ~a/Mail-for-tests~%"
193 (getcwd))))
194
195 #t)))
196 ;; TODO: Add `--with-sql'.
197 #:configure-flags '("--sysconfdir=/etc")
198 #:parallel-tests? #f))
199 (native-inputs
200 ;; Note: Bison and Flex needed due to
201 ;; 'mailutils-uninitialized-memory.patch'.
202 `(("bison" ,bison)
203 ("flex" ,flex)
204 ("perl" ,perl))) ;for 'gylwrap'
205 (inputs
206 `(("dejagnu" ,dejagnu)
207 ("m4" ,m4)
208 ("texinfo" ,texinfo)
209 ("guile" ,guile-2.0)
210 ("gnutls" ,gnutls)
211 ("ncurses" ,ncurses)
212 ("readline" ,readline)
213 ("linux-pam" ,linux-pam)
214 ("libltdl" ,libltdl)
215 ("gdbm" ,gdbm)))
216 (home-page "https://mailutils.org")
217 (synopsis "Utilities and library for reading and serving mail")
218 (description
219 "GNU Mailutils is a collection of programs for managing, viewing and
220processing electronic mail. It contains both utilities and server daemons
221and all operate in a protocol-agnostic way. The underlying libraries are
222also available, simplifying the addition of mail capabilities to new
223software.")
224 (license
225 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
226 (list gpl3+ lgpl3+))))
227
228(define-public fetchmail
229 (package
230 (name "fetchmail")
231 (version "6.3.26")
232 (source (origin
233 (method url-fetch)
234 (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-"
235 version ".tar.xz"))
236 (sha256
237 (base32
238 "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r"))))
239 (build-system gnu-build-system)
240 (inputs
241 `(("openssl" ,openssl)))
242 (arguments
243 `(#:configure-flags (list (string-append "--with-ssl="
244 (assoc-ref %build-inputs "openssl")))))
245 (home-page "http://www.fetchmail.info/")
246 (synopsis "Remote-mail retrieval and forwarding utility")
247 (description
248 "Fetchmail is a full-featured, robust, well-documented remote-mail
249retrieval and forwarding utility intended to be used over on-demand
250TCP/IP links (such as SLIP or PPP connections). It supports every
251remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
252KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
253and IPSEC.
254
255Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
256so it can then be read by normal mail user agents such as mutt, elm
257or BSD Mail. It allows all your system MTA's filtering, forwarding, and
258aliasing facilities to work just as they would on normal mail.")
259 (license gpl2+))) ; most files are actually public domain or x11
260
261(define-public mutt
262 (package
263 (name "mutt")
264 (version "1.10.1")
265 (source (origin
266 (method url-fetch)
267 (uri (string-append "https://bitbucket.org/mutt/mutt/downloads/"
268 "mutt-" version ".tar.gz"))
269 (sha256
270 (base32
271 "182lkbkpd3q3l1x6bvyds90ycp38gyyxhf35ry0d3hwf2n1khjkk"))
272 (patches (search-patches "mutt-store-references.patch"))))
273 (build-system gnu-build-system)
274 (inputs
275 `(("cyrus-sasl" ,cyrus-sasl)
276 ("gdbm" ,gdbm)
277 ("gpgme" ,gpgme)
278 ("ncurses" ,ncurses)
279 ("openssl" ,openssl)
280 ("perl" ,perl)))
281 (arguments
282 `(#:configure-flags '("--enable-smtp"
283 "--enable-imap"
284 "--enable-pop"
285 "--enable-gpgme"
286 "--enable-hcache" ; for header caching
287 "--enable-sidebar"
288 "--with-ssl"
289 "--with-sasl"
290 ;; so that mutt does not check whether the path
291 ;; exists, which it does not in the chroot
292 "--with-mailpath=/var/mail")))
293 (home-page "http://www.mutt.org/")
294 (synopsis "Mail client")
295 (description
296 "Mutt is a small but very powerful text-based mail client for Unix
297operating systems.")
298 (license gpl2+)))
299
300(define-public neomutt
301 (package
302 (name "neomutt")
303 (version "20180716")
304 (source
305 (origin
306 (method url-fetch)
307 (uri (string-append "https://github.com/" name "/" name
308 "/archive/" name "-" version ".tar.gz"))
309 (sha256
310 (base32
311 "0072in2d6znwqq461shsaxlf40r4zr7w3j9848qvm4xlh1lq52dx"))))
312 (build-system gnu-build-system)
313 (inputs
314 `(("cyrus-sasl" ,cyrus-sasl)
315 ("gdbm" ,gdbm)
316 ("gpgme" ,gpgme)
317 ("ncurses" ,ncurses)
318 ("gnutls" ,gnutls)
319 ("openssl" ,openssl) ;For smime
320 ("perl" ,perl)
321 ("kyotocabinet" ,kyotocabinet)
322 ("libxslt" ,libxslt)
323 ("libidn" ,libidn)
324 ("libxml2" ,libxml2)
325 ("lmdb" ,lmdb)
326 ("notmuch" ,notmuch)))
327 (native-inputs
328 `(("automake" ,automake)
329 ("gettext-minimal" ,gettext-minimal)
330 ("pkg-config" ,pkg-config)
331 ("docbook-xsl" ,docbook-xsl)
332 ("docbook-xml" ,docbook-xml-4.2)
333 ("w3m" ,w3m)
334 ("tcl" ,tcl)))
335 (arguments
336 `(#:tests? #f
337 #:configure-flags
338 (list "--gpgme"
339
340 ;; database, implies header caching
341 "--disable-tokyocabinet"
342 "--disable-qdbm"
343 "--disable-bdb"
344 "--lmdb"
345 "--kyotocabinet"
346
347 "--gdbm"
348
349 "--gnutls"
350 "--disable-ssl"
351 "--sasl"
352 (string-append "--with-sasl="
353 (assoc-ref %build-inputs "cyrus-sasl"))
354
355
356 "--smime"
357 "--notmuch"
358 "--idn"
359
360 ;; If we do not set this, neomutt wants to check
361 ;; whether the path exists, which it does not
362 ;; in the chroot. The workaround is this.
363 "--with-mailpath=/var/mail"
364
365 "--with-ui=ncurses"
366 (string-append "--with-ncurses="
367 (assoc-ref %build-inputs "ncurses"))
368 (string-append "--prefix="
369 (assoc-ref %outputs "out"))
370 "--debug")
371 #:phases
372 (modify-phases %standard-phases
373 ;; TODO: autosetup is meant to be included in the source,
374 ;; but we should package autosetup and use our own version of it.
375 (add-before 'configure 'fix-sasl-test
376 (lambda _
377 ;; Upstream suggestion to fix the failing sasl autosetup test.
378 (substitute* "auto.def"
379 (("cc-with \\[list -cflags -I\\$prefix/include -libs")
380 "cc-with [list -includes stddef.h -cflags -I$prefix/include -libs"))
381 #t))
382 (replace 'configure
383 (lambda* (#:key outputs inputs configure-flags #:allow-other-keys)
384 (let* ((out (assoc-ref outputs "out"))
385 (flags `(,@configure-flags))
386 (bash (which "bash")))
387 (setenv "SHELL" bash)
388 (setenv "CONFIG_SHELL" bash)
389 (apply invoke bash
390 (string-append (getcwd) "/configure")
391 flags)))))))
392 (home-page "https://www.neomutt.org/")
393 (synopsis "Command-line mail reader based on Mutt")
394 (description
395 "NeoMutt is a command-line mail reader which is based on mutt.
396It adds a large amount of new and improved features to mutt.")
397 (license gpl2+)))
398
399(define-public gmime
400 (package
401 (name "gmime")
402 (version "3.2.0")
403 (source (origin
404 (method url-fetch)
405 (uri (string-append "mirror://gnome/sources/gmime/"
406 (version-major+minor version)
407 "/gmime-" version ".tar.xz"))
408 (sha256
409 (base32
410 "1q6palbpf6lh6bvy9ly26q5apl5k0z0r4mvl6zzqh90rz4rn1v3m"))))
411 (build-system gnu-build-system)
412 (native-inputs
413 `(("pkg-config" ,pkg-config)
414 ("gnupg" ,gnupg))) ; for tests only
415 (inputs `(("glib" ,glib)
416 ("gpgme" ,gpgme)
417 ("zlib" ,zlib)))
418 (arguments
419 `(#:phases
420 (modify-phases %standard-phases
421 (add-after
422 'unpack 'patch-paths-in-tests
423 (lambda _
424 ;; The test programs run several programs using 'system' with
425 ;; hard-coded paths. Here we patch them all.
426 ;; We use ISO-8859-1 here because test-iconv.c contains
427 ;; raw byte sequences in several different encodings.
428 (with-fluids ((%default-port-encoding #f))
429 (substitute* (find-files "tests" "\\.c$")
430 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
431 (let* ((base (basename prog-path))
432 (prog (which base)))
433 (string-append pre
434 (or prog (error "not found: " base)))))))
435 #t)))))
436 (home-page "http://spruce.sourceforge.net/gmime/")
437 (synopsis "MIME message parser and creator library")
438 (description
439 "GMime provides a core library and set of utilities which may be used for
440the creation and parsing of messages using the Multipurpose Internet Mail
441Extension (MIME).")
442 (license (list lgpl2.1+ gpl2+ gpl3+))))
443
444;; Some packages are not ready for GMime 3 yet.
445(define-public gmime-2.6
446 (package
447 (inherit gmime)
448 (version "2.6.23")
449 (source (origin
450 (method url-fetch)
451 (uri (string-append "mirror://gnome/sources/gmime/"
452 (version-major+minor version)
453 "/gmime-" version ".tar.xz"))
454 (sha256
455 (base32
456 "0slzlzcr3h8jikpz5a5amqd0csqh2m40gdk910ws2hnaf5m6hjbi"))))))
457
458(define-public bogofilter
459 (package
460 (name "bogofilter")
461 (version "1.2.4")
462 (source (origin
463 (method url-fetch)
464 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-"
465 version "/bogofilter-"
466 version ".tar.bz2"))
467 (sha256
468 (base32
469 "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1"))))
470 (build-system gnu-build-system)
471 (arguments
472 '(#:phases
473 (modify-phases %standard-phases
474 (add-before 'check 'pre-check
475 (lambda _
476 (substitute* "src/tests/t.frame"
477 (("GREP=/bin/grep")
478 (string-append "GREP=" (which "grep") "\n")))
479 #t)))))
480 (native-inputs `(("flex" ,flex)))
481 (inputs `(("bdb" ,bdb)))
482 (home-page "http://bogofilter.sourceforge.net/")
483 (synopsis "Mail classifier based on a Bayesian filter")
484 (description
485 "Bogofilter is a mail filter that classifies mail as spam or ham
486 (non-spam) by a statistical analysis of the message's header and
487content (body). The program is able to learn from the user's classifications
488and corrections. It is based on a Bayesian filter.")
489 (license gpl2)))
490
491(define-public offlineimap
492 (package
493 (name "offlineimap")
494 (version "7.2.1")
495 (source (origin
496 (method url-fetch)
497 (uri (string-append "https://github.com/OfflineIMAP/offlineimap/"
498 "archive/v" version ".tar.gz"))
499 (file-name (string-append name "-" version ".tar.gz"))
500 (sha256
501 (base32
502 "1022xf2w1xax4vx4kzhlfbhaf0b72wkpvrcscvs4q8qk2ja68h8x"))))
503 (build-system python-build-system)
504 (native-inputs
505 `(("asciidoc" ,asciidoc)))
506 (inputs `(("python2-pysqlite" ,python2-pysqlite)
507 ("python2-six" ,python2-six)))
508 (arguments
509 ;; The setup.py script expects python-2.
510 `(#:python ,python-2
511 ;; Tests require a modifiable IMAP account.
512 #:tests? #f
513 #:phases
514 (modify-phases %standard-phases
515 (add-after 'build 'build-documentation
516 (lambda _
517 (substitute* "docs/Makefile"
518 ;; Prevent xmllint and xsltproc from downloading a DTD file.
519 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
520 (invoke "make" "-C" "docs" "man")))
521 (add-after 'install 'install-documentation
522 (lambda* (#:key outputs #:allow-other-keys)
523 (let* ((out (assoc-ref outputs "out"))
524 (man (string-append out "/share/man")))
525 (install-file "docs/offlineimap.1" (string-append man "/man1"))
526 (install-file "docs/offlineimapui.7" (string-append man "/man7"))
527 #t)))
528 (add-after 'install-documentation 'wrap-binary
529 (lambda* (#:key outputs #:allow-other-keys)
530 (let* ((out (assoc-ref outputs "out"))
531 (bin (string-append out "/bin/offlineimap")))
532 (wrap-program bin
533 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
534 #t))))))
535 (home-page "http://www.offlineimap.org")
536 (synopsis "Sync emails between two repositories")
537 (description
538 "OfflineImap synchronizes emails between two repositories, so that you
539can read the same mailbox from multiple computers. It supports IMAP as REMOTE
540repository and Maildir/IMAP as LOCAL repository.")
541 (license gpl2+)))
542
543(define-public emacs-mew
544 (package
545 (name "emacs-mew")
546 (version "6.7")
547 (source (origin
548 (method url-fetch)
549 (uri (string-append "https://mew.org/Release/mew-"
550 version ".tar.gz"))
551 (sha256
552 (base32
553 "03fzky2kz73vgx4cbps2psbbnrgqgkk5q7jwfldisymkzr9iz03y"))))
554 (native-inputs
555 `(("emacs" ,emacs)))
556 (propagated-inputs
557 `(("ruby-sqlite3" ,ruby-sqlite3) ; optional for the database of messages
558 ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
559 (build-system gnu-build-system)
560 (arguments
561 (let ((elisp-dir "/share/emacs/site-lisp/guix.d/mew")
562 (icon-dir "/share/mew"))
563 `(#:modules ((guix build gnu-build-system)
564 (guix build utils)
565 (guix build emacs-utils))
566 #:imported-modules (,@%gnu-build-system-modules
567 (guix build emacs-utils))
568 #:configure-flags
569 (list (string-append "--with-elispdir=" %output ,elisp-dir)
570 (string-append "--with-etcdir=" %output ,icon-dir))
571 #:phases
572 (modify-phases %standard-phases
573 (add-after 'configure 'patch-mew-icon-directory
574 (lambda* (#:key outputs #:allow-other-keys)
575 (emacs-substitute-sexps "mew-key.el"
576 ("(def.* mew-icon-directory"
577 `(progn
578 (add-to-list 'image-load-path 'mew-icon-directory)
579 ,(string-append (assoc-ref outputs "out") ,icon-dir))))
580 #t))
581 (add-after 'install 'generate-autoloads
582 (lambda* (#:key outputs #:allow-other-keys)
583 (emacs-generate-autoloads
584 "mew" (string-append (assoc-ref outputs "out") ,elisp-dir))
585 #t)))
586 #:tests? #f)))
587 (home-page "https://mew.org")
588 (synopsis "Emacs e-mail client")
589 (description "Mew (Messaging in the Emacs World) is a user interface
590for text messages, multimedia messages (MIME), news articles and
591security functionality including PGP, S/MIME, SSH, and SSL.")
592 (license bsd-3)))
593
594(define-public mu
595 (package
596 (name "mu")
597 (version "1.0")
598 (source (origin
599 (method url-fetch)
600 (uri (string-append "https://github.com/djcb/mu/releases/"
601 "download/v" version "/mu-"
602 version ".tar.xz"))
603 (sha256
604 (base32
605 "04x5azl19gszw2h7argq666gf9xs4hy9q7w9cbqxvy08n56xqsln"))))
606 (build-system gnu-build-system)
607 (native-inputs
608 `(("pkg-config" ,pkg-config)
609 ("glib" ,glib "bin") ; for gtester
610 ("emacs" ,emacs-minimal)
611 ("tzdata" ,tzdata-for-tests))) ;for mu/test/test-mu-query.c
612 ;; TODO: Add webkit and gtk to build the mug GUI.
613 (inputs
614 `(("xapian" ,xapian)
615 ("guile" ,guile-2.2)
616 ("glib" ,glib)
617 ("gmime" ,gmime-2.6)))
618 (arguments
619 `(#:modules ((guix build gnu-build-system)
620 (guix build utils)
621 (guix build emacs-utils))
622 #:imported-modules (,@%gnu-build-system-modules
623 (guix build emacs-utils))
624 #:phases
625 (modify-phases %standard-phases
626 (add-after 'unpack 'patch-configure
627 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
628 ;; so our Emacs package can't find it. Setting "--with-lispdir"
629 ;; configure flag doesn't help because "mu4e" will be added to
630 ;; the lispdir anyway, so we have to modify "configure.ac".
631 (lambda _
632 (substitute* "configure"
633 (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") "")
634 ;; Use latest Guile
635 (("guile-2.0") "guile-2.2"))
636 (substitute* '("guile/Makefile.in"
637 "guile/mu/Makefile.in")
638 (("share/guile/site/2.0/") "share/guile/site/2.2/"))
639 #t))
640 (add-after 'patch-configure 'fix-date-tests
641 ;; Loosen test tolerances to prevent failures caused by daylight
642 ;; saving time (DST). See: https://github.com/djcb/mu/issues/1214.
643 (lambda _
644 (substitute* "lib/parser/test-utils.cc"
645 (("\\* 60 \\* 60, 1 },")
646 "* 60 * 60, 3600 + 1 },"))
647 #t))
648 (add-before 'install 'fix-ffi
649 (lambda* (#:key outputs #:allow-other-keys)
650 (substitute* "guile/mu.scm"
651 (("\"libguile-mu\"")
652 (format #f "\"~a/lib/libguile-mu\""
653 (assoc-ref outputs "out"))))
654 #t))
655 (add-before 'check 'check-tz-setup
656 (lambda* (#:key inputs #:allow-other-keys)
657 ;; For mu/test/test-mu-query.c
658 (setenv "TZDIR"
659 (string-append (assoc-ref inputs "tzdata")
660 "/share/zoneinfo"))
661 #t))
662 (add-after 'install 'install-emacs-autoloads
663 (lambda* (#:key outputs #:allow-other-keys)
664 (emacs-generate-autoloads
665 "mu4e"
666 (string-append (assoc-ref outputs "out")
667 "/share/emacs/site-lisp"))
668 #t)))))
669 (home-page "http://www.djcbsoftware.nl/code/mu/")
670 (synopsis "Quickly find emails")
671 (description
672 "Mu is a tool for dealing with e-mail messages stored in the
673Maildir-format. Mu's purpose in life is to help you to quickly find the
674messages you need; in addition, it allows you to view messages, extract
675attachments, create new maildirs, and so on.")
676 (license gpl3+)))
677
678(define-public alot
679 (package
680 (name "alot")
681 (version "0.5.1")
682 (source (origin
683 (method url-fetch)
684 ;; package author intends on distributing via github rather
685 ;; than pypi:
686 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
687 (uri (string-append "https://github.com/pazz/alot/archive/"
688 version ".tar.gz"))
689 (file-name (string-append "alot-" version ".tar.gz"))
690 (sha256
691 (base32
692 "0wax30hjzmkqfml7hig1dqw1v1y63yc0cgbzl96x58b9h2ggqx3a"))))
693 (build-system python-build-system)
694 (arguments
695 `(;; python 3 is currently unsupported, more info:
696 ;; https://github.com/pazz/alot/blob/master/docs/source/faq.rst
697 #:python ,python-2))
698 (native-inputs
699 `(("python2-mock" ,python2-mock)))
700 (inputs
701 `(("python2-magic" ,python2-magic)
702 ("python2-configobj" ,python2-configobj)
703 ("python2-twisted" ,python2-twisted)
704 ("python2-urwid" ,python2-urwid)
705 ("python2-urwidtrees" ,python2-urwidtrees)
706 ("python2-pygpgme" ,python2-pygpgme)
707 ("python2-notmuch" ,python2-notmuch)))
708 (home-page "https://github.com/pazz/alot")
709 (synopsis "Command-line MUA using @code{notmuch}")
710 (description
711 "Alot is an experimental terminal mail user agent (@dfn{MUA}) based on
712@code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
713 (license gpl3+)))
714
715(define-public notifymuch
716 (let
717 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
718 (revision "1"))
719 (package
720 (name "notifymuch")
721 (version (string-append "0.1-" revision "." (string-take commit 7)))
722 (source
723 (origin
724 (method git-fetch)
725 (uri (git-reference
726 (url "https://github.com/kspi/notifymuch.git")
727 (commit commit)))
728 (sha256
729 (base32
730 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
731 (file-name (string-append name "-" version "-checkout"))))
732 (build-system python-build-system)
733 (inputs
734 `(("python-notmuch" ,python-notmuch)
735 ("python-pygobject" ,python-pygobject)
736 ("gobject-introspection" ,gobject-introspection)
737 ("libnotify" ,libnotify)
738 ("gtk+" ,gtk+)))
739 (arguments
740 `(#:phases
741 (modify-phases %standard-phases
742 (add-after 'install 'wrap-binary
743 (lambda* (#:key outputs #:allow-other-keys)
744 (let* ((out (assoc-ref outputs "out"))
745 (bin (string-append out "/bin/notifymuch")))
746 (wrap-program bin
747 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
748 `("GI_TYPELIB_PATH" ":" prefix
749 (,(getenv "GI_TYPELIB_PATH")
750 ,(string-append out "/lib/girepository-1.0")))))
751 #t)))))
752 (home-page "https://github.com/kspi/notifymuch")
753 (synopsis "Displays notifications for changes in the notmuch email database")
754 (description "notifymuch displays desktop notifications for messages in
755the notmuch database. The notifications are sent using libnotify to a
756notification daemon. The query to find messages to send a notification about
757is configurable, and a notification for the same message will not be send
758within a configurable period (defaults to 48 hours). To use notifymuch, run
759@command{notifymuch} after new mail is indexed, this can be automated by
760invoking @command{notifymuch} from the post-new hook.")
761 (license gpl3))))
762
763(define-public notmuch
764 (package
765 (name "notmuch")
766 (version "0.27")
767 (source (origin
768 (method url-fetch)
769 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
770 version ".tar.gz"))
771 (sha256
772 (base32
773 "0xh8vq2sa7r07xb3n13drc6gdiqhcgl0pj0za5xj43qkiwpikls0"))))
774 (build-system gnu-build-system)
775 (arguments
776 `(#:modules ((guix build gnu-build-system)
777 ((guix build emacs-build-system) #:prefix emacs:)
778 (guix build utils))
779 #:imported-modules (,@%gnu-build-system-modules
780 (guix build emacs-build-system)
781 (guix build emacs-utils))
782 #:make-flags (list "V=1") ; Verbose test output.
783 #:phases (modify-phases %standard-phases
784 (add-after 'unpack 'patch-notmuch-lib.el
785 (lambda _
786 (substitute* "emacs/notmuch-lib.el"
787 (("/bin/sh") (which "sh")))
788 #t))
789 (replace 'configure
790 (lambda* (#:key outputs #:allow-other-keys)
791 (setenv "CC" "gcc")
792 (setenv "CONFIG_SHELL" (which "sh"))
793
794 (let* ((out (assoc-ref outputs "out"))
795 (elisp
796 (string-append out "/share/emacs/site-lisp/guix.d/"
797 ,name "-" ,version)))
798 (invoke "./configure"
799 (string-append "--prefix=" out)
800 (string-append "--emacslispdir=" elisp)
801 (string-append "--emacsetcdir=" elisp)))))
802 (add-before 'check 'prepare-test-environment
803 (lambda _
804 (setenv "TEST_CC" "gcc")
805 ;; Patch various inline shell invocations.
806 (substitute* (find-files "test" "\\.sh$")
807 (("/bin/sh") (which "sh")))
808 #t))
809 (add-after 'install 'make-autoloads
810 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
811 (native-inputs
812 `(("bash-completion" ,bash-completion)
813 ("emacs" ,emacs-no-x) ; Minimal lacks libxml, needed for some tests.
814 ("pkg-config" ,pkg-config)
815 ("python" ,python-2)
816 ("python-docutils" ,python2-docutils)
817 ("python-sphinx" ,python2-sphinx)
818
819 ;; The following are required for tests only.
820 ("which" ,which)
821 ("dtach" ,dtach)
822 ("gnupg" ,gnupg)
823 ("man" ,man-db)
824 ("perl" ,perl)))
825 (inputs
826 `(("glib" ,glib)
827 ("gmime" ,gmime)
828 ("talloc" ,talloc)
829 ("xapian" ,xapian)
830 ("zlib" ,zlib)))
831 (home-page "https://notmuchmail.org/")
832 (synopsis "Thread-based email index, search, and tagging")
833 (description
834 "Notmuch is a command-line based program for indexing, searching, read-
835ing, and tagging large collections of email messages.")
836 (license gpl3+)))
837
838(define-public notmuch-addrlookup-c
839 ;; This commit includes a compatibility fix for notmuch-0.25, and is not
840 ;; currently part of any release. Please update this package when
841 ;; notmuch-addrlookup-c-9 is released.
842 (let ((commit "88f156d04990a71c6ad6fc2757b537b44e3c4d00")
843 (revision "1")) ;Guix package revision
844 (package
845 (name "notmuch-addrlookup-c")
846 (version (string-append "8-" revision "."
847 (string-take commit 7)))
848 (source (origin
849 (method git-fetch)
850 (uri (git-reference
851 (url "https://github.com/aperezdc/notmuch-addrlookup-c.git")
852 (commit commit)))
853 (file-name (string-append name "-" version "-checkout"))
854 (sha256
855 (base32
856 "0v0wzs7qzy4n1hbql8s10qrwgalcxdzbxf8pj6cii1pv2jwmkxbm"))))
857 (build-system gnu-build-system)
858 (arguments
859 '(#:tests? #f ; no tests
860 #:make-flags (list "CC=gcc"
861 (string-append "PREFIX="
862 (assoc-ref %outputs "out")))
863 #:phases (modify-phases %standard-phases
864 (delete 'configure)
865 ;; Remove vim code completion config, it's not needed to
866 ;; build (or be patched).
867 (add-before 'patch-source-shebangs 'delete-ycm-file
868 (lambda _ (delete-file ".ycm_extra_conf.py")))
869 (replace 'install
870 (lambda* (#:key outputs #:allow-other-keys)
871 (let ((bin (string-append
872 (assoc-ref outputs "out") "/bin")))
873 (install-file "notmuch-addrlookup" bin)))))))
874 (native-inputs
875 `(("pkg-config" ,pkg-config)))
876 (inputs
877 `(("glib" ,glib)
878 ("notmuch" ,notmuch)))
879 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
880 (synopsis "Address lookup tool for Notmuch")
881 (description "This is an address lookup tool using a Notmuch database,
882useful for email address completion.")
883 (license license:expat))))
884
885(define-public python-notmuch
886 (package
887 (name "python-notmuch")
888 (version (package-version notmuch))
889 ;; Notmuch python bindings are now unavailable on pypi. The
890 ;; bindings are distributed via the notmuch release tarball.
891 (source (package-source notmuch))
892 (build-system python-build-system)
893 (inputs `(("notmuch" ,notmuch)))
894 (arguments
895 `(#:tests? #f ; no "test" target
896 #:phases
897 (modify-phases %standard-phases
898 ;; This python package lives in a subdirectory of the notmuch source
899 ;; tree, so chdir into it before building.
900 (add-after 'unpack 'enter-python-dir
901 (lambda _ (chdir "bindings/python") #t))
902 ;; Make sure the correct notmuch shared library gets loaded.
903 (add-before 'build 'set-libnotmuch-file-name
904 (lambda* (#:key inputs #:allow-other-keys)
905 (let ((notmuch (assoc-ref inputs "notmuch")))
906 (substitute* "notmuch/globals.py"
907 (("libnotmuch\\.so\\.")
908 (string-append notmuch "/lib/libnotmuch.so.")))
909 #t))))))
910 (home-page (package-home-page notmuch))
911 (synopsis "Python bindings of the Notmuch mail indexing library")
912 (description
913 "This package provides Python bindings to use the Notmuch mail indexing
914and search library.")
915 (license gpl3+)))
916
917(define-public python2-notmuch
918 (package-with-python2 python-notmuch))
919
920(define-public getmail
921 (package
922 (name "getmail")
923 (version "5.6")
924 (source
925 (origin
926 (method url-fetch)
927 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
928 name "-" version ".tar.gz"))
929 (sha256
930 (base32
931 "16nmvj80szr6yvcxxgmxn2lxqpjqqj4xg5a0b66zhvck6j42q3a6"))))
932 (build-system python-build-system)
933 (arguments
934 `(#:tests? #f ; no tests
935 #:python ,python-2))
936 (home-page "http://pyropus.ca/software/getmail/")
937 (synopsis "Mail retriever")
938 (description
939 "A flexible, extensible mail retrieval system with support for
940POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
941arbitrary message filtering, single-user and domain-mailboxes, and many other
942useful features.")
943
944 ;; License is specified in file '__init__.py'.
945 (license gpl2)))
946
947(define-public libetpan
948 (package
949 (name "libetpan")
950 (version "1.8")
951 (source (origin
952 (method git-fetch)
953 (uri (git-reference
954 (url "https://github.com/dinhviethoa/libetpan.git")
955 (commit version)))
956 (file-name (git-file-name name version))
957 (sha256
958 (base32 "09xqy1n18qn63x7idfrpwm59lfkvb1p5vxkyksywvy4f6mn4pyxk"))))
959 (build-system gnu-build-system)
960 (native-inputs `(("autoconf" ,autoconf-wrapper)
961 ("automake" ,automake)
962 ("libtool" ,libtool)
963 ("pkg-config" ,pkg-config)))
964 (propagated-inputs
965 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
966 ;; libraries need to be propagated.
967 `(("cyrus-sasl" ,cyrus-sasl)
968 ("openssl" ,openssl)))
969 (inputs
970 `(("curl" ,curl)
971 ("expat" ,expat)
972 ("zlib" ,zlib)))
973 (arguments
974 '(#:phases
975 (modify-phases %standard-phases
976 (add-after 'unpack 'autogen
977 (lambda _
978 (setenv "NOCONFIGURE" "true")
979 (invoke "sh" "autogen.sh"))))
980 #:configure-flags
981 '("--disable-static" "--disable-db")))
982 (home-page "http://www.etpan.org/libetpan.html")
983 (synopsis "Portable middleware for email access")
984 (description
985 "The purpose of this mail library is to provide a portable, efficient
986framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
987provides an API for C language. It's the low-level API used by MailCore and
988MailCore 2.")
989 (license bsd-3)))
990
991(define-public compface
992 (package
993 (name "compface")
994 (version "1.5.2")
995 (source (origin
996 (method url-fetch)
997 (uri (string-append "https://ftp.heanet.ie/mirrors/"
998 "ftp.xemacs.org/aux/"
999 name "-" version ".tar.gz"))
1000 (sha256
1001 (base32
1002 "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
1003 (build-system gnu-build-system)
1004 (arguments
1005 `(#:tests? #f))
1006 (synopsis "Portrait image compressor")
1007 (description "This packages takes your 48x48x1 portrait image and
1008compresses it.")
1009 (home-page "http://www.cs.indiana.edu/pub/faces/")
1010 (license (x11-style "file://README"))))
1011
1012(define-public claws-mail
1013 (package
1014 (name "claws-mail")
1015 (version "3.17.1")
1016 (source (origin
1017 (method url-fetch)
1018 (uri (string-append
1019 "https://www.claws-mail.org/releases/" name "-" version
1020 ".tar.xz"))
1021 (sha256
1022 (base32
1023 "1wknxbwyzm5xjh3cqmddcxmvp1rkp301qga5n5rgfi7vcd0myyvm"))))
1024 (build-system gnu-build-system)
1025 (native-inputs `(("pkg-config" ,pkg-config)))
1026 (inputs `(("bogofilter" ,bogofilter)
1027 ("curl" ,curl)
1028 ("dbus-glib" ,dbus-glib)
1029 ("enchant" ,enchant)
1030 ("expat" ,expat)
1031 ("ghostscript" ,ghostscript)
1032 ("hicolor-icon-theme" ,hicolor-icon-theme)
1033 ("gnupg" ,gnupg)
1034 ("gnutls" ,gnutls)
1035 ("gpgme" ,gpgme)
1036 ("gtk" ,gtk+-2)
1037 ("libarchive" ,libarchive)
1038 ("libcanberra" ,libcanberra)
1039 ("libetpan" ,libetpan)
1040 ("libical" ,libical)
1041 ("libnotify" ,libnotify)
1042 ("libsm" ,libsm)
1043 ("libxml2" ,libxml2)
1044 ("perl" ,perl)
1045 ("python-2" ,python-2)
1046 ("mime-info" ,shared-mime-info)))
1047 (arguments
1048 '(#:configure-flags
1049 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant")
1050 #:make-flags
1051 ;; Disable updating icon cache since it's done by the profile hook.
1052 ;; Conflict with other packages in the profile would be inevitable
1053 ;; otherwise.
1054 '("gtk_update_icon_cache=true")
1055 #:phases (modify-phases %standard-phases
1056 (add-before 'build 'patch-mime
1057 (lambda* (#:key inputs #:allow-other-keys)
1058 (substitute* "src/procmime.c"
1059 (("/usr/share/mime/globs")
1060 (string-append (assoc-ref inputs "mime-info")
1061 "/share/mime/globs"))))))))
1062 (synopsis "GTK-based Email client")
1063 (description
1064 "Claws-Mail is an email client (and news reader) based on GTK+. The
1065appearance and interface are designed to be familiar to new users coming from
1066other popular email clients, as well as experienced users. Almost all commands
1067are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
1068which can add many functionalities to the base client.")
1069 (home-page "https://www.claws-mail.org/")
1070 (license gpl3+))) ; most files are actually public domain or x11
1071
1072(define-public msmtp
1073 (package
1074 (name "msmtp")
1075 (version "1.8.0")
1076 (source
1077 (origin
1078 (method url-fetch)
1079 (uri (string-append "https://marlam.de/msmtp/releases/"
1080 "/msmtp-" version ".tar.xz"))
1081 (sha256
1082 (base32
1083 "1k9wwlapkxk9ql3xq05y6vwn6ziqk9b1v8lyhj1866qd02zhqwxx"))))
1084 (build-system gnu-build-system)
1085 (inputs
1086 `(("libsecret" ,libsecret)
1087 ("gnutls" ,gnutls)
1088 ("zlib" ,zlib)
1089 ("gsasl" ,gsasl)))
1090 (native-inputs
1091 `(("pkg-config" ,pkg-config)))
1092 (home-page "https://marlam.de/msmtp/")
1093 (arguments
1094 `(#:configure-flags (list "--with-libgsasl"
1095 "--with-libidn"
1096 "--with-tls=gnutls")
1097 #:phases
1098 (modify-phases %standard-phases
1099 (add-after 'install 'install-msmtpq
1100 (lambda* (#:key outputs #:allow-other-keys)
1101 (let* ((out (assoc-ref outputs "out"))
1102 (bin (string-append out "/bin"))
1103 (doc (string-append out "/share/doc/msmtp"))
1104 (msmtpq (string-append "scripts/msmtpq")))
1105 (install-file (string-append msmtpq "/msmtpq") bin)
1106 (install-file (string-append msmtpq "/msmtp-queue") bin)
1107 (install-file (string-append msmtpq "/README.msmtpq") doc)
1108 #t))))))
1109 (synopsis
1110 "Simple and easy to use SMTP client with decent sendmail compatibility")
1111 (description
1112 "msmtp is an SMTP client. In the default mode, it transmits a mail to
1113an SMTP server (for example at a free mail provider) which takes care of further
1114delivery.")
1115 (license gpl3+)))
1116
1117(define-public exim
1118 (package
1119 (name "exim")
1120 (version "4.90.1")
1121 (source
1122 (origin
1123 (method url-fetch)
1124 (uri (list (string-append "https://ftp.exim.org/pub/exim/exim4/exim-"
1125 version ".tar.bz2")
1126 (string-append "https://ftp.exim.org/pub/exim/exim4/old/exim-"
1127 version ".tar.bz2")))
1128 (sha256
1129 (base32
1130 "1w6blvvrd87c649j8xpag034md2w1ib0db9c4ijqbzc5dh2i1xfq"))))
1131 (build-system gnu-build-system)
1132 (inputs
1133 `(("bdb" ,bdb)
1134 ("gnutls" ,gnutls)
1135 ("gzip" ,gzip)
1136 ("bzip2" ,bzip2)
1137 ("xz" ,xz)
1138 ("perl" ,perl)
1139 ("libnsl" ,libnsl)
1140 ("libxt" ,libxt)
1141 ("libxaw" ,libxaw)))
1142 (native-inputs
1143 `(("pcre" ,pcre "bin")
1144 ("perl" ,perl)))
1145 (arguments
1146 '(#:phases
1147 (modify-phases %standard-phases
1148 (replace 'configure
1149 ;; We'd use #:make-flags but the top-level Makefile calls others
1150 ;; recursively, so just set all variables this way.
1151 (lambda* (#:key outputs inputs #:allow-other-keys)
1152 (substitute* '("Makefile" "OS/Makefile-Default")
1153 (("(RM_COMMAND=).*" all var)
1154 (string-append var "rm\n")))
1155 (copy-file "src/EDITME" "Local/Makefile")
1156 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
1157 (let ((out (assoc-ref outputs "out"))
1158 (gzip (assoc-ref inputs "gzip"))
1159 (bzip2 (assoc-ref inputs "bzip2"))
1160 (xz (assoc-ref inputs "xz")))
1161 (substitute* '("Local/Makefile")
1162 (("(BIN_DIRECTORY=).*" all var)
1163 (string-append var out "/bin\n"))
1164 (("(CONFIGURE_FILE=).*" all var)
1165 (string-append var out "/etc/exim.conf\n"))
1166 (("(EXIM_USER=).*" all var)
1167 (string-append var "nobody\n"))
1168 (("(FIXED_NEVER_USERS=).*" all var)
1169 (string-append var "\n")) ;XXX no root in build environment
1170 (("(COMPRESS_COMMAND=).*" all var)
1171 (string-append var gzip "/bin/gzip\n"))
1172 (("(ZCAT_COMMAND=).*" all var)
1173 (string-append var gzip "/bin/zcat\n")))
1174 ;; This file has hardcoded names for tools despite the zcat
1175 ;; configuration above.
1176 (substitute* '("src/exigrep.src")
1177 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
1178 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
1179 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
1180 (("'lzma'") (string-append "'" xz "/bin/lzma'"))))
1181 #t))
1182 (add-before 'build 'fix-sh-paths
1183 (lambda* (#:key inputs #:allow-other-keys)
1184 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
1185 (("SHELL=/bin/sh") "SHELL=sh"))
1186 (substitute* '("scripts/Configure-config.h")
1187 (("\\| /bin/sh") "| sh"))
1188 (let ((bash (assoc-ref inputs "bash")))
1189 (substitute* '("scripts/Configure-eximon")
1190 (("#!/bin/sh") (string-append "#!" bash "/bin/sh"))))
1191 #t)))
1192 #:make-flags '("INSTALL_ARG=-no_chown")
1193 ;; No 'check' target.
1194 #:tests? #f))
1195 (home-page "https://www.exim.org/")
1196 (synopsis
1197 "Message Transfer Agent (MTA) developed at the University of Cambridge")
1198 (description
1199 "Exim is a message transfer agent (MTA) developed at the University of
1200Cambridge for use on Unix systems connected to the Internet. In style it is
1201similar to Smail 3, but its facilities are more general. There is a great
1202deal of flexibility in the way mail can be routed, and there are extensive
1203facilities for checking incoming mail.")
1204 (license gpl2+)))
1205
1206(define-public dovecot
1207 (package
1208 (name "dovecot")
1209 (version "2.3.2.1")
1210 (source
1211 (origin
1212 (method url-fetch)
1213 (uri (string-append "https://www.dovecot.org/releases/"
1214 (version-major+minor version) "/"
1215 name "-" version ".tar.gz"))
1216 (sha256 (base32
1217 "0d2ffbicgl3wswbnyjbw6qigz7r1aqzprpchbwp5cynw122i2raa"))))
1218 (build-system gnu-build-system)
1219 (native-inputs
1220 `(("pkg-config" ,pkg-config)))
1221 (inputs
1222 `(("openssl" ,openssl)
1223 ("zlib" ,zlib)
1224 ("bzip2" ,bzip2)
1225 ("sqlite" ,sqlite)
1226 ("linux-pam" ,linux-pam)))
1227 (arguments
1228 `(#:configure-flags '("--sysconfdir=/etc"
1229 "--localstatedir=/var")
1230 #:phases (modify-phases %standard-phases
1231 (add-before
1232 'configure 'pre-configure
1233 (lambda _
1234 ;; Simple hack to avoid installing in /etc.
1235 (substitute* '("doc/Makefile.in"
1236 "doc/example-config/Makefile.in")
1237 (("pkgsysconfdir = .*")
1238 "pkgsysconfdir = /tmp/etc"))
1239 #t))
1240 (add-after
1241 'unpack 'patch-other-file-names
1242 (lambda _
1243 (substitute*
1244 "src/lib-program-client/test-program-client-local.c"
1245 (("(/bin/| )cat") (which "cat"))
1246 (("/bin/echo") (which "echo"))
1247 (("/bin/false") (which "false"))
1248 (("/bin/sh") (which "bash"))
1249 (("head") (which "head"))
1250 (("sleep") (which "sleep")))
1251 #t)))))
1252 (home-page "https://www.dovecot.org")
1253 (synopsis "Secure POP3/IMAP server")
1254 (description
1255 "Dovecot is a mail server whose major goals are security and reliability.
1256It supports mbox/Maildir and its own dbox/mdbox formats.")
1257 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
1258 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
1259 ;; Unicode, Inc. License Agreement for Data Files and Software.
1260 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
1261
1262(define-public dovecot-trees
1263 (package
1264 (name "dovecot-trees")
1265 (version "2.1.0")
1266 (source
1267 (origin
1268 (method url-fetch)
1269 (uri (string-append "https://0xacab.org/riseuplabs/trees/repository/"
1270 "archive.tar.gz?ref=v" version))
1271 (file-name (string-append name "-" version ".tar.gz"))
1272 (sha256
1273 (base32
1274 "0rkk10b1bsjz979sc864vpgcdchy7yxwmyv4ik50lar1h6awdnrf"))
1275 (patches
1276 (search-patches "dovecot-trees-support-dovecot-2.3.patch"))))
1277 (build-system gnu-build-system)
1278 (native-inputs
1279 `(("automake" ,automake)
1280 ("autoconf" ,autoconf)
1281 ("libtool" ,libtool)
1282 ("dovecot" ,dovecot)
1283 ("pkg-config" ,pkg-config)))
1284 (inputs
1285 `(("libsodium" ,libsodium)))
1286 (arguments
1287 `(#:tests? #f ;No tests exist.
1288 #:configure-flags (list (string-append "--with-dovecot="
1289 (assoc-ref %build-inputs "dovecot")
1290 "/lib/dovecot"))
1291 #:phases
1292 (modify-phases %standard-phases
1293 (add-after 'unpack 'autogen
1294 (lambda _
1295 (invoke "sh" "autogen.sh"))))))
1296 (home-page "https://0xacab.org/riseuplabs/trees")
1297 (synopsis "NaCL-based Dovecot email storage encryption plugin")
1298 (description
1299 "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
1300Dovecot encryption plugin. This plugin adds individually encrypted mail
1301storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
1302which uses OpenSSL and RSA keypairs. TREES works in a similar way, but uses
1303the Sodium crypto library (based on NaCL).
1304
1305How it works:
1306@enumerate
1307@item On IMAP log in, the user's cleartext password is passed to the plugin.
1308@item The plugin creates an argon2 digest from the password.
1309@item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
1310@item Inside the secretbox is stored a Curve25519 private key.
1311@item The Curve25519 private key is used to decrypt each individual message,
1312using lidsodium sealed boxes.
1313@item New mail is encrypted as it arrives using the Curve25519 public key.
1314@end enumerate\n")
1315 (license agpl3)))
1316
1317(define-public dovecot-libsodium-plugin
1318 (let ((commit "044de73c01c35385df0105f6b387bec5d5317ce7")
1319 (revision "1"))
1320 (package
1321 (name "dovecot-libsodium-plugin")
1322 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
1323 (source
1324 (origin
1325 (method git-fetch)
1326 (uri (git-reference
1327 (url "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1328 (commit commit)))
1329 (file-name (string-append name "-" version "-checkout"))
1330 (sha256
1331 (base32
1332 "13h07l7xy713zchnj2p9fhvq7fdl4zy1ai94li3ygkqjjj8hrgas"))))
1333 (build-system gnu-build-system)
1334 (native-inputs
1335 `(("automake" ,automake)
1336 ("autoconf" ,autoconf)
1337 ("libtool" ,libtool)
1338 ("dovecot" ,dovecot)
1339 ("pkg-config" ,pkg-config)))
1340 (inputs
1341 `(("libsodium" ,libsodium)))
1342 (arguments
1343 `(#:tests? #f ;No tests exist.
1344 #:configure-flags (list (string-append "--with-dovecot="
1345 (assoc-ref %build-inputs "dovecot")
1346 "/lib/dovecot"))
1347 #:phases
1348 (modify-phases %standard-phases
1349 (add-after 'unpack 'autogen
1350 (lambda _
1351 (invoke "sh" "autogen.sh"))))))
1352 (home-page "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1353 (synopsis "Libsodium password hashing schemes plugin for Dovecot")
1354 (description
1355 "@code{dovecot-libsodium-plugin} provides libsodium password
1356hashing schemes plugin for @code{Dovecot}.")
1357 (license gpl3+))))
1358
1359(define-public isync
1360 (package
1361 (name "isync")
1362 (version "1.3.0")
1363 (source
1364 (origin
1365 (method url-fetch)
1366 (uri (string-append "mirror://sourceforge/isync/isync/"
1367 version "/isync-" version ".tar.gz"))
1368 (sha256 (base32
1369 "173wd7x8y5sp94slzwlnb7zhgs32r57zl9xspl2rf4g3fqwmhpwd"))))
1370 (build-system gnu-build-system)
1371 (native-inputs
1372 `(("perl" ,perl)))
1373 (inputs
1374 `(("bdb" ,bdb)
1375 ("cyrus-sasl" ,cyrus-sasl)
1376 ("openssl" ,openssl)
1377 ("zlib" ,zlib)))
1378 (home-page "http://isync.sourceforge.net/")
1379 (synopsis "Mailbox synchronization program")
1380 (description
1381 "isync/mbsync is a command-line tool for two-way synchronization of
1382mailboxes. Currently Maildir and IMAP are supported types.")
1383 (license gpl2+)))
1384
1385(define-public perl-email-abstract
1386 (package
1387 (name "perl-email-abstract")
1388 (version "3.008")
1389 (source
1390 (origin
1391 (method url-fetch)
1392 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1393 "Email-Abstract-" version ".tar.gz"))
1394 (sha256
1395 (base32
1396 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
1397 (build-system perl-build-system)
1398 (propagated-inputs
1399 `(("perl-email-simple" ,perl-email-simple)
1400 ("perl-module-pluggable" ,perl-module-pluggable)
1401 ("perl-mro-compat" ,perl-mro-compat)))
1402 (home-page "https://metacpan.org/release/Email-Abstract")
1403 (synopsis "Interface to mail representations")
1404 (description "Email::Abstract provides module writers with the ability to
1405write simple, representation-independent mail handling code.")
1406 (license perl-license)))
1407
1408(define-public perl-email-address
1409 (package
1410 (name "perl-email-address")
1411 (version "1.909")
1412 (source
1413 (origin
1414 (method url-fetch)
1415 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1416 "Email-Address-" version ".tar.gz"))
1417 (sha256
1418 (base32
1419 "0l7x6sl06j9ffgfz5f9vgms2b5axd4cgp5fj03ivb3kia4km6b3g"))))
1420 (build-system perl-build-system)
1421 (home-page "https://metacpan.org/release/Email-Address")
1422 (synopsis "Email address parsing and creation")
1423 (description "Email::Address implements a regex-based RFC 2822 parser that
1424locates email addresses in strings and returns a list of Email::Address
1425objects found. Alternatively you may construct objects manually.")
1426 (license perl-license)))
1427
1428(define-public perl-email-date-format
1429 (package
1430 (name "perl-email-date-format")
1431 (version "1.005")
1432 (source
1433 (origin
1434 (method url-fetch)
1435 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1436 "Email-Date-Format-" version ".tar.gz"))
1437 (sha256
1438 (base32
1439 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
1440 (build-system perl-build-system)
1441 (home-page "https://metacpan.org/release/Email-Date-Format")
1442 (synopsis "Produce RFC 2822 date strings")
1443 (description "Email::Date::Format provides a means for generating an RFC
14442822 compliant datetime string.")
1445 (license perl-license)))
1446
1447(define-public perl-email-messageid
1448 (package
1449 (name "perl-email-messageid")
1450 (version "1.406")
1451 (source
1452 (origin
1453 (method url-fetch)
1454 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1455 "Email-MessageID-" version ".tar.gz"))
1456 (sha256
1457 (base32
1458 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
1459 (build-system perl-build-system)
1460 (home-page "https://metacpan.org/release/Email-MessageID")
1461 (synopsis "Generate world unique message-ids")
1462 (description "Email::MessageID generates recommended message-ids to
1463identify a message uniquely.")
1464 (license perl-license)))
1465
1466(define-public perl-email-mime
1467 (package
1468 (name "perl-email-mime")
1469 (version "1.946")
1470 (source
1471 (origin
1472 (method url-fetch)
1473 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1474 "Email-MIME-" version ".tar.gz"))
1475 (sha256
1476 (base32
1477 "0z1k3i0lzp2k421gc8f3wq0jbqflkbw2xqd2k7n7pmv56417kvk8"))))
1478 (build-system perl-build-system)
1479 (propagated-inputs
1480 `(("perl-email-address" ,perl-email-address)
1481 ("perl-email-messageid" ,perl-email-messageid)
1482 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1483 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1484 ("perl-email-simple" ,perl-email-simple)
1485 ("perl-mime-types" ,perl-mime-types)
1486 ("perl-module-runtime" ,perl-module-runtime)))
1487 (home-page "https://metacpan.org/release/Email-MIME")
1488 (synopsis "MIME message handling")
1489 (description "Email::MIME is an extension of the Email::Simple module, to
1490handle MIME encoded messages. It takes a message as a string, splits it up
1491into its constituent parts, and allows you access to various parts of the
1492message. Headers are decoded from MIME encoding.")
1493 (license perl-license)))
1494
1495(define-public perl-email-mime-contenttype
1496 (package
1497 (name "perl-email-mime-contenttype")
1498 (version "1.022")
1499 (source
1500 (origin
1501 (method url-fetch)
1502 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1503 "Email-MIME-ContentType-" version ".tar.gz"))
1504 (sha256
1505 (base32
1506 "042kxhs3bp1ab9z0mbr1wy21ld4lxd6v2a2mmrashqnsn2075fws"))))
1507 (build-system perl-build-system)
1508 (native-inputs
1509 `(("perl-capture-tiny" ,perl-capture-tiny)))
1510 (home-page "https://metacpan.org/release/Email-MIME-ContentType")
1511 (synopsis "Parse MIME Content-Type headers")
1512 (description "Email::MIME::ContentType parses a MIME Content-Type
1513header.")
1514 (license perl-license)))
1515
1516(define-public perl-email-mime-encodings
1517 (package
1518 (name "perl-email-mime-encodings")
1519 (version "1.315")
1520 (source
1521 (origin
1522 (method url-fetch)
1523 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1524 "Email-MIME-Encodings-" version ".tar.gz"))
1525 (sha256
1526 (base32
1527 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1528 (build-system perl-build-system)
1529 (native-inputs
1530 `(("perl-capture-tiny" ,perl-capture-tiny)))
1531 (home-page "https://metacpan.org/release/Email-MIME-Encodings")
1532 (synopsis "Unified interface to MIME encoding and decoding")
1533 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
1534 (license perl-license)))
1535
1536(define-public perl-email-sender
1537 (package
1538 (name "perl-email-sender")
1539 (version "1.300031")
1540 (source
1541 (origin
1542 (method url-fetch)
1543 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1544 "Email-Sender-" version ".tar.gz"))
1545 (sha256
1546 (base32
1547 "052g0slw3h2lzn93j71fi47nfawww2aph4jhr3c860ji70lkf4n4"))))
1548 (build-system perl-build-system)
1549 (native-inputs
1550 `(("perl-capture-tiny" ,perl-capture-tiny)))
1551 (propagated-inputs
1552 `(("perl-email-abstract" ,perl-email-abstract)
1553 ("perl-email-address" ,perl-email-address)
1554 ("perl-email-simple" ,perl-email-simple)
1555 ("perl-list-moreutils" ,perl-list-moreutils)
1556 ("perl-module-runtime" ,perl-module-runtime)
1557 ("perl-moo" ,perl-moo)
1558 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1559 ("perl-sub-exporter" ,perl-sub-exporter)
1560 ("perl-throwable" ,perl-throwable)
1561 ("perl-try-tiny" ,perl-try-tiny)))
1562 (home-page "https://metacpan.org/release/Email-Sender")
1563 (synopsis "Perl library for sending email")
1564 (description "Email::Sender replaces the old and sometimes problematic
1565Email::Send library.")
1566 (license perl-license)))
1567
1568(define-public perl-email-simple
1569 (package
1570 (name "perl-email-simple")
1571 (version "2.216")
1572 (source
1573 (origin
1574 (method url-fetch)
1575 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1576 "Email-Simple-" version ".tar.gz"))
1577 (sha256
1578 (base32
1579 "1m4brbjvalyp5kjqslqv4155dzwg977shxin208i7lc8236n6pyq"))))
1580 (build-system perl-build-system)
1581 (propagated-inputs
1582 `(("perl-email-date-format" ,perl-email-date-format)))
1583 (home-page "https://metacpan.org/release/Email-Simple")
1584 (synopsis "Parsing of RFC 2822 messages")
1585 (description "Email::Simple provides simple parsing of RFC 2822 message
1586format and headers.")
1587 (license perl-license)))
1588
1589(define-public libesmtp
1590 (package
1591 (name "libesmtp")
1592 (version "1.0.6")
1593 (source
1594 (origin
1595 (method url-fetch)
1596 (uri (list (string-append "https://pkgs.fedoraproject.org/repo/pkgs/"
1597 "libesmtp/libesmtp-" version ".tar.bz2/"
1598 "bf3915e627fd8f35524a8fdfeed979c8/libesmtp-"
1599 version ".tar.bz2")
1600 ;; XXX This site is offline, so we fetch Fedora's cached copy
1601 ;; of the source tarball.
1602 (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1603 version ".tar.bz2")))
1604 (sha256
1605 (base32
1606 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1607 (build-system gnu-build-system)
1608 (propagated-inputs
1609 `(("openssl" ,openssl)))
1610 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1611 (synopsis "Library for sending mail via remote hosts using SMTP")
1612 (description "libESMTP is an SMTP client which manages posting (or
1613submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1614It may be used as part of a Mail User Agent (MUA) or other program that must
1615be able to post electronic mail where mail functionality may not be that
1616program's primary purpose.")
1617 (license (list lgpl2.1+ gpl2+))))
1618
1619(define-public esmtp
1620 (package
1621 (name "esmtp")
1622 (version "1.2")
1623 (source
1624 (origin
1625 (method git-fetch)
1626 (uri (git-reference
1627 (url "https://github.com/andywingo/esmtp.git")
1628 (commit "01bf9fc")))
1629 (sha256
1630 (base32
1631 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1632 (file-name (string-append name "-" version "-checkout"))))
1633 (arguments
1634 `(#:phases (modify-phases %standard-phases
1635 (replace 'bootstrap
1636 (lambda _ (invoke "autoreconf" "-vfi"))))))
1637 (build-system gnu-build-system)
1638 (native-inputs
1639 `(("bison" ,bison)
1640 ("flex" ,flex)
1641 ("autoconf" ,autoconf)
1642 ("automake" ,automake)
1643 ("libtool" ,libtool)))
1644 (inputs
1645 `(("libesmtp" ,libesmtp)))
1646 (home-page "https://sourceforge.net/projects/esmtp/")
1647 (synopsis "Relay-only mail transfer agent (MTA)")
1648 (description "Esmtp is a simple relay-only mail transfer agent built using
1649libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1650user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1651page for more on configuration. This package also provides minimal
1652compatibility shims for the @command{sendmail}, @command{mailq}, and
1653@command{newaliases} commands.")
1654 (license gpl2+)))
1655
1656(define-public fdm
1657 (package
1658 (name "fdm")
1659 (version "1.9")
1660 (source (origin
1661 (method url-fetch)
1662 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1663 version "/fdm-"
1664 version ".tar.gz"))
1665 (file-name (string-append name "-" version ".tar.gz"))
1666 (sha256
1667 (base32 "054rscijahiza5f9qha79rg3siji3bk5mk10f8c2vqx7m4w6qh8n"))))
1668 (build-system gnu-build-system)
1669 (inputs
1670 `(("tdb" ,tdb)
1671 ("openssl" ,openssl)
1672 ("zlib" ,zlib)))
1673 (home-page "https://github.com/nicm/fdm")
1674 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1675 (description "fdm is a program designed to fetch mail from POP3
1676or IMAP servers, or receive local mail from stdin, and
1677deliver it in various ways.")
1678 (license
1679 ;; Why point to a source file? Well, all the individual files have a
1680 ;; copy of this license in their headers, but there's no seprate file
1681 ;; with that information.
1682 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
1683
1684
1685(define-public procmail
1686 (package
1687 (name "procmail")
1688 (version "3.22")
1689 (source
1690 (origin
1691 (method url-fetch)
1692 (uri (string-append
1693 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1694 version
1695 ".tar.gz"))
1696 (sha256
1697 (base32
1698 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1699 ;; The following patch fixes an ambiguous definition of
1700 ;; getline() in formail.c. The patch is provided by Debian as
1701 ;; patch 24.
1702 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
1703 "procmail-CVE-2014-3618.patch"
1704 "procmail-CVE-2017-16844.patch"))))
1705 (arguments
1706 `(#:phases (modify-phases %standard-phases
1707 (replace 'configure
1708 (lambda _
1709 (substitute* "Makefile"
1710 (("/bin/sh")
1711 (which "sh"))
1712 (("/usr")
1713 (assoc-ref %outputs "out"))
1714 (("/bin/rm")
1715 (which "rm")))
1716 #t)))
1717 #:tests? #f)) ;; There are no tests indicating a successful
1718 ;; build. Some tests of basic locking mechanisms provided by the
1719 ;; file system are performed during 'make install'. However, these
1720 ;; are performed before the actual build process.
1721 (build-system gnu-build-system)
1722 (inputs `(("exim" ,exim)))
1723 (home-page "http://www.procmail.org/")
1724 (synopsis "Versatile mail delivery agent (MDA)")
1725 (description "Procmail is a mail delivery agent (MDA) featuring support
1726for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1727can be sorted into separate files/directories and arbitrary commands can be
1728executed on mail arrival. Procmail is considered stable, but is no longer
1729maintained.")
1730 (license gpl2+))) ;; procmail allows to choose the
1731 ;; nonfree Artistic License 1.0
1732 ;; as alternative to the GPL2+.
1733 ;; This option is not listed here.
1734
1735(define-public khard
1736 (package
1737 (name "khard")
1738 (version "0.11.4")
1739 (source (origin
1740 (method url-fetch)
1741 (uri (pypi-uri name version))
1742 (sha256
1743 (base32
1744 "1shhlq6ljbd8095hd82v4mw56rjcfxf1ymmgknbgh8gix02nsxw1"))))
1745 (build-system python-build-system)
1746 (arguments
1747 `(#:phases
1748 (modify-phases %standard-phases
1749 (add-after 'install 'install-doc
1750 (lambda* (#:key outputs #:allow-other-keys)
1751 (let* ((out (assoc-ref outputs "out"))
1752 (doc (string-append out "/share/doc/khard")))
1753 (copy-recursively "misc/khard" doc)
1754 #t))))
1755 ;; FIXME: check phase fails with
1756 ;; "Config file /tmp/.config/khard/khard.conf not available"
1757 #:tests? #f))
1758 (propagated-inputs
1759 `(("python-vobject" ,python-vobject)
1760 ("python-pyyaml" ,python-pyyaml)
1761 ("python-atomicwrites" ,python-atomicwrites)
1762 ("python-configobj" ,python-configobj)))
1763 (synopsis "Console address book using CardDAV")
1764 (description "Khard is an address book for the console. It creates, reads,
1765modifies and removes CardDAV address book entries at your local machine. For
1766synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1767Khard can also be used from within the email client @command{mutt}.")
1768 (home-page "https://github.com/scheibler/khard")
1769 (license gpl3+)))
1770
1771(define-public perl-mail-spf
1772 (package
1773 (name "perl-mail-spf")
1774 (version "v2.9.0")
1775 (source
1776 (origin
1777 (method url-fetch)
1778 (uri (string-append
1779 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-"
1780 version
1781 ".tar.gz"))
1782 (sha256
1783 (base32
1784 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1785 (build-system perl-build-system)
1786 (native-inputs
1787 `(("perl-module-build" ,perl-module-build)
1788 ("perl-net-dns-resolver-programmable"
1789 ,perl-net-dns-resolver-programmable)))
1790 (arguments
1791 `(#:phases (modify-phases %standard-phases
1792 (add-before 'configure 'modify-Build.PL
1793 (lambda* (#:key outputs #:allow-other-keys)
1794 (substitute* "Build.PL"
1795 (("'/usr/sbin'") (string-append "'"
1796 (assoc-ref outputs "out")
1797 "/sbin'")))
1798 #t)))))
1799 (inputs
1800 `(("perl-error" ,perl-error)
1801 ("perl-net-dns" ,perl-net-dns)
1802 ("perl-netaddr-ip" ,perl-netaddr-ip)
1803 ("perl-uri" ,perl-uri)))
1804 (home-page
1805 "https://metacpan.org/release/Mail-SPF")
1806 (synopsis
1807 "Perl implementation of Sender Policy Framework")
1808 (description "Mail::SPF is the Sender Policy Framework implemented
1809in Perl.")
1810 (license bsd-3)))
1811
1812(define-public mb2md
1813 (package
1814 (name "mb2md")
1815 (version "3.20")
1816 (source (origin
1817 (method url-fetch)
1818 (uri (string-append
1819 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
1820 version ".pl.gz"))
1821 (sha256
1822 (base32
1823 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
1824 (build-system trivial-build-system)
1825 (arguments
1826 '(#:modules ((guix build utils))
1827 #:builder
1828 (begin
1829 (use-modules (guix build utils))
1830 (let* ((source (assoc-ref %build-inputs "source"))
1831 (out (assoc-ref %outputs "out"))
1832 (bin (string-append out "/bin"))
1833 (perl (assoc-ref %build-inputs "perl"))
1834 (gzip (assoc-ref %build-inputs "gzip"))
1835 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
1836 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
1837 (mkdir-p bin)
1838 (with-directory-excursion bin
1839 (copy-file source "mb2md.gz")
1840 (invoke (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
1841 (substitute* "mb2md"
1842 (("#!/usr/bin/perl")
1843 (string-append "#!/usr/bin/perl -I " perl5lib)))
1844 (patch-shebang "mb2md" (list (string-append perl "/bin")))
1845 (chmod "mb2md" #o555))
1846 #t))))
1847 (native-inputs `(("gzip" ,gzip)))
1848 (inputs `(("perl" ,perl)
1849 ("perl-timedate" ,perl-timedate)))
1850 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
1851 (synopsis "Mbox to maildir converter")
1852 (description
1853 "Mb2md is a Perl script that takes one or more mbox format files and
1854converts them to maildir format directories.")
1855 (license public-domain)))
1856
1857(define-public mpop
1858 (package
1859 (name "mpop")
1860 (version "1.2.8")
1861 (source
1862 (origin
1863 (method url-fetch)
1864 (uri (string-append "https://marlam.de/mpop/releases/"
1865 name "-" version ".tar.xz"))
1866 (sha256
1867 (base32
1868 "1skrda7lbks5h0v03ab8bhpg6ma1b63if8x9x3kb2fv70x2pkhqn"))))
1869 (build-system gnu-build-system)
1870 (inputs
1871 `(("gnutls" ,gnutls)
1872 ("libidn" ,libidn)))
1873 (native-inputs
1874 `(("pkg-config" ,pkg-config)))
1875 (home-page "https://marlam.de/mpop/")
1876 (synopsis "POP3 mail client")
1877 (description "mpop is a small and fast POP3 client suitable as a
1878fetchmail replacement.
1879
1880mpop supports multiple accounts, header based mail filtering, delivery
1881to mbox files, maildir folders or a Mail Delivery Agent (MDA),
1882TLS/SSL, several authentication methods, Internationalized Domain
1883Names (IDN) and SOCKS proxies.")
1884 (license gpl3+)))
1885
1886(define-public mhonarc
1887 (package
1888 (name "mhonarc")
1889 (version "2.6.19")
1890 (source
1891 (origin
1892 (method url-fetch)
1893 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
1894 version ".tar.gz"))
1895 (sha256
1896 (base32
1897 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
1898 (build-system perl-build-system)
1899 (home-page "https://www.mhonarc.org/")
1900 (synopsis "Create HTML archives of mail/news messages")
1901 (description
1902 "MHonArc is a Perl mail-to-HTML converter. MHonArc
1903provides HTML mail archiving with index, mail thread linking,
1904etc; plus other capabilities including support for MIME and
1905powerful user customization features.")
1906 (license gpl2+)))
1907
1908
1909(define-public sendmail
1910 (package
1911 (name "sendmail")
1912 (version "8.15.2")
1913 (source
1914 (origin
1915 (method url-fetch)
1916 (uri (string-append
1917 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
1918 version ".tar.gz"))
1919 (sha256
1920 (base32
1921 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
1922 (build-system gnu-build-system)
1923 (arguments
1924 `(#:phases
1925 (modify-phases %standard-phases
1926 (add-before 'build 'replace-/bin/sh
1927 (lambda _
1928 (substitute*
1929 (append
1930 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
1931 "contrib/mmuegel" "devtools/bin/configure.sh")
1932 (find-files "." ".*\\.m4")
1933 (find-files "." ".*\\.cf"))
1934 (("/bin/sh") (which "sh")))
1935
1936 (substitute* "devtools/bin/Build"
1937 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
1938 #t))
1939 (replace 'configure
1940 (lambda _
1941
1942 ;; Render harmless any attempts to chown or chgrp
1943 (substitute* "devtools/bin/install.sh"
1944 (("owner=\\$2") "owner=''")
1945 (("group=\\$2") "group=''"))
1946
1947 (with-output-to-file "devtools/Site/site.config.m4"
1948 (lambda ()
1949 (format #t "
1950define(`confCC', `gcc')
1951define(`confOPTIMIZE', `-g -O2')
1952define(`confLIBS', `-lresolv')
1953define(`confINSTALL', `~a/devtools/bin/install.sh')
1954define(`confDEPEND_TYPE', `CC-M')
1955define(`confINST_DEP', `')
1956" (getcwd))))
1957 #t))
1958 (replace 'build
1959 (lambda _
1960 (invoke "sh" "Build")
1961 (with-directory-excursion "cf/cf"
1962 (copy-file "generic-linux.mc" "sendmail.mc")
1963 (invoke "sh" "Build" "sendmail.cf"))
1964 #t))
1965 (add-before 'install 'pre-install
1966 (lambda _
1967 (let ((out (assoc-ref %outputs "out")))
1968 (mkdir-p (string-append out "/usr/bin"))
1969 (mkdir-p (string-append out "/usr/sbin"))
1970 (mkdir-p (string-append out "/etc/mail"))
1971 (setenv "DESTDIR" out)
1972 (with-directory-excursion "cf/cf"
1973 (invoke "sh" "Build" "install-cf"))
1974 #t))))
1975 ;; There is no make check. There are some post installation tests, but those
1976 ;; require root privileges
1977 #:tests? #f))
1978 (inputs
1979 `(("m4" ,m4)
1980 ("perl" ,perl)))
1981 (home-page "http://sendmail.org")
1982 (synopsis
1983 "Highly configurable Mail Transfer Agent (MTA)")
1984 (description
1985 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
1986Allman. It is highly configurable and supports many delivery methods and many
1987transfer protocols.")
1988 (license (non-copyleft "file://LICENSE"
1989 "See LICENSE in the distribution."))))
1990
1991(define-public opensmtpd
1992 (package
1993 (name "opensmtpd")
1994 (version "6.0.3p1")
1995 (source (origin
1996 (method url-fetch)
1997 (uri (string-append "https://www.opensmtpd.org/archives/"
1998 name "-" version ".tar.gz"))
1999 (sha256
2000 (base32
2001 "10bsfsnlg9d9i6l2izdnxp05s3ri8fvwzqxvx1jmarc852382619"))
2002 ;; Fixed upstream: <github.com/OpenSMTPD/OpenSMTPD/pull/835>.
2003 (patches (search-patches "opensmtpd-fix-crash.patch"))))
2004 (build-system gnu-build-system)
2005 (inputs
2006 `(("bdb" ,bdb)
2007 ("libressl" ,libressl)
2008 ("libevent" ,libevent)
2009 ("libasr" ,libasr)
2010 ("linux-pam" ,linux-pam)
2011 ("zlib" ,zlib)))
2012 (native-inputs
2013 `(("bison" ,bison)
2014 ("groff" ,groff)))
2015 (arguments
2016 `(#:configure-flags
2017 (list "--with-table-db" "--with-auth-pam" "--localstatedir=/var"
2018 "--with-user-smtpd=smtpd" "--with-user-queue=smtpq"
2019 "--with-group-queue=smtpq"
2020 "--with-path-socket=/var/run" ; not default (./configure lies)
2021 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt")
2022 #:phases
2023 (modify-phases %standard-phases
2024 ;; Fix some incorrectly hard-coded external tool file names.
2025 (add-after 'unpack 'patch-FHS-file-names
2026 (lambda* (#:key inputs #:allow-other-keys)
2027 (substitute* "smtpd/smtpctl.c"
2028 (("/bin/cat") (which "cat"))
2029 (("/bin/sh") (which "sh")))
2030 #t))
2031 ;; OpenSMTPD provides a single utility smtpctl to control the daemon and
2032 ;; the local submission subsystem. To accomodate systems that require
2033 ;; historical interfaces such as sendmail, newaliases or makemap, the
2034 ;; smtpctl utility can operate in compatibility mode if called with the
2035 ;; historical name.
2036 (add-after 'install 'install-compability-links
2037 (lambda* (#:key outputs #:allow-other-keys)
2038 (let* ((out (assoc-ref outputs "out"))
2039 (sbin (string-append out "/sbin/")))
2040 (for-each (lambda (command)
2041 (symlink "smtpctl" (string-append sbin command)))
2042 '("makemap" "sendmail" "send-mail"
2043 "newaliases" "mailq")))
2044 #t)))))
2045 (synopsis "Lightweight SMTP daemon")
2046 (description
2047 "OpenSMTPD is an implementation of the server-side SMTP protocol, with
2048some additional standard extensions. It allows ordinary machines to exchange
2049e-mails with other systems speaking the SMTP protocol.")
2050 (home-page "https://www.opensmtpd.org")
2051 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
2052 public-domain isc license:openssl))))
2053
2054(define-public opensmtpd-extras
2055 (package
2056 (name "opensmtpd-extras")
2057 (version "5.7.1")
2058 (source (origin
2059 (method url-fetch)
2060 (uri (string-append "https://www.opensmtpd.org/archives/"
2061 name "-" version ".tar.gz"))
2062 (sha256
2063 (base32
2064 "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm"))))
2065 (build-system gnu-build-system)
2066 (inputs
2067 `(("libressl" ,libressl)
2068 ("libevent" ,libevent)
2069 ("libasr" ,libasr)
2070 ("python-2" ,python-2)
2071 ("opensmtpd" ,opensmtpd)
2072 ("perl" ,perl)
2073 ("lua" ,lua)
2074 ("postgresql" ,postgresql)
2075 ("sqlite" ,sqlite)
2076 ("linux-pam" ,linux-pam)))
2077 (native-inputs
2078 `(("bison" ,bison)
2079 ("pkg-config" ,pkg-config)
2080 ("groff" ,groff)
2081 ("automake" ,automake)
2082 ("autoconf" ,autoconf)))
2083 (arguments
2084 `(;; We have to configure it like this because the default checks for for example
2085 ;; python in /usr/local/bin, /usr/bin and fails otherwise.
2086 #:configure-flags (list
2087 "--with-filter-clamav" "--with-filter-dkim-signer"
2088 "--with-filter-dnsbl" "--with-filter-lua"
2089 "--with-filter-monkey" "--with-filter-pause"
2090 "--with-filter-perl" "--with-filter-python"
2091 "--with-filter-regex" "--with-filter-spamassassin"
2092 "--with-filter-stub" "--with-filter-trace"
2093 "--with-filter-void"
2094
2095 "--with-queue-null" "--with-queue-python"
2096 "--with-queue-ram" "--with-queue-stub"
2097
2098 "--with-scheduler-python" "--with-scheduler-ram"
2099 "--with-scheduler-stub"
2100
2101 "--with-table-ldap" ; "--with-table-mysql"
2102 "--with-table-passwd" "--with-table-postgres"
2103 "--with-table-python" "--with-table-socketmap"
2104 "--with-table-sqlite" "--with-table-stub"
2105 ;;"--with-table-redis" ; TODO: package hiredis
2106
2107 "--with-user=smtpd" "--with-privsep-user=smtpd"
2108 "--localstatedir=/var" "--sysconfdir=/etc"
2109 "--with-lua-type=lua" ; can use lua or luajit
2110
2111 (string-append "--with-python="
2112 (assoc-ref %build-inputs "python-2"))
2113 (string-append "--with-lua="
2114 (assoc-ref %build-inputs "lua")))))
2115 (license (list bsd-2 bsd-3 bsd-4
2116 public-domain isc license:openssl))
2117 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
2118 (description
2119 "This package provides extra tables, filters, and various other addons
2120for OpenSMTPD to extend its functionality.")
2121 (home-page "https://www.opensmtpd.org")))
2122
2123(define-public python-mailmanclient
2124 (package
2125 (name "python-mailmanclient")
2126 (version "3.1.1")
2127 (source
2128 (origin
2129 (method url-fetch)
2130 (uri (pypi-uri "mailmanclient" version))
2131 (sha256
2132 (base32
2133 "0fdfs5g3pf30v2i7w18pdkv9xnfxmfcv66mzv56dck0a1igq07m3"))))
2134 (build-system python-build-system)
2135 (arguments
2136 `(#:tests? #f)) ; Requires mailman running
2137 (propagated-inputs
2138 `(("python-six" ,python-six)
2139 ("python-httplib2" ,python-httplib2)))
2140 (home-page "https://launchpad.net/mailman.client")
2141 (synopsis "Python bindings for the Mailman 3 REST API")
2142 (description
2143 "The mailmanclient library provides official Python bindings for
2144the GNU Mailman 3 REST API.")
2145 (license lgpl3+)))
2146
2147(define-public python2-mailmanclient
2148 (package-with-python2 python-mailmanclient))
2149
2150(define-public mlmmj
2151 (package
2152 (name "mlmmj")
2153 (version "1.3.0")
2154 (source
2155 (origin
2156 (method url-fetch)
2157 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
2158 version ".tar.bz2"))
2159 (sha256
2160 (base32
2161 "0hpj10qad821ci11si8xc2qnmkzfn90y13s43fm4fca38f0qjp8w"))))
2162 (build-system gnu-build-system)
2163 (inputs
2164 `(("perl" ,perl))) ; For "contrib/web/"
2165 (native-inputs
2166 `(("pkg-config" ,pkg-config)))
2167 (arguments
2168 `(#:configure-flags
2169 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
2170 ;; It opens the files control/mimedeny and control/mimestrip to get a list
2171 ;; of mimetypes for parts of multipart/mime messages that should be denied
2172 ;; or stripped. The parts then get stripped directly when the mail is
2173 ;; received. mlmmj-receive-strip also appends an extra header
2174 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
2175 ;; mime parts
2176 (list "--enable-receive-strip")
2177 #:phases
2178 (modify-phases %standard-phases
2179 (add-before 'install 'install-contrib
2180 (lambda* (#:key outputs #:allow-other-keys)
2181 (let* ((out (assoc-ref outputs "out"))
2182 (share (string-append out "/share/mlmmj"))
2183 (contrib (string-append share "/contrib/web"))
2184 (texts (string-append share "/listtexts")))
2185 (copy-recursively "contrib/web/" contrib)
2186 (copy-recursively "listtexts" texts)
2187 (rename-file texts (string-append share "/texts"))
2188 #t))))))
2189 (home-page "http://mlmmj.org")
2190 (synopsis "Mailing list managing made joyful")
2191 (description
2192 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
2193It works with many different Mail Transport Agents (MTAs) and is simple for a
2194system administrator to install, configure and integrate with other software.
2195As it uses very few resources, and requires no daemons, it is ideal for
2196installation on systems where resources are limited. Its features include:
2197@enumerate
2198@item Archive, Custom headers / footer,
2199@item Fully automated bounce handling (similar to ezmlm),
2200@item Complete requeueing functionality, Moderation functionality, Subject prefix,
2201@item Subscribers only posting, Regular expression access control,
2202@item Functionality to retrieve old posts, Web interface, Digests,
2203@item No-mail subscription, VERP support,
2204@item Delivery Status Notification (RFC1891) support,
2205@item Rich and customisable texts for automated operations.
2206@end enumerate\n")
2207 (license license:expat)))
2208
2209(define-public python2-django-mailman3
2210 (package
2211 (name "python2-django-mailman3")
2212 (version "1.1.0")
2213 (source
2214 (origin
2215 (method url-fetch)
2216 (uri (pypi-uri "django-mailman3" version))
2217 (sha256
2218 (base32
2219 "1xjdkgfjwhgyrp5nxw65dcpcsr98ygj6856sp0bwkrmyxpd1xxk2"))))
2220 (build-system python-build-system)
2221 (arguments
2222 `(#:phases
2223 (modify-phases %standard-phases
2224 (replace 'check
2225 (lambda _
2226 (invoke "django-admin"
2227 "test"
2228 "--settings=django_mailman3.tests.settings_test"
2229 "django_mailman3"))))
2230 #:python ,python-2))
2231 (inputs
2232 `(("python2-django" ,python2-django)))
2233 (propagated-inputs
2234 `(("python2-requests" ,python2-requests)
2235 ("python2-requests-oauthlib" ,python2-requests-oauthlib)
2236 ("python2-openid" ,python2-openid)
2237 ("python2-mailmanclient" ,python2-mailmanclient)
2238 ("python2-django-allauth" ,python2-django-allauth)
2239 ("python2-django-gravatar2" ,python2-django-gravatar2)
2240 ("python2-pytz" ,python2-pytz)))
2241 (home-page "https://gitlab.com/mailman/django-mailman3")
2242 (synopsis "Django library for Mailman UIs")
2243 (description
2244 "Libraries and templates for Django-based interfaces
2245interacting with Mailman.")
2246 (license gpl3+)))
2247
2248(define-public postorius
2249 (package
2250 (name "postorius")
2251 (version "1.0.3")
2252 (source
2253 (origin
2254 (method url-fetch)
2255 (uri (pypi-uri "postorius" version "+post2.tar.gz"))
2256 (file-name (string-append name "-" version ".tar.gz"))
2257 (sha256
2258 (base32
2259 "1wymcpv2icjjy8h1ni52p6dr7wwxf71ivqgbqhzx4i82yqphcaq5"))))
2260 (build-system python-build-system)
2261 (arguments
2262 `(; One test dependency relies on Persona, which was shut down in
2263 ;; November 2016.
2264 #:tests? #f
2265 ;; The part of the frontend of Mailman is still python 2.7.
2266 #:python ,python-2))
2267 (inputs
2268 `(("python2-django" ,python2-django)
2269 ("python2-django-mailman3" ,python2-django-mailman3)
2270 ("python2-mailmanclient" ,python2-mailmanclient)))
2271 (home-page "https://gitlab.com/mailman/postorius")
2272 (synopsis "Web user interface for GNU Mailman")
2273 (description
2274 "Postorius is a Django app which provides a web user interface
2275to access GNU Mailman.")
2276 (license (list gpl3+ lgpl3+))))
2277
2278(define-public blists
2279 (package
2280 (name "blists")
2281 (version "2.0")
2282 (source
2283 (origin
2284 (method url-fetch)
2285 (uri (string-append "http://download.openwall.net/pub/projects/"
2286 "blists/blists-" version ".tar.gz"))
2287 (sha256
2288 (base32
2289 "1xll5wn7py3bbncbwrj172f56nz75c9gwfsa80rwd96ss9gfmp3c"))))
2290 (build-system gnu-build-system)
2291 (arguments
2292 `(#:tests? #f ; No tests
2293 #:phases
2294 (modify-phases %standard-phases
2295 (delete 'configure)
2296 (replace 'install
2297 (lambda* (#:key outputs #:allow-other-keys)
2298 (let* ((out (assoc-ref outputs "out"))
2299 (bin (string-append out "/bin")))
2300 (install-file "bindex" bin)
2301 (install-file "bit" bin)
2302 #t))))))
2303 (home-page "http://www.openwall.com/blists/")
2304 (synopsis "Web interface to mailing list archives")
2305 (description
2306 "Blists is a web interface to mailing list archives that works off
2307indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
2308@code{bindex} generates or updates the index file (incremental updates
2309are supported). @code{bit} is a CGI/SSI program that generates web pages
2310on the fly. Both programs are written in C and are very fast.")
2311 (license license:expat)))
2312
2313(define-public swaks
2314 (package
2315 (name "swaks")
2316 (version "20170101.0")
2317 (source
2318 (origin
2319 (method url-fetch)
2320 (uri (string-append
2321 "https://jetmore.org/john/code/swaks/files/swaks-"
2322 version ".tar.gz"))
2323 (sha256
2324 (base32
2325 "0pli4mlhasnqqxmmxalwyg3x7n2vhcbgsnp2xgddamjavv82vrl4"))))
2326 (build-system perl-build-system)
2327 (inputs
2328 `(("perl-net-dns" ,perl-net-dns)
2329 ("perl-net-ssleay" ,perl-net-ssleay)))
2330 (arguments
2331 `(#:tests? #f ; No tests
2332 #:phases
2333 (modify-phases %standard-phases
2334 (delete 'configure)
2335 (replace 'build
2336 (lambda _
2337 (invoke "pod2man" "doc/ref.pod" "swaks.1")))
2338 (replace 'install
2339 (lambda* (#:key outputs #:allow-other-keys)
2340 (let ((out (assoc-ref outputs "out")))
2341 (install-file "swaks" (string-append out "/bin"))
2342 (install-file "swaks.1" (string-append out "/share/man/man1")))
2343 #t))
2344 (add-after 'install 'wrap-program
2345 (lambda* (#:key outputs #:allow-other-keys)
2346 (wrap-program (string-append (assoc-ref outputs "out")
2347 "/bin/swaks")
2348 `("PERL5LIB" ":" = (,(getenv "PERL5LIB"))))
2349 #t)))))
2350 (home-page "https://jetmore.org/john/code/swaks/")
2351 (synopsis "Featureful SMTP test tool")
2352 (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
2353test tool. It handles SMTP features and extensions such as TLS,
2354authentication, and pipelining; multiple versions of the SMTP protocol
2355including SMTP, ESMTP, and LMTP; and multiple transport methods including
2356unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
2357Options can be specified in environment variables, configuration files, and
2358the command line allowing maximum configurability and ease of use for
2359operators and scripters.")
2360 (license gpl2+)))
2361
2362(define-public alpine
2363 (package
2364 (name "alpine")
2365 (version "2.21.9999")
2366 (source
2367 (origin
2368 (method url-fetch)
2369 ;; There are two versions: the plain continuation of Alpine without extra
2370 ;; patches and the version which adds extra fixes. Every distro uses
2371 ;; the patched version, and so do we to not break expectations.
2372 ;; http://alpine.freeiz.com/alpine/readme/README.patches
2373 (uri (string-append "http://repo.or.cz/alpine.git/snapshot/"
2374 "d3e6f3932f2af9deca8eed09e30a55e9bd524362.tar.gz"))
2375 (file-name (string-append name "-" version ".tar.gz"))
2376 (sha256
2377 (base32
2378 "0w4qyybfdxi29r2z3giq0by6aa6v6nrgibh1xgv4d1vwwq4hw35w"))))
2379 (build-system gnu-build-system)
2380 (arguments
2381 `(#:make-flags (list "CC=gcc")
2382 #:configure-flags (list (string-append "--with-ssl-include-dir="
2383 (assoc-ref %build-inputs "openssl")
2384 "/include/openssl")
2385 (string-append "--with-ssl-dir="
2386 (assoc-ref %build-inputs "openssl"))
2387 (string-append "--with-ssl-certs-dir="
2388 "/etc/ssl/certs/")
2389 (string-append "--with-ssl-lib-dir="
2390 (assoc-ref %build-inputs "openssl")
2391 "/lib")
2392 (string-append "--with-interactive-spellcheck="
2393 (assoc-ref %build-inputs "aspell")
2394 "/bin/aspell"))
2395 #:phases
2396 (modify-phases %standard-phases
2397 (add-after 'unpack 'make-reproducible
2398 (lambda _
2399 ;; This removes time-dependent code to make alpine reproducible.
2400 (substitute* "pico/blddate.c"
2401 (("%02d-%s-%d") "1970-01-01"))
2402 (substitute* (list "alpine/Makefile.in"
2403 "web/src/alpined.d/Makefile.in")
2404 (("`date`") "1970-01-01"))
2405 #t)))))
2406 (inputs
2407 `(("ncurses" ,ncurses)
2408 ("openssl" ,openssl)
2409 ("gnutls" ,gnutls)
2410 ("openldap" ,openldap)
2411 ("cyrus-sasl" ,cyrus-sasl)
2412 ("mit-krb5" ,mit-krb5)
2413 ("aspell" ,aspell)
2414 ("tcl" ,tcl)
2415 ("linux-pam" ,linux-pam)))
2416 (home-page "http://repo.or.cz/alpine.git")
2417 (synopsis "Alternatively Licensed Program for Internet News and Email")
2418 (description
2419 "Alpine is a text-based mail and news client. Alpine includes several
2420tools and applications:
2421@enumerate
2422@item alpine, the Alpine mailer
2423@item pico, the standalone text editor, GNU nano's predecessor
2424@item pilot, the standalone file system navigator
2425@end enumerate\n")
2426 (license asl2.0)))
2427
2428(define-public balsa
2429 (package
2430 (name "balsa")
2431 (version "2.5.3")
2432 (source
2433 (origin
2434 (method url-fetch)
2435 (uri (string-append "https://pawsa.fedorapeople.org/balsa/balsa-"
2436 version ".tar.bz2"))
2437 (sha256
2438 (base32
2439 "15jkwp3ylbwd8iha4dr37z1xb6mkk31ym90vv3h2a5xk2rmym5mq"))))
2440 (build-system gnu-build-system)
2441 (arguments
2442 `(#:configure-flags
2443 '(;; Balsa tries to install additional MIME icons
2444 ;; under gtk+ directory.
2445 "--enable-extra-mimeicons=no"
2446 "--with-gtksourceview"
2447 "--with-canberra"
2448 "--with-spell-checker=gtkspell"
2449 "--with-gpgme"
2450 "--with-sqlite"
2451 "--with-compface"
2452 "--with-ldap")))
2453 (inputs
2454 `(("cyrus-sasl" ,cyrus-sasl)
2455 ("enchant" ,enchant)
2456 ("gdk-pixbuf" ,gdk-pixbuf)
2457 ("gmime" ,gmime-2.6)
2458 ("gnutls" ,gnutls)
2459 ("gpgme" ,gpgme)
2460 ("gtk+" ,gtk+)
2461 ("gtksourceview" ,gtksourceview)
2462 ("gtkspell3" ,gtkspell3)
2463 ("libcanberra" ,libcanberra)
2464 ("libesmtp" ,libesmtp)
2465 ("libnotify" ,libnotify)
2466 ("openldap" ,openldap)
2467 ("sqlite" ,sqlite)
2468 ("webkitgtk" ,webkitgtk)))
2469 (native-inputs
2470 `(("compface" ,compface)
2471 ("glib" ,glib "bin")
2472 ("intltool" ,intltool)
2473 ("pkg-config" ,pkg-config)
2474 ("yelp-tools" ,yelp-tools)))
2475 (home-page "https://pawsa.fedorapeople.org/balsa")
2476 (synopsis "E-mail client for GNOME")
2477 (description "Balsa is a highly configurable and robust mail client for
2478the GNOME desktop. It supports both POP3 and IMAP servers as well as the
2479mbox, maildir and mh local mailbox formats. Balsa also supports SMTP and/or
2480the use of a local MTA such as Sendmail.")
2481 (license gpl3+)))
2482
2483(define-public afew
2484 (package
2485 (name "afew")
2486 (version "1.2.0")
2487 (source
2488 (origin
2489 (method url-fetch)
2490 (uri (pypi-uri "afew" version))
2491 (sha256
2492 (base32
2493 "121w7bd53xyibllxxbfykjj76n81kn1vgjqd22izyh67y8qyyk5r"))))
2494 (build-system python-build-system)
2495 (inputs
2496 `(("python-chardet" ,python-chardet)
2497 ("python-notmuch" ,python-notmuch)))
2498 (native-inputs
2499 `(("python-setuptools-scm" ,python-setuptools-scm)))
2500 (home-page "https://github.com/afewmail/afew")
2501 (synopsis "Initial tagging script for notmuch mail")
2502 (description "afew is an initial tagging script for notmuch mail. It
2503provides automatic tagging each time new mail is registered with notmuch. It
2504can add tags based on email headers or Maildir folders and can handle spam and
2505killed threads.")
2506 (license isc)))
2507
2508(define-public pan
2509 (package
2510 (name "pan")
2511 (version "0.145")
2512 (source
2513 (origin
2514 (method url-fetch)
2515 (uri (string-append "http://pan.rebelbase.com/download/releases/"
2516 version "/source/" name "-" version ".tar.bz2"))
2517 (sha256
2518 (base32
2519 "1b4wamv33hprghcjk903bpvnd233yxyrm18qnh13alc8h1553nk8"))))
2520 (arguments
2521 `(#:configure-flags '("--with-gtk3" "--with-gtkspell" "--with-gnutls"
2522 "--enable-libnotify" "--enable-manual"
2523 "--enable-gkr")
2524 #:phases
2525 (modify-phases %standard-phases
2526 (add-before 'configure 'patch-gpg2
2527 (lambda* (#:key inputs #:allow-other-keys)
2528 (substitute* "pan/usenet-utils/gpg.cc"
2529 (("\"gpg2\"") (string-append "\""
2530 (assoc-ref inputs "gnupg")
2531 "/bin/gpg\"")))
2532 #t)))))
2533 (inputs
2534 `(("gmime" ,gmime-2.6)
2535 ("gnupg" ,gnupg)
2536 ("gnutls" ,gnutls)
2537 ("gtk+" ,gtk+)
2538 ("gtkspell3" ,gtkspell3)
2539 ("libnotify" ,libnotify)
2540 ("libsecret" ,libsecret)
2541 ("libxml2" ,libxml2)
2542 ("zlib" ,zlib)))
2543 (native-inputs
2544 `(("gettext-minimal" ,gettext-minimal)
2545 ("itstool" ,itstool)
2546 ("pkg-config" ,pkg-config)))
2547 (build-system gnu-build-system)
2548 (home-page "http://pan.rebelbase.com/")
2549 (synopsis "Pan newsreader")
2550 (description "@code{pan} is a Usenet newsreader that's good at both text
2551and binaries. It supports offline reading, scoring and killfiles, yEnc, NZB,
2552PGP handling, multiple servers, and secure connections.")
2553 ;; License of the docs: fdl-1.1; Others: gpl2.
2554 (license (list fdl1.1+ gpl2))))
2555
2556(define-public imapfilter
2557 (package
2558 (name "imapfilter")
2559 (version "2.6.11")
2560 (source
2561 (origin
2562 (method url-fetch)
2563 (uri
2564 (string-append "https://github.com/lefcha/imapfilter/archive/"
2565 "v" version ".tar.gz"))
2566 (file-name (string-append name "-" version ".tar.gz"))
2567 (sha256
2568 (base32
2569 "1yslvwr3w5fnl06gfrp0lim8zdlasx3cvgd2fsqi0695xnb9bsms"))))
2570 (build-system gnu-build-system)
2571 (arguments
2572 `(#:tests? #f
2573 #:make-flags
2574 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2575 "CC=gcc")
2576 #:phases
2577 (modify-phases %standard-phases
2578 (delete 'configure)
2579 (add-after 'unpack 'fix-include-path
2580 (lambda* (#:key inputs #:allow-other-keys)
2581 (let ((pcre (assoc-ref inputs "pcre")))
2582 (substitute* "src/Makefile"
2583 (("INCDIRS =")
2584 (string-append "INCDIRS ="
2585 "-I" pcre "/include")))
2586 #t))))))
2587 (native-inputs
2588 `(("lua" ,lua)
2589 ("pcre" ,pcre)
2590 ("openssl" ,openssl)))
2591 (home-page "https://github.com/lefcha/imapfilter")
2592 (synopsis "IMAP mail filtering utility")
2593 (description "IMAPFilter is a mail filtering utility. It connects
2594to remote mail servers using IMAP, sends searching queries to the server and
2595processes mailboxes based on the results. It can be used to delete, copy,
2596move, flag, etc. messages residing in mailboxes at the same or different mail
2597servers. The 4rev1 and 4 versions of IMAP are supported.")
2598 (license license:expat)))
2599
2600(define-public urlscan
2601 (package
2602 (name "urlscan")
2603 (version "0.9.0")
2604 (source
2605 (origin
2606 (method url-fetch)
2607 (uri (pypi-uri "urlscan" version))
2608 (sha256
2609 (base32
2610 "133f28bisr4xj0nihpwpil8dyadss62mp8qgqdyzd676hg9xjfyc"))))
2611 (build-system python-build-system)
2612 (propagated-inputs
2613 `(("python-urwid" ,python-urwid)))
2614 (home-page "https://github.com/firecat53/urlscan")
2615 (synopsis "View/select the URLs in an email message or file")
2616 (description
2617 "Urlscan is a small program that is designed to integrate with the
2618@code{mutt} mailreader to allow you to easily launch a Web browser for URLs
2619contained in email messages. It parses an email message or file and scans it
2620for URLs and email addresses. It then displays the URLs and their context
2621within the message, and allows you to choose one or more URLs to send to your
2622Web browser. Alternatively, it send a list of all URLs to stdout. It is a
2623replacement for the @code{urlview} program.")
2624 (license gpl2)))