gnu: mpop: Update to 1.4.9.
[jackhill/guix/guix.git] / gnu / packages / mail.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 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, 2019 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, 2018 Eric Bavier <bavier@member.fsf.org>
10 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
11 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 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 Nikita <nikita@n0.is>
19 ;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
20 ;;; Copyright © 2016, 2017, 2018, 2019 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, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
26 ;;; Copyright © 2017, 2018, 2020 Rene Saavedra <pacoon@protonmail.com>
27 ;;; Copyright © 2018, 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com>
28 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
29 ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
30 ;;; Copyright © 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
31 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
32 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
33 ;;; Copyright © 2020 Justus Winter <justus@sequoia-pgp.org>
34 ;;; Copyright © 2020 Eric Brown <ecbrown@ericcbrown.com>
35 ;;;
36 ;;; This file is part of GNU Guix.
37 ;;;
38 ;;; GNU Guix is free software; you can redistribute it and/or modify it
39 ;;; under the terms of the GNU General Public License as published by
40 ;;; the Free Software Foundation; either version 3 of the License, or (at
41 ;;; your option) any later version.
42 ;;;
43 ;;; GNU Guix is distributed in the hope that it will be useful, but
44 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
45 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46 ;;; GNU General Public License for more details.
47 ;;;
48 ;;; You should have received a copy of the GNU General Public License
49 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
50
51 (define-module (gnu packages mail)
52 #:use-module (gnu packages)
53 #:use-module (gnu packages admin)
54 #:use-module (gnu packages aspell)
55 #:use-module (gnu packages autotools)
56 #:use-module (gnu packages backup)
57 #:use-module (gnu packages base)
58 #:use-module (gnu packages bash)
59 #:use-module (gnu packages bison)
60 #:use-module (gnu packages calendar)
61 #:use-module (gnu packages check)
62 #:use-module (gnu packages compression)
63 #:use-module (gnu packages crypto)
64 #:use-module (gnu packages curl)
65 #:use-module (gnu packages cyrus-sasl)
66 #:use-module (gnu packages databases)
67 #:use-module (gnu packages dbm)
68 #:use-module (gnu packages dejagnu)
69 #:use-module (gnu packages django)
70 #:use-module (gnu packages dns)
71 #:use-module (gnu packages docbook)
72 #:use-module (gnu packages documentation)
73 #:use-module (gnu packages emacs)
74 #:use-module (gnu packages enchant)
75 #:use-module (gnu packages gdb)
76 #:use-module (gnu packages gettext)
77 #:use-module (gnu packages ghostscript)
78 #:use-module (gnu packages glib)
79 #:use-module (gnu packages gnome)
80 #:use-module (gnu packages gnupg)
81 #:use-module (gnu packages groff)
82 #:use-module (gnu packages gsasl)
83 #:use-module (gnu packages gtk)
84 #:use-module (gnu packages guile)
85 #:use-module (gnu packages guile-xyz)
86 #:use-module (gnu packages flex)
87 #:use-module (gnu packages haskell-xyz)
88 #:use-module (gnu packages kerberos)
89 #:use-module (gnu packages libcanberra)
90 #:use-module (gnu packages libevent)
91 #:use-module (gnu packages libidn)
92 #:use-module (gnu packages libunistring)
93 #:use-module (gnu packages libunwind)
94 #:use-module (gnu packages linux)
95 #:use-module (gnu packages lsof)
96 #:use-module (gnu packages lua)
97 #:use-module (gnu packages m4)
98 #:use-module (gnu packages man)
99 #:use-module (gnu packages ncurses)
100 #:use-module (gnu packages networking)
101 #:use-module (gnu packages openldap)
102 #:use-module (gnu packages onc-rpc)
103 #:use-module (gnu packages pcre)
104 #:use-module (gnu packages perl)
105 #:use-module (gnu packages perl-check)
106 #:use-module (gnu packages perl-web)
107 #:use-module (gnu packages pkg-config)
108 #:use-module (gnu packages python)
109 #:use-module (gnu packages python-web)
110 #:use-module (gnu packages python-xyz)
111 #:use-module (gnu packages readline)
112 #:use-module (gnu packages ruby)
113 #:use-module (gnu packages search)
114 #:use-module (gnu packages serialization)
115 #:use-module (gnu packages samba)
116 #:use-module (gnu packages screen)
117 #:use-module (gnu packages sphinx)
118 #:use-module (gnu packages sqlite)
119 #:use-module (gnu packages tcl)
120 #:use-module (gnu packages texinfo)
121 #:use-module (gnu packages time)
122 #:use-module (gnu packages tls)
123 #:use-module (gnu packages version-control)
124 #:use-module (gnu packages w3m)
125 #:use-module (gnu packages web)
126 #:use-module (gnu packages webkit)
127 #:use-module (gnu packages xdisorg)
128 #:use-module (gnu packages xorg)
129 #:use-module (gnu packages xml)
130 #:use-module ((guix licenses)
131 #:select (fdl1.1+
132 agpl3+
133 gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+
134 non-copyleft (expat . license:expat) bsd-3
135 public-domain bsd-4 isc (openssl . license:openssl)
136 bsd-2 x11-style agpl3 asl2.0 perl-license))
137 #:use-module (guix packages)
138 #:use-module (guix download)
139 #:use-module (guix git-download)
140 #:use-module (guix utils)
141 #:use-module (guix build-system gnu)
142 #:use-module (guix build-system guile)
143 #:use-module (guix build-system perl)
144 #:use-module (guix build-system python)
145 #:use-module (guix build-system trivial)
146 #:use-module (srfi srfi-1)
147 #:use-module (ice-9 match))
148
149 (define-public mailutils
150 (package
151 (name "mailutils")
152 (version "3.9")
153 (source (origin
154 (method url-fetch)
155 (uri (string-append "mirror://gnu/mailutils/mailutils-"
156 version ".tar.xz"))
157 (sha256
158 (base32
159 "1g1xf2lal04nsnf1iym9n9n0wxjpqbcr9nysxpm98v4pniinqwsz"))))
160 (build-system gnu-build-system)
161 (arguments
162 `(#:phases
163 (modify-phases %standard-phases
164 (add-before 'check 'prepare-test-suite
165 (lambda _
166 ;; Use the right file name for `cat'.
167 (substitute* "testsuite/lib/mailutils.exp"
168 (("/bin/cat")
169 (which "cat")))
170
171 ;; Tests try to invoke 'mda' such that it looks up the
172 ;; 'root' user, which does not exist in the build
173 ;; environment.
174 (substitute* '("mda/mda/tests/testsuite"
175 "mda/lmtpd/tests/testsuite")
176 (("root <") "nobody <")
177 (("spool/root") "spool/nobody")
178 (("root@localhost") "nobody@localhost"))
179
180 ;; The 'pipeact.at' tests generate a shell script; make
181 ;; sure it uses the right shell.
182 (substitute* '("sieve/tests/testsuite"
183 "mh/tests/testsuite")
184 (("#! /bin/sh")
185 (string-append "#!" (which "sh"))))
186
187 (substitute* "mh/tests/testsuite"
188 (("moreproc: /bin/cat")
189 (string-append "moreproc: " (which "cat"))))
190
191 ;; XXX: The comsatd tests rely on being able to open
192 ;; /dev/tty, but that gives ENODEV in the build
193 ;; environment. Thus, ignore test failures here.
194 (substitute* "comsat/tests/Makefile.in"
195 (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
196 (string-append "-" all)))
197
198 ;; 'frm' tests expect write access to $HOME.
199 (setenv "HOME" (getcwd))
200
201 ;; Avoid the message "I'm going to create the standard MH path
202 ;; for you", which would lead to one test failure (when diffing
203 ;; stdout of 'fmtcheck'.)
204 (call-with-output-file ".mh_profile"
205 (lambda (port)
206 (format port "Path: ~a/Mail-for-tests~%"
207 (getcwd))))
208
209 #t)))
210 ;; TODO: Add `--with-sql'.
211 #:configure-flags
212 (list "--sysconfdir=/etc"
213
214 ;; Add "/X.Y" to the installation directory.
215 (string-append "--with-guile-site-dir="
216 (assoc-ref %outputs "out")
217 "/share/guile/site/"
218 ,(match (assoc "guile"
219 (package-inputs this-package))
220 (("guile" guile)
221 (version-major+minor
222 (package-version guile))))))
223
224 #:parallel-tests? #f))
225 (native-inputs
226 `(("perl" ,perl) ;for 'gylwrap'
227 ("texinfo" ,texinfo)
228 ("dejagnu" ,dejagnu)))
229 (inputs
230 `(("m4" ,m4)
231 ("guile" ,guile-3.0)
232 ("gsasl" ,gsasl)
233 ("gnutls" ,gnutls)
234 ("ncurses" ,ncurses)
235 ("readline" ,readline)
236 ("linux-pam" ,linux-pam)
237 ("libltdl" ,libltdl)
238 ("gdbm" ,gdbm)
239
240 ;; Required for SEARCH CHARSET.
241 ("libiconv" ,libiconv)
242 ("libunistring" ,libunistring)))
243 (home-page "https://mailutils.org")
244 (synopsis "Utilities and library for reading and serving mail")
245 (description
246 "GNU Mailutils is a collection of programs for managing, viewing and
247 processing electronic mail. It contains both utilities and server daemons
248 and all operate in a protocol-agnostic way. The underlying libraries are
249 also available, simplifying the addition of mail capabilities to new
250 software.")
251 (license
252 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
253 (list gpl3+ lgpl3+))))
254
255 (define-public guile2.2-mailutils
256 (package
257 (inherit mailutils)
258 (name "guile2.2-mailutils")
259 (inputs
260 `(("guile" ,guile-2.2)
261 ,@(alist-delete "guile" (package-inputs mailutils))))))
262
263 (define-public guile3.0-mailutils
264 (deprecated-package "guile3.0-mailutils" mailutils))
265
266 (define-public nullmailer
267 (package
268 (name "nullmailer")
269 (version "2.2")
270 (source
271 (origin
272 (method url-fetch)
273 (uri (list
274 (string-append "https://untroubled.org/nullmailer/"
275 "nullmailer-" version ".tar.gz")
276 ;; Previous releases are moved to this subdirectory.
277 (string-append "https://untroubled.org/nullmailer/archive/"
278 "nullmailer-" version ".tar.gz")))
279 (sha256
280 (base32 "0md8cf90fl2yf3zh9njjy42a673v4j4ygyq95xg7fzkygdigm1lq"))))
281 (build-system gnu-build-system)
282 (arguments
283 `(#:configure-flags
284 (list "--enable-tls"
285 "--localstatedir=/var"
286 "--sysconfdir=/etc")
287 #:phases
288 (modify-phases %standard-phases
289 (add-before 'check 'patch-test-FHS-file-names
290 (lambda _
291 (with-directory-excursion "test"
292 (substitute* (list "functions.in"
293 "tests/send")
294 ;; Fix some shebangs later generated on the fly.
295 (("/bin/sh") (which "bash"))))
296 #t))
297 (add-before 'check 'pass-PATH-to-tests
298 ;; ‘runtest’ launches each test through ‘env -’, clearing $PATH. The
299 ;; tests then source ‘functions’, which first demands a working $PATH
300 ;; only to clobber it later. Pass our $PATH to the test environment
301 ;; and don't touch it after that.
302 (lambda _
303 (with-directory-excursion "test"
304 (substitute* "runtests"
305 (("env - bash")
306 (string-append "env - PATH=\"" (getenv "PATH") "\" bash")))
307 (substitute* "functions.in"
308 (("export PATH=.*") "")))
309 #t))
310 (add-before 'check 'delete-failing-tests
311 (lambda _
312 (with-directory-excursion "test/tests"
313 (for-each delete-file
314 (list
315 ;; XXX ‘nullmailer-inject: nullmailer-queue failed: 15’
316 "inject/queue"
317 ;; XXX These require the not-yet-packaged tcpserver.
318 "protocols" "smtp-auth")))
319 #t))
320 (add-before 'install 'skip-install-data-local
321 ;; Don't attempt to install run-time files outside of the store.
322 (lambda _
323 (substitute* "Makefile"
324 ((" install-data-local") ""))
325 #t)))))
326 (native-inputs
327 ;; For tests.
328 `(("daemontools" ,daemontools))) ; for svc
329 (inputs
330 `(("gnutls" ,gnutls)))
331 (home-page "https://untroubled.org/nullmailer/")
332 (synopsis "Simple relay-only mail transfer agent")
333 (description
334 "Nullmailer is a simple replacement @acronym{MTA, Mail Transfer Agent} for
335 hosts that receive no local mail and only relay mail to a fixed set of smart
336 relays. It's useful for systems such as Web servers that must be able to send
337 email notifications, without having to run a full-blown MTA such as sendmail
338 or qmail.
339
340 Nullmailer is designed to be simple to configure, easy to extend, and secure.
341 It requires little ongoing administration. The included @command{sendmail}
342 emulator front-end should allow most (if not all) sendmail-compatible programs
343 to run without any changes.")
344 (license (list lgpl2.1+ ; lib/cli++/ (but some files lack headers)
345 gpl2+)))) ; everything else
346
347 (define-public fetchmail
348 (package
349 (name "fetchmail")
350 (version "6.4.1")
351 (source
352 (origin
353 (method url-fetch)
354 (uri (string-append "mirror://sourceforge/fetchmail/branch_"
355 (version-major+minor version) "/"
356 "fetchmail-" version ".tar.xz"))
357 (sha256
358 (base32 "1859wvfc9fq72mwp4njdiy0x89hnddlfr3nix71qqglcs0fz2crz"))))
359 (build-system gnu-build-system)
360 (inputs
361 `(("openssl" ,openssl)))
362 (arguments
363 `(#:configure-flags
364 (list (string-append "--with-ssl="
365 (assoc-ref %build-inputs "openssl")))
366 #:phases
367 (modify-phases %standard-phases
368 (add-before 'check 'create-test-environment
369 (lambda _
370 ;; Fix ‘Cannot find absolute path for user's home directory’.
371 (setenv "HOME" "/tmp")
372 #t)))))
373 (home-page "https://www.fetchmail.info/")
374 (synopsis "Remote-mail retrieval and forwarding utility")
375 (description
376 "Fetchmail is a full-featured, robust, well-documented remote-mail
377 retrieval and forwarding utility intended to be used over on-demand
378 TCP/IP links (such as SLIP or PPP connections). It supports every
379 remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
380 KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
381 and IPSEC.
382
383 Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
384 so it can then be read by normal mail user agents such as mutt, elm
385 or BSD Mail. It allows all your system MTA's filtering, forwarding, and
386 aliasing facilities to work just as they would on normal mail.")
387 (license gpl2+))) ; most files are actually public domain or x11
388
389 (define-public mutt
390 (package
391 (name "mutt")
392 (version "1.13.5")
393 (source (origin
394 (method url-fetch)
395 (uri (list
396 (string-append "https://bitbucket.org/mutt/mutt/downloads/"
397 "mutt-" version ".tar.gz")
398 (string-append "http://ftp.mutt.org/pub/mutt/mutt-"
399 version ".tar.gz")))
400 (sha256
401 (base32
402 "0lx65a44b03rbvcrz0y9syrik67fx3hvblxyyvz5l9bb7rdipmvc"))
403 (patches (search-patches "mutt-store-references.patch"))))
404 (build-system gnu-build-system)
405 (inputs
406 `(("cyrus-sasl" ,cyrus-sasl)
407 ("gdbm" ,gdbm)
408 ("gpgme" ,gpgme)
409 ("libidn2" ,libidn2)
410 ("ncurses" ,ncurses)
411 ("openssl" ,openssl)
412 ("perl" ,perl)
413 ("sqlite" ,sqlite)))
414 (arguments
415 `(#:configure-flags '("--enable-smtp"
416 "--enable-imap"
417 "--enable-pop"
418 "--enable-gpgme"
419 "--enable-hcache" ; for header caching
420 "--enable-sidebar"
421 "--enable-autocrypt"
422 "--with-ssl"
423 "--with-sasl"
424 "--with-sqlite3" ; required for Autocrypt
425 "--with-idn2" ; recommended for Autocrypt
426 ;; so that mutt does not check whether the path
427 ;; exists, which it does not in the chroot
428 "--with-mailpath=/var/mail")))
429 (home-page "http://www.mutt.org/")
430 (synopsis "Mail client")
431 (description
432 "Mutt is a small but very powerful text-based mail client for Unix
433 operating systems.")
434 (license gpl2+)))
435
436 (define-public neomutt
437 (package
438 (name "neomutt")
439 (version "20200313")
440 (source
441 (origin
442 (method git-fetch)
443 (uri (git-reference
444 (url "https://github.com/neomutt/neomutt.git")
445 (commit version)))
446 (file-name (git-file-name name version))
447 (sha256
448 (base32 "1k4k07l6h5krc3fx928qvdq3ssw9fxn95aj7k885xlckd2i1lnb5"))))
449 (build-system gnu-build-system)
450 (inputs
451 `(("cyrus-sasl" ,cyrus-sasl)
452 ("gdbm" ,gdbm)
453 ("gpgme" ,gpgme)
454 ("ncurses" ,ncurses)
455 ("gnutls" ,gnutls)
456 ("openssl" ,openssl) ; for S/MIME
457 ("perl" ,perl)
458 ("kyotocabinet" ,kyotocabinet)
459 ("libxslt" ,libxslt)
460 ("libidn2" ,libidn2)
461 ("libxml2" ,libxml2)
462 ("lmdb" ,lmdb)
463 ("notmuch" ,notmuch)))
464 (native-inputs
465 `(("automake" ,automake)
466 ("gettext-minimal" ,gettext-minimal)
467 ("pkg-config" ,pkg-config)
468 ("docbook-xsl" ,docbook-xsl)
469 ("docbook-xml" ,docbook-xml-4.2)
470 ("w3m" ,w3m)
471 ("tcl" ,tcl)))
472 (arguments
473 `(#:test-target "test"
474 #:configure-flags
475 (list "--gpgme"
476
477 ;; Database, implies header caching.
478 "--disable-tokyocabinet"
479 "--disable-qdbm"
480 "--disable-bdb"
481 "--lmdb"
482 "--kyotocabinet"
483
484 "--gdbm"
485
486 "--gnutls"
487 "--disable-ssl"
488 "--sasl"
489 (string-append "--with-sasl="
490 (assoc-ref %build-inputs "cyrus-sasl"))
491
492
493 "--smime"
494 "--notmuch"
495 "--disable-idn"
496 "--idn2"
497
498 ;; If we do not set this, neomutt wants to check
499 ;; whether the path exists, which it does not
500 ;; in the chroot.
501 "--with-mailpath=/var/mail"
502
503 "--with-ui=ncurses"
504 (string-append "--with-ncurses="
505 (assoc-ref %build-inputs "ncurses"))
506 (string-append "--prefix="
507 (assoc-ref %outputs "out"))
508 "--debug")
509 #:phases
510 (modify-phases %standard-phases
511 ;; TODO: autosetup is meant to be included in the source,
512 ;; but we should package autosetup and use our own version of it.
513 (replace 'configure
514 (lambda* (#:key outputs inputs configure-flags #:allow-other-keys)
515 (let* ((out (assoc-ref outputs "out"))
516 (flags `(,@configure-flags))
517 (bash (which "bash")))
518 (setenv "SHELL" bash)
519 (setenv "CONFIG_SHELL" bash)
520 (apply invoke bash
521 (string-append (getcwd) "/configure")
522 flags)))))))
523 (home-page "https://neomutt.org/")
524 (synopsis "Command-line mail reader based on Mutt")
525 (description
526 "NeoMutt is a command-line mail reader which is based on mutt.
527 It adds a large amount of new and improved features to mutt.")
528 (license gpl2+)))
529
530 (define-public gmime
531 (package
532 (name "gmime")
533 (version "3.2.7")
534 (source (origin
535 (method url-fetch)
536 (uri (string-append "mirror://gnome/sources/gmime/"
537 (version-major+minor version)
538 "/gmime-" version ".tar.xz"))
539 (sha256
540 (base32
541 "0i3xfc84qn1z99i70q68kbnp9rmgqrnprqb418ba52s6g9j9dsia"))))
542 (build-system gnu-build-system)
543 (native-inputs
544 `(("pkg-config" ,pkg-config)
545 ("gnupg" ,gnupg))) ; for tests only
546 (inputs `(("glib" ,glib)
547 ("gpgme" ,gpgme)
548 ("zlib" ,zlib)))
549 (arguments
550 `(#:phases
551 (modify-phases %standard-phases
552 (add-after
553 'unpack 'patch-paths-in-tests
554 (lambda _
555 ;; The test programs run several programs using 'system' with
556 ;; hard-coded paths. Here we patch them all.
557 ;; We use ISO-8859-1 here because test-iconv.c contains
558 ;; raw byte sequences in several different encodings.
559 (with-fluids ((%default-port-encoding #f))
560 (substitute* (find-files "tests" "\\.c$")
561 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
562 (let* ((base (basename prog-path))
563 (prog (which base)))
564 (string-append pre
565 (or prog (error "not found: " base)))))))
566 #t)))))
567 (home-page "http://spruce.sourceforge.net/gmime/")
568 (synopsis "MIME message parser and creator library")
569 (description
570 "GMime provides a core library and set of utilities which may be used for
571 the creation and parsing of messages using the Multipurpose Internet Mail
572 Extension (MIME).")
573 (license (list lgpl2.1+ gpl2+ gpl3+))))
574
575 ;; Some packages are not ready for GMime 3 yet.
576 (define-public gmime-2.6
577 (package
578 (inherit gmime)
579 (version "2.6.23")
580 (source (origin
581 (method url-fetch)
582 (uri (string-append "mirror://gnome/sources/gmime/"
583 (version-major+minor version)
584 "/gmime-" version ".tar.xz"))
585 (sha256
586 (base32
587 "0slzlzcr3h8jikpz5a5amqd0csqh2m40gdk910ws2hnaf5m6hjbi"))))))
588
589 (define-public bogofilter
590 (package
591 (name "bogofilter")
592 (version "1.2.5")
593 (source
594 (origin
595 (method url-fetch)
596 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-stable/"
597 "bogofilter-" version ".tar.xz"))
598 (sha256
599 (base32 "1sl9xrnnlk2sn8gmibhn8li09vnansjbxb9l1182qmgz7cvs2j1j"))))
600 (build-system gnu-build-system)
601 (arguments
602 '(#:phases
603 (modify-phases %standard-phases
604 (add-before 'check 'pre-check
605 (lambda _
606 (substitute* "src/tests/t.frame"
607 (("GREP=/bin/grep")
608 (string-append "GREP=" (which "grep") "\n")))
609 #t)))))
610 (native-inputs `(("flex" ,flex)))
611 (inputs `(("bdb" ,bdb)))
612 (home-page "https://bogofilter.sourceforge.io/")
613 (synopsis "Mail classifier based on a Bayesian filter")
614 (description
615 "Bogofilter is a mail filter that classifies mail as spam or ham
616 (non-spam) by a statistical analysis of the message's header and
617 content (body). The program is able to learn from the user's classifications
618 and corrections. It is based on a Bayesian filter.")
619 (license gpl3+)))
620
621 (define-public offlineimap
622 (package
623 (name "offlineimap")
624 (version "7.2.4")
625 (source (origin
626 (method git-fetch)
627 (uri (git-reference
628 (url "https://github.com/OfflineIMAP/offlineimap")
629 (commit (string-append "v" version))))
630 (file-name (git-file-name name version))
631 (sha256
632 (base32
633 "0h5q5nk2p2vx86w6rrbs7v70h81dpqqr68x6l3klzl3m0yj9agb1"))))
634 (build-system python-build-system)
635 (native-inputs
636 `(("asciidoc" ,asciidoc)))
637 (inputs `(("python2-pysqlite" ,python2-pysqlite)
638 ("python2-six" ,python2-six)))
639 (arguments
640 ;; The setup.py script expects python-2.
641 `(#:python ,python-2
642 ;; Tests require a modifiable IMAP account.
643 #:tests? #f
644 #:phases
645 (modify-phases %standard-phases
646 (add-after 'build 'build-documentation
647 (lambda _
648 (substitute* "docs/Makefile"
649 ;; Prevent xmllint and xsltproc from downloading a DTD file.
650 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
651 (invoke "make" "-C" "docs" "man")))
652 (add-after 'install 'install-documentation
653 (lambda* (#:key outputs #:allow-other-keys)
654 (let* ((out (assoc-ref outputs "out"))
655 (man (string-append out "/share/man")))
656 (install-file "docs/offlineimap.1" (string-append man "/man1"))
657 (install-file "docs/offlineimapui.7" (string-append man "/man7"))
658 #t))))))
659 (home-page "https://www.offlineimap.org")
660 (synopsis "Sync emails between two repositories")
661 (description
662 "OfflineImap synchronizes emails between two repositories, so that you
663 can read the same mailbox from multiple computers. It supports IMAP as REMOTE
664 repository and Maildir/IMAP as LOCAL repository.")
665 (license gpl2+)))
666
667 (define-public emacs-mew
668 (package
669 (name "emacs-mew")
670 (version "6.8")
671 (source (origin
672 (method url-fetch)
673 (uri (string-append "https://mew.org/Release/mew-"
674 version ".tar.gz"))
675 (sha256
676 (base32
677 "0ixzyq33l6j34410kqav3lwn2wx171zvqd3irvns2jvhrbww8i6g"))))
678 (native-inputs
679 `(("emacs" ,emacs)))
680 (propagated-inputs
681 `(("ruby-sqlite3" ,ruby-sqlite3) ; optional for the database of messages
682 ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
683 (build-system gnu-build-system)
684 (arguments
685 (let ((elisp-dir "/share/emacs/site-lisp")
686 (icon-dir "/share/mew"))
687 `(#:modules ((guix build gnu-build-system)
688 (guix build utils)
689 (guix build emacs-utils))
690 #:imported-modules (,@%gnu-build-system-modules
691 (guix build emacs-utils))
692 #:configure-flags
693 (list (string-append "--with-elispdir=" %output ,elisp-dir)
694 (string-append "--with-etcdir=" %output ,icon-dir))
695 #:phases
696 (modify-phases %standard-phases
697 (add-after 'configure 'patch-mew-icon-directory
698 (lambda* (#:key outputs #:allow-other-keys)
699 (emacs-substitute-sexps "mew-key.el"
700 ("(def.* mew-icon-directory"
701 `(progn
702 (add-to-list 'image-load-path 'mew-icon-directory)
703 ,(string-append (assoc-ref outputs "out") ,icon-dir))))
704 #t))
705 (add-after 'install 'generate-autoloads
706 (lambda* (#:key outputs #:allow-other-keys)
707 (emacs-generate-autoloads
708 "mew" (string-append (assoc-ref outputs "out") ,elisp-dir))
709 #t)))
710 #:tests? #f)))
711 (home-page "https://mew.org")
712 (synopsis "Emacs e-mail client")
713 (description "Mew (Messaging in the Emacs World) is a user interface
714 for text messages, multimedia messages (MIME), news articles and
715 security functionality including PGP, S/MIME, SSH, and SSL.")
716 (license bsd-3)))
717
718 (define-public mu
719 (package
720 (name "mu")
721 (version "1.4.6")
722 (source (origin
723 (method url-fetch)
724 (uri (string-append "https://github.com/djcb/mu/releases/"
725 "download/" version "/"
726 "mu-" version ".tar.xz"))
727 (sha256
728 (base32
729 "15spbplf9p8cdxqfwnv3x67451sfpna9q5n2kgqqwh2y78i7zlhc"))))
730 (build-system gnu-build-system)
731 (native-inputs
732 `(("pkg-config" ,pkg-config)
733 ("glib" ,glib "bin") ; for gtester
734 ("emacs" ,emacs-minimal)
735 ("tzdata" ,tzdata-for-tests))) ; for mu/test/test-mu-query.c
736 (inputs
737 `(("xapian" ,xapian)
738 ("guile" ,guile-2.2)
739 ("glib" ,glib)
740 ("gmime" ,gmime)))
741 (arguments
742 `(#:modules ((guix build gnu-build-system)
743 (guix build utils)
744 (guix build emacs-utils))
745 #:imported-modules (,@%gnu-build-system-modules
746 (guix build emacs-utils))
747 #:phases
748 (modify-phases %standard-phases
749 (add-after 'unpack 'patch-configure
750 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
751 ;; so our Emacs package can't find it. Setting "--with-lispdir"
752 ;; configure flag doesn't help because "mu4e" will be added to
753 ;; the lispdir anyway, so we have to modify "configure.ac".
754 (lambda _
755 (substitute* "configure"
756 (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") "")
757 ;; Use latest Guile
758 (("guile-2.0") "guile-2.2"))
759 (substitute* '("guile/Makefile.in"
760 "guile/mu/Makefile.in")
761 (("share/guile/site/2.0/") "share/guile/site/2.2/"))
762 #t))
763 (add-after 'unpack 'patch-bin-sh-in-tests
764 (lambda _
765 (substitute* '("guile/tests/test-mu-guile.c"
766 "mu/test-mu-cmd.c"
767 "mu/test-mu-cmd-cfind.c"
768 "mu/test-mu-query.c"
769 "mu/test-mu-threads.c")
770 (("/bin/sh") (which "sh")))
771 #t))
772 (add-before 'install 'fix-ffi
773 (lambda* (#:key outputs #:allow-other-keys)
774 (substitute* "guile/mu.scm"
775 (("\"libguile-mu\"")
776 (format #f "\"~a/lib/libguile-mu\""
777 (assoc-ref outputs "out"))))
778 #t))
779 (add-before 'check 'check-tz-setup
780 (lambda* (#:key inputs #:allow-other-keys)
781 ;; For mu/test/test-mu-query.c
782 (setenv "TZDIR"
783 (string-append (assoc-ref inputs "tzdata")
784 "/share/zoneinfo"))
785 #t))
786 (add-after 'install 'install-emacs-autoloads
787 (lambda* (#:key outputs #:allow-other-keys)
788 (emacs-generate-autoloads
789 "mu4e"
790 (string-append (assoc-ref outputs "out")
791 "/share/emacs/site-lisp"))
792 #t)))))
793 (home-page "https://www.djcbsoftware.nl/code/mu/")
794 (synopsis "Quickly find emails")
795 (description
796 "Mu is a tool for dealing with e-mail messages stored in the
797 Maildir-format. Mu's purpose in life is to help you to quickly find the
798 messages you need; in addition, it allows you to view messages, extract
799 attachments, create new maildirs, and so on.")
800 (license gpl3+)))
801
802 (define-public alot
803 (package
804 (name "alot")
805 (version "0.5.1")
806 (source (origin
807 (method url-fetch)
808 ;; package author intends on distributing via github rather
809 ;; than pypi:
810 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
811 (uri (string-append "https://github.com/pazz/alot/archive/"
812 version ".tar.gz"))
813 (file-name (string-append "alot-" version ".tar.gz"))
814 (sha256
815 (base32
816 "0wax30hjzmkqfml7hig1dqw1v1y63yc0cgbzl96x58b9h2ggqx3a"))))
817 (build-system python-build-system)
818 (arguments
819 `(;; python 3 is currently unsupported, more info:
820 ;; https://github.com/pazz/alot/blob/master/docs/source/faq.rst
821 #:python ,python-2))
822 (native-inputs
823 `(("python2-mock" ,python2-mock)))
824 (inputs
825 `(("python2-magic" ,python2-magic)
826 ("python2-configobj" ,python2-configobj)
827 ("python2-twisted" ,python2-twisted)
828 ("python2-urwid" ,python2-urwid)
829 ("python2-urwidtrees" ,python2-urwidtrees)
830 ("python2-pygpgme" ,python2-pygpgme)
831 ("python2-notmuch" ,python2-notmuch)))
832 (home-page "https://github.com/pazz/alot")
833 (synopsis "Command-line MUA using @code{notmuch}")
834 (description
835 "Alot is an experimental terminal mail user agent (@dfn{MUA}) based on
836 @code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
837 (license gpl3+)))
838
839 (define-public notifymuch
840 (let
841 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
842 (revision "1"))
843 (package
844 (name "notifymuch")
845 (version (string-append "0.1-" revision "." (string-take commit 7)))
846 (source
847 (origin
848 (method git-fetch)
849 (uri (git-reference
850 (url "https://github.com/kspi/notifymuch.git")
851 (commit commit)))
852 (sha256
853 (base32
854 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
855 (file-name (string-append name "-" version "-checkout"))))
856 (build-system python-build-system)
857 (inputs
858 `(("python-notmuch" ,python-notmuch)
859 ("python-pygobject" ,python-pygobject)
860 ("gobject-introspection" ,gobject-introspection)
861 ("libnotify" ,libnotify)
862 ("gtk+" ,gtk+)))
863 (arguments
864 `(#:phases
865 (modify-phases %standard-phases
866 (add-after 'install 'wrap-binary
867 (lambda* (#:key outputs #:allow-other-keys)
868 (let* ((out (assoc-ref outputs "out"))
869 (bin (string-append out "/bin/notifymuch")))
870 (wrap-program bin
871 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
872 `("GI_TYPELIB_PATH" ":" prefix
873 (,(getenv "GI_TYPELIB_PATH")
874 ,(string-append out "/lib/girepository-1.0")))))
875 #t)))))
876 (home-page "https://github.com/kspi/notifymuch")
877 (synopsis "Displays notifications for changes in the notmuch email database")
878 (description "notifymuch displays desktop notifications for messages in
879 the notmuch database. The notifications are sent using libnotify to a
880 notification daemon. The query to find messages to send a notification about
881 is configurable, and a notification for the same message will not be send
882 within a configurable period (defaults to 48 hours). To use notifymuch, run
883 @command{notifymuch} after new mail is indexed, this can be automated by
884 invoking @command{notifymuch} from the post-new hook.")
885 (license gpl3))))
886
887 (define-public notmuch
888 (package
889 (name "notmuch")
890 (version "0.29.3")
891 (source (origin
892 (method url-fetch)
893 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
894 version ".tar.xz"))
895 (sha256
896 (base32
897 "0dfwa38vgnxk9cvvpza66szjgp8lir6iz6yy0cry9593lywh9xym"))))
898 (build-system gnu-build-system)
899 (arguments
900 `(#:modules ((guix build gnu-build-system)
901 ((guix build emacs-build-system) #:prefix emacs:)
902 (guix build utils))
903 #:imported-modules (,@%gnu-build-system-modules
904 (guix build emacs-build-system)
905 (guix build emacs-utils))
906 #:make-flags
907 (list "V=1" ; verbose test output
908 "NOTMUCH_TEST_TIMEOUT=1h") ; don't fail on slow machines
909 #:phases (modify-phases %standard-phases
910 (add-after 'unpack 'patch-notmuch-lib.el
911 (lambda _
912 (substitute* "emacs/notmuch-lib.el"
913 (("/bin/sh") (which "sh")))
914 #t))
915 (replace 'configure
916 (lambda* (#:key outputs #:allow-other-keys)
917 (setenv "CC" "gcc")
918 (setenv "CONFIG_SHELL" (which "sh"))
919
920 (let* ((out (assoc-ref outputs "out"))
921 (elisp
922 (string-append out "/share/emacs/site-lisp/")))
923 (invoke "./configure"
924 (string-append "--prefix=" out)
925 (string-append "--emacslispdir=" elisp)
926 (string-append "--emacsetcdir=" elisp)))))
927 (add-before 'check 'prepare-test-environment
928 (lambda _
929 (setenv "TEST_CC" "gcc")
930 ;; Patch various inline shell invocations.
931 (substitute* (find-files "test" "\\.sh$")
932 (("/bin/sh") (which "sh")))
933 #t))
934 (add-after 'install 'make-autoloads
935 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
936 (native-inputs
937 `(("bash-completion" ,bash-completion)
938 ("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for some tests
939 ("pkg-config" ,pkg-config)
940 ("python" ,python)
941 ("python-docutils" ,python-docutils)
942 ("sphinx" ,python-sphinx)
943
944 ;; The following are required for tests only.
945 ("which" ,which)
946 ("dtach" ,dtach)
947 ("gnupg" ,gnupg)
948 ("man" ,man-db)
949 ("perl" ,perl)))
950 (inputs
951 `(("glib" ,glib)
952 ("gmime" ,gmime)
953 ("talloc" ,talloc)
954 ("xapian" ,xapian)
955 ("zlib" ,zlib)))
956 (home-page "https://notmuchmail.org/")
957 (synopsis "Thread-based email index, search, and tagging")
958 (description
959 "Notmuch is a command-line based program for indexing, searching, read-
960 ing, and tagging large collections of email messages.")
961 (license gpl3+)))
962
963 (define-public notmuch-addrlookup-c
964 (package
965 (name "notmuch-addrlookup-c")
966 (version (string-append "9"))
967 (source (origin
968 (method git-fetch)
969 (uri (git-reference
970 (url "https://github.com/aperezdc/notmuch-addrlookup-c.git")
971 (commit (string-append "v" version))))
972 (file-name (string-append name "-" version "-checkout"))
973 (sha256
974 (base32
975 "1j3zdx161i1x4w0nic14ix5i8hd501rb31daf8api0k8855sx4rc"))))
976 (build-system gnu-build-system)
977 (arguments
978 '(#:tests? #f ; no tests
979 #:make-flags (list "CC=gcc")
980 #:phases (modify-phases %standard-phases
981 (delete 'configure)
982 ;; Remove vim code completion config, it's not needed to
983 ;; build (or be patched).
984 (add-before 'patch-source-shebangs 'delete-ycm-file
985 (lambda _ (delete-file ".ycm_extra_conf.py")))
986 (replace 'install
987 (lambda* (#:key outputs #:allow-other-keys)
988 (let ((bin (string-append
989 (assoc-ref outputs "out") "/bin")))
990 (install-file "notmuch-addrlookup" bin)))))))
991 (native-inputs
992 `(("pkg-config" ,pkg-config)))
993 (inputs
994 `(("glib" ,glib)
995 ("notmuch" ,notmuch)))
996 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
997 (synopsis "Address lookup tool for Notmuch")
998 (description "This is an address lookup tool using a Notmuch database,
999 useful for email address completion.")
1000 (license license:expat)))
1001
1002 (define-public python-notmuch
1003 (package
1004 (name "python-notmuch")
1005 (version (package-version notmuch))
1006 ;; Notmuch python bindings are now unavailable on pypi. The
1007 ;; bindings are distributed via the notmuch release tarball.
1008 (source (package-source notmuch))
1009 (build-system python-build-system)
1010 (inputs `(("notmuch" ,notmuch)))
1011 (arguments
1012 `(#:tests? #f ; no "test" target
1013 #:phases
1014 (modify-phases %standard-phases
1015 ;; This python package lives in a subdirectory of the notmuch source
1016 ;; tree, so chdir into it before building.
1017 (add-after 'unpack 'enter-python-dir
1018 (lambda _ (chdir "bindings/python") #t))
1019 ;; Make sure the correct notmuch shared library gets loaded.
1020 (add-before 'build 'set-libnotmuch-file-name
1021 (lambda* (#:key inputs #:allow-other-keys)
1022 (let ((notmuch (assoc-ref inputs "notmuch")))
1023 (substitute* "notmuch/globals.py"
1024 (("libnotmuch\\.so\\.")
1025 (string-append notmuch "/lib/libnotmuch.so.")))
1026 #t))))))
1027 (home-page (package-home-page notmuch))
1028 (synopsis "Python bindings of the Notmuch mail indexing library")
1029 (description
1030 "This package provides Python bindings to use the Notmuch mail indexing
1031 and search library.")
1032 (license gpl3+)))
1033
1034 (define-public python2-notmuch
1035 (package-with-python2 python-notmuch))
1036
1037 (define-public muchsync
1038 (package
1039 (name "muchsync")
1040 (version "5")
1041 (source
1042 (origin
1043 (method url-fetch)
1044 (uri (string-append "http://www.muchsync.org/src/"
1045 "muchsync-" version ".tar.gz"))
1046 (sha256
1047 (base32 "1k2m44pj5i6vfhp9icdqs42chsp208llanc666p3d9nww8ngq2lb"))))
1048 (build-system gnu-build-system)
1049 (native-inputs
1050 `(("ghc-pandoc" ,ghc-pandoc)
1051 ("pkg-config" ,pkg-config)))
1052 (inputs
1053 `(("libcrypto" ,openssl)
1054 ("notmuch" ,notmuch)
1055 ("sqlite" ,sqlite)
1056 ("xapian" ,xapian)))
1057 (home-page "http://www.muchsync.org/")
1058 (synopsis "Synchronize notmuch mail across machines")
1059 (description
1060 "Muchsync brings Notmuch to all of your computers by synchronizing your
1061 mail messages and Notmuch tags across machines. The protocol is heavily
1062 pipelined to work efficiently over high-latency networks such as mobile
1063 broadband. Muchsync supports arbitrary pairwise synchronization among
1064 replicas. A version-vector-based algorithm allows it to exchange only the
1065 minimum information necessary to bring replicas up to date regardless of which
1066 pairs have previously synchronized.")
1067 (license gpl2+)))
1068
1069 (define-public getmail
1070 (package
1071 (name "getmail")
1072 (version "5.14")
1073 (source
1074 (origin
1075 (method url-fetch)
1076 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
1077 "getmail-" version ".tar.gz"))
1078 (sha256
1079 (base32 "1hcrd9h4g12f5gvl1djsbchcjry02ghq4icdr897s8v48pkrzagk"))))
1080 (build-system python-build-system)
1081 (arguments
1082 `(#:tests? #f ; no tests
1083 #:python ,python-2))
1084 (home-page "http://pyropus.ca/software/getmail/")
1085 (synopsis "Mail retriever")
1086 (description
1087 "A flexible, extensible mail retrieval system with support for
1088 POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
1089 arbitrary message filtering, single-user and domain-mailboxes, and many other
1090 useful features.")
1091
1092 ;; License is specified in file '__init__.py'.
1093 (license gpl2)))
1094
1095 (define-public libetpan
1096 (package
1097 (name "libetpan")
1098 (version "1.9.3")
1099 (source (origin
1100 (method git-fetch)
1101 (uri (git-reference
1102 (url "https://github.com/dinhviethoa/libetpan.git")
1103 (commit version)))
1104 (file-name (git-file-name name version))
1105 (sha256
1106 (base32 "19g4qskg71jv7sxfxsdkjmrxk9mk5kf9b6fhw06g6wvm3205n95f"))))
1107 (build-system gnu-build-system)
1108 (native-inputs `(("autoconf" ,autoconf-wrapper)
1109 ("automake" ,automake)
1110 ("libtool" ,libtool)
1111 ("pkg-config" ,pkg-config)))
1112 (propagated-inputs
1113 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
1114 ;; libraries need to be propagated.
1115 `(("cyrus-sasl" ,cyrus-sasl)
1116 ("openssl" ,openssl)))
1117 (inputs
1118 `(("curl" ,curl)
1119 ("expat" ,expat)
1120 ("zlib" ,zlib)))
1121 (arguments
1122 '(#:configure-flags
1123 '("--disable-static" "--disable-db")))
1124 (home-page "https://www.etpan.org/libetpan.html")
1125 (synopsis "Portable middleware for email access")
1126 (description
1127 "The purpose of this mail library is to provide a portable, efficient
1128 framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
1129 provides an API for C language. It's the low-level API used by MailCore and
1130 MailCore 2.")
1131 (license bsd-3)))
1132
1133 (define-public compface
1134 (package
1135 (name "compface")
1136 (version "1.5.2")
1137 (source (origin
1138 (method url-fetch)
1139 (uri (string-append "https://ftp.heanet.ie/mirrors/"
1140 "ftp.xemacs.org/aux/"
1141 "compface-" version ".tar.gz"))
1142 (sha256
1143 (base32
1144 "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
1145 (build-system gnu-build-system)
1146 (arguments
1147 `(#:tests? #f))
1148 (synopsis "Portrait image compressor")
1149 (description "This package takes your 48x48x1 portrait image and
1150 compresses it.")
1151 (home-page "https://legacy.cs.indiana.edu/ftp/faces/")
1152 (license (x11-style "file://README"))))
1153
1154 (define-public claws-mail
1155 (package
1156 (name "claws-mail")
1157 (version "3.17.5")
1158 (source (origin
1159 (method url-fetch)
1160 (uri (string-append
1161 "https://www.claws-mail.org/releases/claws-mail-" version
1162 ".tar.xz"))
1163 (sha256
1164 (base32
1165 "1gjrmdmhc7zzilrlss9yl86ybv9sra8v0qi7mkwv7d9azidx5kns"))))
1166 (build-system gnu-build-system)
1167 (native-inputs `(("pkg-config" ,pkg-config)))
1168 (inputs `(("bogofilter" ,bogofilter)
1169 ("curl" ,curl)
1170 ("dbus-glib" ,dbus-glib)
1171 ("enchant" ,enchant)
1172 ("expat" ,expat)
1173 ("ghostscript" ,ghostscript)
1174 ("hicolor-icon-theme" ,hicolor-icon-theme)
1175 ("gnupg" ,gnupg)
1176 ("gnutls" ,gnutls)
1177 ("gpgme" ,gpgme)
1178 ("gtk" ,gtk+-2)
1179 ("libarchive" ,libarchive)
1180 ("libcanberra" ,libcanberra)
1181 ("libetpan" ,libetpan)
1182 ("libical" ,libical)
1183 ("libnotify" ,libnotify)
1184 ("libsm" ,libsm)
1185 ("libxml2" ,libxml2)
1186 ("perl" ,perl)
1187 ("python-2" ,python-2)
1188 ("mime-info" ,shared-mime-info)
1189 ("startup-notification" ,startup-notification)))
1190 (arguments
1191 '(#:configure-flags
1192 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant"
1193 "--enable-ldap")
1194 #:make-flags
1195 ;; Disable updating icon cache since it's done by the profile hook.
1196 ;; Conflict with other packages in the profile would be inevitable
1197 ;; otherwise.
1198 '("gtk_update_icon_cache=true")
1199 #:phases (modify-phases %standard-phases
1200 (add-before 'build 'patch-mime
1201 (lambda* (#:key inputs #:allow-other-keys)
1202 (substitute* "src/procmime.c"
1203 (("/usr/share/mime/globs")
1204 (string-append (assoc-ref inputs "mime-info")
1205 "/share/mime/globs"))))))))
1206 (synopsis "GTK-based Email client")
1207 (description
1208 "Claws-Mail is an email client (and news reader) based on GTK+. The
1209 appearance and interface are designed to be familiar to new users coming from
1210 other popular email clients, as well as experienced users. Almost all commands
1211 are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
1212 which can add many functionalities to the base client.")
1213 (home-page "https://www.claws-mail.org/")
1214 (license gpl3+))) ; most files are actually public domain or x11
1215
1216 (define-public msmtp
1217 (package
1218 (name "msmtp")
1219 (version "1.8.10")
1220 (source
1221 (origin
1222 (method url-fetch)
1223 (uri (string-append "https://marlam.de/msmtp/releases/"
1224 "/msmtp-" version ".tar.xz"))
1225 (sha256
1226 (base32 "041g921rdjiv8bapp61gp4rylq8cckfkcwzyh8bs7xwxs4wpzfna"))))
1227 (build-system gnu-build-system)
1228 (inputs
1229 `(("libsecret" ,libsecret)
1230 ("gnutls" ,gnutls)
1231 ("zlib" ,zlib)
1232 ("gsasl" ,gsasl)))
1233 (native-inputs
1234 `(("pkg-config" ,pkg-config)))
1235 (home-page "https://marlam.de/msmtp/")
1236 (arguments
1237 `(#:configure-flags (list "--with-libgsasl"
1238 "--with-libidn"
1239 "--with-tls=gnutls")
1240 #:phases
1241 (modify-phases %standard-phases
1242 (add-after 'install 'install-additional-files
1243 (lambda* (#:key outputs #:allow-other-keys)
1244 (let* ((out (assoc-ref outputs "out"))
1245 (bin (string-append out "/bin"))
1246 (doc (string-append out "/share/doc/msmtp"))
1247 (msmtpq "scripts/msmtpq")
1248 (vimfiles (string-append out "/share/vim/vimfiles/plugin")))
1249 (install-file (string-append msmtpq "/msmtpq") bin)
1250 (install-file (string-append msmtpq "/msmtp-queue") bin)
1251 (install-file (string-append msmtpq "/README.msmtpq") doc)
1252 (install-file "scripts/vim/msmtp.vim" vimfiles)
1253 ;; Don't rely on netcat being in the PATH to test for a
1254 ;; connection, instead try tp ing debian.org.
1255 (substitute* (string-append bin "/msmtpq")
1256 (("EMAIL_CONN_TEST=n") "EMAIL_CONN_TEST=p"))
1257 #t))))))
1258 (synopsis
1259 "Simple and easy to use SMTP client with decent sendmail compatibility")
1260 (description
1261 "msmtp is an SMTP client. In the default mode, it transmits a mail to
1262 an SMTP server (for example at a free mail provider) which takes care of further
1263 delivery.")
1264 (license gpl3+)))
1265
1266 (define-public exim
1267 (package
1268 (name "exim")
1269 (version "4.93.0.4")
1270 (source
1271 (origin
1272 (method url-fetch)
1273 (uri (let ((file-name (string-append "exim-" version ".tar.xz")))
1274 (list (string-append "https://ftp.exim.org/pub/exim/exim4/"
1275 file-name)
1276 ;; ‘Fix’ releases (exim-x.y.z.f) are kept separately.
1277 (string-append "https://ftp.exim.org/pub/exim/exim4/fixes/"
1278 file-name)
1279 ;; After a new non-fix release, the old one is moved here.
1280 (string-append "https://ftp.exim.org/pub/exim/exim4/old/"
1281 file-name))))
1282 (sha256
1283 (base32 "01g4sfycv13glnmfrapwhjbdw6z1z7w5bwjldxjmglwfw5p3czak"))))
1284 (build-system gnu-build-system)
1285 (inputs
1286 `(("bdb" ,bdb-5.3) ; ‘#error Version 6 and later BDB API is not supported’
1287 ("gnutls" ,gnutls/dane)
1288 ("gzip" ,gzip)
1289 ("bzip2" ,bzip2)
1290 ("xz" ,xz)
1291 ("perl" ,perl)
1292 ("libnsl" ,libnsl)
1293 ("libxt" ,libxt)
1294 ("libxaw" ,libxaw)))
1295 (native-inputs
1296 `(("pcre" ,pcre "bin")
1297 ("perl" ,perl)
1298 ("pkg-config" ,pkg-config)))
1299 (arguments
1300 '(#:phases
1301 (modify-phases %standard-phases
1302 (replace 'configure
1303 ;; We'd use #:make-flags but the top-level Makefile calls others
1304 ;; recursively, so just set all variables this way.
1305 (lambda* (#:key outputs inputs #:allow-other-keys)
1306 (substitute* '("Makefile" "OS/Makefile-Default")
1307 (("(RM_COMMAND=).*" all var)
1308 (string-append var "rm\n")))
1309 (copy-file "src/EDITME" "Local/Makefile")
1310 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
1311 (let ((out (assoc-ref outputs "out"))
1312 (gzip (assoc-ref inputs "gzip"))
1313 (bzip2 (assoc-ref inputs "bzip2"))
1314 (xz (assoc-ref inputs "xz")))
1315 (substitute* '("Local/Makefile")
1316 (("(BIN_DIRECTORY=).*" all var)
1317 (string-append var out "/bin\n"))
1318 (("(CONFIGURE_FILE=).*" all var)
1319 (string-append var out "/etc/exim.conf\n"))
1320 (("(EXIM_USER=).*" all var)
1321 (string-append var "nobody\n"))
1322 (("(FIXED_NEVER_USERS=).*" all var)
1323 (string-append var "\n")) ; XXX no root in build environment
1324 (("(COMPRESS_COMMAND=).*" all var)
1325 (string-append var gzip "/bin/gzip\n"))
1326 (("(ZCAT_COMMAND=).*" all var)
1327 (string-append var gzip "/bin/zcat\n"))
1328 (("# (USE_GNUTLS(|_PC)=.*)" all line)
1329 (string-append line "\n")))
1330 ;; This file has hard-coded relative file names for tools despite
1331 ;; the zcat configuration above.
1332 (substitute* '("src/exigrep.src")
1333 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
1334 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
1335 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
1336 (("'lzma'") (string-append "'" xz "/bin/lzma'"))))
1337 #t))
1338 (add-before 'build 'fix-sh-paths
1339 (lambda* (#:key inputs #:allow-other-keys)
1340 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
1341 (("SHELL=/bin/sh") "SHELL=sh"))
1342 (substitute* '("scripts/Configure-config.h")
1343 (("\\| /bin/sh") "| sh"))
1344 (let ((bash (assoc-ref inputs "bash")))
1345 (substitute* '("scripts/Configure-eximon")
1346 (("#!/bin/sh") (string-append "#!" bash "/bin/sh"))))
1347 #t))
1348 (add-before 'build 'build-reproducibly
1349 (lambda _
1350 ;; The ‘compilation number’ is incremented for every build from the
1351 ;; same source tree. It appears to vary over different (parallel?)
1352 ;; builds. Make it a ‘constant number’ instead.
1353 (substitute* "src/version.c"
1354 (("#include \"cnumber.h\"") "1")))))
1355 #:make-flags
1356 (list "CC=gcc"
1357 "INSTALL_ARG=-no_chown")
1358 ;; No 'check' target. There is a test suite in test/, which assumes that
1359 ;; certain build options were (not) used and that it can freely ‘sudo’.
1360 #:tests? #f))
1361 (home-page "https://www.exim.org/")
1362 (synopsis
1363 "Message Transfer Agent (MTA) developed at the University of Cambridge")
1364 (description
1365 "Exim is a message transfer agent (MTA) developed at the University of
1366 Cambridge for use on Unix systems connected to the Internet. In style it is
1367 similar to Smail 3, but its facilities are more general. There is a great
1368 deal of flexibility in the way mail can be routed, and there are extensive
1369 facilities for checking incoming mail.")
1370 (license gpl2+)))
1371
1372 (define-public dovecot
1373 (package
1374 (name "dovecot")
1375 (version "2.3.10.1")
1376 (source
1377 (origin
1378 (method url-fetch)
1379 (uri (string-append "https://www.dovecot.org/releases/"
1380 (version-major+minor version) "/"
1381 "dovecot-" version ".tar.gz"))
1382 (sha256
1383 (base32 "035idr2j81s5mngnhd58rih79dhwwak7q01mqbx3rcmi4cpychk6"))))
1384 (build-system gnu-build-system)
1385 (native-inputs
1386 `(("pkg-config" ,pkg-config)))
1387 (inputs
1388 `(("bzip2" ,bzip2)
1389 ("libsodium" ,libsodium) ; extra password algorithms
1390 ;; FIXME: The 'test-backtrace' tests fail on arm when using glibc's
1391 ;; backtrace_symbol() function so fallback to using libunwind.
1392 ,@(if (target-arm?)
1393 `(("libunwind" ,libunwind))
1394 '())
1395 ("linux-pam" ,linux-pam)
1396 ("lz4" ,lz4)
1397 ("openssl" ,openssl)
1398 ("sqlite" ,sqlite)
1399 ("zlib" ,zlib)))
1400 (arguments
1401 `(#:configure-flags '("--sysconfdir=/etc"
1402 "--localstatedir=/var"
1403 "--with-sqlite") ; not auto-detected
1404 #:phases
1405 (modify-phases %standard-phases
1406 (add-after 'unpack 'patch-file-names
1407 (lambda _
1408 (substitute* "src/lib-program-client/test-program-client-local.c"
1409 (("(/bin/| )cat") (which "cat"))
1410 (("/bin/echo") (which "echo"))
1411 (("/bin/false") (which "false"))
1412 (("/bin/sh") (which "bash"))
1413 (("head") (which "head"))
1414 (("sleep") (which "sleep")))
1415 (substitute* (list "src/lib-smtp/test-bin/sendmail-exit-1.sh"
1416 "src/lib-smtp/test-bin/sendmail-success.sh")
1417 (("cat") (which "cat")))
1418 #t))
1419 (replace 'install
1420 (lambda* (#:key make-flags #:allow-other-keys)
1421 ;; Simple hack to avoid installing a trivial README in /etc.
1422 (apply invoke "make" "install" "sysconfdir=/tmp/bogus"
1423 make-flags))))))
1424 (home-page "https://www.dovecot.org")
1425 (synopsis "Secure POP3/IMAP server")
1426 (description
1427 "Dovecot is a mail server whose major goals are security and reliability.
1428 It supports mbox/Maildir and its own dbox/mdbox formats.")
1429 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
1430 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
1431 ;; Unicode, Inc. License Agreement for Data Files and Software.
1432 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
1433
1434 (define-public dovecot-trees
1435 (package
1436 (name "dovecot-trees")
1437 (version "2.1.0")
1438 (source
1439 (origin
1440 (method url-fetch)
1441 (uri (string-append "https://0xacab.org/riseuplabs/trees/repository/"
1442 "archive.tar.gz?ref=v" version))
1443 (file-name (string-append name "-" version ".tar.gz"))
1444 (sha256
1445 (base32
1446 "0rkk10b1bsjz979sc864vpgcdchy7yxwmyv4ik50lar1h6awdnrf"))
1447 (patches
1448 (search-patches "dovecot-trees-support-dovecot-2.3.patch"))))
1449 (build-system gnu-build-system)
1450 (native-inputs
1451 `(("automake" ,automake)
1452 ("autoconf" ,autoconf)
1453 ("libtool" ,libtool)
1454 ("dovecot" ,dovecot)
1455 ("pkg-config" ,pkg-config)))
1456 (inputs
1457 `(("libsodium" ,libsodium)))
1458 (arguments
1459 `(#:tests? #f ;No tests exist.
1460 #:configure-flags (list (string-append "--with-dovecot="
1461 (assoc-ref %build-inputs "dovecot")
1462 "/lib/dovecot"))))
1463 (home-page "https://0xacab.org/riseuplabs/trees")
1464 (synopsis "NaCL-based Dovecot email storage encryption plugin")
1465 (description
1466 "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
1467 Dovecot encryption plugin. This plugin adds individually encrypted mail
1468 storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
1469 which uses OpenSSL and RSA keypairs. TREES works in a similar way, but uses
1470 the Sodium crypto library (based on NaCL).
1471
1472 How it works:
1473 @enumerate
1474 @item On IMAP log in, the user's cleartext password is passed to the plugin.
1475 @item The plugin creates an argon2 digest from the password.
1476 @item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
1477 @item Inside the secretbox is stored a Curve25519 private key.
1478 @item The Curve25519 private key is used to decrypt each individual message,
1479 using libsodium sealed boxes.
1480 @item New mail is encrypted as it arrives using the Curve25519 public key.
1481 @end enumerate\n")
1482 (license agpl3)))
1483
1484 (define-public dovecot-libsodium-plugin
1485 (let ((commit "044de73c01c35385df0105f6b387bec5d5317ce7")
1486 (revision "1"))
1487 (package
1488 (name "dovecot-libsodium-plugin")
1489 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
1490 (source
1491 (origin
1492 (method git-fetch)
1493 (uri (git-reference
1494 (url "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1495 (commit commit)))
1496 (file-name (string-append name "-" version "-checkout"))
1497 (sha256
1498 (base32
1499 "13h07l7xy713zchnj2p9fhvq7fdl4zy1ai94li3ygkqjjj8hrgas"))))
1500 (build-system gnu-build-system)
1501 (native-inputs
1502 `(("automake" ,automake)
1503 ("autoconf" ,autoconf)
1504 ("libtool" ,libtool)
1505 ("dovecot" ,dovecot)
1506 ("pkg-config" ,pkg-config)))
1507 (inputs
1508 `(("libsodium" ,libsodium)))
1509 (arguments
1510 `(#:tests? #f ;No tests exist.
1511 #:configure-flags (list (string-append "--with-dovecot="
1512 (assoc-ref %build-inputs "dovecot")
1513 "/lib/dovecot"))))
1514 (home-page "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1515 (synopsis "Libsodium password hashing schemes plugin for Dovecot")
1516 (description
1517 "@code{dovecot-libsodium-plugin} provides a libsodium password
1518 hashing scheme (such as scrypt) plug-in for @code{Dovecot}.")
1519 (license gpl3+))))
1520
1521 (define-public isync
1522 (package
1523 (name "isync")
1524 (version "1.3.1")
1525 (source
1526 (origin
1527 (method url-fetch)
1528 (uri (string-append "mirror://sourceforge/isync/isync/"
1529 version "/isync-" version ".tar.gz"))
1530 (sha256 (base32
1531 "1sphd30jplii58y2zmw365bckm6pszmapcy905zhjll1sm1ldjv8"))))
1532 (build-system gnu-build-system)
1533 (native-inputs
1534 `(("perl" ,perl)))
1535 (inputs
1536 `(("bdb" ,bdb)
1537 ("cyrus-sasl" ,cyrus-sasl)
1538 ("openssl" ,openssl-1.0)
1539 ("zlib" ,zlib)))
1540 (home-page "http://isync.sourceforge.net/")
1541 (synopsis "Mailbox synchronization program")
1542 (description
1543 "isync/mbsync is a command-line tool for two-way synchronization of
1544 mailboxes. Currently Maildir and IMAP are supported types.")
1545 (license gpl2+)))
1546
1547 (define-public perl-email-abstract
1548 (package
1549 (name "perl-email-abstract")
1550 (version "3.008")
1551 (source
1552 (origin
1553 (method url-fetch)
1554 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1555 "Email-Abstract-" version ".tar.gz"))
1556 (sha256
1557 (base32
1558 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
1559 (build-system perl-build-system)
1560 (propagated-inputs
1561 `(("perl-email-simple" ,perl-email-simple)
1562 ("perl-module-pluggable" ,perl-module-pluggable)
1563 ("perl-mro-compat" ,perl-mro-compat)))
1564 (home-page "https://metacpan.org/release/Email-Abstract")
1565 (synopsis "Interface to mail representations")
1566 (description "Email::Abstract provides module writers with the ability to
1567 write simple, representation-independent mail handling code.")
1568 (license perl-license)))
1569
1570 (define-public perl-email-address
1571 (package
1572 (name "perl-email-address")
1573 (version "1.912")
1574 (source
1575 (origin
1576 (method url-fetch)
1577 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1578 "Email-Address-" version ".tar.gz"))
1579 (sha256
1580 (base32 "1vzr0vx4zsw4zbc9xdffc31wnkc1raqmyfiyws06fbyck197i8qg"))))
1581 (build-system perl-build-system)
1582 (home-page "https://metacpan.org/release/Email-Address")
1583 (synopsis "Email address parsing and creation")
1584 (description "Email::Address implements a regex-based RFC 2822 parser that
1585 locates email addresses in strings and returns a list of Email::Address
1586 objects found. Alternatively you may construct objects manually.")
1587 (license perl-license)))
1588
1589 (define-public perl-email-address-xs
1590 (package
1591 (name "perl-email-address-xs")
1592 (version "1.04")
1593 (source
1594 (origin
1595 (method url-fetch)
1596 (uri (string-append "mirror://cpan/authors/id/P/PA/PALI/"
1597 "Email-Address-XS-" version ".tar.gz"))
1598 (sha256
1599 (base32
1600 "0gjrrl81z3sfwavgx5kwjd87gj44mlnbbqsm3dgdv1xllw26spwr"))))
1601 (build-system perl-build-system)
1602 (home-page "https://metacpan.org/release/Email-Address-XS")
1603 (synopsis "Parse and format RFC 5322 email addresses and groups")
1604 (description
1605 "Email::Address::XS implements RFC 5322 parser and formatter of email
1606 addresses and groups. Unlike Email::Address, this module does not use regular
1607 expressions for parsing but instead is implemented in XS and uses shared code
1608 from Dovecot IMAP server.")
1609 (license perl-license)))
1610
1611 (define-public perl-email-date-format
1612 (package
1613 (name "perl-email-date-format")
1614 (version "1.005")
1615 (source
1616 (origin
1617 (method url-fetch)
1618 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1619 "Email-Date-Format-" version ".tar.gz"))
1620 (sha256
1621 (base32
1622 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
1623 (build-system perl-build-system)
1624 (home-page "https://metacpan.org/release/Email-Date-Format")
1625 (synopsis "Produce RFC 2822 date strings")
1626 (description "Email::Date::Format provides a means for generating an RFC
1627 2822 compliant datetime string.")
1628 (license perl-license)))
1629
1630 (define-public perl-email-messageid
1631 (package
1632 (name "perl-email-messageid")
1633 (version "1.406")
1634 (source
1635 (origin
1636 (method url-fetch)
1637 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1638 "Email-MessageID-" version ".tar.gz"))
1639 (sha256
1640 (base32
1641 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
1642 (build-system perl-build-system)
1643 (home-page "https://metacpan.org/release/Email-MessageID")
1644 (synopsis "Generate world unique message-ids")
1645 (description "Email::MessageID generates recommended message-ids to
1646 identify a message uniquely.")
1647 (license perl-license)))
1648
1649 (define-public perl-email-mime
1650 (package
1651 (name "perl-email-mime")
1652 (version "1.946")
1653 (source
1654 (origin
1655 (method url-fetch)
1656 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1657 "Email-MIME-" version ".tar.gz"))
1658 (sha256
1659 (base32
1660 "0z1k3i0lzp2k421gc8f3wq0jbqflkbw2xqd2k7n7pmv56417kvk8"))))
1661 (build-system perl-build-system)
1662 (propagated-inputs
1663 `(("perl-email-address" ,perl-email-address)
1664 ("perl-email-messageid" ,perl-email-messageid)
1665 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1666 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1667 ("perl-email-simple" ,perl-email-simple)
1668 ("perl-mime-types" ,perl-mime-types)
1669 ("perl-module-runtime" ,perl-module-runtime)))
1670 (home-page "https://metacpan.org/release/Email-MIME")
1671 (synopsis "MIME message handling")
1672 (description "Email::MIME is an extension of the Email::Simple module, to
1673 handle MIME encoded messages. It takes a message as a string, splits it up
1674 into its constituent parts, and allows you access to various parts of the
1675 message. Headers are decoded from MIME encoding.")
1676 (license perl-license)))
1677
1678 (define-public perl-email-mime-contenttype
1679 (package
1680 (name "perl-email-mime-contenttype")
1681 (version "1.022")
1682 (source
1683 (origin
1684 (method url-fetch)
1685 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1686 "Email-MIME-ContentType-" version ".tar.gz"))
1687 (sha256
1688 (base32
1689 "042kxhs3bp1ab9z0mbr1wy21ld4lxd6v2a2mmrashqnsn2075fws"))))
1690 (build-system perl-build-system)
1691 (native-inputs
1692 `(("perl-capture-tiny" ,perl-capture-tiny)))
1693 (home-page "https://metacpan.org/release/Email-MIME-ContentType")
1694 (synopsis "Parse MIME Content-Type headers")
1695 (description "Email::MIME::ContentType parses a MIME Content-Type
1696 header.")
1697 (license perl-license)))
1698
1699 (define-public perl-email-mime-encodings
1700 (package
1701 (name "perl-email-mime-encodings")
1702 (version "1.315")
1703 (source
1704 (origin
1705 (method url-fetch)
1706 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1707 "Email-MIME-Encodings-" version ".tar.gz"))
1708 (sha256
1709 (base32
1710 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1711 (build-system perl-build-system)
1712 (native-inputs
1713 `(("perl-capture-tiny" ,perl-capture-tiny)))
1714 (home-page "https://metacpan.org/release/Email-MIME-Encodings")
1715 (synopsis "Unified interface to MIME encoding and decoding")
1716 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
1717 (license perl-license)))
1718
1719 (define-public perl-email-sender
1720 (package
1721 (name "perl-email-sender")
1722 (version "1.300034")
1723 (source
1724 (origin
1725 (method url-fetch)
1726 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1727 "Email-Sender-" version ".tar.gz"))
1728 (sha256
1729 (base32 "14aj9kqa9dr2bdhzn2qvjj2mffj8wjb5397z8qw7qg057fk3ib05"))))
1730 (build-system perl-build-system)
1731 (native-inputs
1732 `(("perl-capture-tiny" ,perl-capture-tiny)))
1733 (propagated-inputs
1734 `(("perl-email-abstract" ,perl-email-abstract)
1735 ("perl-email-address" ,perl-email-address)
1736 ("perl-email-simple" ,perl-email-simple)
1737 ("perl-list-moreutils" ,perl-list-moreutils)
1738 ("perl-module-runtime" ,perl-module-runtime)
1739 ("perl-moo" ,perl-moo)
1740 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1741 ("perl-sub-exporter" ,perl-sub-exporter)
1742 ("perl-throwable" ,perl-throwable)
1743 ("perl-try-tiny" ,perl-try-tiny)))
1744 (home-page "https://metacpan.org/release/Email-Sender")
1745 (synopsis "Perl library for sending email")
1746 (description "Email::Sender replaces the old and sometimes problematic
1747 Email::Send library.")
1748 (license perl-license)))
1749
1750 (define-public perl-email-simple
1751 (package
1752 (name "perl-email-simple")
1753 (version "2.216")
1754 (source
1755 (origin
1756 (method url-fetch)
1757 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1758 "Email-Simple-" version ".tar.gz"))
1759 (sha256
1760 (base32
1761 "1m4brbjvalyp5kjqslqv4155dzwg977shxin208i7lc8236n6pyq"))))
1762 (build-system perl-build-system)
1763 (propagated-inputs
1764 `(("perl-email-date-format" ,perl-email-date-format)))
1765 (home-page "https://metacpan.org/release/Email-Simple")
1766 (synopsis "Parsing of RFC 2822 messages")
1767 (description "Email::Simple provides simple parsing of RFC 2822 message
1768 format and headers.")
1769 (license perl-license)))
1770
1771 (define-public libesmtp
1772 (package
1773 (name "libesmtp")
1774 (version "1.0.6")
1775 (source
1776 (origin
1777 (method url-fetch)
1778 (uri (list (string-append "https://pkgs.fedoraproject.org/repo/pkgs/"
1779 "libesmtp/libesmtp-" version ".tar.bz2/"
1780 "bf3915e627fd8f35524a8fdfeed979c8/libesmtp-"
1781 version ".tar.bz2")
1782 ;; XXX This site is offline, so we fetch Fedora's cached copy
1783 ;; of the source tarball.
1784 (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1785 version ".tar.bz2")))
1786 (sha256
1787 (base32
1788 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1789 (build-system gnu-build-system)
1790 (propagated-inputs
1791 `(("openssl" ,openssl)))
1792 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1793 (synopsis "Library for sending mail via remote hosts using SMTP")
1794 (description "libESMTP is an SMTP client which manages posting (or
1795 submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1796 It may be used as part of a Mail User Agent (MUA) or other program that must
1797 be able to post electronic mail where mail functionality may not be that
1798 program's primary purpose.")
1799 (license (list lgpl2.1+ gpl2+))))
1800
1801 (define-public esmtp
1802 (package
1803 (name "esmtp")
1804 (version "1.2")
1805 (source
1806 (origin
1807 (method git-fetch)
1808 (uri (git-reference
1809 (url "https://github.com/andywingo/esmtp.git")
1810 (commit "01bf9fc")))
1811 (sha256
1812 (base32
1813 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1814 (file-name (string-append name "-" version "-checkout"))))
1815 (arguments
1816 `(#:phases (modify-phases %standard-phases
1817 (replace 'bootstrap
1818 (lambda _ (invoke "autoreconf" "-vfi"))))))
1819 (build-system gnu-build-system)
1820 (native-inputs
1821 `(("bison" ,bison)
1822 ("flex" ,flex)
1823 ("autoconf" ,autoconf)
1824 ("automake" ,automake)
1825 ("libtool" ,libtool)))
1826 (inputs
1827 `(("libesmtp" ,libesmtp)))
1828 (home-page "https://sourceforge.net/projects/esmtp/")
1829 (synopsis "Relay-only mail transfer agent (MTA)")
1830 (description "Esmtp is a simple relay-only mail transfer agent built using
1831 libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1832 user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1833 page for more on configuration. This package also provides minimal
1834 compatibility shims for the @command{sendmail}, @command{mailq}, and
1835 @command{newaliases} commands.")
1836 (license gpl2+)))
1837
1838 (define-public fdm
1839 (package
1840 (name "fdm")
1841 (version "2.0")
1842 (source (origin
1843 (method url-fetch)
1844 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1845 version "/fdm-" version ".tar.gz"))
1846 (sha256
1847 (base32 "196fs1z8y7p12wmqn1bylzz94szl58yv2aby3p30nmwjnyv8rch6"))))
1848 (build-system gnu-build-system)
1849 (inputs
1850 `(("tdb" ,tdb)
1851 ("openssl" ,openssl)
1852 ("zlib" ,zlib)))
1853 (home-page "https://github.com/nicm/fdm")
1854 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1855 (description "fdm is a program designed to fetch mail from POP3
1856 or IMAP servers, or receive local mail from stdin, and
1857 deliver it in various ways.")
1858 (license
1859 ;; Why point to a source file? Well, all the individual files have a
1860 ;; copy of this license in their headers, but there's no seprate file
1861 ;; with that information.
1862 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
1863
1864
1865 (define-public procmail
1866 (package
1867 (name "procmail")
1868 (version "3.22")
1869 (source
1870 (origin
1871 (method url-fetch)
1872 (uri (string-append
1873 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1874 version
1875 ".tar.gz"))
1876 (sha256
1877 (base32
1878 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1879 ;; The following patch fixes an ambiguous definition of
1880 ;; getline() in formail.c. The patch is provided by Debian as
1881 ;; patch 24.
1882 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
1883 "procmail-CVE-2014-3618.patch"
1884 "procmail-CVE-2017-16844.patch"))))
1885 (arguments
1886 `(#:phases (modify-phases %standard-phases
1887 (replace 'configure
1888 (lambda _
1889 (substitute* "Makefile"
1890 (("/bin/sh")
1891 (which "sh"))
1892 (("/usr")
1893 (assoc-ref %outputs "out"))
1894 (("/bin/rm")
1895 (which "rm")))
1896 #t)))
1897 #:tests? #f)) ;; There are no tests indicating a successful
1898 ;; build. Some tests of basic locking mechanisms provided by the
1899 ;; file system are performed during 'make install'. However, these
1900 ;; are performed before the actual build process.
1901 (build-system gnu-build-system)
1902 (inputs `(("exim" ,exim)))
1903 (home-page "http://www.procmail.org/")
1904 (synopsis "Versatile mail delivery agent (MDA)")
1905 (description "Procmail is a mail delivery agent (MDA) featuring support
1906 for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1907 can be sorted into separate files/directories and arbitrary commands can be
1908 executed on mail arrival. Procmail is considered stable, but is no longer
1909 maintained.")
1910 (license gpl2+))) ;; procmail allows to choose the
1911 ;; nonfree Artistic License 1.0
1912 ;; as alternative to the GPL2+.
1913 ;; This option is not listed here.
1914
1915 (define-public khard
1916 (package
1917 (name "khard")
1918 (version "0.16.1")
1919 (source (origin
1920 (method url-fetch)
1921 (uri (pypi-uri name version))
1922 (sha256
1923 (base32
1924 "0fg4qh5gzki5wg958wlpc8a2icnk74gzg33lqxjm755cfnjng7qd"))))
1925 (build-system python-build-system)
1926 (arguments
1927 `(#:phases
1928 (modify-phases %standard-phases
1929 (add-after 'install 'install-completions
1930 (lambda* (#:key outputs #:allow-other-keys)
1931 (let* ((out (assoc-ref outputs "out"))
1932 (zsh (string-append out "/share/zsh/site-functions")))
1933 (copy-recursively "misc/zsh" zsh)
1934 #t))))))
1935 (native-inputs
1936 `(("python-setuptools-scm" ,python-setuptools-scm)))
1937 (inputs
1938 `(("python-atomicwrites" ,python-atomicwrites)
1939 ("python-configobj" ,python-configobj)
1940 ("python-pyyaml" ,python-pyyaml)
1941 ("python-ruamel.yaml" ,python-ruamel.yaml)
1942 ("python-unidecode" ,python-unidecode)
1943 ("python-vobject" ,python-vobject)))
1944 (synopsis "Console address book using CardDAV")
1945 (description "Khard is an address book for the console. It creates, reads,
1946 modifies and removes CardDAV address book entries at your local machine. For
1947 synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1948 Khard can also be used from within the email client @command{mutt}.")
1949 (home-page "https://github.com/scheibler/khard")
1950 (license gpl3+)))
1951
1952 (define-public perl-mail-spf
1953 (package
1954 (name "perl-mail-spf")
1955 (version "2.9.0")
1956 (source
1957 (origin
1958 (method url-fetch)
1959 (uri (string-append
1960 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-v"
1961 version
1962 ".tar.gz"))
1963 (sha256
1964 (base32 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1965 (build-system perl-build-system)
1966 (native-inputs
1967 `(("perl-module-build" ,perl-module-build)
1968 ("perl-net-dns-resolver-programmable"
1969 ,perl-net-dns-resolver-programmable)))
1970 (arguments
1971 `(#:phases
1972 (modify-phases %standard-phases
1973 (add-before 'configure 'modify-Build.PL
1974 (lambda* (#:key outputs #:allow-other-keys)
1975 (substitute* "Build.PL"
1976 (("'/usr/sbin'") (string-append "'"
1977 (assoc-ref outputs "out")
1978 "/sbin'")))
1979 #t)))))
1980 (inputs
1981 `(("perl-error" ,perl-error)
1982 ("perl-net-dns" ,perl-net-dns)
1983 ("perl-netaddr-ip" ,perl-netaddr-ip)
1984 ("perl-uri" ,perl-uri)))
1985 (home-page "https://metacpan.org/release/Mail-SPF")
1986 (synopsis "Perl implementation of Sender Policy Framework")
1987 (description "Mail::SPF is the Sender Policy Framework implemented
1988 in Perl.")
1989 (license bsd-3)))
1990
1991 (define-public perl-mail-authenticationresults
1992 (package
1993 (name "perl-mail-authenticationresults")
1994 (version "1.20180923")
1995 (source (origin
1996 (method url-fetch)
1997 (uri (string-append
1998 "mirror://cpan/authors/id/M/MB/MBRADSHAW/"
1999 "Mail-AuthenticationResults-" version ".tar.gz"))
2000 (sha256
2001 (base32
2002 "1g1wym9vcbhldwvi4w5pl0fhd4jh2icj975awf4wr5xmkli9mxbz"))))
2003 (build-system perl-build-system)
2004 (native-inputs
2005 `(("perl-test-exception" ,perl-test-exception)))
2006 (home-page "https://metacpan.org/release/Mail-AuthenticationResults")
2007 (synopsis "Object Oriented Authentication-Results Headers")
2008 (description "Mail::AuthenticationResults parses the message header field
2009 that indicates the message authentication status as per RFC7601. This module
2010 is not fully compliant with the RFC but it tries to implement most styles of
2011 Authentication-Results header seen in the wild.")
2012 (license perl-license)))
2013
2014 (define-public perl-mail-dkim
2015 (package
2016 (name "perl-mail-dkim")
2017 (version "0.58")
2018 (source (origin
2019 (method url-fetch)
2020 (uri (string-append
2021 "mirror://cpan/authors/id/M/MB/MBRADSHAW/Mail-DKIM-"
2022 version
2023 ".tar.gz"))
2024 (sha256
2025 (base32
2026 "0cgkal65qqcy57b21lgij90ba36wl66byw9i76g5yhwaa8ms8hqa"))))
2027 (build-system perl-build-system)
2028 (propagated-inputs
2029 `(("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
2030 ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
2031 ("perl-mailtools" ,perl-mailtools)
2032 ("perl-net-dns" ,perl-net-dns)))
2033 (native-inputs
2034 `(("perl-net-dns-resolver-mock" ,perl-net-dns-resolver-mock)
2035 ("perl-test-requiresinternet" ,perl-test-requiresinternet)
2036 ("perl-yaml-libyaml" ,perl-yaml-libyaml)))
2037 (home-page "https://metacpan.org/release/Mail-DKIM")
2038 (synopsis "Signs/verifies Internet mail with DKIM/DomainKey signatures")
2039 (description "Mail::DKIM is a Perl module that implements the new Domain
2040 Keys Identified Mail (DKIM) standard, and the older Yahoo! DomainKeys standard,
2041 both of which sign and verify emails using digital signatures and DNS records.
2042 Mail-DKIM can be used by any Perl program that wants to provide support for
2043 DKIM and/or DomainKeys.")
2044 (license gpl3+)))
2045
2046 (define-public dkimproxy
2047 (package
2048 (name "dkimproxy")
2049 (version "1.4.1")
2050 (source (origin
2051 (method url-fetch)
2052 (uri (string-append
2053 "mirror://sourceforge/dkimproxy/dkimproxy/"
2054 version "/dkimproxy-" version ".tar.gz"))
2055 (sha256
2056 (base32
2057 "1gc5c7lg2qrlck7b0lvjfqr824ch6jkrzkpsn0gjvlzg7hfmld75"))
2058 (patches
2059 (search-patches "dkimproxy-add-ipv6-support.patch"))))
2060 (build-system gnu-build-system)
2061 (arguments
2062 `(#:phases
2063 (modify-phases %standard-phases
2064 (add-after 'install 'make-wrapper
2065 (lambda* (#:key inputs outputs #:allow-other-keys)
2066 (let* ((out (assoc-ref outputs "out"))
2067 (wrap.pl (lambda (scripts keys)
2068 (for-each
2069 (lambda (script)
2070 (wrap-program (string-append out script)
2071 `("PERL5LIB" ":" prefix
2072 ,(map (λ (input)
2073 (string-append
2074 (assoc-ref inputs input)
2075 "/lib/perl5/site_perl"))
2076 keys))))
2077 scripts))))
2078 (wrap.pl (list "/bin/dkimproxy.in"
2079 "/bin/dkimproxy.out")
2080 (list "perl-crypt-openssl-rsa"
2081 "perl-io-socket-inet6"
2082 "perl-mailtools"
2083 "perl-mail-authenticationresults"
2084 "perl-mail-dkim"
2085 "perl-net-dns"
2086 "perl-net-server"
2087 "perl-socket6"))
2088 (wrap.pl (list "/bin/dkim_responder.pl")
2089 (list "perl-crypt-openssl-rsa"
2090 "perl-mail-dkim"
2091 "perl-mailtools"
2092 "perl-mime-tools"
2093 "perl-net-dns"
2094 "perl-timedate"))
2095 #t))))))
2096 (inputs
2097 `(("perl" ,perl)
2098 ("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
2099 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
2100 ("perl-mailtools" ,perl-mailtools)
2101 ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
2102 ("perl-mail-dkim" ,perl-mail-dkim)
2103 ("perl-mime-tools" ,perl-mime-tools)
2104 ("perl-net-dns" ,perl-net-dns)
2105 ("perl-net-server" ,perl-net-server)
2106 ("perl-socket6" ,perl-socket6)
2107 ("perl-timedate" ,perl-timedate)))
2108 (home-page "http://dkimproxy.sourceforge.net/")
2109 (synopsis "SMTP proxy to sign and verify Internet mail with DKIM headers")
2110 (description
2111 "DKIMproxy is an SMTP proxy that signs and verifies Internet mail using the
2112 @code{Mail::DKIM} Perl module. It comprises two separate proxies: an outbound
2113 proxy for signing outgoing email, and an inbound proxy for verifying signatures
2114 of incoming messages.
2115
2116 It was designed for Postfix, but can be used to add DKIM support to nearly any
2117 existing mail server. With Postfix, the proxies can operate as either
2118 @code{Before-Queue} or @code{After-Queue} content filters.")
2119 (license gpl2+)))
2120
2121 (define-public mb2md
2122 (package
2123 (name "mb2md")
2124 (version "3.20")
2125 (source (origin
2126 (method url-fetch)
2127 (uri (string-append
2128 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
2129 version ".pl.gz"))
2130 (sha256
2131 (base32
2132 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
2133 (build-system trivial-build-system)
2134 (arguments
2135 '(#:modules ((guix build utils))
2136 #:builder
2137 (begin
2138 (use-modules (guix build utils))
2139 (let* ((source (assoc-ref %build-inputs "source"))
2140 (out (assoc-ref %outputs "out"))
2141 (bin (string-append out "/bin"))
2142 (perl (assoc-ref %build-inputs "perl"))
2143 (gzip (assoc-ref %build-inputs "gzip"))
2144 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
2145 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
2146 (mkdir-p bin)
2147 (with-directory-excursion bin
2148 (copy-file source "mb2md.gz")
2149 (invoke (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
2150 (substitute* "mb2md"
2151 (("#!/usr/bin/perl")
2152 (string-append "#!/usr/bin/perl -I " perl5lib)))
2153 (patch-shebang "mb2md" (list (string-append perl "/bin")))
2154 (chmod "mb2md" #o555))
2155 #t))))
2156 (native-inputs `(("gzip" ,gzip)))
2157 (inputs `(("perl" ,perl)
2158 ("perl-timedate" ,perl-timedate)))
2159 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
2160 (synopsis "Mbox to maildir converter")
2161 (description
2162 "Mb2md is a Perl script that takes one or more mbox format files and
2163 converts them to maildir format directories.")
2164 (license public-domain)))
2165
2166 (define-public mpop
2167 (package
2168 (name "mpop")
2169 (version "1.4.9")
2170 (source
2171 (origin
2172 (method url-fetch)
2173 (uri (string-append "https://marlam.de/mpop/releases/"
2174 "mpop-" version ".tar.xz"))
2175 (sha256
2176 (base32 "0hinmyd4lipy9wi3grwm72vv6xrpf4m08i9g9nlxzxnwfanw885q"))))
2177 (build-system gnu-build-system)
2178 (inputs
2179 `(("gnutls" ,gnutls)))
2180 (native-inputs
2181 `(("pkg-config" ,pkg-config)))
2182 (home-page "https://marlam.de/mpop/")
2183 (synopsis "POP3 mail client")
2184 (description "mpop is a small and fast POP3 client suitable as a
2185 fetchmail replacement.
2186
2187 mpop supports multiple accounts, header based mail filtering, delivery
2188 to mbox files, maildir folders or an @acronym{MDA, Mail Delivery Agent},
2189 TLS/SSL, several authentication methods, @acronym{IDN, Internationalized Domain
2190 Names} and SOCKS proxies.")
2191 (license gpl3+)))
2192
2193 (define-public mhonarc
2194 (package
2195 (name "mhonarc")
2196 (version "2.6.19")
2197 (source
2198 (origin
2199 (method url-fetch)
2200 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
2201 version ".tar.gz"))
2202 (sha256
2203 (base32
2204 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
2205 (build-system perl-build-system)
2206 (home-page "https://www.mhonarc.org/")
2207 (synopsis "Create HTML archives of mail/news messages")
2208 (description
2209 "MHonArc is a Perl mail-to-HTML converter. MHonArc
2210 provides HTML mail archiving with index, mail thread linking,
2211 etc; plus other capabilities including support for MIME and
2212 powerful user customization features.")
2213 (license gpl2+)))
2214
2215
2216 (define-public sendmail
2217 (package
2218 (name "sendmail")
2219 (version "8.15.2")
2220 (source
2221 (origin
2222 (method url-fetch)
2223 (uri (string-append
2224 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
2225 version ".tar.gz"))
2226 (sha256
2227 (base32
2228 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
2229 (build-system gnu-build-system)
2230 (arguments
2231 `(#:phases
2232 (modify-phases %standard-phases
2233 (add-before 'build 'replace-/bin/sh
2234 (lambda _
2235 (substitute*
2236 (append
2237 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
2238 "contrib/mmuegel" "devtools/bin/configure.sh")
2239 (find-files "." ".*\\.m4")
2240 (find-files "." ".*\\.cf"))
2241 (("/bin/sh") (which "sh")))
2242
2243 (substitute* "devtools/bin/Build"
2244 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
2245 #t))
2246 (replace 'configure
2247 (lambda _
2248
2249 ;; Render harmless any attempts to chown or chgrp
2250 (substitute* "devtools/bin/install.sh"
2251 (("owner=\\$2") "owner=''")
2252 (("group=\\$2") "group=''"))
2253
2254 (with-output-to-file "devtools/Site/site.config.m4"
2255 (lambda ()
2256 (format #t "
2257 define(`confCC', `gcc')
2258 define(`confOPTIMIZE', `-g -O2')
2259 define(`confLIBS', `-lresolv')
2260 define(`confINSTALL', `~a/devtools/bin/install.sh')
2261 define(`confDEPEND_TYPE', `CC-M')
2262 define(`confINST_DEP', `')
2263 " (getcwd))))
2264 #t))
2265 (replace 'build
2266 (lambda _
2267 (invoke "sh" "Build")
2268 (with-directory-excursion "cf/cf"
2269 (copy-file "generic-linux.mc" "sendmail.mc")
2270 (invoke "sh" "Build" "sendmail.cf"))
2271 #t))
2272 (add-before 'install 'pre-install
2273 (lambda _
2274 (let ((out (assoc-ref %outputs "out")))
2275 (mkdir-p (string-append out "/usr/bin"))
2276 (mkdir-p (string-append out "/usr/sbin"))
2277 (mkdir-p (string-append out "/etc/mail"))
2278 (setenv "DESTDIR" out)
2279 (with-directory-excursion "cf/cf"
2280 (invoke "sh" "Build" "install-cf"))
2281 #t))))
2282 ;; There is no make check. There are some post installation tests, but those
2283 ;; require root privileges
2284 #:tests? #f))
2285 (inputs
2286 `(("m4" ,m4)
2287 ("perl" ,perl)))
2288 (home-page "http://sendmail.org")
2289 (synopsis
2290 "Highly configurable Mail Transfer Agent (MTA)")
2291 (description
2292 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
2293 Allman. It is highly configurable and supports many delivery methods and many
2294 transfer protocols.")
2295 (license (non-copyleft "file://LICENSE"
2296 "See LICENSE in the distribution."))))
2297
2298 (define-public opensmtpd
2299 (package
2300 (name "opensmtpd")
2301 (version "6.7.0p1")
2302 (source
2303 (origin
2304 (method url-fetch)
2305 (uri (string-append "https://www.opensmtpd.org/archives/"
2306 "opensmtpd-" version ".tar.gz"))
2307 (sha256
2308 (base32 "1f8bp40ywyixflg5qbnang6l210bv4vqa1k2pgm2356bp7bmsgy1"))))
2309 (build-system gnu-build-system)
2310 (inputs
2311 `(("bdb" ,bdb)
2312 ("libasr" ,libasr)
2313 ("libevent" ,libevent)
2314 ("libressl" ,libressl) ; recommended, and supports e.g. ECDSA
2315 ("linux-pam" ,linux-pam)
2316 ("zlib" ,zlib)))
2317 (native-inputs
2318 `(("bison" ,bison)
2319 ("groff" ,groff))) ; for man pages
2320 (arguments
2321 `(#:configure-flags
2322 (list "--localstatedir=/var"
2323 ;; This is the default only if it exists at build time—it doesn't.
2324 "--with-path-socket=/var/run"
2325 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt"
2326 "--with-user-smtpd=smtpd"
2327 "--with-user-queue=smtpq" "--with-group-queue=smtpq"
2328 "--with-auth-pam"
2329 "--with-table-db")
2330 #:phases
2331 (modify-phases %standard-phases
2332 ;; Fix some incorrectly hard-coded external tool file names.
2333 (add-after 'unpack 'patch-FHS-file-names
2334 (lambda _
2335 (substitute* "smtpd/smtpctl.c"
2336 ;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't.
2337 (("/bin/cat") (which "cat")))
2338 (substitute* "smtpd/mda_unpriv.c"
2339 (("/bin/sh") (which "sh")))
2340 #t))
2341 ;; OpenSMTPD provides a single smtpctl utility to control both the
2342 ;; daemon and the local submission subsystem. To accomodate systems
2343 ;; that require historical interfaces such as sendmail, newaliases or
2344 ;; makemap, smtpctl operates in compatibility mode if called with the
2345 ;; historical name.
2346 (add-after 'install 'install-compability-links
2347 (lambda* (#:key outputs #:allow-other-keys)
2348 (let* ((out (assoc-ref outputs "out"))
2349 (sbin (string-append out "/sbin/")))
2350 (for-each (lambda (command)
2351 (symlink "smtpctl" (string-append sbin command)))
2352 (list "mailq" "makemap" "newaliases"
2353 "send-mail" "sendmail")))
2354 #t)))))
2355 (synopsis "Lightweight SMTP daemon")
2356 (description
2357 "OpenSMTPD is an implementation of server-side @acronym{SMTP, Simple Mail
2358 Transfer Protocol}, with some additional standard extensions. It allows
2359 ordinary machines to exchange e-mails with other systems speaking the SMTP
2360 protocol, or to deliver them to local users.
2361
2362 In order to simplify the use of SMTP, OpenSMTPD implements a smaller set of
2363 functionality than those available in other SMTP daemons. The objective is to
2364 provide enough features to satisfy typical usage at the risk of unsuitability
2365 to esoteric or niche requirements.")
2366 (home-page "https://www.opensmtpd.org")
2367 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
2368 public-domain isc license:openssl))))
2369
2370 (define-public opensmtpd-extras
2371 (package
2372 (name "opensmtpd-extras")
2373 (version "5.7.1")
2374 (source (origin
2375 (method url-fetch)
2376 (uri (string-append "https://www.opensmtpd.org/archives/"
2377 name "-" version ".tar.gz"))
2378 (sha256
2379 (base32
2380 "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm"))))
2381 (build-system gnu-build-system)
2382 (inputs
2383 `(("libressl" ,libressl)
2384 ("libevent" ,libevent)
2385 ("libasr" ,libasr)
2386 ("python-2" ,python-2)
2387 ("opensmtpd" ,opensmtpd)
2388 ("perl" ,perl)
2389 ("lua" ,lua)
2390 ("postgresql" ,postgresql)
2391 ("sqlite" ,sqlite)
2392 ("linux-pam" ,linux-pam)))
2393 (native-inputs
2394 `(("bison" ,bison)
2395 ("pkg-config" ,pkg-config)
2396 ("groff" ,groff)
2397 ("automake" ,automake)
2398 ("autoconf" ,autoconf)))
2399 (arguments
2400 `(;; We have to configure it like this because the default checks for for example
2401 ;; python in /usr/local/bin, /usr/bin and fails otherwise.
2402 #:configure-flags (list
2403 "--with-filter-clamav" "--with-filter-dkim-signer"
2404 "--with-filter-dnsbl" "--with-filter-lua"
2405 "--with-filter-monkey" "--with-filter-pause"
2406 "--with-filter-perl" "--with-filter-python"
2407 "--with-filter-regex" "--with-filter-spamassassin"
2408 "--with-filter-stub" "--with-filter-trace"
2409 "--with-filter-void"
2410
2411 "--with-queue-null" "--with-queue-python"
2412 "--with-queue-ram" "--with-queue-stub"
2413
2414 "--with-scheduler-python" "--with-scheduler-ram"
2415 "--with-scheduler-stub"
2416
2417 "--with-table-ldap" ; "--with-table-mysql"
2418 "--with-table-passwd" "--with-table-postgres"
2419 "--with-table-python" "--with-table-socketmap"
2420 "--with-table-sqlite" "--with-table-stub"
2421 ;;"--with-table-redis" ; TODO: package hiredis
2422
2423 "--with-user=smtpd" "--with-privsep-user=smtpd"
2424 "--localstatedir=/var" "--sysconfdir=/etc"
2425 "--with-lua-type=lua" ; can use lua or luajit
2426
2427 (string-append "--with-python="
2428 (assoc-ref %build-inputs "python-2"))
2429 (string-append "--with-lua="
2430 (assoc-ref %build-inputs "lua")))))
2431 (license (list bsd-2 bsd-3 bsd-4
2432 public-domain isc license:openssl))
2433 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
2434 (description
2435 "This package provides extra tables, filters, and various other addons
2436 for OpenSMTPD to extend its functionality.")
2437 (home-page "https://www.opensmtpd.org")))
2438
2439 (define-public python-mailmanclient
2440 (package
2441 (name "python-mailmanclient")
2442 (version "3.1.1")
2443 (source
2444 (origin
2445 (method url-fetch)
2446 (uri (pypi-uri "mailmanclient" version))
2447 (sha256
2448 (base32
2449 "0fdfs5g3pf30v2i7w18pdkv9xnfxmfcv66mzv56dck0a1igq07m3"))))
2450 (build-system python-build-system)
2451 (arguments
2452 `(#:tests? #f)) ; Requires mailman running
2453 (propagated-inputs
2454 `(("python-six" ,python-six)
2455 ("python-httplib2" ,python-httplib2)))
2456 (home-page "https://launchpad.net/mailman.client")
2457 (synopsis "Python bindings for the Mailman 3 REST API")
2458 (description
2459 "The mailmanclient library provides official Python bindings for
2460 the GNU Mailman 3 REST API.")
2461 (license lgpl3+)))
2462
2463 (define-public python2-mailmanclient
2464 (package-with-python2 python-mailmanclient))
2465
2466 (define-public mlmmj
2467 (package
2468 (name "mlmmj")
2469 (version "1.3.0")
2470 (source
2471 (origin
2472 (method url-fetch)
2473 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
2474 version ".tar.bz2"))
2475 (sha256
2476 (base32
2477 "0hpj10qad821ci11si8xc2qnmkzfn90y13s43fm4fca38f0qjp8w"))))
2478 (build-system gnu-build-system)
2479 (inputs
2480 `(("perl" ,perl))) ; For "contrib/web/"
2481 (native-inputs
2482 `(("pkg-config" ,pkg-config)))
2483 (arguments
2484 `(#:configure-flags
2485 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
2486 ;; It opens the files control/mimedeny and control/mimestrip to get a list
2487 ;; of mimetypes for parts of multipart/mime messages that should be denied
2488 ;; or stripped. The parts then get stripped directly when the mail is
2489 ;; received. mlmmj-receive-strip also appends an extra header
2490 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
2491 ;; mime parts
2492 (list "--enable-receive-strip")
2493 #:phases
2494 (modify-phases %standard-phases
2495 (add-before 'install 'install-contrib
2496 (lambda* (#:key outputs #:allow-other-keys)
2497 (let* ((out (assoc-ref outputs "out"))
2498 (share (string-append out "/share/mlmmj"))
2499 (contrib (string-append share "/contrib/web"))
2500 (texts (string-append share "/listtexts")))
2501 (copy-recursively "contrib/web/" contrib)
2502 (copy-recursively "listtexts" texts)
2503 (rename-file texts (string-append share "/texts"))
2504 #t))))))
2505 (home-page "http://mlmmj.org")
2506 (synopsis "Mailing list managing made joyful")
2507 (description
2508 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
2509 It works with many different Mail Transport Agents (MTAs) and is simple for a
2510 system administrator to install, configure and integrate with other software.
2511 As it uses very few resources, and requires no daemons, it is ideal for
2512 installation on systems where resources are limited. Its features include:
2513 @enumerate
2514 @item Archive, Custom headers / footer,
2515 @item Fully automated bounce handling (similar to ezmlm),
2516 @item Complete requeueing functionality, Moderation functionality, Subject prefix,
2517 @item Subscribers only posting, Regular expression access control,
2518 @item Functionality to retrieve old posts, Web interface, Digests,
2519 @item No-mail subscription, VERP support,
2520 @item Delivery Status Notification (RFC1891) support,
2521 @item Rich and customisable texts for automated operations.
2522 @end enumerate\n")
2523 (license license:expat)))
2524
2525 (define-public python2-django-mailman3
2526 (package
2527 (name "python2-django-mailman3")
2528 (version "1.1.0")
2529 (source
2530 (origin
2531 (method url-fetch)
2532 (uri (pypi-uri "django-mailman3" version))
2533 (sha256
2534 (base32
2535 "1xjdkgfjwhgyrp5nxw65dcpcsr98ygj6856sp0bwkrmyxpd1xxk2"))))
2536 (build-system python-build-system)
2537 (arguments
2538 `(#:phases
2539 (modify-phases %standard-phases
2540 (replace 'check
2541 (lambda _
2542 (invoke "django-admin"
2543 "test"
2544 "--settings=django_mailman3.tests.settings_test"
2545 "django_mailman3"))))
2546 #:python ,python-2))
2547 (inputs
2548 `(("python2-django" ,python2-django)))
2549 (propagated-inputs
2550 `(("python2-requests" ,python2-requests)
2551 ("python2-requests-oauthlib" ,python2-requests-oauthlib)
2552 ("python2-openid" ,python2-openid)
2553 ("python2-mailmanclient" ,python2-mailmanclient)
2554 ("python2-django-allauth" ,python2-django-allauth)
2555 ("python2-django-gravatar2" ,python2-django-gravatar2)
2556 ("python2-pytz" ,python2-pytz)))
2557 (home-page "https://gitlab.com/mailman/django-mailman3")
2558 (synopsis "Django library for Mailman UIs")
2559 (description
2560 "Libraries and templates for Django-based interfaces
2561 interacting with Mailman.")
2562 (license gpl3+)))
2563
2564 (define-public postorius
2565 (package
2566 (name "postorius")
2567 (version "1.0.3")
2568 (source
2569 (origin
2570 (method url-fetch)
2571 (uri (pypi-uri "postorius" version "+post2.tar.gz"))
2572 (file-name (string-append name "-" version ".tar.gz"))
2573 (sha256
2574 (base32
2575 "1wymcpv2icjjy8h1ni52p6dr7wwxf71ivqgbqhzx4i82yqphcaq5"))))
2576 (build-system python-build-system)
2577 (arguments
2578 `(; One test dependency relies on Persona, which was shut down in
2579 ;; November 2016.
2580 #:tests? #f
2581 ;; The part of the frontend of Mailman is still python 2.7.
2582 #:python ,python-2))
2583 (inputs
2584 `(("python2-django" ,python2-django)
2585 ("python2-django-mailman3" ,python2-django-mailman3)
2586 ("python2-mailmanclient" ,python2-mailmanclient)))
2587 (home-page "https://gitlab.com/mailman/postorius")
2588 (synopsis "Web user interface for GNU Mailman")
2589 (description
2590 "Postorius is a Django app which provides a web user interface
2591 to access GNU Mailman.")
2592 (license (list gpl3+ lgpl3+))))
2593
2594 (define-public blists
2595 (package
2596 (name "blists")
2597 (version "2.0")
2598 (source
2599 (origin
2600 (method url-fetch)
2601 (uri (string-append "http://download.openwall.net/pub/projects/"
2602 "blists/blists-" version ".tar.gz"))
2603 (sha256
2604 (base32
2605 "1xll5wn7py3bbncbwrj172f56nz75c9gwfsa80rwd96ss9gfmp3c"))))
2606 (build-system gnu-build-system)
2607 (arguments
2608 `(#:tests? #f ; No tests
2609 #:phases
2610 (modify-phases %standard-phases
2611 (delete 'configure)
2612 (replace 'install
2613 (lambda* (#:key outputs #:allow-other-keys)
2614 (let* ((out (assoc-ref outputs "out"))
2615 (bin (string-append out "/bin")))
2616 (install-file "bindex" bin)
2617 (install-file "bit" bin)
2618 #t))))))
2619 (home-page "http://www.openwall.com/blists/")
2620 (synopsis "Web interface to mailing list archives")
2621 (description
2622 "Blists is a web interface to mailing list archives that works off
2623 indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
2624 @code{bindex} generates or updates the index file (incremental updates
2625 are supported). @code{bit} is a CGI/SSI program that generates web pages
2626 on the fly. Both programs are written in C and are very fast.")
2627 (license license:expat)))
2628
2629 (define-public swaks
2630 (package
2631 (name "swaks")
2632 (version "20181104.0")
2633 (source
2634 (origin
2635 (method url-fetch)
2636 (uri (string-append
2637 "https://jetmore.org/john/code/swaks/files/swaks-"
2638 version ".tar.gz"))
2639 (sha256
2640 (base32
2641 "0n1yd27xcyb1ylp5gln3yv5gzi9r377hjy1j32367kgb3247ygq2"))))
2642 (build-system perl-build-system)
2643 (inputs
2644 `(("perl-net-dns" ,perl-net-dns)
2645 ("perl-net-ssleay" ,perl-net-ssleay)))
2646 (arguments
2647 `(#:tests? #f ; No tests
2648 #:phases
2649 (modify-phases %standard-phases
2650 (delete 'configure)
2651 (replace 'build
2652 (lambda _
2653 (invoke "pod2man" "doc/ref.pod" "swaks.1")))
2654 (replace 'install
2655 (lambda* (#:key outputs #:allow-other-keys)
2656 (let ((out (assoc-ref outputs "out")))
2657 (install-file "swaks" (string-append out "/bin"))
2658 (install-file "swaks.1" (string-append out "/share/man/man1")))
2659 #t))
2660 (add-after 'install 'wrap-program
2661 (lambda* (#:key outputs #:allow-other-keys)
2662 (wrap-program (string-append (assoc-ref outputs "out")
2663 "/bin/swaks")
2664 `("PERL5LIB" ":" = (,(getenv "PERL5LIB"))))
2665 #t)))))
2666 (home-page "https://jetmore.org/john/code/swaks/")
2667 (synopsis "Featureful SMTP test tool")
2668 (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
2669 test tool. It handles SMTP features and extensions such as TLS,
2670 authentication, and pipelining; multiple versions of the SMTP protocol
2671 including SMTP, ESMTP, and LMTP; and multiple transport methods including
2672 unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
2673 Options can be specified in environment variables, configuration files, and
2674 the command line allowing maximum configurability and ease of use for
2675 operators and scripters.")
2676 (license gpl2+)))
2677
2678 (define-public alpine
2679 (package
2680 (name "alpine")
2681 ;; Upstream doesn't use git tags, but does ‘tag’ their releases in the
2682 ;; commit message. Hence the lack of GIT-VERSIONing despite using a commit
2683 ;; ID below. Don't forget to update it…
2684 (version "2.22")
2685 (source
2686 (origin
2687 (method git-fetch)
2688 ;; There are two versions: the plain continuation of Alpine without extra
2689 ;; patches and the version which adds extra fixes. Every distro uses
2690 ;; the patched version, and so do we to not break expectations.
2691 ;; http://alpine.freeiz.com/alpine/readme/README.patches
2692 (uri (git-reference
2693 (url "http://repo.or.cz/alpine.git")
2694 (commit "b50297779a4becb9ceca9c6b5b375d526fe3df78")))
2695 (file-name (git-file-name name version))
2696 (sha256
2697 (base32 "06js44fvdl7l33hfd4lsxpcd1cz3c0h796cswyzz0lkrzx89yl48"))
2698 (modules '((guix build utils)))
2699 (snippet
2700 '(begin
2701 ;; Remove pre-built binaries scattered across the source repository.
2702 (for-each delete-file (find-files "." "\\.(dll|exe)"))
2703 #t))))
2704 (build-system gnu-build-system)
2705 (arguments
2706 `(#:make-flags
2707 (let ((target ,(%current-target-system)))
2708 (list (string-append "CC=" (if target
2709 (string-append target "-gcc")
2710 "gcc"))))
2711 #:configure-flags (list (string-append "--with-ssl-include-dir="
2712 (assoc-ref %build-inputs "openssl")
2713 "/include/openssl")
2714 (string-append "--with-ssl-dir="
2715 (assoc-ref %build-inputs "openssl"))
2716 (string-append "--with-ssl-certs-dir="
2717 "/etc/ssl/certs/")
2718 (string-append "--with-ssl-lib-dir="
2719 (assoc-ref %build-inputs "openssl")
2720 "/lib")
2721 (string-append "--with-interactive-spellcheck="
2722 (assoc-ref %build-inputs "aspell")
2723 "/bin/aspell")
2724 "--with-date-stamp=Thu 1 Jan 01:00:01 CET 1970")
2725 #:phases
2726 (modify-phases %standard-phases
2727 (add-after 'unpack 'assume-shadow-passwords
2728 ;; Alpine's configure script confuses ‘shadow password support’ with
2729 ;; ‘/etc/shadow exists in the build environment’. It does not.
2730 (lambda _
2731 (substitute* "configure"
2732 (("test -f /etc/shadow") "true"))
2733 #t))
2734 (add-after 'unpack 'make-reproducible
2735 (lambda _
2736 ;; This removes time-dependent code to make alpine reproducible.
2737 (substitute* "pico/blddate.c"
2738 (("%02d-%s-%d") "1970-01-01"))
2739 #t)))))
2740 (inputs
2741 `(("ncurses" ,ncurses)
2742 ("openssl" ,openssl)
2743 ("gnutls" ,gnutls)
2744 ("openldap" ,openldap)
2745 ("cyrus-sasl" ,cyrus-sasl)
2746 ("mit-krb5" ,mit-krb5)
2747 ("aspell" ,aspell)
2748 ("tcl" ,tcl)
2749 ("linux-pam" ,linux-pam)))
2750 (home-page "https://repo.or.cz/alpine.git")
2751 (synopsis "Alternatively Licensed Program for Internet News and Email")
2752 (description
2753 "Alpine is a text-based mail and news client. Alpine includes several
2754 tools and applications:
2755 @enumerate
2756 @item alpine, the Alpine mailer
2757 @item pico, the standalone text editor, GNU nano's predecessor
2758 @item pilot, the standalone file system navigator
2759 @end enumerate\n")
2760 (license asl2.0)))
2761
2762 (define-public balsa
2763 (package
2764 (name "balsa")
2765 (version "2.6.0")
2766 (source
2767 (origin
2768 (method url-fetch)
2769 (uri (string-append "https://pawsa.fedorapeople.org/balsa/"
2770 name "-" version ".tar.bz2"))
2771 (sha256
2772 (base32 "0ycidvgy9npd6avxk88sf2ca609m7zb0hzrk1yajrgwb1rfqx68a"))))
2773 (build-system gnu-build-system)
2774 (arguments
2775 `(#:configure-flags
2776 '(;; Balsa tries to install additional MIME icons
2777 ;; under gtk+ directory.
2778 "--enable-extra-mimeicons=no"
2779 "--with-gtksourceview"
2780 "--with-canberra"
2781 "--with-spell-checker=gtkspell"
2782 "--with-gpgme"
2783 "--with-sqlite"
2784 "--with-compface"
2785 "--with-ldap")))
2786 (inputs
2787 `(("cyrus-sasl" ,cyrus-sasl)
2788 ("enchant" ,enchant)
2789 ("gdk-pixbuf" ,gdk-pixbuf)
2790 ("gmime" ,gmime)
2791 ("gnutls" ,gnutls)
2792 ("gpgme" ,gpgme)
2793 ("gtk+" ,gtk+)
2794 ("gtksourceview" ,gtksourceview-3)
2795 ("gtkspell3" ,gtkspell3)
2796 ("libcanberra" ,libcanberra)
2797 ("libesmtp" ,libesmtp)
2798 ("libical" ,libical)
2799 ("libnotify" ,libnotify)
2800 ("libsecret" ,libsecret)
2801 ("openldap" ,openldap)
2802 ("sqlite" ,sqlite)
2803 ("webkitgtk" ,webkitgtk)))
2804 (native-inputs
2805 `(("compface" ,compface)
2806 ("glib" ,glib "bin")
2807 ("intltool" ,intltool)
2808 ("pkg-config" ,pkg-config)
2809 ("yelp-tools" ,yelp-tools)))
2810 (home-page "https://pawsa.fedorapeople.org/balsa")
2811 (synopsis "E-mail client for GNOME")
2812 (description "Balsa is a highly configurable and robust mail client for
2813 the GNOME desktop. It supports both POP3 and IMAP servers as well as the
2814 mbox, maildir and mh local mailbox formats. Balsa also supports SMTP and/or
2815 the use of a local MTA such as Sendmail.")
2816 (license gpl3+)))
2817
2818 (define-public afew
2819 (package
2820 (name "afew")
2821 (version "1.2.0")
2822 (source
2823 (origin
2824 (method url-fetch)
2825 (uri (pypi-uri "afew" version))
2826 (sha256
2827 (base32
2828 "121w7bd53xyibllxxbfykjj76n81kn1vgjqd22izyh67y8qyyk5r"))))
2829 (build-system python-build-system)
2830 (inputs
2831 `(("python-chardet" ,python-chardet)
2832 ("python-notmuch" ,python-notmuch)))
2833 (native-inputs
2834 `(("python-setuptools-scm" ,python-setuptools-scm)))
2835 (home-page "https://github.com/afewmail/afew")
2836 (synopsis "Initial tagging script for notmuch mail")
2837 (description "afew is an initial tagging script for notmuch mail. It
2838 provides automatic tagging each time new mail is registered with notmuch. It
2839 can add tags based on email headers or Maildir folders and can handle spam and
2840 killed threads.")
2841 (license isc)))
2842
2843 (define-public pan
2844 (package
2845 (name "pan")
2846 (version "0.146")
2847 (source
2848 (origin
2849 (method url-fetch)
2850 (uri (string-append "http://pan.rebelbase.com/download/releases/"
2851 version "/source/" name "-" version ".tar.bz2"))
2852 (sha256
2853 (base32 "17agd27sn4a7nahvkpg0w39kv74njgdrrygs74bbvpaj8rk2hb55"))))
2854 (arguments
2855 `(#:configure-flags '("--with-gtk3" "--with-gtkspell" "--with-gnutls"
2856 "--enable-libnotify" "--enable-manual"
2857 "--enable-gkr")
2858 #:phases
2859 (modify-phases %standard-phases
2860 (add-before 'configure 'patch-gpg2
2861 (lambda* (#:key inputs #:allow-other-keys)
2862 (substitute* "pan/usenet-utils/gpg.cc"
2863 (("\"gpg2\"") (string-append "\""
2864 (assoc-ref inputs "gnupg")
2865 "/bin/gpg\"")))
2866 #t)))))
2867 (inputs
2868 `(("gmime" ,gmime-2.6)
2869 ("gnupg" ,gnupg)
2870 ("gnutls" ,gnutls)
2871 ("gtk+" ,gtk+)
2872 ("gtkspell3" ,gtkspell3)
2873 ("libnotify" ,libnotify)
2874 ("libsecret" ,libsecret)
2875 ("libxml2" ,libxml2)
2876 ("zlib" ,zlib)))
2877 (native-inputs
2878 `(("gettext-minimal" ,gettext-minimal)
2879 ("itstool" ,itstool)
2880 ("pkg-config" ,pkg-config)))
2881 (build-system gnu-build-system)
2882 (home-page "http://pan.rebelbase.com/")
2883 (synopsis "Pan newsreader")
2884 (description "@code{pan} is a Usenet newsreader that's good at both text
2885 and binaries. It supports offline reading, scoring and killfiles, yEnc, NZB,
2886 PGP handling, multiple servers, and secure connections.")
2887 ;; License of the docs: fdl-1.1; Others: gpl2.
2888 (license (list fdl1.1+ gpl2))))
2889
2890 (define-public imapfilter
2891 (package
2892 (name "imapfilter")
2893 (version "2.6.16")
2894 (source
2895 (origin
2896 (method git-fetch)
2897 (uri (git-reference
2898 (url "https://github.com/lefcha/imapfilter.git")
2899 (commit (string-append "v" version))))
2900 (file-name (git-file-name name version))
2901 (sha256
2902 (base32 "0f65sg6hhv6778fxwsz4hvarbm97dsb8jj0mg7a9qs273r35pqck"))))
2903 (build-system gnu-build-system)
2904 (arguments
2905 `(#:tests? #f
2906 #:make-flags
2907 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2908 "CC=gcc")
2909 #:phases
2910 (modify-phases %standard-phases
2911 (delete 'configure)))) ; no configure script
2912 (native-inputs
2913 `(("lua" ,lua)
2914 ("pcre" ,pcre)
2915 ("openssl" ,openssl)))
2916 (home-page "https://github.com/lefcha/imapfilter")
2917 (synopsis "IMAP mail filtering utility")
2918 (description "IMAPFilter is a mail filtering utility. It connects
2919 to remote mail servers using IMAP, sends searching queries to the server and
2920 processes mailboxes based on the results. It can be used to delete, copy,
2921 move, flag, etc. messages residing in mailboxes at the same or different mail
2922 servers. The 4rev1 and 4 versions of IMAP are supported.")
2923 (license license:expat)))
2924
2925 (define-public urlscan
2926 (package
2927 (name "urlscan")
2928 (version "0.9.4")
2929 (source
2930 (origin
2931 (method url-fetch)
2932 (uri (pypi-uri "urlscan" version))
2933 (sha256
2934 (base32 "1q0vxv9haap01vz1cbkzss62cgwb9365lv5vnkg2gbpx4g5y7a9l"))))
2935 (build-system python-build-system)
2936 (propagated-inputs
2937 `(("python-urwid" ,python-urwid)))
2938 (home-page "https://github.com/firecat53/urlscan")
2939 (synopsis "View/select the URLs in an email message or file")
2940 (description
2941 "Urlscan is a small program that is designed to integrate with the
2942 @code{mutt} mailreader to allow you to easily launch a Web browser for URLs
2943 contained in email messages. It parses an email message or file and scans it
2944 for URLs and email addresses. It then displays the URLs and their context
2945 within the message, and allows you to choose one or more URLs to send to your
2946 Web browser. Alternatively, it send a list of all URLs to stdout. It is a
2947 replacement for the @code{urlview} program.")
2948 (license gpl2)))
2949
2950 (define-public tnef
2951 (package
2952 (name "tnef")
2953 (version "1.4.18")
2954 (source
2955 (origin
2956 (method git-fetch)
2957 (uri (git-reference
2958 (url "https://github.com/verdammelt/tnef.git")
2959 (commit version)))
2960 (sha256
2961 (base32 "104g48mcm00bgiyzas2vf86331w7bnw7h3bc11ib4lp7rz6zqfck"))
2962 (file-name (git-file-name name version))))
2963 (build-system gnu-build-system)
2964 (native-inputs
2965 `(("autoconf" ,autoconf)
2966 ("automake" ,automake)))
2967 (arguments `(#:parallel-tests? #f)) ;tests are side-effect'y
2968 (home-page "https://github.com/verdammelt/tnef")
2969 (synopsis "Unpack @code{application/ms-tnef} attachments")
2970 (description
2971 "TNEF is a tar-like program that unpacks MIME attachments of type
2972 @code{application/ms-tnef}.")
2973 (license gpl2+)))
2974
2975 (define-public mumi
2976 (let ((commit "5a578328199bab51a147fbadbce12c8d06959ed6")
2977 (revision "2"))
2978 (package
2979 (name "mumi")
2980 (version (git-version "0.0.1" revision commit))
2981 (source (origin
2982 (method git-fetch)
2983 (uri (git-reference
2984 (url "https://git.elephly.net/software/mumi.git")
2985 (commit commit)))
2986 (file-name (git-file-name name version))
2987 (sha256
2988 (base32
2989 "0hngv82gd19l4q7nnbf97r120z1yagsmkp0x3lc8haza5q4mc12c"))))
2990 (build-system gnu-build-system)
2991 (arguments
2992 `(#:modules ((guix build gnu-build-system)
2993 ((guix build guile-build-system)
2994 #:select (target-guile-effective-version))
2995 (guix build utils))
2996 #:imported-modules ((guix build guile-build-system)
2997 ,@%gnu-build-system-modules)
2998
2999 #:configure-flags '("--localstatedir=/var")
3000
3001 #:phases
3002 (modify-phases %standard-phases
3003 (add-after 'install 'wrap-executable
3004 (lambda* (#:key outputs #:allow-other-keys)
3005 (let* ((out (assoc-ref outputs "out"))
3006 (bin (string-append out "/bin"))
3007 (version (target-guile-effective-version))
3008 (scm (string-append out "/share/guile/site/" version))
3009 (go (string-append out "/lib/guile/" version
3010 "/site-ccache")))
3011 (wrap-program (string-append bin "/mumi")
3012 `("GUILE_LOAD_PATH" ":" prefix
3013 (,scm ,(getenv "GUILE_LOAD_PATH")))
3014 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
3015 (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))
3016 #t))))))
3017 (inputs
3018 `(("guile-email" ,guile-email)
3019 ("guile-fibers" ,guile-fibers)
3020 ("guile-gcrypt" ,guile-gcrypt)
3021 ("guile-json" ,guile-json-3)
3022 ("guile-redis" ,guile-redis)
3023 ("guile-syntax-highlight" ,guile-syntax-highlight)
3024 ("guile-webutils" ,guile-webutils)
3025 ("guile-xapian" ,guile-xapian)
3026 ("guile" ,guile-3.0)
3027 ("mailutils" ,mailutils)))
3028 (native-inputs
3029 `(("autoconf" ,autoconf)
3030 ("automake" ,automake)
3031 ("pkg-config" ,pkg-config)))
3032 (home-page "https://git.elephly.net/software/mumi.git")
3033 (synopsis "Debbugs web interface")
3034 (description "Mumi is a Debbugs web interface.")
3035 (license agpl3+))))
3036
3037 (define-public ytnef
3038 (package
3039 (name "ytnef")
3040 (version "1.9.3")
3041 (source (origin
3042 (method git-fetch)
3043 (uri (git-reference
3044 (url "https://github.com/Yeraze/ytnef.git")
3045 (commit (string-append "v" version))))
3046 (file-name (git-file-name name version))
3047 (sha256
3048 (base32
3049 "07h48s5qf08503pp9kafqbwipdqghiif22ghki7z8j67gyp04l6l"))))
3050 (build-system gnu-build-system)
3051 (native-inputs
3052 `(("autoconf" ,autoconf)
3053 ("automake" ,automake)
3054 ("libtool" ,libtool)))
3055 (home-page "https://github.com/Yeraze/ytnef/")
3056 (synopsis "TNEF stream reader for winmail.dat files")
3057 (description "This package provides a TNEF stream reader library and
3058 related tools to process winmail.dat files.")
3059 (license gpl2+)))
3060
3061 (define-public public-inbox
3062 (let ((commit "05a06f3262a2ddbf46adb85169e13ce9127e4524")
3063 (revision "0"))
3064 (package
3065 (name "public-inbox")
3066 (version (git-version "1.2.0" revision commit))
3067 (source
3068 (origin (method git-fetch)
3069 (uri (git-reference
3070 (url "https://public-inbox.org")
3071 (commit commit)))
3072 (sha256
3073 (base32
3074 "06cclxg46gsls3x19l9s8s9x8gkjghm6gd4jb1v9ng6fds6xi2fg"))
3075 (file-name (git-file-name name version))))
3076 (build-system perl-build-system)
3077 (arguments
3078 '(#:phases
3079 (modify-phases %standard-phases
3080 (add-before 'configure 'qualify-paths
3081 (lambda _
3082 ;; Use absolute paths for 'xapian-compact'.
3083 (let ((xapian-compact (which "xapian-compact")))
3084 (substitute* "script/public-inbox-compact"
3085 (("xapian-compact") xapian-compact)))
3086 #t))
3087 (add-before 'check 'pre-check
3088 (lambda _
3089 (substitute* "t/spawn.t"
3090 (("\\['env'\\]") (string-append "['" (which "env") "']")))
3091 (substitute* "t/ds-leak.t"
3092 (("/bin/sh") (which "sh")))
3093 (invoke "./certs/create-certs.perl")
3094 ;; XXX: This test fails due to zombie process is not reaped by
3095 ;; the builder.
3096 (substitute* "t/httpd-unix.t"
3097 (("^SKIP: \\{") "SKIP: { skip('Guix');"))
3098 #t))
3099 (add-after 'install 'wrap-programs
3100 (lambda* (#:key inputs outputs #:allow-other-keys)
3101 (let ((out (assoc-ref outputs "out")))
3102 (for-each
3103 (lambda (prog)
3104 (wrap-program prog
3105 ;; Let those scripts find their perl modules.
3106 `("PERL5LIB" ":" prefix
3107 (,(string-append out "/lib/perl5/site_perl")
3108 ,(getenv "PERL5LIB")))
3109 ;; 'git' is invoked in various files of the PublicInbox
3110 ;; perl module.
3111 `("PATH" ":" prefix
3112 (,(string-append (assoc-ref inputs "git") "/bin")))))
3113 (find-files (string-append out "/bin"))))
3114 #t)))))
3115 (native-inputs
3116 `(("git" ,git)
3117 ("xapian" ,xapian)
3118 ;; For testing.
3119 ("lsof" ,lsof)
3120 ("openssl" ,openssl)))
3121 (inputs
3122 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
3123 ("perl-dbi" ,perl-dbi)
3124 ("perl-email-address-xs" ,perl-email-address-xs)
3125 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
3126 ("perl-email-mime" ,perl-email-mime)
3127 ("perl-email-simple" ,perl-email-simple)
3128 ("perl-net-server" ,perl-net-server)
3129 ("perl-filesys-notify-simple" ,perl-filesys-notify-simple)
3130 ("perl-plack-middleware-deflater" ,perl-plack-middleware-deflater)
3131 ("perl-plack-middleware-reverseproxy" ,perl-plack-middleware-reverseproxy)
3132 ("perl-plack" ,perl-plack)
3133 ("perl-search-xapian" ,perl-search-xapian)
3134 ("perl-timedate" ,perl-timedate)
3135 ("perl-uri-escape" ,perl-uri-escape)
3136 ;; For testing.
3137 ("perl-ipc-run" ,perl-ipc-run)
3138 ("perl-xml-feed" ,perl-xml-feed)))
3139 (home-page "https://public-inbox.org/README.html")
3140 (synopsis "Archive mailing lists in git repositories")
3141 (description
3142 "public-inbox implements the sharing of an email inbox via git to
3143 complement or replace traditional mailing lists. Readers may read via NNTP,
3144 Atom feeds or HTML archives.")
3145 (license agpl3+))))
3146
3147 (define-public sylpheed
3148 (package
3149 (name "sylpheed")
3150 (version "3.7.0")
3151 (source (origin
3152 (method url-fetch)
3153 (uri (string-append "https://sylpheed.sraoss.jp/sylpheed/v3.7/"
3154 name "-" version ".tar.xz"))
3155 (sha256
3156 (base32
3157 "0j9y5vdzch251s264diw9clrn88dn20bqqkwfmis9l7m8vmwasqd"))))
3158 (build-system gnu-build-system)
3159 (native-inputs
3160 `(("pkg-config" ,pkg-config)))
3161 (inputs
3162 `(("bogofilter" ,bogofilter)
3163 ("compface" ,compface)
3164 ("gnupg" ,gnupg-1)
3165 ("gpgme" ,gpgme)
3166 ("gtk+-2.0" ,gtk+-2)
3167 ("gtkspell" ,gtkspell3)
3168 ("libnsl" ,libnsl)
3169 ("openldap" ,openldap)
3170 ("openssl" ,openssl)))
3171 (home-page "https://sylpheed.sraoss.jp/en/")
3172 (synopsis "Lightweight GTK+ email client")
3173 (description
3174 "Sylpheed is a simple, lightweight but featureful, and easy-to-use e-mail
3175 client. Sylpheed provides intuitive user-interface. Sylpheed is also
3176 designed for keyboard-oriented operation.")
3177 (license gpl2+)))