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