gnu: Remove obsolete bootstrap workaround phases.
[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>
40864d79 30;;; Copyright © 2018, 2019 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")
d98438e6 524 (version "3.2.5")
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
d98438e6 532 "0ndsg1z1kq4w4caascydvialpyn4rfbjdn7xclzbzhw53x85cxgv"))))
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)))))
d2938d59
EB
784 (home-page "http://www.djcbsoftware.nl/code/mu/")
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.
796 (let ((commit "ad30b5e9c85f0465aeeeac461d8c32d95775d450")
797 (revision "1"))
798 (package
799 (inherit mu)
800 (name "mumimu")
03460d2b
CB
801 ;; TODO The version here used to be (package-version guile-email), but
802 ;; that code caused problems
803 (version (git-version "0.2.2" revision commit))
c7b2b539
LC
804 (source (origin
805 (method git-fetch)
806 (uri (git-reference
807 (url "https://git.elephly.net/software/mumimu.git")
808 (commit commit)))
809 (file-name (git-file-name name version))
810 (sha256
811 (base32
812 "1y8r8csvkyxncgpi469dir4n4sga4z9xdzc18qh5s8bk29qj689n"))))
813 (arguments
814 (substitute-keyword-arguments (package-arguments mu)
815 ((#:tests? anything '())
816 #f)
817 ((#:phases phases)
818 `(modify-phases ,phases
819 (replace 'patch-configure
820 (lambda _
821 (delete-file "autogen.sh")
822 (substitute* "configure.ac"
823 ;; Use latest Guile
824 (("guile-2.0") "guile-2.2"))
825 (substitute* '("guile/Makefile.am"
826 "guile/mu/Makefile.am")
827 (("share/guile/site/2.0/") "share/guile/site/2.2/"))
828 #t))
829 (replace 'fix-ffi
830 (lambda* (#:key outputs #:allow-other-keys)
831 (substitute* "guile/mumimu.scm"
832 (("\"libguile-mu\"")
833 (format #f "\"~a/lib/libguile-mumimu\""
834 (assoc-ref outputs "out"))))
835 #t))
836 (delete 'install-emacs-autoloads)))
837 ((#:configure-flags flags)
838 '("--disable-gtk"
839 "--disable-webkit"
840 "--disable-mu4e"))))
841 (native-inputs
842 `(("pkg-config" ,pkg-config)
843 ("autoconf" ,autoconf)
844 ("automake" ,automake)
845 ("libtool" ,libtool)
846 ("glib" ,glib "bin")
847 ("tzdata" ,tzdata-for-tests)
848 ("texinfo" ,texinfo))))))
849
a2cb16b0
TS
850(define-public alot
851 (package
852 (name "alot")
3f81ca32 853 (version "0.5.1")
a2cb16b0
TS
854 (source (origin
855 (method url-fetch)
1b94f182
TS
856 ;; package author intends on distributing via github rather
857 ;; than pypi:
858 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
a2cb16b0
TS
859 (uri (string-append "https://github.com/pazz/alot/archive/"
860 version ".tar.gz"))
861 (file-name (string-append "alot-" version ".tar.gz"))
862 (sha256
863 (base32
3f81ca32 864 "0wax30hjzmkqfml7hig1dqw1v1y63yc0cgbzl96x58b9h2ggqx3a"))))
a2cb16b0
TS
865 (build-system python-build-system)
866 (arguments
3f81ca32 867 `(;; python 3 is currently unsupported, more info:
fe3b8862 868 ;; https://github.com/pazz/alot/blob/master/docs/source/faq.rst
a2cb16b0 869 #:python ,python-2))
3f81ca32
TS
870 (native-inputs
871 `(("python2-mock" ,python2-mock)))
a2cb16b0
TS
872 (inputs
873 `(("python2-magic" ,python2-magic)
874 ("python2-configobj" ,python2-configobj)
875 ("python2-twisted" ,python2-twisted)
876 ("python2-urwid" ,python2-urwid)
877 ("python2-urwidtrees" ,python2-urwidtrees)
878 ("python2-pygpgme" ,python2-pygpgme)
879 ("python2-notmuch" ,python2-notmuch)))
880 (home-page "https://github.com/pazz/alot")
cfcfc6ab 881 (synopsis "Command-line MUA using @code{notmuch}")
a2cb16b0 882 (description
cfcfc6ab 883 "Alot is an experimental terminal mail user agent (@dfn{MUA}) based on
a2cb16b0
TS
884@code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
885 (license gpl3+)))
886
0350a8bb
HG
887(define-public notifymuch
888 (let
889 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
890 (revision "1"))
891 (package
892 (name "notifymuch")
893 (version (string-append "0.1-" revision "." (string-take commit 7)))
894 (source
895 (origin
896 (method git-fetch)
897 (uri (git-reference
898 (url "https://github.com/kspi/notifymuch.git")
899 (commit commit)))
900 (sha256
901 (base32
902 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
903 (file-name (string-append name "-" version "-checkout"))))
904 (build-system python-build-system)
905 (inputs
906 `(("python-notmuch" ,python-notmuch)
907 ("python-pygobject" ,python-pygobject)
908 ("gobject-introspection" ,gobject-introspection)
909 ("libnotify" ,libnotify)
910 ("gtk+" ,gtk+)))
911 (arguments
912 `(#:phases
913 (modify-phases %standard-phases
914 (add-after 'install 'wrap-binary
915 (lambda* (#:key outputs #:allow-other-keys)
916 (let* ((out (assoc-ref outputs "out"))
917 (bin (string-append out "/bin/notifymuch")))
918 (wrap-program bin
919 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
920 `("GI_TYPELIB_PATH" ":" prefix
921 (,(getenv "GI_TYPELIB_PATH")
922 ,(string-append out "/lib/girepository-1.0")))))
923 #t)))))
924 (home-page "https://github.com/kspi/notifymuch")
925 (synopsis "Displays notifications for changes in the notmuch email database")
926 (description "notifymuch displays desktop notifications for messages in
927the notmuch database. The notifications are sent using libnotify to a
928notification daemon. The query to find messages to send a notification about
929is configurable, and a notification for the same message will not be send
930within a configurable period (defaults to 48 hours). To use notifymuch, run
931@command{notifymuch} after new mail is indexed, this can be automated by
932invoking @command{notifymuch} from the post-new hook.")
933 (license gpl3))))
934
1bd3f849
DT
935(define-public notmuch
936 (package
937 (name "notmuch")
60392114 938 (version "0.29.3")
1bd3f849
DT
939 (source (origin
940 (method url-fetch)
866fade9 941 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
80fa745c 942 version ".tar.xz"))
1bd3f849
DT
943 (sha256
944 (base32
60392114 945 "0dfwa38vgnxk9cvvpza66szjgp8lir6iz6yy0cry9593lywh9xym"))))
1bd3f849
DT
946 (build-system gnu-build-system)
947 (arguments
d738f134
AI
948 `(#:modules ((guix build gnu-build-system)
949 ((guix build emacs-build-system) #:prefix emacs:)
950 (guix build utils))
951 #:imported-modules (,@%gnu-build-system-modules
952 (guix build emacs-build-system)
953 (guix build emacs-utils))
76472ed9 954 #:make-flags (list "V=1") ; verbose test output
eb537f57 955 #:phases (modify-phases %standard-phases
6cf27c89
MB
956 (add-after 'unpack 'patch-notmuch-lib.el
957 (lambda _
958 (substitute* "emacs/notmuch-lib.el"
959 (("/bin/sh") (which "sh")))
960 #t))
eb537f57
DT
961 (replace 'configure
962 (lambda* (#:key outputs #:allow-other-keys)
963 (setenv "CC" "gcc")
964 (setenv "CONFIG_SHELL" (which "sh"))
ee886454 965
d738f134
AI
966 (let* ((out (assoc-ref outputs "out"))
967 (elisp
1cd91499 968 (string-append out "/share/emacs/site-lisp/")))
82d2dfa0
TGR
969 (invoke "./configure"
970 (string-append "--prefix=" out)
971 (string-append "--emacslispdir=" elisp)
972 (string-append "--emacsetcdir=" elisp)))))
6cf27c89
MB
973 (add-before 'check 'prepare-test-environment
974 (lambda _
975 (setenv "TEST_CC" "gcc")
976 ;; Patch various inline shell invocations.
977 (substitute* (find-files "test" "\\.sh$")
978 (("/bin/sh") (which "sh")))
d738f134
AI
979 #t))
980 (add-after 'install 'make-autoloads
981 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
1bd3f849 982 (native-inputs
2c5b91dc 983 `(("bash-completion" ,bash-completion)
76472ed9 984 ("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for some tests
2c5b91dc 985 ("pkg-config" ,pkg-config)
3d3c07f3
MB
986 ("python" ,python)
987 ("python-docutils" ,python-docutils)
556530c9 988 ("sphinx" ,python-sphinx)
6cf27c89
MB
989
990 ;; The following are required for tests only.
991 ("which" ,which)
992 ("dtach" ,dtach)
993 ("gnupg" ,gnupg)
994 ("man" ,man-db)
995 ("perl" ,perl)))
1bd3f849 996 (inputs
2c5b91dc 997 `(("glib" ,glib)
1bd3f849
DT
998 ("gmime" ,gmime)
999 ("talloc" ,talloc)
1000 ("xapian" ,xapian)
1001 ("zlib" ,zlib)))
540d6cc7 1002 (home-page "https://notmuchmail.org/")
1bd3f849
DT
1003 (synopsis "Thread-based email index, search, and tagging")
1004 (description
1005 "Notmuch is a command-line based program for indexing, searching, read-
1006ing, and tagging large collections of email messages.")
1007 (license gpl3+)))
1008
8a75c589 1009(define-public notmuch-addrlookup-c
9694b44e
AI
1010 (package
1011 (name "notmuch-addrlookup-c")
1012 (version (string-append "9"))
1013 (source (origin
1014 (method git-fetch)
1015 (uri (git-reference
1016 (url "https://github.com/aperezdc/notmuch-addrlookup-c.git")
1017 (commit (string-append "v" version))))
1018 (file-name (string-append name "-" version "-checkout"))
1019 (sha256
1020 (base32
1021 "1j3zdx161i1x4w0nic14ix5i8hd501rb31daf8api0k8855sx4rc"))))
1022 (build-system gnu-build-system)
1023 (arguments
1024 '(#:tests? #f ; no tests
1025 #:make-flags (list "CC=gcc")
1026 #:phases (modify-phases %standard-phases
1027 (delete 'configure)
1028 ;; Remove vim code completion config, it's not needed to
1029 ;; build (or be patched).
1030 (add-before 'patch-source-shebangs 'delete-ycm-file
1031 (lambda _ (delete-file ".ycm_extra_conf.py")))
1032 (replace 'install
1033 (lambda* (#:key outputs #:allow-other-keys)
1034 (let ((bin (string-append
1035 (assoc-ref outputs "out") "/bin")))
1036 (install-file "notmuch-addrlookup" bin)))))))
1037 (native-inputs
1038 `(("pkg-config" ,pkg-config)))
1039 (inputs
1040 `(("glib" ,glib)
1041 ("notmuch" ,notmuch)))
1042 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
1043 (synopsis "Address lookup tool for Notmuch")
1044 (description "This is an address lookup tool using a Notmuch database,
8a75c589 1045useful for email address completion.")
9694b44e 1046 (license license:expat)))
8a75c589 1047
4b6909bc
TS
1048(define-public python-notmuch
1049 (package
1050 (name "python-notmuch")
540d6cc7 1051 (version (package-version notmuch))
4b6909bc
TS
1052 ;; Notmuch python bindings are now unavailable on pypi. The
1053 ;; bindings are distributed via the notmuch release tarball.
1054 (source (package-source notmuch))
1055 (build-system python-build-system)
1056 (inputs `(("notmuch" ,notmuch)))
1057 (arguments
1058 `(#:tests? #f ; no "test" target
1059 #:phases
1060 (modify-phases %standard-phases
1061 ;; This python package lives in a subdirectory of the notmuch source
1062 ;; tree, so chdir into it before building.
1063 (add-after 'unpack 'enter-python-dir
1064 (lambda _ (chdir "bindings/python") #t))
1065 ;; Make sure the correct notmuch shared library gets loaded.
1066 (add-before 'build 'set-libnotmuch-file-name
1067 (lambda* (#:key inputs #:allow-other-keys)
1068 (let ((notmuch (assoc-ref inputs "notmuch")))
1069 (substitute* "notmuch/globals.py"
1070 (("libnotmuch\\.so\\.")
1071 (string-append notmuch "/lib/libnotmuch.so.")))
1072 #t))))))
540d6cc7 1073 (home-page (package-home-page notmuch))
4b6909bc
TS
1074 (synopsis "Python bindings of the Notmuch mail indexing library")
1075 (description
1076 "This package provides Python bindings to use the Notmuch mail indexing
1077and search library.")
1078 (license gpl3+)))
1079
1c74da21 1080(define-public python2-notmuch
caa6fc89 1081 (package-with-python2 python-notmuch))
1c74da21 1082
98e9e22f
SB
1083(define-public getmail
1084 (package
1085 (name "getmail")
88e903a5 1086 (version "5.14")
98e9e22f
SB
1087 (source
1088 (origin
1089 (method url-fetch)
1090 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
7e14ed93 1091 "getmail-" version ".tar.gz"))
98e9e22f 1092 (sha256
88e903a5 1093 (base32 "1hcrd9h4g12f5gvl1djsbchcjry02ghq4icdr897s8v48pkrzagk"))))
98e9e22f
SB
1094 (build-system python-build-system)
1095 (arguments
88e903a5 1096 `(#:tests? #f ; no tests
98e9e22f
SB
1097 #:python ,python-2))
1098 (home-page "http://pyropus.ca/software/getmail/")
1099 (synopsis "Mail retriever")
1100 (description
1101 "A flexible, extensible mail retrieval system with support for
1102POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
1103arbitrary message filtering, single-user and domain-mailboxes, and many other
1104useful features.")
1105
1106 ;; License is specified in file '__init__.py'.
1107 (license gpl2)))
1108
f58f767b
JL
1109(define-public libetpan
1110 (package
1111 (name "libetpan")
0aa20371 1112 (version "1.9.3")
f58f767b 1113 (source (origin
aae96f8f
TGR
1114 (method git-fetch)
1115 (uri (git-reference
1116 (url "https://github.com/dinhviethoa/libetpan.git")
1117 (commit version)))
1118 (file-name (git-file-name name version))
f58f767b 1119 (sha256
0aa20371 1120 (base32 "19g4qskg71jv7sxfxsdkjmrxk9mk5kf9b6fhw06g6wvm3205n95f"))))
f58f767b 1121 (build-system gnu-build-system)
464f5447 1122 (native-inputs `(("autoconf" ,autoconf-wrapper)
f58f767b 1123 ("automake" ,automake)
3246cc91 1124 ("libtool" ,libtool)
f58f767b
JL
1125 ("pkg-config" ,pkg-config)))
1126 (propagated-inputs
1127 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
1128 ;; libraries need to be propagated.
1129 `(("cyrus-sasl" ,cyrus-sasl)
1130 ("openssl" ,openssl)))
1131 (inputs
1132 `(("curl" ,curl)
c1748912
EF
1133 ("expat" ,expat)
1134 ("zlib" ,zlib)))
f58f767b 1135 (arguments
778d6b52 1136 '(#:configure-flags
f58f767b 1137 '("--disable-static" "--disable-db")))
81fb037f 1138 (home-page "https://www.etpan.org/libetpan.html")
f58f767b
JL
1139 (synopsis "Portable middleware for email access")
1140 (description
1141 "The purpose of this mail library is to provide a portable, efficient
1142framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
1143provides an API for C language. It's the low-level API used by MailCore and
1144MailCore 2.")
a979eea9 1145 (license bsd-3)))
f58f767b 1146
ee6e780b
DM
1147(define-public compface
1148 (package
1149 (name "compface")
1150 (version "1.5.2")
1151 (source (origin
1152 (method url-fetch)
1153 (uri (string-append "https://ftp.heanet.ie/mirrors/"
1154 "ftp.xemacs.org/aux/"
1155 name "-" version ".tar.gz"))
1156 (sha256
1157 (base32
1158 "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
1159 (build-system gnu-build-system)
1160 (arguments
1161 `(#:tests? #f))
1162 (synopsis "Portrait image compressor")
586ddde5 1163 (description "This package takes your 48x48x1 portrait image and
ee6e780b
DM
1164compresses it.")
1165 (home-page "http://www.cs.indiana.edu/pub/faces/")
1166 (license (x11-style "file://README"))))
1167
e8435c4d
JL
1168(define-public claws-mail
1169 (package
1170 (name "claws-mail")
01a0b141 1171 (version "3.17.4")
e8435c4d
JL
1172 (source (origin
1173 (method url-fetch)
1174 (uri (string-append
ca6f5ab8 1175 "https://www.claws-mail.org/releases/claws-mail-" version
6ea4b094 1176 ".tar.xz"))
e8435c4d 1177 (sha256
ec92806a 1178 (base32
01a0b141 1179 "00mfhaac16sv67rwiq98hr4nl5zmd1h2afswwwksdcsi3q9x23jr"))))
e8435c4d
JL
1180 (build-system gnu-build-system)
1181 (native-inputs `(("pkg-config" ,pkg-config)))
1182 (inputs `(("bogofilter" ,bogofilter)
1183 ("curl" ,curl)
1184 ("dbus-glib" ,dbus-glib)
e8435c4d
JL
1185 ("enchant" ,enchant)
1186 ("expat" ,expat)
1187 ("ghostscript" ,ghostscript)
1188 ("hicolor-icon-theme" ,hicolor-icon-theme)
1189 ("gnupg" ,gnupg)
1190 ("gnutls" ,gnutls)
1191 ("gpgme" ,gpgme)
1192 ("gtk" ,gtk+-2)
1193 ("libarchive" ,libarchive)
1194 ("libcanberra" ,libcanberra)
1195 ("libetpan" ,libetpan)
fc9a93cb 1196 ("libical" ,libical)
e8435c4d
JL
1197 ("libnotify" ,libnotify)
1198 ("libsm" ,libsm)
1199 ("libxml2" ,libxml2)
1200 ("perl" ,perl)
f6292baf 1201 ("python-2" ,python-2)
3d88855d
DM
1202 ("mime-info" ,shared-mime-info)
1203 ("startup-notification" ,startup-notification)))
e8435c4d
JL
1204 (arguments
1205 '(#:configure-flags
9716f621
MH
1206 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant"
1207 "--enable-ldap")
ff4192ff
DM
1208 #:make-flags
1209 ;; Disable updating icon cache since it's done by the profile hook.
1210 ;; Conflict with other packages in the profile would be inevitable
1211 ;; otherwise.
1212 '("gtk_update_icon_cache=true")
f6292baf
EB
1213 #:phases (modify-phases %standard-phases
1214 (add-before 'build 'patch-mime
1215 (lambda* (#:key inputs #:allow-other-keys)
1216 (substitute* "src/procmime.c"
1217 (("/usr/share/mime/globs")
1218 (string-append (assoc-ref inputs "mime-info")
1219 "/share/mime/globs"))))))))
e8435c4d
JL
1220 (synopsis "GTK-based Email client")
1221 (description
1222 "Claws-Mail is an email client (and news reader) based on GTK+. The
1223appearance and interface are designed to be familiar to new users coming from
1224other popular email clients, as well as experienced users. Almost all commands
1225are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
1226which can add many functionalities to the base client.")
ba5c926c 1227 (home-page "https://www.claws-mail.org/")
e8435c4d
JL
1228 (license gpl3+))) ; most files are actually public domain or x11
1229
d6e941bc
1230(define-public msmtp
1231 (package
1232 (name "msmtp")
a4fd9423 1233 (version "1.8.7")
d6e941bc
1234 (source
1235 (origin
1236 (method url-fetch)
1a80f1a9 1237 (uri (string-append "https://marlam.de/msmtp/releases/"
d23d1ddf
LF
1238 "/msmtp-" version ".tar.xz"))
1239 (sha256
a4fd9423 1240 (base32 "1waiiksa57byb7gvx1zmh6srvl6r8rvwqklk0slb3iaf4kfbqlws"))))
d6e941bc
1241 (build-system gnu-build-system)
1242 (inputs
91b3a6d4 1243 `(("libsecret" ,libsecret)
d6e941bc
1244 ("gnutls" ,gnutls)
1245 ("zlib" ,zlib)
1246 ("gsasl" ,gsasl)))
1247 (native-inputs
1248 `(("pkg-config" ,pkg-config)))
1a80f1a9 1249 (home-page "https://marlam.de/msmtp/")
d6e941bc
1250 (arguments
1251 `(#:configure-flags (list "--with-libgsasl"
1252 "--with-libidn"
823e2ed4
LF
1253 "--with-tls=gnutls")
1254 #:phases
1255 (modify-phases %standard-phases
34e549d8 1256 (add-after 'install 'install-additional-files
823e2ed4
LF
1257 (lambda* (#:key outputs #:allow-other-keys)
1258 (let* ((out (assoc-ref outputs "out"))
1259 (bin (string-append out "/bin"))
1260 (doc (string-append out "/share/doc/msmtp"))
34e549d8
EF
1261 (msmtpq "scripts/msmtpq")
1262 (vimfiles (string-append out "/share/vim/vimfiles/plugin")))
823e2ed4
LF
1263 (install-file (string-append msmtpq "/msmtpq") bin)
1264 (install-file (string-append msmtpq "/msmtp-queue") bin)
1265 (install-file (string-append msmtpq "/README.msmtpq") doc)
34e549d8 1266 (install-file "scripts/vim/msmtp.vim" vimfiles)
823e2ed4 1267 #t))))))
d6e941bc
1268 (synopsis
1269 "Simple and easy to use SMTP client with decent sendmail compatibility")
1270 (description
1271 "msmtp is an SMTP client. In the default mode, it transmits a mail to
1272an SMTP server (for example at a free mail provider) which takes care of further
1273delivery.")
1274 (license gpl3+)))
1275
66cc3ab2
TUBK
1276(define-public exim
1277 (package
1278 (name "exim")
cda8250b 1279 (version "4.93.0.4")
66cc3ab2
TUBK
1280 (source
1281 (origin
1282 (method url-fetch)
c9b99e88
TGR
1283 (uri (let ((file-name (string-append "exim-" version ".tar.xz")))
1284 (list (string-append "https://ftp.exim.org/pub/exim/exim4/"
1285 file-name)
1286 ;; ‘Fix’ releases (exim-x.y.z.f) are kept separately.
1287 (string-append "https://ftp.exim.org/pub/exim/exim4/fixes/"
1288 file-name)
1289 ;; After a new non-fix release, the old one is moved here.
1290 (string-append "https://ftp.exim.org/pub/exim/exim4/old/"
1291 file-name))))
66cc3ab2 1292 (sha256
c9b99e88 1293 (base32 "01g4sfycv13glnmfrapwhjbdw6z1z7w5bwjldxjmglwfw5p3czak"))))
66cc3ab2
TUBK
1294 (build-system gnu-build-system)
1295 (inputs
15871b52 1296 `(("bdb" ,bdb-5.3) ; ‘#error Version 6 and later BDB API is not supported’
cda8250b 1297 ("gnutls" ,gnutls/dane)
66cc3ab2
TUBK
1298 ("gzip" ,gzip)
1299 ("bzip2" ,bzip2)
1300 ("xz" ,xz)
66cc3ab2 1301 ("perl" ,perl)
c315d370 1302 ("libnsl" ,libnsl)
66cc3ab2
TUBK
1303 ("libxt" ,libxt)
1304 ("libxaw" ,libxaw)))
1305 (native-inputs
42773138 1306 `(("pcre" ,pcre "bin")
cda8250b
TGR
1307 ("perl" ,perl)
1308 ("pkg-config" ,pkg-config)))
66cc3ab2
TUBK
1309 (arguments
1310 '(#:phases
dc1d3cde
KK
1311 (modify-phases %standard-phases
1312 (replace 'configure
1313 ;; We'd use #:make-flags but the top-level Makefile calls others
1314 ;; recursively, so just set all variables this way.
1315 (lambda* (#:key outputs inputs #:allow-other-keys)
1316 (substitute* '("Makefile" "OS/Makefile-Default")
1317 (("(RM_COMMAND=).*" all var)
1318 (string-append var "rm\n")))
1319 (copy-file "src/EDITME" "Local/Makefile")
1320 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
1321 (let ((out (assoc-ref outputs "out"))
1322 (gzip (assoc-ref inputs "gzip"))
1323 (bzip2 (assoc-ref inputs "bzip2"))
1324 (xz (assoc-ref inputs "xz")))
1325 (substitute* '("Local/Makefile")
1326 (("(BIN_DIRECTORY=).*" all var)
1327 (string-append var out "/bin\n"))
1328 (("(CONFIGURE_FILE=).*" all var)
1329 (string-append var out "/etc/exim.conf\n"))
1330 (("(EXIM_USER=).*" all var)
1331 (string-append var "nobody\n"))
1332 (("(FIXED_NEVER_USERS=).*" all var)
15871b52 1333 (string-append var "\n")) ; XXX no root in build environment
dc1d3cde
KK
1334 (("(COMPRESS_COMMAND=).*" all var)
1335 (string-append var gzip "/bin/gzip\n"))
1336 (("(ZCAT_COMMAND=).*" all var)
cda8250b
TGR
1337 (string-append var gzip "/bin/zcat\n"))
1338 (("# (USE_GNUTLS(|_PC)=.*)" all line)
1339 (string-append line "\n")))
1340 ;; This file has hard-coded relative file names for tools despite
1341 ;; the zcat configuration above.
dc1d3cde
KK
1342 (substitute* '("src/exigrep.src")
1343 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
1344 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
1345 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
1346 (("'lzma'") (string-append "'" xz "/bin/lzma'"))))
1347 #t))
1348 (add-before 'build 'fix-sh-paths
1349 (lambda* (#:key inputs #:allow-other-keys)
1350 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
1351 (("SHELL=/bin/sh") "SHELL=sh"))
1352 (substitute* '("scripts/Configure-config.h")
1353 (("\\| /bin/sh") "| sh"))
1354 (let ((bash (assoc-ref inputs "bash")))
1355 (substitute* '("scripts/Configure-eximon")
1356 (("#!/bin/sh") (string-append "#!" bash "/bin/sh"))))
bb335e84
TGR
1357 #t))
1358 (add-before 'build 'build-reproducibly
1359 (lambda _
1360 ;; The ‘compilation number’ is incremented for every build from the
1361 ;; same source tree. It appears to vary over different (parallel?)
1362 ;; builds. Make it a ‘constant number’ instead.
1363 (substitute* "src/version.c"
1364 (("#include \"cnumber.h\"") "1")))))
cda8250b
TGR
1365 #:make-flags
1366 (list "CC=gcc"
1367 "INSTALL_ARG=-no_chown")
1368 ;; No 'check' target. There is a test suite in test/, which assumes that
1369 ;; certain build options were (not) used and that it can freely ‘sudo’.
66cc3ab2 1370 #:tests? #f))
85a9ffcb 1371 (home-page "https://www.exim.org/")
66cc3ab2
TUBK
1372 (synopsis
1373 "Message Transfer Agent (MTA) developed at the University of Cambridge")
1374 (description
1375 "Exim is a message transfer agent (MTA) developed at the University of
1376Cambridge for use on Unix systems connected to the Internet. In style it is
1377similar to Smail 3, but its facilities are more general. There is a great
1378deal of flexibility in the way mail can be routed, and there are extensive
1379facilities for checking incoming mail.")
1380 (license gpl2+)))
1381
7d2b784b
MW
1382(define-public dovecot
1383 (package
1384 (name "dovecot")
48947e6b 1385 (version "2.3.9.2")
7d2b784b
MW
1386 (source
1387 (origin
1388 (method url-fetch)
c8608faf 1389 (uri (string-append "https://www.dovecot.org/releases/"
7d2b784b 1390 (version-major+minor version) "/"
2fa1a3a8 1391 "dovecot-" version ".tar.gz"))
c03b355f 1392 (sha256
48947e6b 1393 (base32 "1yc6hi4hqg4hcc4495sf4m5f1lnargphi6dawj43if21vncgp127"))))
7d2b784b
MW
1394 (build-system gnu-build-system)
1395 (native-inputs
1396 `(("pkg-config" ,pkg-config)))
1397 (inputs
1398 `(("openssl" ,openssl)
1399 ("zlib" ,zlib)
1400 ("bzip2" ,bzip2)
fd5c70f8
AW
1401 ("sqlite" ,sqlite)
1402 ("linux-pam" ,linux-pam)))
7d2b784b
MW
1403 (arguments
1404 `(#:configure-flags '("--sysconfdir=/etc"
1405 "--localstatedir=/var")
f762e49f
TGR
1406 #:phases
1407 (modify-phases %standard-phases
f762e49f
TGR
1408 (add-after 'unpack 'patch-file-names
1409 (lambda _
1410 (substitute* "src/lib-program-client/test-program-client-local.c"
1411 (("(/bin/| )cat") (which "cat"))
1412 (("/bin/echo") (which "echo"))
1413 (("/bin/false") (which "false"))
1414 (("/bin/sh") (which "bash"))
1415 (("head") (which "head"))
1416 (("sleep") (which "sleep")))
1417 (substitute* (list "src/lib-smtp/test-bin/sendmail-exit-1.sh"
1418 "src/lib-smtp/test-bin/sendmail-success.sh")
1419 (("cat") (which "cat")))
37fc44ea
TGR
1420 #t))
1421 (replace 'install
1422 (lambda* (#:key make-flags #:allow-other-keys)
1423 ;; Simple hack to avoid installing a trivial README in /etc.
1424 (apply invoke "make" "install" "sysconfdir=/tmp/bogus"
1425 make-flags))))))
c8608faf 1426 (home-page "https://www.dovecot.org")
7d2b784b
MW
1427 (synopsis "Secure POP3/IMAP server")
1428 (description
1429 "Dovecot is a mail server whose major goals are security and reliability.
1430It supports mbox/Maildir and its own dbox/mdbox formats.")
1431 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
1432 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
1433 ;; Unicode, Inc. License Agreement for Data Files and Software.
1434 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
1435
944a5cdd 1436(define-public dovecot-trees
cf47a8a5 1437 (package
1438 (name "dovecot-trees")
1439 (version "2.1.0")
1440 (source
1441 (origin
1442 (method url-fetch)
1443 (uri (string-append "https://0xacab.org/riseuplabs/trees/repository/"
1444 "archive.tar.gz?ref=v" version))
1445 (file-name (string-append name "-" version ".tar.gz"))
1446 (sha256
1447 (base32
0e66f4a1
TGR
1448 "0rkk10b1bsjz979sc864vpgcdchy7yxwmyv4ik50lar1h6awdnrf"))
1449 (patches
1450 (search-patches "dovecot-trees-support-dovecot-2.3.patch"))))
cf47a8a5 1451 (build-system gnu-build-system)
1452 (native-inputs
1453 `(("automake" ,automake)
1454 ("autoconf" ,autoconf)
1455 ("libtool" ,libtool)
1456 ("dovecot" ,dovecot)
1457 ("pkg-config" ,pkg-config)))
1458 (inputs
1459 `(("libsodium" ,libsodium)))
1460 (arguments
1461 `(#:tests? #f ;No tests exist.
1462 #:configure-flags (list (string-append "--with-dovecot="
1463 (assoc-ref %build-inputs "dovecot")
7b0efd4c 1464 "/lib/dovecot"))))
cf47a8a5 1465 (home-page "https://0xacab.org/riseuplabs/trees")
1466 (synopsis "NaCL-based Dovecot email storage encryption plugin")
1467 (description
1468 "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
944a5cdd 1469Dovecot encryption plugin. This plugin adds individually encrypted mail
1470storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
1471which uses OpenSSL and RSA keypairs. TREES works in a similar way, but uses
1472the Sodium crypto library (based on NaCL).
1473
1474How it works:
1475@enumerate
1476@item On IMAP log in, the user's cleartext password is passed to the plugin.
1477@item The plugin creates an argon2 digest from the password.
1478@item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
1479@item Inside the secretbox is stored a Curve25519 private key.
1480@item The Curve25519 private key is used to decrypt each individual message,
b3a47662 1481using libsodium sealed boxes.
944a5cdd 1482@item New mail is encrypted as it arrives using the Curve25519 public key.
1483@end enumerate\n")
cf47a8a5 1484 (license agpl3)))
944a5cdd 1485
a4651f64 1486(define-public dovecot-libsodium-plugin
1487 (let ((commit "044de73c01c35385df0105f6b387bec5d5317ce7")
1488 (revision "1"))
1489 (package
1490 (name "dovecot-libsodium-plugin")
1491 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
1492 (source
1493 (origin
1494 (method git-fetch)
1495 (uri (git-reference
1496 (url "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1497 (commit commit)))
1498 (file-name (string-append name "-" version "-checkout"))
1499 (sha256
1500 (base32
1501 "13h07l7xy713zchnj2p9fhvq7fdl4zy1ai94li3ygkqjjj8hrgas"))))
1502 (build-system gnu-build-system)
1503 (native-inputs
1504 `(("automake" ,automake)
1505 ("autoconf" ,autoconf)
1506 ("libtool" ,libtool)
1507 ("dovecot" ,dovecot)
1508 ("pkg-config" ,pkg-config)))
1509 (inputs
1510 `(("libsodium" ,libsodium)))
1511 (arguments
1512 `(#:tests? #f ;No tests exist.
1513 #:configure-flags (list (string-append "--with-dovecot="
1514 (assoc-ref %build-inputs "dovecot")
1f53fdae 1515 "/lib/dovecot"))))
a4651f64 1516 (home-page "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1517 (synopsis "Libsodium password hashing schemes plugin for Dovecot")
1518 (description
1519 "@code{dovecot-libsodium-plugin} provides libsodium password
1520hashing schemes plugin for @code{Dovecot}.")
1521 (license gpl3+))))
1522
81ce19f4
1523(define-public isync
1524 (package
1525 (name "isync")
a5d8a2b2 1526 (version "1.3.1")
81ce19f4
1527 (source
1528 (origin
1529 (method url-fetch)
1530 (uri (string-append "mirror://sourceforge/isync/isync/"
1531 version "/isync-" version ".tar.gz"))
1532 (sha256 (base32
a5d8a2b2 1533 "1sphd30jplii58y2zmw365bckm6pszmapcy905zhjll1sm1ldjv8"))))
81ce19f4 1534 (build-system gnu-build-system)
49490231
LF
1535 (native-inputs
1536 `(("perl" ,perl)))
81ce19f4
1537 (inputs
1538 `(("bdb" ,bdb)
a052d5ab 1539 ("cyrus-sasl" ,cyrus-sasl)
1fdab9d3 1540 ("openssl" ,openssl-1.0)
a66fb3a1 1541 ("zlib" ,zlib)))
81ce19f4
1542 (home-page "http://isync.sourceforge.net/")
1543 (synopsis "Mailbox synchronization program")
1544 (description
f6cd8586 1545 "isync/mbsync is a command-line tool for two-way synchronization of
81ce19f4
1546mailboxes. Currently Maildir and IMAP are supported types.")
1547 (license gpl2+)))
1548
26b8de19
EB
1549(define-public perl-email-abstract
1550 (package
1551 (name "perl-email-abstract")
1552 (version "3.008")
1553 (source
1554 (origin
1555 (method url-fetch)
1556 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1557 "Email-Abstract-" version ".tar.gz"))
1558 (sha256
1559 (base32
1560 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
1561 (build-system perl-build-system)
1562 (propagated-inputs
1563 `(("perl-email-simple" ,perl-email-simple)
a2190ccc 1564 ("perl-module-pluggable" ,perl-module-pluggable)
26b8de19 1565 ("perl-mro-compat" ,perl-mro-compat)))
9aba9b12 1566 (home-page "https://metacpan.org/release/Email-Abstract")
26b8de19
EB
1567 (synopsis "Interface to mail representations")
1568 (description "Email::Abstract provides module writers with the ability to
1569write simple, representation-independent mail handling code.")
2f3108ad 1570 (license perl-license)))
26b8de19 1571
ebda902f
EB
1572(define-public perl-email-address
1573 (package
1574 (name "perl-email-address")
b6c7df92 1575 (version "1.912")
ebda902f
EB
1576 (source
1577 (origin
1578 (method url-fetch)
1579 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1580 "Email-Address-" version ".tar.gz"))
1581 (sha256
b6c7df92 1582 (base32 "1vzr0vx4zsw4zbc9xdffc31wnkc1raqmyfiyws06fbyck197i8qg"))))
ebda902f 1583 (build-system perl-build-system)
9aba9b12 1584 (home-page "https://metacpan.org/release/Email-Address")
ebda902f
EB
1585 (synopsis "Email address parsing and creation")
1586 (description "Email::Address implements a regex-based RFC 2822 parser that
1587locates email addresses in strings and returns a list of Email::Address
1588objects found. Alternatively you may construct objects manually.")
2f3108ad 1589 (license perl-license)))
ebda902f 1590
944d3b4b
SB
1591(define-public perl-email-address-xs
1592 (package
1593 (name "perl-email-address-xs")
1594 (version "1.04")
1595 (source
1596 (origin
1597 (method url-fetch)
1598 (uri (string-append "mirror://cpan/authors/id/P/PA/PALI/"
1599 "Email-Address-XS-" version ".tar.gz"))
1600 (sha256
1601 (base32
1602 "0gjrrl81z3sfwavgx5kwjd87gj44mlnbbqsm3dgdv1xllw26spwr"))))
1603 (build-system perl-build-system)
1604 (home-page "https://metacpan.org/release/Email-Address-XS")
1605 (synopsis "Parse and format RFC 5322 email addresses and groups")
1606 (description
1607 "Email::Address::XS implements RFC 5322 parser and formatter of email
1608addresses and groups. Unlike Email::Address, this module does not use regular
1609expressions for parsing but instead is implemented in XS and uses shared code
1610from Dovecot IMAP server.")
1611 (license perl-license)))
1612
aa86a3be
EB
1613(define-public perl-email-date-format
1614 (package
1615 (name "perl-email-date-format")
1616 (version "1.005")
1617 (source
1618 (origin
1619 (method url-fetch)
1620 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1621 "Email-Date-Format-" version ".tar.gz"))
1622 (sha256
1623 (base32
1624 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
1625 (build-system perl-build-system)
9aba9b12 1626 (home-page "https://metacpan.org/release/Email-Date-Format")
aa86a3be
EB
1627 (synopsis "Produce RFC 2822 date strings")
1628 (description "Email::Date::Format provides a means for generating an RFC
16292822 compliant datetime string.")
2f3108ad 1630 (license perl-license)))
aa86a3be 1631
08bf7095
EB
1632(define-public perl-email-messageid
1633 (package
1634 (name "perl-email-messageid")
1fb37ef0 1635 (version "1.406")
08bf7095
EB
1636 (source
1637 (origin
1638 (method url-fetch)
1639 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1640 "Email-MessageID-" version ".tar.gz"))
1641 (sha256
1642 (base32
1fb37ef0 1643 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
08bf7095 1644 (build-system perl-build-system)
9aba9b12 1645 (home-page "https://metacpan.org/release/Email-MessageID")
08bf7095
EB
1646 (synopsis "Generate world unique message-ids")
1647 (description "Email::MessageID generates recommended message-ids to
1648identify a message uniquely.")
2f3108ad 1649 (license perl-license)))
08bf7095 1650
0a4c49f6
EB
1651(define-public perl-email-mime
1652 (package
1653 (name "perl-email-mime")
4f50fd75 1654 (version "1.946")
0a4c49f6
EB
1655 (source
1656 (origin
1657 (method url-fetch)
1658 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1659 "Email-MIME-" version ".tar.gz"))
1660 (sha256
1661 (base32
4f50fd75 1662 "0z1k3i0lzp2k421gc8f3wq0jbqflkbw2xqd2k7n7pmv56417kvk8"))))
0a4c49f6
EB
1663 (build-system perl-build-system)
1664 (propagated-inputs
1665 `(("perl-email-address" ,perl-email-address)
1666 ("perl-email-messageid" ,perl-email-messageid)
1667 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1668 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1669 ("perl-email-simple" ,perl-email-simple)
4f50fd75
TGR
1670 ("perl-mime-types" ,perl-mime-types)
1671 ("perl-module-runtime" ,perl-module-runtime)))
9aba9b12 1672 (home-page "https://metacpan.org/release/Email-MIME")
0a4c49f6
EB
1673 (synopsis "MIME message handling")
1674 (description "Email::MIME is an extension of the Email::Simple module, to
1675handle MIME encoded messages. It takes a message as a string, splits it up
1676into its constituent parts, and allows you access to various parts of the
1677message. Headers are decoded from MIME encoding.")
2f3108ad 1678 (license perl-license)))
0a4c49f6 1679
55025bb5
EB
1680(define-public perl-email-mime-contenttype
1681 (package
1682 (name "perl-email-mime-contenttype")
9b5fc20c 1683 (version "1.022")
55025bb5
EB
1684 (source
1685 (origin
1686 (method url-fetch)
1687 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1688 "Email-MIME-ContentType-" version ".tar.gz"))
1689 (sha256
1690 (base32
9b5fc20c 1691 "042kxhs3bp1ab9z0mbr1wy21ld4lxd6v2a2mmrashqnsn2075fws"))))
55025bb5
EB
1692 (build-system perl-build-system)
1693 (native-inputs
1694 `(("perl-capture-tiny" ,perl-capture-tiny)))
9aba9b12 1695 (home-page "https://metacpan.org/release/Email-MIME-ContentType")
55025bb5
EB
1696 (synopsis "Parse MIME Content-Type headers")
1697 (description "Email::MIME::ContentType parses a MIME Content-Type
1698header.")
2f3108ad 1699 (license perl-license)))
55025bb5 1700
02e29936
EB
1701(define-public perl-email-mime-encodings
1702 (package
1703 (name "perl-email-mime-encodings")
1704 (version "1.315")
1705 (source
1706 (origin
1707 (method url-fetch)
1708 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1709 "Email-MIME-Encodings-" version ".tar.gz"))
1710 (sha256
1711 (base32
1712 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1713 (build-system perl-build-system)
1714 (native-inputs
1715 `(("perl-capture-tiny" ,perl-capture-tiny)))
9aba9b12 1716 (home-page "https://metacpan.org/release/Email-MIME-Encodings")
02e29936
EB
1717 (synopsis "Unified interface to MIME encoding and decoding")
1718 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
2f3108ad 1719 (license perl-license)))
02e29936 1720
a24c5420
EB
1721(define-public perl-email-sender
1722 (package
1723 (name "perl-email-sender")
0fd6f28d 1724 (version "1.300034")
a24c5420
EB
1725 (source
1726 (origin
1727 (method url-fetch)
1728 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1729 "Email-Sender-" version ".tar.gz"))
1730 (sha256
0fd6f28d 1731 (base32 "14aj9kqa9dr2bdhzn2qvjj2mffj8wjb5397z8qw7qg057fk3ib05"))))
a24c5420
EB
1732 (build-system perl-build-system)
1733 (native-inputs
1734 `(("perl-capture-tiny" ,perl-capture-tiny)))
1735 (propagated-inputs
1736 `(("perl-email-abstract" ,perl-email-abstract)
1737 ("perl-email-address" ,perl-email-address)
1738 ("perl-email-simple" ,perl-email-simple)
1739 ("perl-list-moreutils" ,perl-list-moreutils)
1740 ("perl-module-runtime" ,perl-module-runtime)
1741 ("perl-moo" ,perl-moo)
1742 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1743 ("perl-sub-exporter" ,perl-sub-exporter)
1744 ("perl-throwable" ,perl-throwable)
1745 ("perl-try-tiny" ,perl-try-tiny)))
9aba9b12 1746 (home-page "https://metacpan.org/release/Email-Sender")
a24c5420
EB
1747 (synopsis "Perl library for sending email")
1748 (description "Email::Sender replaces the old and sometimes problematic
1749Email::Send library.")
2f3108ad 1750 (license perl-license)))
a24c5420 1751
151ef3ed
EB
1752(define-public perl-email-simple
1753 (package
1754 (name "perl-email-simple")
3a2f1d93 1755 (version "2.216")
151ef3ed
EB
1756 (source
1757 (origin
1758 (method url-fetch)
1759 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1760 "Email-Simple-" version ".tar.gz"))
1761 (sha256
1762 (base32
3a2f1d93 1763 "1m4brbjvalyp5kjqslqv4155dzwg977shxin208i7lc8236n6pyq"))))
151ef3ed
EB
1764 (build-system perl-build-system)
1765 (propagated-inputs
1766 `(("perl-email-date-format" ,perl-email-date-format)))
9aba9b12 1767 (home-page "https://metacpan.org/release/Email-Simple")
151ef3ed
EB
1768 (synopsis "Parsing of RFC 2822 messages")
1769 (description "Email::Simple provides simple parsing of RFC 2822 message
1770format and headers.")
2f3108ad 1771 (license perl-license)))
151ef3ed 1772
f5dceecb
AW
1773(define-public libesmtp
1774 (package
1775 (name "libesmtp")
1776 (version "1.0.6")
1777 (source
1778 (origin
1779 (method url-fetch)
049e02ea
LF
1780 (uri (list (string-append "https://pkgs.fedoraproject.org/repo/pkgs/"
1781 "libesmtp/libesmtp-" version ".tar.bz2/"
1782 "bf3915e627fd8f35524a8fdfeed979c8/libesmtp-"
1783 version ".tar.bz2")
1784 ;; XXX This site is offline, so we fetch Fedora's cached copy
1785 ;; of the source tarball.
1786 (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1787 version ".tar.bz2")))
f5dceecb
AW
1788 (sha256
1789 (base32
1790 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1791 (build-system gnu-build-system)
1792 (propagated-inputs
1793 `(("openssl" ,openssl)))
1794 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1795 (synopsis "Library for sending mail via remote hosts using SMTP")
1796 (description "libESMTP is an SMTP client which manages posting (or
1797submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1798It may be used as part of a Mail User Agent (MUA) or other program that must
1799be able to post electronic mail where mail functionality may not be that
1800program's primary purpose.")
1801 (license (list lgpl2.1+ gpl2+))))
1802
f8ae32a2
AW
1803(define-public esmtp
1804 (package
1805 (name "esmtp")
1806 (version "1.2")
1807 (source
1808 (origin
1809 (method git-fetch)
1810 (uri (git-reference
1811 (url "https://github.com/andywingo/esmtp.git")
1812 (commit "01bf9fc")))
1813 (sha256
1814 (base32
1815 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1816 (file-name (string-append name "-" version "-checkout"))))
1817 (arguments
1818 `(#:phases (modify-phases %standard-phases
73c0e477
EF
1819 (replace 'bootstrap
1820 (lambda _ (invoke "autoreconf" "-vfi"))))))
f8ae32a2
AW
1821 (build-system gnu-build-system)
1822 (native-inputs
1823 `(("bison" ,bison)
1824 ("flex" ,flex)
1825 ("autoconf" ,autoconf)
1826 ("automake" ,automake)
1827 ("libtool" ,libtool)))
1828 (inputs
718c5dd6 1829 `(("libesmtp" ,libesmtp)))
3b3b60d0 1830 (home-page "https://sourceforge.net/projects/esmtp/")
f8ae32a2
AW
1831 (synopsis "Relay-only mail transfer agent (MTA)")
1832 (description "Esmtp is a simple relay-only mail transfer agent built using
1833libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1834user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1835page for more on configuration. This package also provides minimal
1836compatibility shims for the @command{sendmail}, @command{mailq}, and
1837@command{newaliases} commands.")
1838 (license gpl2+)))
1839
34dd26af
CAW
1840(define-public fdm
1841 (package
1842 (name "fdm")
9a0681d1 1843 (version "2.0")
34dd26af
CAW
1844 (source (origin
1845 (method url-fetch)
1846 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
9a0681d1 1847 version "/fdm-" version ".tar.gz"))
34dd26af 1848 (sha256
9a0681d1 1849 (base32 "196fs1z8y7p12wmqn1bylzz94szl58yv2aby3p30nmwjnyv8rch6"))))
34dd26af
CAW
1850 (build-system gnu-build-system)
1851 (inputs
1852 `(("tdb" ,tdb)
1853 ("openssl" ,openssl)
1854 ("zlib" ,zlib)))
1855 (home-page "https://github.com/nicm/fdm")
1856 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1857 (description "fdm is a program designed to fetch mail from POP3
1858or IMAP servers, or receive local mail from stdin, and
1859deliver it in various ways.")
1860 (license
1861 ;; Why point to a source file? Well, all the individual files have a
1862 ;; copy of this license in their headers, but there's no seprate file
1863 ;; with that information.
16966d5b 1864 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
34dd26af 1865
e90819c4
LG
1866
1867(define-public procmail
1868 (package
1869 (name "procmail")
1870 (version "3.22")
1871 (source
1872 (origin
1873 (method url-fetch)
1874 (uri (string-append
1875 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1876 version
1877 ".tar.gz"))
1878 (sha256
1879 (base32
1880 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1881 ;; The following patch fixes an ambiguous definition of
1882 ;; getline() in formail.c. The patch is provided by Debian as
1883 ;; patch 24.
1d982d78 1884 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
c297e965
LF
1885 "procmail-CVE-2014-3618.patch"
1886 "procmail-CVE-2017-16844.patch"))))
e90819c4
LG
1887 (arguments
1888 `(#:phases (modify-phases %standard-phases
1889 (replace 'configure
1890 (lambda _
1891 (substitute* "Makefile"
1892 (("/bin/sh")
1893 (which "sh"))
1894 (("/usr")
1895 (assoc-ref %outputs "out"))
1896 (("/bin/rm")
1897 (which "rm")))
1898 #t)))
1899 #:tests? #f)) ;; There are no tests indicating a successful
1900 ;; build. Some tests of basic locking mechanisms provided by the
8f65585b 1901 ;; file system are performed during 'make install'. However, these
e90819c4
LG
1902 ;; are performed before the actual build process.
1903 (build-system gnu-build-system)
05aa576b 1904 (inputs `(("exim" ,exim)))
e90819c4
LG
1905 (home-page "http://www.procmail.org/")
1906 (synopsis "Versatile mail delivery agent (MDA)")
1907 (description "Procmail is a mail delivery agent (MDA) featuring support
1908for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1909can be sorted into separate files/directories and arbitrary commands can be
1910executed on mail arrival. Procmail is considered stable, but is no longer
1911maintained.")
1912 (license gpl2+))) ;; procmail allows to choose the
1913 ;; nonfree Artistic License 1.0
1914 ;; as alternative to the GPL2+.
1915 ;; This option is not listed here.
e90819c4 1916
61c30e9d
LF
1917(define-public khard
1918 (package
1919 (name "khard")
82680f80 1920 (version "0.15.1")
61c30e9d
LF
1921 (source (origin
1922 (method url-fetch)
1923 (uri (pypi-uri name version))
1924 (sha256
1925 (base32
82680f80 1926 "18ba2xgfq8sw0bg6xmlfjpizid1hkzgswcfcc54gl21y2dwfda2w"))))
61c30e9d
LF
1927 (build-system python-build-system)
1928 (arguments
2385012b
EF
1929 `(#:phases
1930 (modify-phases %standard-phases
1931 (add-after 'install 'install-doc
1932 (lambda* (#:key outputs #:allow-other-keys)
1933 (let* ((out (assoc-ref outputs "out"))
1934 (doc (string-append out "/share/doc/khard")))
1935 (copy-recursively "misc/khard" doc)
1936 #t))))))
82680f80
TLC
1937 (native-inputs
1938 `(("python-setuptools-scm" ,python-setuptools-scm)))
61c30e9d 1939 (propagated-inputs
224b1c83
EF
1940 `(("python-atomicwrites" ,python-atomicwrites)
1941 ("python-configobj" ,python-configobj)
a57495e2 1942 ("python-pyyaml" ,python-pyyaml)
224b1c83
EF
1943 ("python-ruamel.yaml" ,python-ruamel.yaml)
1944 ("python-unidecode" ,python-unidecode)
1945 ("python-vobject" ,python-vobject)))
61c30e9d
LF
1946 (synopsis "Console address book using CardDAV")
1947 (description "Khard is an address book for the console. It creates, reads,
1948modifies and removes CardDAV address book entries at your local machine. For
1949synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1950Khard can also be used from within the email client @command{mutt}.")
1951 (home-page "https://github.com/scheibler/khard")
1952 (license gpl3+)))
be0c5733
DM
1953
1954(define-public perl-mail-spf
27f172a9
TGR
1955 (package
1956 (name "perl-mail-spf")
1957 (version "2.9.0")
1958 (source
1959 (origin
1960 (method url-fetch)
1961 (uri (string-append
1962 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-v"
be0c5733
DM
1963 version
1964 ".tar.gz"))
27f172a9
TGR
1965 (sha256
1966 (base32 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1967 (build-system perl-build-system)
1968 (native-inputs
1969 `(("perl-module-build" ,perl-module-build)
1970 ("perl-net-dns-resolver-programmable"
1971 ,perl-net-dns-resolver-programmable)))
1972 (arguments
1973 `(#:phases
1974 (modify-phases %standard-phases
1975 (add-before 'configure 'modify-Build.PL
1976 (lambda* (#:key outputs #:allow-other-keys)
1977 (substitute* "Build.PL"
1978 (("'/usr/sbin'") (string-append "'"
1979 (assoc-ref outputs "out")
1980 "/sbin'")))
be0c5733 1981 #t)))))
27f172a9
TGR
1982 (inputs
1983 `(("perl-error" ,perl-error)
1984 ("perl-net-dns" ,perl-net-dns)
1985 ("perl-netaddr-ip" ,perl-netaddr-ip)
1986 ("perl-uri" ,perl-uri)))
1987 (home-page "https://metacpan.org/release/Mail-SPF")
1988 (synopsis "Perl implementation of Sender Policy Framework")
1989 (description "Mail::SPF is the Sender Policy Framework implemented
be0c5733 1990in Perl.")
27f172a9 1991 (license bsd-3)))
24262239 1992
f115d817
JL
1993(define-public perl-mail-authenticationresults
1994 (package
1995 (name "perl-mail-authenticationresults")
1996 (version "1.20180923")
1997 (source (origin
1998 (method url-fetch)
1999 (uri (string-append
2000 "mirror://cpan/authors/id/M/MB/MBRADSHAW/"
2001 "Mail-AuthenticationResults-" version ".tar.gz"))
2002 (sha256
2003 (base32
2004 "1g1wym9vcbhldwvi4w5pl0fhd4jh2icj975awf4wr5xmkli9mxbz"))))
2005 (build-system perl-build-system)
2006 (native-inputs
2007 `(("perl-test-exception" ,perl-test-exception)))
2008 (home-page "https://metacpan.org/release/Mail-AuthenticationResults")
2009 (synopsis "Object Oriented Authentication-Results Headers")
2010 (description "Mail::AuthenticationResults parses the message header field
2011that indicates the message authentication status as per RFC7601. This module
2012is not fully compliant with the RFC but it tries to implement most styles of
2013Authentication-Results header seen in the wild.")
2014 (license perl-license)))
2015
930c52ae
JL
2016(define-public perl-mail-dkim
2017 (package
2018 (name "perl-mail-dkim")
3b27ffec 2019 (version "0.58")
930c52ae
JL
2020 (source (origin
2021 (method url-fetch)
2022 (uri (string-append
2023 "mirror://cpan/authors/id/M/MB/MBRADSHAW/Mail-DKIM-"
2024 version
2025 ".tar.gz"))
2026 (sha256
2027 (base32
3b27ffec 2028 "0cgkal65qqcy57b21lgij90ba36wl66byw9i76g5yhwaa8ms8hqa"))))
930c52ae
JL
2029 (build-system perl-build-system)
2030 (propagated-inputs
2031 `(("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
2032 ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
2033 ("perl-mailtools" ,perl-mailtools)
2034 ("perl-net-dns" ,perl-net-dns)))
2035 (native-inputs
2036 `(("perl-net-dns-resolver-mock" ,perl-net-dns-resolver-mock)
2037 ("perl-test-requiresinternet" ,perl-test-requiresinternet)
2038 ("perl-yaml-libyaml" ,perl-yaml-libyaml)))
2039 (home-page "https://metacpan.org/release/Mail-DKIM")
2040 (synopsis "Signs/verifies Internet mail with DKIM/DomainKey signatures")
2041 (description "Mail::DKIM is a Perl module that implements the new Domain
2042Keys Identified Mail (DKIM) standard, and the older Yahoo! DomainKeys standard,
2043both of which sign and verify emails using digital signatures and DNS records.
2044Mail-DKIM can be used by any Perl program that wants to provide support for
2045DKIM and/or DomainKeys.")
2046 (license gpl3+)))
2047
8582202c
JL
2048(define-public dkimproxy
2049 (package
2050 (name "dkimproxy")
2051 (version "1.4.1")
2052 (source (origin
2053 (method url-fetch)
2054 (uri (string-append
2055 "mirror://sourceforge/dkimproxy/dkimproxy/"
2056 version "/dkimproxy-" version ".tar.gz"))
2057 (sha256
2058 (base32
66e39000
TGR
2059 "1gc5c7lg2qrlck7b0lvjfqr824ch6jkrzkpsn0gjvlzg7hfmld75"))
2060 (patches
2061 (search-patches "dkimproxy-add-ipv6-support.patch"))))
8582202c
JL
2062 (build-system gnu-build-system)
2063 (arguments
2064 `(#:phases
2065 (modify-phases %standard-phases
2066 (add-after 'install 'make-wrapper
2067 (lambda* (#:key inputs outputs #:allow-other-keys)
8c07824c
TGR
2068 (let* ((out (assoc-ref outputs "out"))
2069 (wrap.pl (lambda (scripts keys)
2070 (for-each
2071 (lambda (script)
2072 (wrap-program (string-append out script)
2073 `("PERL5LIB" ":" prefix
2074 ,(map (λ (input)
2075 (string-append
2076 (assoc-ref inputs input)
2077 "/lib/perl5/site_perl"))
2078 keys))))
2079 scripts))))
2080 (wrap.pl (list "/bin/dkimproxy.in"
2081 "/bin/dkimproxy.out")
2082 (list "perl-crypt-openssl-rsa"
2083 "perl-io-socket-inet6"
2084 "perl-mailtools"
2085 "perl-mail-authenticationresults"
2086 "perl-mail-dkim"
2087 "perl-net-dns"
2088 "perl-net-server"
2089 "perl-socket6"))
28e4c3bb
TGR
2090 (wrap.pl (list "/bin/dkim_responder.pl")
2091 (list "perl-crypt-openssl-rsa"
2092 "perl-mail-dkim"
2093 "perl-mailtools"
2094 "perl-mime-tools"
2095 "perl-net-dns"
2096 "perl-timedate"))
8c07824c 2097 #t))))))
8582202c
JL
2098 (inputs
2099 `(("perl" ,perl)
2100 ("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
66e39000 2101 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
8582202c
JL
2102 ("perl-mailtools" ,perl-mailtools)
2103 ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
2104 ("perl-mail-dkim" ,perl-mail-dkim)
28e4c3bb 2105 ("perl-mime-tools" ,perl-mime-tools)
8582202c 2106 ("perl-net-dns" ,perl-net-dns)
66e39000 2107 ("perl-net-server" ,perl-net-server)
28e4c3bb
TGR
2108 ("perl-socket6" ,perl-socket6)
2109 ("perl-timedate" ,perl-timedate)))
8582202c 2110 (home-page "http://dkimproxy.sourceforge.net/")
d045dce1
TGR
2111 (synopsis "SMTP proxy to sign and verify Internet mail with DKIM headers")
2112 (description
2113 "DKIMproxy is an SMTP proxy that signs and verifies Internet mail using the
2114@code{Mail::DKIM} Perl module. It comprises two separate proxies: an outbound
8582202c 2115proxy for signing outgoing email, and an inbound proxy for verifying signatures
d045dce1
TGR
2116of incoming messages.
2117
2118It was designed for Postfix, but can be used to add DKIM support to nearly any
2119existing mail server. With Postfix, the proxies can operate as either
8582202c 2120@code{Before-Queue} or @code{After-Queue} content filters.")
2b456dd8 2121 (license gpl2+)))
8582202c 2122
24262239
CL
2123(define-public mb2md
2124 (package
2125 (name "mb2md")
2126 (version "3.20")
2127 (source (origin
2128 (method url-fetch)
2129 (uri (string-append
2130 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
2131 version ".pl.gz"))
2132 (sha256
2133 (base32
2134 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
2135 (build-system trivial-build-system)
2136 (arguments
2137 '(#:modules ((guix build utils))
2138 #:builder
2139 (begin
2140 (use-modules (guix build utils))
2141 (let* ((source (assoc-ref %build-inputs "source"))
2142 (out (assoc-ref %outputs "out"))
2143 (bin (string-append out "/bin"))
2144 (perl (assoc-ref %build-inputs "perl"))
2145 (gzip (assoc-ref %build-inputs "gzip"))
2146 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
2147 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
2148 (mkdir-p bin)
2149 (with-directory-excursion bin
2150 (copy-file source "mb2md.gz")
e3cfef22 2151 (invoke (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
24262239
CL
2152 (substitute* "mb2md"
2153 (("#!/usr/bin/perl")
2154 (string-append "#!/usr/bin/perl -I " perl5lib)))
2155 (patch-shebang "mb2md" (list (string-append perl "/bin")))
2156 (chmod "mb2md" #o555))
2157 #t))))
c695fb76 2158 (native-inputs `(("gzip" ,gzip)))
24262239
CL
2159 (inputs `(("perl" ,perl)
2160 ("perl-timedate" ,perl-timedate)))
2161 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
2162 (synopsis "Mbox to maildir converter")
2163 (description
2164 "Mb2md is a Perl script that takes one or more mbox format files and
2165converts them to maildir format directories.")
2166 (license public-domain)))
e0d7b421
AI
2167
2168(define-public mpop
2169 (package
2170 (name "mpop")
4a30c51e 2171 (version "1.4.7")
e0d7b421
AI
2172 (source
2173 (origin
2174 (method url-fetch)
1497b95c 2175 (uri (string-append "https://marlam.de/mpop/releases/"
822c8501 2176 "mpop-" version ".tar.xz"))
e0d7b421 2177 (sha256
4a30c51e 2178 (base32 "0c6n5afn9pr4p7gxkv462lysrw52w9fhvavzm99c78dcp9dj5xnk"))))
e0d7b421
AI
2179 (build-system gnu-build-system)
2180 (inputs
fb5ecdec 2181 `(("gnutls" ,gnutls)))
e0d7b421
AI
2182 (native-inputs
2183 `(("pkg-config" ,pkg-config)))
1497b95c 2184 (home-page "https://marlam.de/mpop/")
e0d7b421
AI
2185 (synopsis "POP3 mail client")
2186 (description "mpop is a small and fast POP3 client suitable as a
2187fetchmail replacement.
2188
2189mpop supports multiple accounts, header based mail filtering, delivery
40b1cee6
TGR
2190to mbox files, maildir folders or an @acronym{MDA, Mail Delivery Agent},
2191TLS/SSL, several authentication methods, @acronym{IDN, Internationalized Domain
2192Names} and SOCKS proxies.")
e0d7b421 2193 (license gpl3+)))
74c0282c 2194
2195(define-public mhonarc
2196 (package
2197 (name "mhonarc")
2198 (version "2.6.19")
2199 (source
2200 (origin
2201 (method url-fetch)
2202 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
2203 version ".tar.gz"))
2204 (sha256
2205 (base32
2206 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
2207 (build-system perl-build-system)
2208 (home-page "https://www.mhonarc.org/")
2209 (synopsis "Create HTML archives of mail/news messages")
2210 (description
2211 "MHonArc is a Perl mail-to-HTML converter. MHonArc
2212provides HTML mail archiving with index, mail thread linking,
2213etc; plus other capabilities including support for MIME and
2214powerful user customization features.")
2215 (license gpl2+)))
5d87088c
JD
2216
2217
2218(define-public sendmail
2219 (package
2220 (name "sendmail")
2221 (version "8.15.2")
2222 (source
2223 (origin
2224 (method url-fetch)
2225 (uri (string-append
2226 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
2227 version ".tar.gz"))
2228 (sha256
2229 (base32
2230 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
2231 (build-system gnu-build-system)
2232 (arguments
2233 `(#:phases
2234 (modify-phases %standard-phases
2235 (add-before 'build 'replace-/bin/sh
2236 (lambda _
2237 (substitute*
2238 (append
2239 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
2240 "contrib/mmuegel" "devtools/bin/configure.sh")
2241 (find-files "." ".*\\.m4")
2242 (find-files "." ".*\\.cf"))
19527952 2243 (("/bin/sh") (which "sh")))
5d87088c
JD
2244
2245 (substitute* "devtools/bin/Build"
19527952 2246 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
5d87088c
JD
2247 #t))
2248 (replace 'configure
2249 (lambda _
2250
2251 ;; Render harmless any attempts to chown or chgrp
2252 (substitute* "devtools/bin/install.sh"
2253 (("owner=\\$2") "owner=''")
2254 (("group=\\$2") "group=''"))
2255
2256 (with-output-to-file "devtools/Site/site.config.m4"
2257 (lambda ()
2258 (format #t "
2259define(`confCC', `gcc')
2260define(`confOPTIMIZE', `-g -O2')
2261define(`confLIBS', `-lresolv')
2262define(`confINSTALL', `~a/devtools/bin/install.sh')
2263define(`confDEPEND_TYPE', `CC-M')
2264define(`confINST_DEP', `')
55492129
TGR
2265" (getcwd))))
2266 #t))
5d87088c
JD
2267 (replace 'build
2268 (lambda _
55492129
TGR
2269 (invoke "sh" "Build")
2270 (with-directory-excursion "cf/cf"
2271 (copy-file "generic-linux.mc" "sendmail.mc")
2272 (invoke "sh" "Build" "sendmail.cf"))
2273 #t))
5d87088c
JD
2274 (add-before 'install 'pre-install
2275 (lambda _
2276 (let ((out (assoc-ref %outputs "out")))
2277 (mkdir-p (string-append out "/usr/bin"))
2278 (mkdir-p (string-append out "/usr/sbin"))
2279 (mkdir-p (string-append out "/etc/mail"))
2280 (setenv "DESTDIR" out)
2281 (with-directory-excursion "cf/cf"
55492129
TGR
2282 (invoke "sh" "Build" "install-cf"))
2283 #t))))
5d87088c
JD
2284 ;; There is no make check. There are some post installation tests, but those
2285 ;; require root privileges
2286 #:tests? #f))
2287 (inputs
2288 `(("m4" ,m4)
2289 ("perl" ,perl)))
2290 (home-page "http://sendmail.org")
2291 (synopsis
2292 "Highly configurable Mail Transfer Agent (MTA)")
2293 (description
2294 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
2295Allman. It is highly configurable and supports many delivery methods and many
2296transfer protocols.")
2297 (license (non-copyleft "file://LICENSE"
2298 "See LICENSE in the distribution."))))
2299
8b53366c 2300(define-public opensmtpd
2301 (package
2302 (name "opensmtpd")
2dbfd8ee 2303 (version "6.6.3p1")
4eb57ca8
TGR
2304 (source
2305 (origin
2306 (method url-fetch)
2307 (uri (string-append "https://www.opensmtpd.org/archives/"
2308 "opensmtpd-" version ".tar.gz"))
2309 (sha256
2dbfd8ee 2310 (base32 "1dqysjlyl0x3qzdzc9sjrla0063vpmlyq735lzf88p7wgzmw1xwy"))))
4eb57ca8
TGR
2311 (build-system gnu-build-system)
2312 (inputs
2313 `(("bdb" ,bdb)
2314 ("libasr" ,libasr)
2315 ("libevent" ,libevent)
996aca28
TGR
2316 ;; XXX Upstream recommends LibreSSL, which doesn't support TLS 1.3 yet,
2317 ;; and requires a development release (3.0.2). Use OpenSSL instead.
2318 ("openssl" ,openssl)
4eb57ca8
TGR
2319 ("linux-pam" ,linux-pam)
2320 ("zlib" ,zlib)))
2321 (native-inputs
2322 `(("bison" ,bison)
2323 ("groff" ,groff))) ; for man pages
2324 (arguments
2325 `(#:configure-flags
2326 (list "--localstatedir=/var"
2327 ;; This is the default only if it exists at build time—it doesn't.
2328 "--with-path-socket=/var/run"
2329 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt"
2330 "--with-user-smtpd=smtpd"
2331 "--with-user-queue=smtpq" "--with-group-queue=smtpq"
2332 "--with-auth-pam"
2333 "--with-table-db")
2334 #:phases
2335 (modify-phases %standard-phases
2336 ;; Fix some incorrectly hard-coded external tool file names.
2337 (add-after 'unpack 'patch-FHS-file-names
2338 (lambda _
2339 (substitute* "smtpd/smtpctl.c"
2340 ;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't.
2341 (("/bin/cat") (which "cat")))
2342 (substitute* "smtpd/mda_unpriv.c"
2343 (("/bin/sh") (which "sh")))
2344 #t))
2345 ;; OpenSMTPD provides a single smtpctl utility to control both the
2346 ;; daemon and the local submission subsystem. To accomodate systems
2347 ;; that require historical interfaces such as sendmail, newaliases or
2348 ;; makemap, smtpctl operates in compatibility mode if called with the
2349 ;; historical name.
2350 (add-after 'install 'install-compability-links
2351 (lambda* (#:key outputs #:allow-other-keys)
2352 (let* ((out (assoc-ref outputs "out"))
2353 (sbin (string-append out "/sbin/")))
2354 (for-each (lambda (command)
2355 (symlink "smtpctl" (string-append sbin command)))
2356 (list "mailq" "makemap" "newaliases"
2357 "send-mail" "sendmail")))
2358 #t)))))
2359 (synopsis "Lightweight SMTP daemon")
2360 (description
2361 "OpenSMTPD is an implementation of server-side @acronym{SMTP, Simple Mail
2362Transfer Protocol}, with some additional standard extensions. It allows
2363ordinary machines to exchange e-mails with other systems speaking the SMTP
2364protocol, or to deliver them to local users.
2365
2366In order to simplify the use of SMTP, OpenSMTPD implements a smaller set of
2367functionality than those available in other SMTP daemons. The objective is to
2368provide enough features to satisfy typical usage at the risk of unsuitability
2369to esoteric or niche requirements.")
2370 (home-page "https://www.opensmtpd.org")
2371 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
2372 public-domain isc license:openssl))))
2373
152ffe7c 2374(define-public opensmtpd-extras
2375 (package
2376 (name "opensmtpd-extras")
2377 (version "5.7.1")
2378 (source (origin
2379 (method url-fetch)
2380 (uri (string-append "https://www.opensmtpd.org/archives/"
2381 name "-" version ".tar.gz"))
2382 (sha256
2383 (base32
2384 "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm"))))
2385 (build-system gnu-build-system)
2386 (inputs
2387 `(("libressl" ,libressl)
2388 ("libevent" ,libevent)
2389 ("libasr" ,libasr)
2390 ("python-2" ,python-2)
2391 ("opensmtpd" ,opensmtpd)
2392 ("perl" ,perl)
2393 ("lua" ,lua)
2394 ("postgresql" ,postgresql)
2395 ("sqlite" ,sqlite)
2396 ("linux-pam" ,linux-pam)))
2397 (native-inputs
2398 `(("bison" ,bison)
2399 ("pkg-config" ,pkg-config)
2400 ("groff" ,groff)
2401 ("automake" ,automake)
2402 ("autoconf" ,autoconf)))
2403 (arguments
2404 `(;; We have to configure it like this because the default checks for for example
2405 ;; python in /usr/local/bin, /usr/bin and fails otherwise.
2406 #:configure-flags (list
2407 "--with-filter-clamav" "--with-filter-dkim-signer"
2408 "--with-filter-dnsbl" "--with-filter-lua"
2409 "--with-filter-monkey" "--with-filter-pause"
2410 "--with-filter-perl" "--with-filter-python"
2411 "--with-filter-regex" "--with-filter-spamassassin"
2412 "--with-filter-stub" "--with-filter-trace"
2413 "--with-filter-void"
2414
2415 "--with-queue-null" "--with-queue-python"
2416 "--with-queue-ram" "--with-queue-stub"
2417
2418 "--with-scheduler-python" "--with-scheduler-ram"
2419 "--with-scheduler-stub"
2420
2421 "--with-table-ldap" ; "--with-table-mysql"
2422 "--with-table-passwd" "--with-table-postgres"
2423 "--with-table-python" "--with-table-socketmap"
2424 "--with-table-sqlite" "--with-table-stub"
2425 ;;"--with-table-redis" ; TODO: package hiredis
2426
2427 "--with-user=smtpd" "--with-privsep-user=smtpd"
2428 "--localstatedir=/var" "--sysconfdir=/etc"
2429 "--with-lua-type=lua" ; can use lua or luajit
2430
2431 (string-append "--with-python="
2432 (assoc-ref %build-inputs "python-2"))
2433 (string-append "--with-lua="
2434 (assoc-ref %build-inputs "lua")))))
19262a71
LC
2435 (license (list bsd-2 bsd-3 bsd-4
2436 public-domain isc license:openssl))
152ffe7c 2437 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
2438 (description
2439 "This package provides extra tables, filters, and various other addons
2440for OpenSMTPD to extend its functionality.")
2441 (home-page "https://www.opensmtpd.org")))
6d3dda4f 2442
2443(define-public python-mailmanclient
2444 (package
2445 (name "python-mailmanclient")
c115a1c8 2446 (version "3.1.1")
6d3dda4f 2447 (source
2448 (origin
2449 (method url-fetch)
2450 (uri (pypi-uri "mailmanclient" version))
2451 (sha256
2452 (base32
c115a1c8 2453 "0fdfs5g3pf30v2i7w18pdkv9xnfxmfcv66mzv56dck0a1igq07m3"))))
6d3dda4f 2454 (build-system python-build-system)
2455 (arguments
2456 `(#:tests? #f)) ; Requires mailman running
f22efa01 2457 (propagated-inputs
6d3dda4f 2458 `(("python-six" ,python-six)
2459 ("python-httplib2" ,python-httplib2)))
2460 (home-page "https://launchpad.net/mailman.client")
2461 (synopsis "Python bindings for the Mailman 3 REST API")
2462 (description
2463 "The mailmanclient library provides official Python bindings for
2464the GNU Mailman 3 REST API.")
6d3dda4f 2465 (license lgpl3+)))
2466
2467(define-public python2-mailmanclient
5c31f4aa 2468 (package-with-python2 python-mailmanclient))
3163a289 2469
2470(define-public mlmmj
2471 (package
2472 (name "mlmmj")
28b48c87 2473 (version "1.3.0")
3163a289 2474 (source
2475 (origin
2476 (method url-fetch)
2477 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
2478 version ".tar.bz2"))
2479 (sha256
2480 (base32
28b48c87 2481 "0hpj10qad821ci11si8xc2qnmkzfn90y13s43fm4fca38f0qjp8w"))))
3163a289 2482 (build-system gnu-build-system)
2483 (inputs
2484 `(("perl" ,perl))) ; For "contrib/web/"
2485 (native-inputs
2486 `(("pkg-config" ,pkg-config)))
2487 (arguments
2488 `(#:configure-flags
2489 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
2490 ;; It opens the files control/mimedeny and control/mimestrip to get a list
2491 ;; of mimetypes for parts of multipart/mime messages that should be denied
2492 ;; or stripped. The parts then get stripped directly when the mail is
2493 ;; received. mlmmj-receive-strip also appends an extra header
2494 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
2495 ;; mime parts
2496 (list "--enable-receive-strip")
2497 #:phases
2498 (modify-phases %standard-phases
2499 (add-before 'install 'install-contrib
2500 (lambda* (#:key outputs #:allow-other-keys)
2501 (let* ((out (assoc-ref outputs "out"))
2502 (share (string-append out "/share/mlmmj"))
2503 (contrib (string-append share "/contrib/web"))
2504 (texts (string-append share "/listtexts")))
2505 (copy-recursively "contrib/web/" contrib)
2506 (copy-recursively "listtexts" texts)
2507 (rename-file texts (string-append share "/texts"))
2508 #t))))))
2509 (home-page "http://mlmmj.org")
2510 (synopsis "Mailing list managing made joyful")
2511 (description
2512 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
2513It works with many different Mail Transport Agents (MTAs) and is simple for a
d1e4ad1b 2514system administrator to install, configure and integrate with other software.
3163a289 2515As it uses very few resources, and requires no daemons, it is ideal for
2516installation on systems where resources are limited. Its features include:
2517@enumerate
2518@item Archive, Custom headers / footer,
2519@item Fully automated bounce handling (similar to ezmlm),
2520@item Complete requeueing functionality, Moderation functionality, Subject prefix,
2521@item Subscribers only posting, Regular expression access control,
2522@item Functionality to retrieve old posts, Web interface, Digests,
2523@item No-mail subscription, VERP support,
2524@item Delivery Status Notification (RFC1891) support,
2525@item Rich and customisable texts for automated operations.
2526@end enumerate\n")
2527 (license license:expat)))
3a263368 2528
ea3b9f7b 2529(define-public python2-django-mailman3
8a3741e6 2530 (package
ea3b9f7b 2531 (name "python2-django-mailman3")
bdf0c644 2532 (version "1.1.0")
8a3741e6 2533 (source
2534 (origin
2535 (method url-fetch)
2536 (uri (pypi-uri "django-mailman3" version))
2537 (sha256
2538 (base32
bdf0c644 2539 "1xjdkgfjwhgyrp5nxw65dcpcsr98ygj6856sp0bwkrmyxpd1xxk2"))))
8a3741e6 2540 (build-system python-build-system)
ea3b9f7b
CB
2541 (arguments
2542 `(#:phases
2543 (modify-phases %standard-phases
2544 (replace 'check
2545 (lambda _
dcfdaa15
TGR
2546 (invoke "django-admin"
2547 "test"
2548 "--settings=django_mailman3.tests.settings_test"
2549 "django_mailman3"))))
ea3b9f7b 2550 #:python ,python-2))
8a3741e6 2551 (inputs
ea3b9f7b 2552 `(("python2-django" ,python2-django)))
8a3741e6 2553 (propagated-inputs
ea3b9f7b
CB
2554 `(("python2-requests" ,python2-requests)
2555 ("python2-requests-oauthlib" ,python2-requests-oauthlib)
2556 ("python2-openid" ,python2-openid)
2557 ("python2-mailmanclient" ,python2-mailmanclient)
2558 ("python2-django-allauth" ,python2-django-allauth)
2559 ("python2-django-gravatar2" ,python2-django-gravatar2)
2560 ("python2-pytz" ,python2-pytz)))
8a3741e6 2561 (home-page "https://gitlab.com/mailman/django-mailman3")
2562 (synopsis "Django library for Mailman UIs")
2563 (description
2564 "Libraries and templates for Django-based interfaces
2565interacting with Mailman.")
2566 (license gpl3+)))
2567
d99a2add 2568(define-public postorius
2569 (package
2570 (name "postorius")
2571 (version "1.0.3")
2572 (source
2573 (origin
2574 (method url-fetch)
2575 (uri (pypi-uri "postorius" version "+post2.tar.gz"))
2576 (file-name (string-append name "-" version ".tar.gz"))
2577 (sha256
2578 (base32
2579 "1wymcpv2icjjy8h1ni52p6dr7wwxf71ivqgbqhzx4i82yqphcaq5"))))
2580 (build-system python-build-system)
2581 (arguments
2582 `(; One test dependency relies on Persona, which was shut down in
2583 ;; November 2016.
2584 #:tests? #f
2585 ;; The part of the frontend of Mailman is still python 2.7.
2586 #:python ,python-2))
2587 (inputs
2588 `(("python2-django" ,python2-django)
2589 ("python2-django-mailman3" ,python2-django-mailman3)
2590 ("python2-mailmanclient" ,python2-mailmanclient)))
2591 (home-page "https://gitlab.com/mailman/postorius")
2592 (synopsis "Web user interface for GNU Mailman")
2593 (description
2594 "Postorius is a Django app which provides a web user interface
2595to access GNU Mailman.")
2596 (license (list gpl3+ lgpl3+))))
2597
3a263368 2598(define-public blists
2599 (package
2600 (name "blists")
18b1589b 2601 (version "2.0")
3a263368 2602 (source
2603 (origin
2604 (method url-fetch)
2605 (uri (string-append "http://download.openwall.net/pub/projects/"
2606 "blists/blists-" version ".tar.gz"))
2607 (sha256
2608 (base32
18b1589b 2609 "1xll5wn7py3bbncbwrj172f56nz75c9gwfsa80rwd96ss9gfmp3c"))))
3a263368 2610 (build-system gnu-build-system)
2611 (arguments
2612 `(#:tests? #f ; No tests
2613 #:phases
2614 (modify-phases %standard-phases
2615 (delete 'configure)
2616 (replace 'install
2617 (lambda* (#:key outputs #:allow-other-keys)
2618 (let* ((out (assoc-ref outputs "out"))
2619 (bin (string-append out "/bin")))
2620 (install-file "bindex" bin)
2621 (install-file "bit" bin)
2622 #t))))))
2623 (home-page "http://www.openwall.com/blists/")
2624 (synopsis "Web interface to mailing list archives")
2625 (description
2626 "Blists is a web interface to mailing list archives that works off
2627indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
2628@code{bindex} generates or updates the index file (incremental updates
2629are supported). @code{bit} is a CGI/SSI program that generates web pages
2630on the fly. Both programs are written in C and are very fast.")
2631 (license license:expat)))
ed428a58
AI
2632
2633(define-public swaks
2634 (package
2635 (name "swaks")
4745f8d7 2636 (version "20181104.0")
ed428a58
AI
2637 (source
2638 (origin
2639 (method url-fetch)
2640 (uri (string-append
d72f59a4 2641 "https://jetmore.org/john/code/swaks/files/swaks-"
ed428a58
AI
2642 version ".tar.gz"))
2643 (sha256
2644 (base32
4745f8d7 2645 "0n1yd27xcyb1ylp5gln3yv5gzi9r377hjy1j32367kgb3247ygq2"))))
ed428a58
AI
2646 (build-system perl-build-system)
2647 (inputs
2648 `(("perl-net-dns" ,perl-net-dns)
2649 ("perl-net-ssleay" ,perl-net-ssleay)))
2650 (arguments
2651 `(#:tests? #f ; No tests
2652 #:phases
2653 (modify-phases %standard-phases
2654 (delete 'configure)
2655 (replace 'build
2656 (lambda _
d72f59a4 2657 (invoke "pod2man" "doc/ref.pod" "swaks.1")))
ed428a58
AI
2658 (replace 'install
2659 (lambda* (#:key outputs #:allow-other-keys)
2660 (let ((out (assoc-ref outputs "out")))
2661 (install-file "swaks" (string-append out "/bin"))
2662 (install-file "swaks.1" (string-append out "/share/man/man1")))
2663 #t))
2664 (add-after 'install 'wrap-program
2665 (lambda* (#:key outputs #:allow-other-keys)
2666 (wrap-program (string-append (assoc-ref outputs "out")
2667 "/bin/swaks")
2668 `("PERL5LIB" ":" = (,(getenv "PERL5LIB"))))
2669 #t)))))
d72f59a4 2670 (home-page "https://jetmore.org/john/code/swaks/")
ed428a58
AI
2671 (synopsis "Featureful SMTP test tool")
2672 (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
2673test tool. It handles SMTP features and extensions such as TLS,
2674authentication, and pipelining; multiple versions of the SMTP protocol
2675including SMTP, ESMTP, and LMTP; and multiple transport methods including
2676unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
2677Options can be specified in environment variables, configuration files, and
2678the command line allowing maximum configurability and ease of use for
2679operators and scripters.")
2680 (license gpl2+)))
b0eb2af2 2681
2682(define-public alpine
2683 (package
2684 (name "alpine")
0ca25073
TGR
2685 ;; Upstream doesn't use git tags, but does ‘tag’ their releases in the
2686 ;; commit message. Hence the lack of GIT-VERSIONing despite using a commit
2687 ;; ID below. Don't forget to update it…
54278e22 2688 (version "2.21.99999")
b0eb2af2 2689 (source
2690 (origin
0ca25073 2691 (method git-fetch)
b0eb2af2 2692 ;; There are two versions: the plain continuation of Alpine without extra
2693 ;; patches and the version which adds extra fixes. Every distro uses
2694 ;; the patched version, and so do we to not break expectations.
32f9cc33 2695 ;; http://alpine.freeiz.com/alpine/readme/README.patches
0ca25073
TGR
2696 (uri (git-reference
2697 (url "http://repo.or.cz/alpine.git")
2698 (commit "abeb2c25935ef8c75f1e5deef0f81276754dc975")))
2699 (file-name (git-file-name name version))
b0eb2af2 2700 (sha256
bc0eb347
TGR
2701 (base32 "0rqgbw08a5lj41dkp82aq480lqkc4bnxagna7wpqffi821n8gkwz"))
2702 (modules '((guix build utils)))
2703 (snippet
2704 '(begin
2705 ;; Remove pre-built binaries scattered across the source repository.
2706 (for-each delete-file (find-files "." "\\.(dll|exe)"))
2707 #t))))
b0eb2af2 2708 (build-system gnu-build-system)
2709 (arguments
2710 `(#:make-flags (list "CC=gcc")
2711 #:configure-flags (list (string-append "--with-ssl-include-dir="
2712 (assoc-ref %build-inputs "openssl")
2713 "/include/openssl")
2714 (string-append "--with-ssl-dir="
2715 (assoc-ref %build-inputs "openssl"))
2716 (string-append "--with-ssl-certs-dir="
2717 "/etc/ssl/certs/")
2718 (string-append "--with-ssl-lib-dir="
2719 (assoc-ref %build-inputs "openssl")
2720 "/lib")
2721 (string-append "--with-interactive-spellcheck="
2722 (assoc-ref %build-inputs "aspell")
03b6c474
TGR
2723 "/bin/aspell")
2724 "--with-date-stamp=Thu 1 Jan 01:00:01 CET 1970")
b0eb2af2 2725 #:phases
2726 (modify-phases %standard-phases
2727 (add-after 'unpack 'make-reproducible
2728 (lambda _
2729 ;; This removes time-dependent code to make alpine reproducible.
2730 (substitute* "pico/blddate.c"
2731 (("%02d-%s-%d") "1970-01-01"))
b0eb2af2 2732 #t)))))
2733 (inputs
2734 `(("ncurses" ,ncurses)
2735 ("openssl" ,openssl)
2736 ("gnutls" ,gnutls)
2737 ("openldap" ,openldap)
2738 ("cyrus-sasl" ,cyrus-sasl)
2739 ("mit-krb5" ,mit-krb5)
2740 ("aspell" ,aspell)
2741 ("tcl" ,tcl)
2742 ("linux-pam" ,linux-pam)))
da83224d 2743 (home-page "https://repo.or.cz/alpine.git")
b0eb2af2 2744 (synopsis "Alternatively Licensed Program for Internet News and Email")
2745 (description
2746 "Alpine is a text-based mail and news client. Alpine includes several
2747tools and applications:
2748@enumerate
2749@item alpine, the Alpine mailer
2750@item pico, the standalone text editor, GNU nano's predecessor
2751@item pilot, the standalone file system navigator
2752@end enumerate\n")
2753 (license asl2.0)))
7c16151a
RS
2754
2755(define-public balsa
2756 (package
2757 (name "balsa")
f58b10cb 2758 (version "2.5.7")
7c16151a
RS
2759 (source
2760 (origin
2761 (method url-fetch)
e9201659
R
2762 (uri (string-append "https://pawsa.fedorapeople.org/balsa/"
2763 name "-" version ".tar.bz2"))
7c16151a 2764 (sha256
f58b10cb 2765 (base32 "0yfqhfpwm1qnwmbpr6dfn2f5w8a8xxq51pn8ypgg0fw973l1c1nx"))))
7c16151a
RS
2766 (build-system gnu-build-system)
2767 (arguments
2768 `(#:configure-flags
2769 '(;; Balsa tries to install additional MIME icons
2770 ;; under gtk+ directory.
2771 "--enable-extra-mimeicons=no"
2772 "--with-gtksourceview"
2773 "--with-canberra"
2774 "--with-spell-checker=gtkspell"
2775 "--with-gpgme"
2776 "--with-sqlite"
2777 "--with-compface"
2778 "--with-ldap")))
2779 (inputs
2780 `(("cyrus-sasl" ,cyrus-sasl)
2781 ("enchant" ,enchant)
2782 ("gdk-pixbuf" ,gdk-pixbuf)
8e020519 2783 ("gmime" ,gmime-2.6)
7c16151a
RS
2784 ("gnutls" ,gnutls)
2785 ("gpgme" ,gpgme)
2786 ("gtk+" ,gtk+)
f58b10cb 2787 ("gtksourceview" ,gtksourceview-3)
7c16151a
RS
2788 ("gtkspell3" ,gtkspell3)
2789 ("libcanberra" ,libcanberra)
2790 ("libesmtp" ,libesmtp)
2791 ("libnotify" ,libnotify)
2792 ("openldap" ,openldap)
2793 ("sqlite" ,sqlite)
2794 ("webkitgtk" ,webkitgtk)))
2795 (native-inputs
2796 `(("compface" ,compface)
2797 ("glib" ,glib "bin")
2798 ("intltool" ,intltool)
2799 ("pkg-config" ,pkg-config)
2800 ("yelp-tools" ,yelp-tools)))
2801 (home-page "https://pawsa.fedorapeople.org/balsa")
2802 (synopsis "E-mail client for GNOME")
2803 (description "Balsa is a highly configurable and robust mail client for
2804the GNOME desktop. It supports both POP3 and IMAP servers as well as the
2805mbox, maildir and mh local mailbox formats. Balsa also supports SMTP and/or
b95d5f62 2806the use of a local MTA such as Sendmail.")
7c16151a 2807 (license gpl3+)))
1e52fd83
AI
2808
2809(define-public afew
2810 (package
2811 (name "afew")
2812 (version "1.2.0")
2813 (source
2814 (origin
2815 (method url-fetch)
2816 (uri (pypi-uri "afew" version))
2817 (sha256
2818 (base32
2819 "121w7bd53xyibllxxbfykjj76n81kn1vgjqd22izyh67y8qyyk5r"))))
2820 (build-system python-build-system)
2821 (inputs
2822 `(("python-chardet" ,python-chardet)
2823 ("python-notmuch" ,python-notmuch)))
2824 (native-inputs
2825 `(("python-setuptools-scm" ,python-setuptools-scm)))
2826 (home-page "https://github.com/afewmail/afew")
2827 (synopsis "Initial tagging script for notmuch mail")
2828 (description "afew is an initial tagging script for notmuch mail. It
2829provides automatic tagging each time new mail is registered with notmuch. It
2830can add tags based on email headers or Maildir folders and can handle spam and
2831killed threads.")
2832 (license isc)))
1679923a
DM
2833
2834(define-public pan
2835 (package
2836 (name "pan")
de227459 2837 (version "0.146")
1679923a
DM
2838 (source
2839 (origin
2840 (method url-fetch)
2841 (uri (string-append "http://pan.rebelbase.com/download/releases/"
2842 version "/source/" name "-" version ".tar.bz2"))
2843 (sha256
de227459 2844 (base32 "17agd27sn4a7nahvkpg0w39kv74njgdrrygs74bbvpaj8rk2hb55"))))
1679923a
DM
2845 (arguments
2846 `(#:configure-flags '("--with-gtk3" "--with-gtkspell" "--with-gnutls"
2847 "--enable-libnotify" "--enable-manual"
2848 "--enable-gkr")
2849 #:phases
2850 (modify-phases %standard-phases
2851 (add-before 'configure 'patch-gpg2
2852 (lambda* (#:key inputs #:allow-other-keys)
2853 (substitute* "pan/usenet-utils/gpg.cc"
2854 (("\"gpg2\"") (string-append "\""
2855 (assoc-ref inputs "gnupg")
2856 "/bin/gpg\"")))
2857 #t)))))
2858 (inputs
8e020519 2859 `(("gmime" ,gmime-2.6)
1679923a
DM
2860 ("gnupg" ,gnupg)
2861 ("gnutls" ,gnutls)
2862 ("gtk+" ,gtk+)
2863 ("gtkspell3" ,gtkspell3)
2864 ("libnotify" ,libnotify)
2865 ("libsecret" ,libsecret)
2866 ("libxml2" ,libxml2)
2867 ("zlib" ,zlib)))
2868 (native-inputs
2869 `(("gettext-minimal" ,gettext-minimal)
2870 ("itstool" ,itstool)
2871 ("pkg-config" ,pkg-config)))
2872 (build-system gnu-build-system)
2873 (home-page "http://pan.rebelbase.com/")
2874 (synopsis "Pan newsreader")
2875 (description "@code{pan} is a Usenet newsreader that's good at both text
2876and binaries. It supports offline reading, scoring and killfiles, yEnc, NZB,
2877PGP handling, multiple servers, and secure connections.")
2878 ;; License of the docs: fdl-1.1; Others: gpl2.
2879 (license (list fdl1.1+ gpl2))))
ae7c1c37
JL
2880
2881(define-public imapfilter
2882 (package
2883 (name "imapfilter")
29a87ed1 2884 (version "2.6.16")
ae7c1c37
JL
2885 (source
2886 (origin
b1d30f46
TGR
2887 (method git-fetch)
2888 (uri (git-reference
2889 (url "https://github.com/lefcha/imapfilter.git")
2890 (commit (string-append "v" version))))
2891 (file-name (git-file-name name version))
ae7c1c37 2892 (sha256
29a87ed1 2893 (base32 "0f65sg6hhv6778fxwsz4hvarbm97dsb8jj0mg7a9qs273r35pqck"))))
ae7c1c37
JL
2894 (build-system gnu-build-system)
2895 (arguments
2896 `(#:tests? #f
2897 #:make-flags
2898 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2899 "CC=gcc")
2900 #:phases
2901 (modify-phases %standard-phases
29a87ed1 2902 (delete 'configure)))) ; no configure script
ae7c1c37
JL
2903 (native-inputs
2904 `(("lua" ,lua)
2905 ("pcre" ,pcre)
2906 ("openssl" ,openssl)))
2907 (home-page "https://github.com/lefcha/imapfilter")
2908 (synopsis "IMAP mail filtering utility")
2909 (description "IMAPFilter is a mail filtering utility. It connects
2910to remote mail servers using IMAP, sends searching queries to the server and
2911processes mailboxes based on the results. It can be used to delete, copy,
2912move, flag, etc. messages residing in mailboxes at the same or different mail
2913servers. The 4rev1 and 4 versions of IMAP are supported.")
2914 (license license:expat)))
dc8675af
EF
2915
2916(define-public urlscan
2917 (package
2918 (name "urlscan")
803f0584 2919 (version "0.9.4")
dc8675af
EF
2920 (source
2921 (origin
2922 (method url-fetch)
2923 (uri (pypi-uri "urlscan" version))
2924 (sha256
803f0584 2925 (base32 "1q0vxv9haap01vz1cbkzss62cgwb9365lv5vnkg2gbpx4g5y7a9l"))))
dc8675af
EF
2926 (build-system python-build-system)
2927 (propagated-inputs
2928 `(("python-urwid" ,python-urwid)))
2929 (home-page "https://github.com/firecat53/urlscan")
2930 (synopsis "View/select the URLs in an email message or file")
2931 (description
2932 "Urlscan is a small program that is designed to integrate with the
2933@code{mutt} mailreader to allow you to easily launch a Web browser for URLs
2934contained in email messages. It parses an email message or file and scans it
2935for URLs and email addresses. It then displays the URLs and their context
2936within the message, and allows you to choose one or more URLs to send to your
2937Web browser. Alternatively, it send a list of all URLs to stdout. It is a
2938replacement for the @code{urlview} program.")
2939 (license gpl2)))
829785c1
EB
2940
2941(define-public tnef
2942 (package
2943 (name "tnef")
fe147c97 2944 (version "1.4.18")
829785c1
EB
2945 (source
2946 (origin
2947 (method git-fetch)
2948 (uri (git-reference
2949 (url "https://github.com/verdammelt/tnef.git")
2950 (commit version)))
2951 (sha256
fe147c97 2952 (base32 "104g48mcm00bgiyzas2vf86331w7bnw7h3bc11ib4lp7rz6zqfck"))
829785c1
EB
2953 (file-name (git-file-name name version))))
2954 (build-system gnu-build-system)
2955 (native-inputs
2956 `(("autoconf" ,autoconf)
2957 ("automake" ,automake)))
2958 (arguments `(#:parallel-tests? #f)) ;tests are side-effect'y
2959 (home-page "https://github.com/verdammelt/tnef")
2960 (synopsis "Unpack @code{application/ms-tnef} attachments")
2961 (description
2962 "TNEF is a tar-like program that unpacks MIME attachments of type
2963@code{application/ms-tnef}.")
2964 (license gpl2+)))
e3a47031
RW
2965
2966(define-public mumi
b7f1a1aa
RW
2967 (let ((commit "8a57c87797ffb07baa88697130204184db643521")
2968 (revision "5"))
e3a47031
RW
2969 (package
2970 (name "mumi")
2971 (version (git-version "0.0.0" revision commit))
2972 (source (origin
2973 (method git-fetch)
2974 (uri (git-reference
2975 (url "https://git.elephly.net/software/mumi.git")
2976 (commit commit)))
2977 (file-name (git-file-name name version))
2978 (sha256
2979 (base32
18e4d11b
LC
2980 "1575gn5p086sjxz5hvg6iyskq6cxf6vf50s9nsc4xgrbcqa3pv2c"))
2981 (modules '((guix build utils)))
2982 (snippet
2983 '(begin
18e4d11b 2984 (substitute* "Makefile.am"
ec73e50b
LC
2985 ;; Install .go files to $prefix/lib instead of
2986 ;; $prefix/share.
18e4d11b
LC
2987 (("^godir[[:space:]]*=.*")
2988 "godir = \
ec73e50b
LC
2989$(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")
2990
2991 ;; Install assets.
2992 (("^assetsdir.*" _)
2993 "\
2994assetsdir = $(pkgdatadir)/assets
2995assetscssdir = $(assetsdir)/css
2996assetsimgdir = $(assetsdir)/img
2997assetsjsdir = $(assetsdir)/js
2998
2999assetscss_DATA = $(wildcard assets/css/*)
3000assetsimg_DATA = $(wildcard assets/img/*)
3001assetsjs_DATA = $(wildcard assets/js/*)\n"))
18e4d11b 3002 #t))))
e3a47031
RW
3003 (build-system gnu-build-system)
3004 (arguments
1214684b
LC
3005 `(#:modules ((guix build gnu-build-system)
3006 ((guix build guile-build-system)
3007 #:select (target-guile-effective-version))
3008 (guix build utils))
3009 #:imported-modules ((guix build guile-build-system)
3010 ,@%gnu-build-system-modules)
3011
8ff573d3
LC
3012 #:configure-flags '("--localstatedir=/var")
3013
1214684b 3014 #:phases
e3a47031
RW
3015 (modify-phases %standard-phases
3016 (add-after 'install 'wrap-executable
3017 (lambda* (#:key outputs #:allow-other-keys)
3018 (let* ((out (assoc-ref outputs "out"))
3019 (bin (string-append out "/bin"))
1214684b
LC
3020 (version (target-guile-effective-version))
3021 (scm (string-append out "/share/guile/site/" version))
3022 (go (string-append out "/lib/guile/" version
3023 "/site-ccache")))
e3a47031
RW
3024 (wrap-program (string-append bin "/mumi")
3025 `("GUILE_LOAD_PATH" ":" prefix
3026 (,scm ,(getenv "GUILE_LOAD_PATH")))
3027 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
3028 (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))
3029 #t))))))
3030 (inputs
3031 `(("guile-debbugs" ,guile-debbugs-next)
3032 ("guile-email" ,guile-email)
3033 ("guile-fibers" ,guile-fibers)
91f55717 3034 ("guile-json" ,guile-json-1)
e3a47031 3035 ("guile-syntax-highlight" ,guile-syntax-highlight)
c48c6152 3036 ("gnutls" ,gnutls) ;needed to talk to https://debbugs.gnu.org
c7b2b539
LC
3037 ("guile" ,guile-2.2)
3038 ("mumimu" ,mumimu))) ;'mumimu' executable recorded in (mumi config)
e3a47031
RW
3039 (native-inputs
3040 `(("autoconf" ,autoconf)
3041 ("automake" ,automake)
3042 ("pkg-config" ,pkg-config)))
3043 (home-page "https://git.elephly.net/software/mumi.git")
3044 (synopsis "Debbugs web interface")
3045 (description "Mumi is a Debbugs web interface.")
3046 (license agpl3+))))
e1c58440
RW
3047
3048(define-public ytnef
3049 (package
3050 (name "ytnef")
3051 (version "1.9.3")
3052 (source (origin
3053 (method git-fetch)
3054 (uri (git-reference
3055 (url "https://github.com/Yeraze/ytnef.git")
3056 (commit (string-append "v" version))))
3057 (file-name (git-file-name name version))
3058 (sha256
3059 (base32
3060 "07h48s5qf08503pp9kafqbwipdqghiif22ghki7z8j67gyp04l6l"))))
3061 (build-system gnu-build-system)
3062 (native-inputs
3063 `(("autoconf" ,autoconf)
3064 ("automake" ,automake)
3065 ("libtool" ,libtool)))
3066 (home-page "https://github.com/Yeraze/ytnef/")
3067 (synopsis "TNEF stream reader for winmail.dat files")
3068 (description "This package provides a TNEF stream reader library and
3069related tools to process winmail.dat files.")
3070 (license gpl2+)))
eff3a9b2
SB
3071
3072(define-public public-inbox
99b23fee 3073 (let ((commit "05a06f3262a2ddbf46adb85169e13ce9127e4524")
eff3a9b2
SB
3074 (revision "0"))
3075 (package
3076 (name "public-inbox")
99b23fee 3077 (version (git-version "1.2.0" revision commit))
eff3a9b2
SB
3078 (source
3079 (origin (method git-fetch)
3080 (uri (git-reference
3081 (url "https://public-inbox.org")
3082 (commit commit)))
3083 (sha256
3084 (base32
99b23fee 3085 "06cclxg46gsls3x19l9s8s9x8gkjghm6gd4jb1v9ng6fds6xi2fg"))
eff3a9b2
SB
3086 (file-name (git-file-name name version))))
3087 (build-system perl-build-system)
3088 (arguments
3089 '(#:phases
3090 (modify-phases %standard-phases
3091 (add-before 'configure 'qualify-paths
3092 (lambda _
3093 ;; Use absolute paths for 'xapian-compact'.
3094 (let ((xapian-compact (which "xapian-compact")))
3095 (substitute* "script/public-inbox-compact"
3096 (("xapian-compact") xapian-compact)))
3097 #t))
3098 (add-before 'check 'pre-check
3099 (lambda _
3100 (substitute* "t/spawn.t"
3101 (("\\['env'\\]") (string-append "['" (which "env") "']")))
99b23fee
SB
3102 (substitute* "t/ds-leak.t"
3103 (("/bin/sh") (which "sh")))
3104 (invoke "./certs/create-certs.perl")
4a0e4927
SB
3105 ;; XXX: This test fails due to zombie process is not reaped by
3106 ;; the builder.
3107 (substitute* "t/httpd-unix.t"
3108 (("^SKIP: \\{") "SKIP: { skip('Guix');"))
eff3a9b2
SB
3109 #t))
3110 (add-after 'install 'wrap-programs
3111 (lambda* (#:key inputs outputs #:allow-other-keys)
3112 (let ((out (assoc-ref outputs "out")))
3113 (for-each
3114 (lambda (prog)
3115 (wrap-program prog
3116 ;; Let those scripts find their perl modules.
3117 `("PERL5LIB" ":" prefix
3118 (,(string-append out "/lib/perl5/site_perl")
3119 ,(getenv "PERL5LIB")))
3120 ;; 'git' is invoked in various files of the PublicInbox
3121 ;; perl module.
3122 `("PATH" ":" prefix
3123 (,(string-append (assoc-ref inputs "git") "/bin")))))
3124 (find-files (string-append out "/bin"))))
3125 #t)))))
3126 (native-inputs
3127 `(("git" ,git)
99b23fee
SB
3128 ("xapian" ,xapian)
3129 ;; For testing.
3130 ("lsof" ,lsof)
3131 ("openssl" ,openssl)))
eff3a9b2 3132 (inputs
99b23fee 3133 `(("perl-dbd-sqlite" ,perl-dbd-sqlite)
eff3a9b2
SB
3134 ("perl-dbi" ,perl-dbi)
3135 ("perl-email-address-xs" ,perl-email-address-xs)
3136 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
3137 ("perl-email-mime" ,perl-email-mime)
3138 ("perl-email-simple" ,perl-email-simple)
4a0e4927 3139 ("perl-net-server" ,perl-net-server)
eff3a9b2
SB
3140 ("perl-filesys-notify-simple" ,perl-filesys-notify-simple)
3141 ("perl-plack-middleware-deflater" ,perl-plack-middleware-deflater)
3142 ("perl-plack-middleware-reverseproxy" ,perl-plack-middleware-reverseproxy)
3143 ("perl-plack" ,perl-plack)
3144 ("perl-search-xapian" ,perl-search-xapian)
3145 ("perl-timedate" ,perl-timedate)
3146 ("perl-uri-escape" ,perl-uri-escape)
3147 ;; For testing.
3148 ("perl-ipc-run" ,perl-ipc-run)
3149 ("perl-xml-feed" ,perl-xml-feed)))
3150 (home-page "https://public-inbox.org/README.html")
3151 (synopsis "Archive mailing lists in git repositories")
3152 (description
3153 "public-inbox implements the sharing of an email inbox via git to
3154complement or replace traditional mailing lists. Readers may read via NNTP,
3155Atom feeds or HTML archives.")
3156 (license agpl3+))))