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