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