gnu: youtube-dl: Update to 2020.09.14.
[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>
c05d2cfc 3;;; Copyright © 2014, 2015, 2017, 2020 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>
b93b7b25 11;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 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>
3c986a7d 18;;; Copyright © 2016, 2017, 2018 Nikita <nikita@n0.is>
24262239 19;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
f8072794 20;;; Copyright © 2016, 2017, 2018, 2019, 2020 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>
7ff2159b 26;;; Copyright © 2017, 2018, 2020 Rene Saavedra <pacoon@protonmail.com>
84ce7c5a 27;;; Copyright © 2018, 2019, 2020 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>
24a3eb90 32;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
9ec27360 33;;; Copyright © 2020 Justus Winter <justus@sequoia-pgp.org>
660611e5 34;;; Copyright © 2020 Eric Brown <ecbrown@ericcbrown.com>
19ca9828 35;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
3866a9ae 36;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
3fc0f877 37;;; Copyright © 2020 Alexey Abramov <levenson@mmer.org>
a661e420
LC
38;;;
39;;; This file is part of GNU Guix.
40;;;
41;;; GNU Guix is free software; you can redistribute it and/or modify it
42;;; under the terms of the GNU General Public License as published by
43;;; the Free Software Foundation; either version 3 of the License, or (at
44;;; your option) any later version.
45;;;
46;;; GNU Guix is distributed in the hope that it will be useful, but
47;;; WITHOUT ANY WARRANTY; without even the implied warranty of
48;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49;;; GNU General Public License for more details.
50;;;
51;;; You should have received a copy of the GNU General Public License
52;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
53
1fdd3ee2 54(define-module (gnu packages mail)
59a43334 55 #:use-module (gnu packages)
1e1142d8 56 #:use-module (gnu packages admin)
b0eb2af2 57 #:use-module (gnu packages aspell)
d983a14f 58 #:use-module (gnu packages autotools)
e8435c4d 59 #:use-module (gnu packages backup)
938078a3 60 #:use-module (gnu packages base)
ee886454 61 #:use-module (gnu packages bash)
f8ae32a2 62 #:use-module (gnu packages bison)
fc9a93cb 63 #:use-module (gnu packages calendar)
ac257f12 64 #:use-module (gnu packages check)
938078a3 65 #:use-module (gnu packages compression)
944a5cdd 66 #:use-module (gnu packages crypto)
f58f767b 67 #:use-module (gnu packages curl)
4fd6bf53 68 #:use-module (gnu packages cyrus-sasl)
81ce19f4 69 #:use-module (gnu packages databases)
255d1bbe 70 #:use-module (gnu packages dbm)
d983a14f 71 #:use-module (gnu packages dejagnu)
8a3741e6 72 #:use-module (gnu packages django)
8b53366c 73 #:use-module (gnu packages dns)
938078a3 74 #:use-module (gnu packages docbook)
7a6213cb 75 #:use-module (gnu packages documentation)
d2938d59 76 #:use-module (gnu packages emacs)
e8435c4d 77 #:use-module (gnu packages enchant)
938078a3 78 #:use-module (gnu packages gdb)
aa20b004 79 #:use-module (gnu packages gettext)
938078a3 80 #:use-module (gnu packages ghostscript)
d2938d59 81 #:use-module (gnu packages glib)
e8435c4d 82 #:use-module (gnu packages gnome)
524e1df6 83 #:use-module (gnu packages gnupg)
152ffe7c 84 #:use-module (gnu packages groff)
d6e941bc 85 #:use-module (gnu packages gsasl)
e8435c4d 86 #:use-module (gnu packages gtk)
1ffa7090 87 #:use-module (gnu packages guile)
0791437f 88 #:use-module (gnu packages guile-xyz)
f8ae32a2 89 #:use-module (gnu packages flex)
9ec27360 90 #:use-module (gnu packages haskell-xyz)
9e2a49db 91 #:use-module (gnu packages icu4c)
b0eb2af2 92 #:use-module (gnu packages kerberos)
c6872990 93 #:use-module (gnu packages language)
e8435c4d 94 #:use-module (gnu packages libcanberra)
8b53366c 95 #:use-module (gnu packages libevent)
d6e941bc 96 #:use-module (gnu packages libidn)
aef4c482 97 #:use-module (gnu packages libunistring)
84ce7c5a 98 #:use-module (gnu packages libunwind)
d983a14f 99 #:use-module (gnu packages linux)
99b23fee 100 #:use-module (gnu packages lsof)
152ffe7c 101 #:use-module (gnu packages lua)
d983a14f 102 #:use-module (gnu packages m4)
938078a3 103 #:use-module (gnu packages man)
1ffa7090 104 #:use-module (gnu packages ncurses)
938078a3 105 #:use-module (gnu packages networking)
b0eb2af2 106 #:use-module (gnu packages openldap)
c315d370 107 #:use-module (gnu packages onc-rpc)
66cc3ab2 108 #:use-module (gnu packages pcre)
13f04f48 109 #:use-module (gnu packages perl)
f115d817 110 #:use-module (gnu packages perl-check)
eff3a9b2 111 #:use-module (gnu packages perl-web)
938078a3 112 #:use-module (gnu packages pkg-config)
3919a31a 113 #:use-module (gnu packages python)
3a98604f 114 #:use-module (gnu packages python-check)
5c4332e5 115 #:use-module (gnu packages python-crypto)
1b2f753d 116 #:use-module (gnu packages python-web)
44d10b1f 117 #:use-module (gnu packages python-xyz)
9e2a49db 118 #:use-module (gnu packages rdf)
1ffa7090 119 #:use-module (gnu packages readline)
938078a3 120 #:use-module (gnu packages ruby)
d2938d59 121 #:use-module (gnu packages search)
224b1c83 122 #:use-module (gnu packages serialization)
1bd3f849 123 #:use-module (gnu packages samba)
6cf27c89 124 #:use-module (gnu packages screen)
9d0c291e 125 #:use-module (gnu packages sphinx)
cd0322a3 126 #:use-module (gnu packages sqlite)
b0eb2af2 127 #:use-module (gnu packages tcl)
938078a3 128 #:use-module (gnu packages texinfo)
33dc54b0 129 #:use-module (gnu packages time)
a7fd7b68 130 #:use-module (gnu packages tls)
eff3a9b2 131 #:use-module (gnu packages version-control)
938078a3 132 #:use-module (gnu packages w3m)
be0c5733 133 #:use-module (gnu packages web)
7c16151a 134 #:use-module (gnu packages webkit)
3d88855d 135 #:use-module (gnu packages xdisorg)
e8435c4d 136 #:use-module (gnu packages xorg)
938078a3 137 #:use-module (gnu packages xml)
7e3b537c 138 #:use-module ((guix licenses) #:prefix license:)
a661e420
LC
139 #:use-module (guix packages)
140 #:use-module (guix download)
f8ae32a2 141 #:use-module (guix git-download)
62035656 142 #:use-module (guix svn-download)
29a7c98a 143 #:use-module (guix utils)
681a6588 144 #:use-module (guix build-system gnu)
e3a47031 145 #:use-module (guix build-system guile)
ebda902f 146 #:use-module (guix build-system perl)
24262239 147 #:use-module (guix build-system python)
98dd9ff8
LC
148 #:use-module (guix build-system trivial)
149 #:use-module (srfi srfi-1)
150 #:use-module (ice-9 match))
a661e420 151
19ca9828
MC
152(define-public anubis
153 (package
154 (name "anubis")
155 ;; This 4.2.90 alpha release adds support for Guile 3 and has fixes for
156 ;; other issues.
157 (version "4.2.90")
158 (source
159 (origin
160 (method url-fetch)
161 (uri (string-append "https://alpha.gnu.org/gnu/anubis/anubis-"
162 version ".tar.gz"))
163 (sha256
164 (base32
165 "0dvm6acl32dv8bixx9z50gzwfp6kj4kxnn1j3dcwjlp7sasjp41s"))))
166 (build-system gnu-build-system)
167 (native-inputs
168 `(("automake" ,automake)
169 ("autoconf" ,autoconf)
170 ("gettext" ,gettext-minimal)
171 ("m4" ,m4))) ;for the test suite
172 (inputs
173 `(("gdbm" ,gdbm)
174 ("gnutls" ,gnutls)
175 ("gpgme" ,gpgme)
176 ("gsasl" ,gsasl)
177 ("guile" ,guile-3.0)
178 ("libgcrypt" ,libgcrypt) ;gnutls support depends on libgcrypt
179 ("libgpg-error" ,libgpg-error)))
180 (outputs '("out" "debug"))
181 (synopsis "SMTP message submission daemon")
182 (description "Anubis is a daemon that sits between the Mail User
183Agent (MUA) and the Mail Transfer Agent (MTA). When a mail is sent by a user
184in the MUA, it is first passed to Anubis, which performs additional processing
185to the message before passing it on for delivery by the MTA. Anubis may, for
186example, modify the message headers or body, or encrypt or sign the message.")
187 (home-page "https://www.gnu.org/software/anubis/manual/")
7e3b537c 188 (license license:gpl3+)))
19ca9828 189
a661e420
LC
190(define-public mailutils
191 (package
192 (name "mailutils")
c28f242b 193 (version "3.10")
a661e420
LC
194 (source (origin
195 (method url-fetch)
196 (uri (string-append "mirror://gnu/mailutils/mailutils-"
20a3df0f 197 version ".tar.xz"))
a661e420
LC
198 (sha256
199 (base32
c28f242b 200 "17smrxjdgbbzbzakik30vj46q4iib85ksqhb82jr4vjp57akszh9"))))
a661e420
LC
201 (build-system gnu-build-system)
202 (arguments
98dd9ff8 203 `(#:phases
de75f0b1 204 (modify-phases %standard-phases
baa6790b 205 (add-before 'check 'prepare-test-suite
de75f0b1
EF
206 (lambda _
207 ;; Use the right file name for `cat'.
208 (substitute* "testsuite/lib/mailutils.exp"
209 (("/bin/cat")
210 (which "cat")))
14253017 211
43987c97 212 ;; Tests try to invoke 'mda' such that it looks up the
de75f0b1
EF
213 ;; 'root' user, which does not exist in the build
214 ;; environment.
7cb77b78
LC
215 (substitute* '("mda/mda/tests/testsuite"
216 "mda/lmtpd/tests/testsuite")
de75f0b1
EF
217 (("root <") "nobody <")
218 (("spool/root") "spool/nobody")
219 (("root@localhost") "nobody@localhost"))
14253017 220
de75f0b1
EF
221 ;; The 'pipeact.at' tests generate a shell script; make
222 ;; sure it uses the right shell.
223 (substitute* '("sieve/tests/testsuite"
224 "mh/tests/testsuite")
225 (("#! /bin/sh")
226 (string-append "#!" (which "sh"))))
14253017 227
de75f0b1
EF
228 (substitute* "mh/tests/testsuite"
229 (("moreproc: /bin/cat")
230 (string-append "moreproc: " (which "cat"))))
14253017 231
de75f0b1
EF
232 ;; XXX: The comsatd tests rely on being able to open
233 ;; /dev/tty, but that gives ENODEV in the build
234 ;; environment. Thus, ignore test failures here.
235 (substitute* "comsat/tests/Makefile.in"
236 (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
237 (string-append "-" all)))
14253017 238
c28f242b
TGR
239 ;; XXX: The ‘moderator: program discard’ test does not specify
240 ;; an explicit From: but does expect an exact match. But why are
241 ;; all other tests unaffected?
242 (substitute* "sieve/tests/testsuite"
243 (("gray@")
244 "nixbld@"))
245
baa6790b
LC
246 ;; 'frm' tests expect write access to $HOME.
247 (setenv "HOME" (getcwd))
248
249 ;; Avoid the message "I'm going to create the standard MH path
250 ;; for you", which would lead to one test failure (when diffing
251 ;; stdout of 'fmtcheck'.)
252 (call-with-output-file ".mh_profile"
253 (lambda (port)
254 (format port "Path: ~a/Mail-for-tests~%"
255 (getcwd))))
256
de75f0b1
EF
257 #t)))
258 ;; TODO: Add `--with-sql'.
98dd9ff8
LC
259 #:configure-flags
260 (list "--sysconfdir=/etc"
ac3b4b12 261
98dd9ff8
LC
262 ;; Add "/X.Y" to the installation directory.
263 (string-append "--with-guile-site-dir="
264 (assoc-ref %outputs "out")
265 "/share/guile/site/"
266 ,(match (assoc "guile"
267 (package-inputs this-package))
268 (("guile" guile)
269 (version-major+minor
270 (package-version guile))))))
ac3b4b12 271
a661e420 272 #:parallel-tests? #f))
3f3c0ab4 273 (native-inputs
24a3eb90 274 `(("perl" ,perl) ;for 'gylwrap'
a661e420 275 ("texinfo" ,texinfo)
24a3eb90
VL
276 ("dejagnu" ,dejagnu)))
277 (inputs
278 `(("m4" ,m4)
b6bee63b 279 ("guile" ,guile-3.0)
1f889cac 280 ("gsasl" ,gsasl)
a661e420
LC
281 ("gnutls" ,gnutls)
282 ("ncurses" ,ncurses)
abe5d2dc 283 ("readline" ,readline)
a661e420 284 ("linux-pam" ,linux-pam)
3246cc91 285 ("libltdl" ,libltdl)
aef4c482
TGR
286 ("gdbm" ,gdbm)
287
288 ;; Required for SEARCH CHARSET.
289 ("libiconv" ,libiconv)
290 ("libunistring" ,libunistring)))
6fd52309 291 (home-page "https://mailutils.org")
f50d2669 292 (synopsis "Utilities and library for reading and serving mail")
a661e420 293 (description
79c311b8
LC
294 "GNU Mailutils is a collection of programs for managing, viewing and
295processing electronic mail. It contains both utilities and server daemons
296and all operate in a protocol-agnostic way. The underlying libraries are
297also available, simplifying the addition of mail capabilities to new
298software.")
a661e420
LC
299 (license
300 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
7e3b537c 301 (list license:gpl3+ license:lgpl3+))))
d983a14f 302
b6bee63b 303(define-public guile2.2-mailutils
98dd9ff8
LC
304 (package
305 (inherit mailutils)
b6bee63b 306 (name "guile2.2-mailutils")
98dd9ff8 307 (inputs
b6bee63b 308 `(("guile" ,guile-2.2)
98dd9ff8
LC
309 ,@(alist-delete "guile" (package-inputs mailutils))))))
310
b6bee63b
LC
311(define-public guile3.0-mailutils
312 (deprecated-package "guile3.0-mailutils" mailutils))
313
1e1142d8
TGR
314(define-public nullmailer
315 (package
316 (name "nullmailer")
317 (version "2.2")
318 (source
319 (origin
320 (method url-fetch)
321 (uri (list
322 (string-append "https://untroubled.org/nullmailer/"
323 "nullmailer-" version ".tar.gz")
324 ;; Previous releases are moved to this subdirectory.
325 (string-append "https://untroubled.org/nullmailer/archive/"
326 "nullmailer-" version ".tar.gz")))
327 (sha256
328 (base32 "0md8cf90fl2yf3zh9njjy42a673v4j4ygyq95xg7fzkygdigm1lq"))))
329 (build-system gnu-build-system)
330 (arguments
331 `(#:configure-flags
332 (list "--enable-tls"
333 "--localstatedir=/var"
334 "--sysconfdir=/etc")
335 #:phases
336 (modify-phases %standard-phases
337 (add-before 'check 'patch-test-FHS-file-names
338 (lambda _
339 (with-directory-excursion "test"
340 (substitute* (list "functions.in"
341 "tests/send")
342 ;; Fix some shebangs later generated on the fly.
343 (("/bin/sh") (which "bash"))))
344 #t))
345 (add-before 'check 'pass-PATH-to-tests
346 ;; ‘runtest’ launches each test through ‘env -’, clearing $PATH. The
347 ;; tests then source ‘functions’, which first demands a working $PATH
348 ;; only to clobber it later. Pass our $PATH to the test environment
349 ;; and don't touch it after that.
350 (lambda _
351 (with-directory-excursion "test"
352 (substitute* "runtests"
353 (("env - bash")
354 (string-append "env - PATH=\"" (getenv "PATH") "\" bash")))
355 (substitute* "functions.in"
356 (("export PATH=.*") "")))
357 #t))
358 (add-before 'check 'delete-failing-tests
359 (lambda _
360 (with-directory-excursion "test/tests"
361 (for-each delete-file
362 (list
363 ;; XXX ‘nullmailer-inject: nullmailer-queue failed: 15’
364 "inject/queue"
365 ;; XXX These require the not-yet-packaged tcpserver.
366 "protocols" "smtp-auth")))
367 #t))
368 (add-before 'install 'skip-install-data-local
369 ;; Don't attempt to install run-time files outside of the store.
370 (lambda _
371 (substitute* "Makefile"
372 ((" install-data-local") ""))
373 #t)))))
374 (native-inputs
375 ;; For tests.
376 `(("daemontools" ,daemontools))) ; for svc
377 (inputs
378 `(("gnutls" ,gnutls)))
379 (home-page "https://untroubled.org/nullmailer/")
380 (synopsis "Simple relay-only mail transfer agent")
381 (description
382 "Nullmailer is a simple replacement @acronym{MTA, Mail Transfer Agent} for
383hosts that receive no local mail and only relay mail to a fixed set of smart
384relays. It's useful for systems such as Web servers that must be able to send
385email notifications, without having to run a full-blown MTA such as sendmail
386or qmail.
387
388Nullmailer is designed to be simple to configure, easy to extend, and secure.
389It requires little ongoing administration. The included @command{sendmail}
390emulator front-end should allow most (if not all) sendmail-compatible programs
391to run without any changes.")
7e3b537c
TGR
392 (license (list license:lgpl2.1+ ; lib/cli++/ (but some files lack headers)
393 license:gpl2+)))) ; everything else
1e1142d8 394
d983a14f
AE
395(define-public fetchmail
396 (package
397 (name "fetchmail")
c4e73251 398 (version "6.4.12")
271b3c9d
TGR
399 (source
400 (origin
401 (method url-fetch)
402 (uri (string-append "mirror://sourceforge/fetchmail/branch_"
403 (version-major+minor version) "/"
404 "fetchmail-" version ".tar.xz"))
405 (sha256
c4e73251 406 (base32 "11s83af63gs9nnrjb66yq58xriyvi8hzj4ykxp3kws5z3nby111b"))))
d983a14f
AE
407 (build-system gnu-build-system)
408 (inputs
409 `(("openssl" ,openssl)))
410 (arguments
271b3c9d
TGR
411 `(#:configure-flags
412 (list (string-append "--with-ssl="
a9ef5425 413 (assoc-ref %build-inputs "openssl")))))
447b61d4 414 (home-page "https://www.fetchmail.info/")
ae2189a9 415 (synopsis "Remote-mail retrieval and forwarding utility")
d983a14f
AE
416 (description
417 "Fetchmail is a full-featured, robust, well-documented remote-mail
418retrieval and forwarding utility intended to be used over on-demand
419TCP/IP links (such as SLIP or PPP connections). It supports every
420remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
421KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
422and IPSEC.
423
424Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
425so it can then be read by normal mail user agents such as mutt, elm
426or BSD Mail. It allows all your system MTA's filtering, forwarding, and
427aliasing facilities to work just as they would on normal mail.")
7e3b537c 428 (license license:gpl2+))) ; most files are actually public domain or x11
13f04f48
AE
429
430(define-public mutt
431 (package
432 (name "mutt")
506dc927 433 (version "1.14.7")
13f04f48
AE
434 (source (origin
435 (method url-fetch)
a101b15b 436 (uri (list
a101b15b 437 (string-append "https://bitbucket.org/mutt/mutt/downloads/"
a11237e4
LF
438 "mutt-" version ".tar.gz")
439 (string-append "http://ftp.mutt.org/pub/mutt/mutt-"
440 version ".tar.gz")))
13f04f48
AE
441 (sha256
442 (base32
506dc927 443 "0r58xnjgkw0kmnnzhb32mk5gkkani5kbi5krybpbag156fqhgxg4"))
fc1adab1 444 (patches (search-patches "mutt-store-references.patch"))))
13f04f48
AE
445 (build-system gnu-build-system)
446 (inputs
4fd6bf53 447 `(("cyrus-sasl" ,cyrus-sasl)
b0bb0136 448 ("gdbm" ,gdbm)
524e1df6 449 ("gpgme" ,gpgme)
892be267 450 ("libidn2" ,libidn2)
4fd6bf53 451 ("ncurses" ,ncurses)
13f04f48 452 ("openssl" ,openssl)
892be267
IVB
453 ("perl" ,perl)
454 ("sqlite" ,sqlite)))
13f04f48
AE
455 (arguments
456 `(#:configure-flags '("--enable-smtp"
457 "--enable-imap"
458 "--enable-pop"
524e1df6 459 "--enable-gpgme"
b0bb0136 460 "--enable-hcache" ; for header caching
0323fe80 461 "--enable-sidebar"
892be267 462 "--enable-autocrypt"
13f04f48 463 "--with-ssl"
4fd6bf53 464 "--with-sasl"
892be267
IVB
465 "--with-sqlite3" ; required for Autocrypt
466 "--with-idn2" ; recommended for Autocrypt
02d32b19
TGR
467 ;; So that mutt does not check whether the path
468 ;; exists, which it does not in the chroot.
13f04f48
AE
469 "--with-mailpath=/var/mail")))
470 (home-page "http://www.mutt.org/")
471 (synopsis "Mail client")
472 (description
473 "Mutt is a small but very powerful text-based mail client for Unix
474operating systems.")
7e3b537c 475 (license license:gpl2+)))
681a6588 476
7596ddf3 477(define-public neomutt
d54a759d
TGR
478 (package
479 (name "neomutt")
f44c555b 480 (version "20200313")
d54a759d
TGR
481 (source
482 (origin
483 (method git-fetch)
484 (uri (git-reference
b0e7b699 485 (url "https://github.com/neomutt/neomutt")
d54a759d
TGR
486 (commit version)))
487 (file-name (git-file-name name version))
488 (sha256
f44c555b 489 (base32 "1k4k07l6h5krc3fx928qvdq3ssw9fxn95aj7k885xlckd2i1lnb5"))))
d54a759d
TGR
490 (build-system gnu-build-system)
491 (inputs
492 `(("cyrus-sasl" ,cyrus-sasl)
493 ("gdbm" ,gdbm)
494 ("gpgme" ,gpgme)
495 ("ncurses" ,ncurses)
496 ("gnutls" ,gnutls)
497 ("openssl" ,openssl) ; for S/MIME
498 ("perl" ,perl)
499 ("kyotocabinet" ,kyotocabinet)
500 ("libxslt" ,libxslt)
501 ("libidn2" ,libidn2)
502 ("libxml2" ,libxml2)
503 ("lmdb" ,lmdb)
504 ("notmuch" ,notmuch)))
505 (native-inputs
506 `(("automake" ,automake)
507 ("gettext-minimal" ,gettext-minimal)
508 ("pkg-config" ,pkg-config)
509 ("docbook-xsl" ,docbook-xsl)
510 ("docbook-xml" ,docbook-xml-4.2)
511 ("w3m" ,w3m)
512 ("tcl" ,tcl)))
513 (arguments
514 `(#:test-target "test"
515 #:configure-flags
516 (list "--gpgme"
7596ddf3 517
d54a759d
TGR
518 ;; Database, implies header caching.
519 "--disable-tokyocabinet"
520 "--disable-qdbm"
521 "--disable-bdb"
522 "--lmdb"
523 "--kyotocabinet"
54a402dd 524
d54a759d 525 "--gdbm"
54a402dd 526
d54a759d
TGR
527 "--gnutls"
528 "--disable-ssl"
529 "--sasl"
530 (string-append "--with-sasl="
531 (assoc-ref %build-inputs "cyrus-sasl"))
7596ddf3 532
7596ddf3 533
d54a759d
TGR
534 "--smime"
535 "--notmuch"
536 "--disable-idn"
537 "--idn2"
7596ddf3 538
d54a759d
TGR
539 ;; If we do not set this, neomutt wants to check
540 ;; whether the path exists, which it does not
541 ;; in the chroot.
542 "--with-mailpath=/var/mail"
7596ddf3 543
d54a759d
TGR
544 "--with-ui=ncurses"
545 (string-append "--with-ncurses="
546 (assoc-ref %build-inputs "ncurses"))
547 (string-append "--prefix="
548 (assoc-ref %outputs "out"))
549 "--debug")
550 #:phases
551 (modify-phases %standard-phases
552 ;; TODO: autosetup is meant to be included in the source,
553 ;; but we should package autosetup and use our own version of it.
554 (replace 'configure
555 (lambda* (#:key outputs inputs configure-flags #:allow-other-keys)
556 (let* ((out (assoc-ref outputs "out"))
557 (flags `(,@configure-flags))
558 (bash (which "bash")))
559 (setenv "SHELL" bash)
560 (setenv "CONFIG_SHELL" bash)
561 (apply invoke bash
562 (string-append (getcwd) "/configure")
563 flags)))))))
c3c56a4e 564 (home-page "https://neomutt.org/")
d54a759d
TGR
565 (synopsis "Command-line mail reader based on Mutt")
566 (description
567 "NeoMutt is a command-line mail reader which is based on mutt.
32fc1ec3 568It adds a large amount of new and improved features to mutt.")
7e3b537c 569 (license license:gpl2+)))
7596ddf3 570
681a6588
MW
571(define-public gmime
572 (package
573 (name "gmime")
4e839a83 574 (version "3.2.7")
681a6588
MW
575 (source (origin
576 (method url-fetch)
75630043 577 (uri (string-append "mirror://gnome/sources/gmime/"
29a7c98a 578 (version-major+minor version)
681a6588
MW
579 "/gmime-" version ".tar.xz"))
580 (sha256
581 (base32
4e839a83 582 "0i3xfc84qn1z99i70q68kbnp9rmgqrnprqb418ba52s6g9j9dsia"))))
681a6588
MW
583 (build-system gnu-build-system)
584 (native-inputs
585 `(("pkg-config" ,pkg-config)
586 ("gnupg" ,gnupg))) ; for tests only
587 (inputs `(("glib" ,glib)
588 ("gpgme" ,gpgme)
589 ("zlib" ,zlib)))
590 (arguments
591 `(#:phases
cc955356
EF
592 (modify-phases %standard-phases
593 (add-after
594 'unpack 'patch-paths-in-tests
595 (lambda _
596 ;; The test programs run several programs using 'system' with
ae83dcf6 597 ;; hard-coded paths. Here we patch them all.
598 ;; We use ISO-8859-1 here because test-iconv.c contains
cc955356
EF
599 ;; raw byte sequences in several different encodings.
600 (with-fluids ((%default-port-encoding #f))
601 (substitute* (find-files "tests" "\\.c$")
602 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
603 (let* ((base (basename prog-path))
ae83dcf6 604 (prog (which base)))
cc955356 605 (string-append pre
8e020519
MB
606 (or prog (error "not found: " base)))))))
607 #t)))))
681a6588
MW
608 (home-page "http://spruce.sourceforge.net/gmime/")
609 (synopsis "MIME message parser and creator library")
610 (description
611 "GMime provides a core library and set of utilities which may be used for
612the creation and parsing of messages using the Multipurpose Internet Mail
613Extension (MIME).")
7e3b537c 614 (license (list license:lgpl2.1+ license:gpl2+ license:gpl3+))))
681a6588 615
8e020519
MB
616;; Some packages are not ready for GMime 3 yet.
617(define-public gmime-2.6
618 (package
619 (inherit gmime)
620 (version "2.6.23")
621 (source (origin
622 (method url-fetch)
623 (uri (string-append "mirror://gnome/sources/gmime/"
624 (version-major+minor version)
625 "/gmime-" version ".tar.xz"))
626 (sha256
627 (base32
628 "0slzlzcr3h8jikpz5a5amqd0csqh2m40gdk910ws2hnaf5m6hjbi"))))))
629
a7e59c50
LC
630(define-public bogofilter
631 (package
632 (name "bogofilter")
2665ff41
TGR
633 (version "1.2.5")
634 (source
635 (origin
636 (method url-fetch)
637 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-stable/"
638 "bogofilter-" version ".tar.xz"))
639 (sha256
640 (base32 "1sl9xrnnlk2sn8gmibhn8li09vnansjbxb9l1182qmgz7cvs2j1j"))))
a7e59c50
LC
641 (build-system gnu-build-system)
642 (arguments
c55fa42b
EF
643 '(#:phases
644 (modify-phases %standard-phases
645 (add-before 'check 'pre-check
646 (lambda _
647 (substitute* "src/tests/t.frame"
648 (("GREP=/bin/grep")
649 (string-append "GREP=" (which "grep") "\n")))
650 #t)))))
a7e59c50
LC
651 (native-inputs `(("flex" ,flex)))
652 (inputs `(("bdb" ,bdb)))
0ba57558 653 (home-page "https://bogofilter.sourceforge.io/")
a7e59c50
LC
654 (synopsis "Mail classifier based on a Bayesian filter")
655 (description
656 "Bogofilter is a mail filter that classifies mail as spam or ham
657 (non-spam) by a statistical analysis of the message's header and
658content (body). The program is able to learn from the user's classifications
659and corrections. It is based on a Bayesian filter.")
7e3b537c 660 (license license:gpl3+)))
a7e59c50 661
3919a31a
EB
662(define-public offlineimap
663 (package
664 (name "offlineimap")
6c98d9c7 665 (version "7.2.4")
3919a31a 666 (source (origin
bc7c9f77
MB
667 (method git-fetch)
668 (uri (git-reference
669 (url "https://github.com/OfflineIMAP/offlineimap")
670 (commit (string-append "v" version))))
671 (file-name (git-file-name name version))
3919a31a
EB
672 (sha256
673 (base32
6c98d9c7 674 "0h5q5nk2p2vx86w6rrbs7v70h81dpqqr68x6l3klzl3m0yj9agb1"))))
3919a31a 675 (build-system python-build-system)
7a6213cb 676 (native-inputs
4b0e6367 677 `(("asciidoc" ,asciidoc)))
a4ea25d3
EF
678 (inputs `(("python2-pysqlite" ,python2-pysqlite)
679 ("python2-six" ,python2-six)))
3919a31a
EB
680 (arguments
681 ;; The setup.py script expects python-2.
682 `(#:python ,python-2
683 ;; Tests require a modifiable IMAP account.
42aa73b3
EF
684 #:tests? #f
685 #:phases
686 (modify-phases %standard-phases
7a6213cb
MB
687 (add-after 'build 'build-documentation
688 (lambda _
689 (substitute* "docs/Makefile"
690 ;; Prevent xmllint and xsltproc from downloading a DTD file.
691 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
7232c3f5 692 (invoke "make" "-C" "docs" "man")))
7a6213cb
MB
693 (add-after 'install 'install-documentation
694 (lambda* (#:key outputs #:allow-other-keys)
695 (let* ((out (assoc-ref outputs "out"))
696 (man (string-append out "/share/man")))
697 (install-file "docs/offlineimap.1" (string-append man "/man1"))
698 (install-file "docs/offlineimapui.7" (string-append man "/man7"))
42aa73b3 699 #t))))))
684633e2 700 (home-page "https://www.offlineimap.org")
31e98ca6 701 (synopsis "Sync emails between two repositories")
3919a31a
EB
702 (description
703 "OfflineImap synchronizes emails between two repositories, so that you
704can read the same mailbox from multiple computers. It supports IMAP as REMOTE
705repository and Maildir/IMAP as LOCAL repository.")
7e3b537c 706 (license license:gpl2+)))
3919a31a 707
3e9750c3
TD
708(define-public emacs-mew
709 (package
710 (name "emacs-mew")
611a6980 711 (version "6.8")
3e9750c3
TD
712 (source (origin
713 (method url-fetch)
8502ff7a 714 (uri (string-append "https://mew.org/Release/mew-"
3e9750c3
TD
715 version ".tar.gz"))
716 (sha256
717 (base32
611a6980 718 "0ixzyq33l6j34410kqav3lwn2wx171zvqd3irvns2jvhrbww8i6g"))))
3e9750c3
TD
719 (native-inputs
720 `(("emacs" ,emacs)))
721 (propagated-inputs
722 `(("ruby-sqlite3" ,ruby-sqlite3) ; optional for the database of messages
723 ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
724 (build-system gnu-build-system)
725 (arguments
d5195020 726 (let ((elisp-dir "/share/emacs/site-lisp")
3e9750c3
TD
727 (icon-dir "/share/mew"))
728 `(#:modules ((guix build gnu-build-system)
729 (guix build utils)
730 (guix build emacs-utils))
731 #:imported-modules (,@%gnu-build-system-modules
732 (guix build emacs-utils))
733 #:configure-flags
734 (list (string-append "--with-elispdir=" %output ,elisp-dir)
735 (string-append "--with-etcdir=" %output ,icon-dir))
736 #:phases
737 (modify-phases %standard-phases
738 (add-after 'configure 'patch-mew-icon-directory
739 (lambda* (#:key outputs #:allow-other-keys)
740 (emacs-substitute-sexps "mew-key.el"
741 ("(def.* mew-icon-directory"
742 `(progn
743 (add-to-list 'image-load-path 'mew-icon-directory)
744 ,(string-append (assoc-ref outputs "out") ,icon-dir))))
745 #t))
746 (add-after 'install 'generate-autoloads
747 (lambda* (#:key outputs #:allow-other-keys)
748 (emacs-generate-autoloads
749 "mew" (string-append (assoc-ref outputs "out") ,elisp-dir))
750 #t)))
751 #:tests? #f)))
8502ff7a 752 (home-page "https://mew.org")
3e9750c3
TD
753 (synopsis "Emacs e-mail client")
754 (description "Mew (Messaging in the Emacs World) is a user interface
755for text messages, multimedia messages (MIME), news articles and
756security functionality including PGP, S/MIME, SSH, and SSL.")
7e3b537c 757 (license license:bsd-3)))
3e9750c3 758
d2938d59
EB
759(define-public mu
760 (package
761 (name "mu")
38265b55 762 (version "1.4.13")
d2938d59
EB
763 (source (origin
764 (method url-fetch)
e7b9da24 765 (uri (string-append "https://github.com/djcb/mu/releases/"
b40ba288 766 "download/" version "/"
857fabcd 767 "mu-" version ".tar.xz"))
d2938d59
EB
768 (sha256
769 (base32
38265b55 770 "13kfpr77qrnp3i5qnb5zd03frd3fdviggnl50973gdk0hr7m0smj"))))
d2938d59
EB
771 (build-system gnu-build-system)
772 (native-inputs
773 `(("pkg-config" ,pkg-config)
9fd571a2 774 ("glib" ,glib "bin") ; for gtester
63298f14 775 ("emacs" ,emacs-minimal)
857fabcd 776 ("tzdata" ,tzdata-for-tests))) ; for mu/test/test-mu-query.c
d2938d59
EB
777 (inputs
778 `(("xapian" ,xapian)
d59ec129 779 ("guile" ,guile-2.2)
d2938d59 780 ("glib" ,glib)
857fabcd 781 ("gmime" ,gmime)))
d2938d59 782 (arguments
704f2196
AK
783 `(#:modules ((guix build gnu-build-system)
784 (guix build utils)
785 (guix build emacs-utils))
786 #:imported-modules (,@%gnu-build-system-modules
787 (guix build emacs-utils))
788 #:phases
99404fff 789 (modify-phases %standard-phases
e62e975b 790 (add-after 'unpack 'patch-configure
789bda83
AK
791 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
792 ;; so our Emacs package can't find it. Setting "--with-lispdir"
793 ;; configure flag doesn't help because "mu4e" will be added to
794 ;; the lispdir anyway, so we have to modify "configure.ac".
795 (lambda _
e62e975b 796 (substitute* "configure"
d59ec129
RW
797 (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") "")
798 ;; Use latest Guile
799 (("guile-2.0") "guile-2.2"))
800 (substitute* '("guile/Makefile.in"
801 "guile/mu/Makefile.in")
802 (("share/guile/site/2.0/") "share/guile/site/2.2/"))
789bda83 803 #t))
096a0527 804 (add-after 'unpack 'patch-bin-sh-in-tests
3481c714 805 (lambda _
096a0527
PL
806 (substitute* '("guile/tests/test-mu-guile.c"
807 "mu/test-mu-cmd.c"
808 "mu/test-mu-cmd-cfind.c"
809 "mu/test-mu-query.c"
810 "mu/test-mu-threads.c")
811 (("/bin/sh") (which "sh")))
3481c714 812 #t))
c9dc4577
RW
813 (add-before 'install 'fix-ffi
814 (lambda* (#:key outputs #:allow-other-keys)
815 (substitute* "guile/mu.scm"
816 (("\"libguile-mu\"")
817 (format #f "\"~a/lib/libguile-mu\""
818 (assoc-ref outputs "out"))))
819 #t))
99404fff
AK
820 (add-before 'check 'check-tz-setup
821 (lambda* (#:key inputs #:allow-other-keys)
822 ;; For mu/test/test-mu-query.c
823 (setenv "TZDIR"
824 (string-append (assoc-ref inputs "tzdata")
825 "/share/zoneinfo"))
704f2196
AK
826 #t))
827 (add-after 'install 'install-emacs-autoloads
828 (lambda* (#:key outputs #:allow-other-keys)
829 (emacs-generate-autoloads
830 "mu4e"
831 (string-append (assoc-ref outputs "out")
832 "/share/emacs/site-lisp"))
99404fff 833 #t)))))
754c1204 834 (home-page "https://www.djcbsoftware.nl/code/mu/")
d2938d59
EB
835 (synopsis "Quickly find emails")
836 (description
837 "Mu is a tool for dealing with e-mail messages stored in the
838Maildir-format. Mu's purpose in life is to help you to quickly find the
839messages you need; in addition, it allows you to view messages, extract
840attachments, create new maildirs, and so on.")
7e3b537c 841 (license license:gpl3+)))
d2938d59 842
a2cb16b0
TS
843(define-public alot
844 (package
845 (name "alot")
3f81ca32 846 (version "0.5.1")
a2cb16b0
TS
847 (source (origin
848 (method url-fetch)
1b94f182
TS
849 ;; package author intends on distributing via github rather
850 ;; than pypi:
851 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
a2cb16b0
TS
852 (uri (string-append "https://github.com/pazz/alot/archive/"
853 version ".tar.gz"))
854 (file-name (string-append "alot-" version ".tar.gz"))
855 (sha256
856 (base32
3f81ca32 857 "0wax30hjzmkqfml7hig1dqw1v1y63yc0cgbzl96x58b9h2ggqx3a"))))
a2cb16b0
TS
858 (build-system python-build-system)
859 (arguments
3f81ca32 860 `(;; python 3 is currently unsupported, more info:
fe3b8862 861 ;; https://github.com/pazz/alot/blob/master/docs/source/faq.rst
a2cb16b0 862 #:python ,python-2))
3f81ca32
TS
863 (native-inputs
864 `(("python2-mock" ,python2-mock)))
a2cb16b0
TS
865 (inputs
866 `(("python2-magic" ,python2-magic)
867 ("python2-configobj" ,python2-configobj)
868 ("python2-twisted" ,python2-twisted)
869 ("python2-urwid" ,python2-urwid)
870 ("python2-urwidtrees" ,python2-urwidtrees)
871 ("python2-pygpgme" ,python2-pygpgme)
872 ("python2-notmuch" ,python2-notmuch)))
873 (home-page "https://github.com/pazz/alot")
cfcfc6ab 874 (synopsis "Command-line MUA using @code{notmuch}")
a2cb16b0 875 (description
cfcfc6ab 876 "Alot is an experimental terminal mail user agent (@dfn{MUA}) based on
a2cb16b0 877@code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
7e3b537c 878 (license license:gpl3+)))
a2cb16b0 879
0350a8bb
HG
880(define-public notifymuch
881 (let
882 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
883 (revision "1"))
884 (package
885 (name "notifymuch")
886 (version (string-append "0.1-" revision "." (string-take commit 7)))
887 (source
888 (origin
889 (method git-fetch)
890 (uri (git-reference
b0e7b699 891 (url "https://github.com/kspi/notifymuch")
0350a8bb
HG
892 (commit commit)))
893 (sha256
894 (base32
895 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
896 (file-name (string-append name "-" version "-checkout"))))
897 (build-system python-build-system)
898 (inputs
899 `(("python-notmuch" ,python-notmuch)
900 ("python-pygobject" ,python-pygobject)
901 ("gobject-introspection" ,gobject-introspection)
902 ("libnotify" ,libnotify)
903 ("gtk+" ,gtk+)))
904 (arguments
905 `(#:phases
906 (modify-phases %standard-phases
907 (add-after 'install 'wrap-binary
908 (lambda* (#:key outputs #:allow-other-keys)
909 (let* ((out (assoc-ref outputs "out"))
910 (bin (string-append out "/bin/notifymuch")))
911 (wrap-program bin
912 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
913 `("GI_TYPELIB_PATH" ":" prefix
914 (,(getenv "GI_TYPELIB_PATH")
915 ,(string-append out "/lib/girepository-1.0")))))
916 #t)))))
917 (home-page "https://github.com/kspi/notifymuch")
918 (synopsis "Displays notifications for changes in the notmuch email database")
919 (description "notifymuch displays desktop notifications for messages in
920the notmuch database. The notifications are sent using libnotify to a
921notification daemon. The query to find messages to send a notification about
922is configurable, and a notification for the same message will not be send
923within a configurable period (defaults to 48 hours). To use notifymuch, run
924@command{notifymuch} after new mail is indexed, this can be automated by
925invoking @command{notifymuch} from the post-new hook.")
7e3b537c 926 (license license:gpl3))))
0350a8bb 927
1bd3f849
DT
928(define-public notmuch
929 (package
930 (name "notmuch")
edc55ce9 931 (version "0.31")
1bd3f849
DT
932 (source (origin
933 (method url-fetch)
866fade9 934 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
edc55ce9 935 version ".tar.xz"))
1bd3f849
DT
936 (sha256
937 (base32
edc55ce9 938 "1543l57viqzqikjgfzp2abpwz3p0k2iq0b1b3wmn31lwaghs07sp"))))
1bd3f849
DT
939 (build-system gnu-build-system)
940 (arguments
d738f134
AI
941 `(#:modules ((guix build gnu-build-system)
942 ((guix build emacs-build-system) #:prefix emacs:)
943 (guix build utils))
944 #:imported-modules (,@%gnu-build-system-modules
945 (guix build emacs-build-system)
946 (guix build emacs-utils))
e82cf6c6
TGR
947 #:make-flags
948 (list "V=1" ; verbose test output
949 "NOTMUCH_TEST_TIMEOUT=1h") ; don't fail on slow machines
eb537f57 950 #:phases (modify-phases %standard-phases
6cf27c89
MB
951 (add-after 'unpack 'patch-notmuch-lib.el
952 (lambda _
953 (substitute* "emacs/notmuch-lib.el"
954 (("/bin/sh") (which "sh")))
955 #t))
eb537f57
DT
956 (replace 'configure
957 (lambda* (#:key outputs #:allow-other-keys)
958 (setenv "CC" "gcc")
959 (setenv "CONFIG_SHELL" (which "sh"))
ee886454 960
d738f134
AI
961 (let* ((out (assoc-ref outputs "out"))
962 (elisp
1cd91499 963 (string-append out "/share/emacs/site-lisp/")))
82d2dfa0
TGR
964 (invoke "./configure"
965 (string-append "--prefix=" out)
966 (string-append "--emacslispdir=" elisp)
967 (string-append "--emacsetcdir=" elisp)))))
c05d2cfc
MW
968 (add-before 'check 'disable-failing-tests
969 ;; FIXME: Investigate why these tests are failing,
edc55ce9 970 ;; and try removing this for notmuch versions > 0.31.
c05d2cfc
MW
971 (lambda _
972 (substitute* "test/T356-protected-headers.sh"
973 (("\\$NOTMUCH_GMIME_X509_CERT_VALIDITY") "0"))
974 #t))
6cf27c89
MB
975 (add-before 'check 'prepare-test-environment
976 (lambda _
977 (setenv "TEST_CC" "gcc")
978 ;; Patch various inline shell invocations.
979 (substitute* (find-files "test" "\\.sh$")
980 (("/bin/sh") (which "sh")))
d738f134
AI
981 #t))
982 (add-after 'install 'make-autoloads
983 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
1bd3f849 984 (native-inputs
2c5b91dc 985 `(("bash-completion" ,bash-completion)
76472ed9 986 ("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for some tests
2c5b91dc 987 ("pkg-config" ,pkg-config)
3d3c07f3
MB
988 ("python" ,python)
989 ("python-docutils" ,python-docutils)
556530c9 990 ("sphinx" ,python-sphinx)
6cf27c89
MB
991
992 ;; The following are required for tests only.
993 ("which" ,which)
994 ("dtach" ,dtach)
995 ("gnupg" ,gnupg)
996 ("man" ,man-db)
997 ("perl" ,perl)))
1bd3f849 998 (inputs
2c5b91dc 999 `(("glib" ,glib)
1bd3f849
DT
1000 ("gmime" ,gmime)
1001 ("talloc" ,talloc)
1002 ("xapian" ,xapian)
1003 ("zlib" ,zlib)))
540d6cc7 1004 (home-page "https://notmuchmail.org/")
1bd3f849
DT
1005 (synopsis "Thread-based email index, search, and tagging")
1006 (description
1007 "Notmuch is a command-line based program for indexing, searching, read-
1008ing, and tagging large collections of email messages.")
7e3b537c 1009 (license license:gpl3+)))
1bd3f849 1010
8a75c589 1011(define-public notmuch-addrlookup-c
9694b44e
AI
1012 (package
1013 (name "notmuch-addrlookup-c")
1014 (version (string-append "9"))
1015 (source (origin
1016 (method git-fetch)
1017 (uri (git-reference
b0e7b699 1018 (url "https://github.com/aperezdc/notmuch-addrlookup-c")
9694b44e
AI
1019 (commit (string-append "v" version))))
1020 (file-name (string-append name "-" version "-checkout"))
1021 (sha256
1022 (base32
1023 "1j3zdx161i1x4w0nic14ix5i8hd501rb31daf8api0k8855sx4rc"))))
1024 (build-system gnu-build-system)
1025 (arguments
1026 '(#:tests? #f ; no tests
1027 #:make-flags (list "CC=gcc")
1028 #:phases (modify-phases %standard-phases
1029 (delete 'configure)
1030 ;; Remove vim code completion config, it's not needed to
1031 ;; build (or be patched).
1032 (add-before 'patch-source-shebangs 'delete-ycm-file
1033 (lambda _ (delete-file ".ycm_extra_conf.py")))
1034 (replace 'install
1035 (lambda* (#:key outputs #:allow-other-keys)
1036 (let ((bin (string-append
1037 (assoc-ref outputs "out") "/bin")))
1038 (install-file "notmuch-addrlookup" bin)))))))
1039 (native-inputs
1040 `(("pkg-config" ,pkg-config)))
1041 (inputs
1042 `(("glib" ,glib)
1043 ("notmuch" ,notmuch)))
1044 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
1045 (synopsis "Address lookup tool for Notmuch")
1046 (description "This is an address lookup tool using a Notmuch database,
8a75c589 1047useful for email address completion.")
9694b44e 1048 (license license:expat)))
8a75c589 1049
4b6909bc
TS
1050(define-public python-notmuch
1051 (package
1052 (name "python-notmuch")
540d6cc7 1053 (version (package-version notmuch))
4b6909bc
TS
1054 ;; Notmuch python bindings are now unavailable on pypi. The
1055 ;; bindings are distributed via the notmuch release tarball.
1056 (source (package-source notmuch))
1057 (build-system python-build-system)
1058 (inputs `(("notmuch" ,notmuch)))
1059 (arguments
1060 `(#:tests? #f ; no "test" target
1061 #:phases
1062 (modify-phases %standard-phases
1063 ;; This python package lives in a subdirectory of the notmuch source
1064 ;; tree, so chdir into it before building.
1065 (add-after 'unpack 'enter-python-dir
1066 (lambda _ (chdir "bindings/python") #t))
1067 ;; Make sure the correct notmuch shared library gets loaded.
1068 (add-before 'build 'set-libnotmuch-file-name
1069 (lambda* (#:key inputs #:allow-other-keys)
1070 (let ((notmuch (assoc-ref inputs "notmuch")))
1071 (substitute* "notmuch/globals.py"
1072 (("libnotmuch\\.so\\.")
1073 (string-append notmuch "/lib/libnotmuch.so.")))
1074 #t))))))
540d6cc7 1075 (home-page (package-home-page notmuch))
4b6909bc
TS
1076 (synopsis "Python bindings of the Notmuch mail indexing library")
1077 (description
1078 "This package provides Python bindings to use the Notmuch mail indexing
1079and search library.")
7e3b537c 1080 (license license:gpl3+)))
4b6909bc 1081
1c74da21 1082(define-public python2-notmuch
caa6fc89 1083 (package-with-python2 python-notmuch))
1c74da21 1084
9ec27360
JW
1085(define-public muchsync
1086 (package
1087 (name "muchsync")
1088 (version "5")
1089 (source
1090 (origin
1091 (method url-fetch)
1092 (uri (string-append "http://www.muchsync.org/src/"
1093 "muchsync-" version ".tar.gz"))
1094 (sha256
1095 (base32 "1k2m44pj5i6vfhp9icdqs42chsp208llanc666p3d9nww8ngq2lb"))))
1096 (build-system gnu-build-system)
1097 (native-inputs
1098 `(("ghc-pandoc" ,ghc-pandoc)
1099 ("pkg-config" ,pkg-config)))
1100 (inputs
1101 `(("libcrypto" ,openssl)
1102 ("notmuch" ,notmuch)
1103 ("sqlite" ,sqlite)
1104 ("xapian" ,xapian)))
1105 (home-page "http://www.muchsync.org/")
1106 (synopsis "Synchronize notmuch mail across machines")
1107 (description
1108 "Muchsync brings Notmuch to all of your computers by synchronizing your
1109mail messages and Notmuch tags across machines. The protocol is heavily
1110pipelined to work efficiently over high-latency networks such as mobile
1111broadband. Muchsync supports arbitrary pairwise synchronization among
1112replicas. A version-vector-based algorithm allows it to exchange only the
1113minimum information necessary to bring replicas up to date regardless of which
1114pairs have previously synchronized.")
7e3b537c 1115 (license license:gpl2+)))
9ec27360 1116
98e9e22f
SB
1117(define-public getmail
1118 (package
1119 (name "getmail")
88e903a5 1120 (version "5.14")
98e9e22f
SB
1121 (source
1122 (origin
1123 (method url-fetch)
1124 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
7e14ed93 1125 "getmail-" version ".tar.gz"))
98e9e22f 1126 (sha256
88e903a5 1127 (base32 "1hcrd9h4g12f5gvl1djsbchcjry02ghq4icdr897s8v48pkrzagk"))))
98e9e22f
SB
1128 (build-system python-build-system)
1129 (arguments
88e903a5 1130 `(#:tests? #f ; no tests
98e9e22f
SB
1131 #:python ,python-2))
1132 (home-page "http://pyropus.ca/software/getmail/")
1133 (synopsis "Mail retriever")
1134 (description
1135 "A flexible, extensible mail retrieval system with support for
1136POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
1137arbitrary message filtering, single-user and domain-mailboxes, and many other
1138useful features.")
1139
1140 ;; License is specified in file '__init__.py'.
7e3b537c 1141 (license license:gpl2)))
98e9e22f 1142
f58f767b
JL
1143(define-public libetpan
1144 (package
1145 (name "libetpan")
a43fcc72 1146 (version "1.9.4")
f58f767b 1147 (source (origin
aae96f8f
TGR
1148 (method git-fetch)
1149 (uri (git-reference
1150 (url "https://github.com/dinhviethoa/libetpan.git")
1151 (commit version)))
1152 (file-name (git-file-name name version))
f58f767b 1153 (sha256
a43fcc72 1154 (base32 "0g7an003simfdn7ihg9yjv7hl2czsmjsndjrp39i7cad8icixscn"))))
f58f767b 1155 (build-system gnu-build-system)
464f5447 1156 (native-inputs `(("autoconf" ,autoconf-wrapper)
f58f767b 1157 ("automake" ,automake)
3246cc91 1158 ("libtool" ,libtool)
f58f767b
JL
1159 ("pkg-config" ,pkg-config)))
1160 (propagated-inputs
1161 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
1162 ;; libraries need to be propagated.
1163 `(("cyrus-sasl" ,cyrus-sasl)
1164 ("openssl" ,openssl)))
1165 (inputs
1166 `(("curl" ,curl)
c1748912
EF
1167 ("expat" ,expat)
1168 ("zlib" ,zlib)))
f58f767b 1169 (arguments
778d6b52 1170 '(#:configure-flags
f58f767b 1171 '("--disable-static" "--disable-db")))
81fb037f 1172 (home-page "https://www.etpan.org/libetpan.html")
f58f767b
JL
1173 (synopsis "Portable middleware for email access")
1174 (description
1175 "The purpose of this mail library is to provide a portable, efficient
1176framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
1177provides an API for C language. It's the low-level API used by MailCore and
1178MailCore 2.")
7e3b537c 1179 (license license:bsd-3)))
f58f767b 1180
ee6e780b
DM
1181(define-public compface
1182 (package
1183 (name "compface")
1184 (version "1.5.2")
1185 (source (origin
1186 (method url-fetch)
1187 (uri (string-append "https://ftp.heanet.ie/mirrors/"
1188 "ftp.xemacs.org/aux/"
f30444b9 1189 "compface-" version ".tar.gz"))
ee6e780b
DM
1190 (sha256
1191 (base32
1192 "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
1193 (build-system gnu-build-system)
1194 (arguments
1195 `(#:tests? #f))
1196 (synopsis "Portrait image compressor")
586ddde5 1197 (description "This package takes your 48x48x1 portrait image and
ee6e780b 1198compresses it.")
0622403d 1199 (home-page "https://legacy.cs.indiana.edu/ftp/faces/")
7e3b537c 1200 (license (license:x11-style "file://README"))))
ee6e780b 1201
e8435c4d
JL
1202(define-public claws-mail
1203 (package
1204 (name "claws-mail")
b418a0b0 1205 (version "3.17.6")
e8435c4d
JL
1206 (source (origin
1207 (method url-fetch)
1208 (uri (string-append
ca6f5ab8 1209 "https://www.claws-mail.org/releases/claws-mail-" version
6ea4b094 1210 ".tar.xz"))
e8435c4d 1211 (sha256
ec92806a 1212 (base32
b418a0b0 1213 "1s05qw0r0gqwvvkxvrrwbjkbi61dvilixiwrpgcq21qc9csc9r0m"))))
e8435c4d
JL
1214 (build-system gnu-build-system)
1215 (native-inputs `(("pkg-config" ,pkg-config)))
1216 (inputs `(("bogofilter" ,bogofilter)
1217 ("curl" ,curl)
1218 ("dbus-glib" ,dbus-glib)
e8435c4d
JL
1219 ("enchant" ,enchant)
1220 ("expat" ,expat)
1221 ("ghostscript" ,ghostscript)
1222 ("hicolor-icon-theme" ,hicolor-icon-theme)
1223 ("gnupg" ,gnupg)
1224 ("gnutls" ,gnutls)
1225 ("gpgme" ,gpgme)
1226 ("gtk" ,gtk+-2)
1227 ("libarchive" ,libarchive)
1228 ("libcanberra" ,libcanberra)
1229 ("libetpan" ,libetpan)
fc9a93cb 1230 ("libical" ,libical)
e8435c4d
JL
1231 ("libnotify" ,libnotify)
1232 ("libsm" ,libsm)
1233 ("libxml2" ,libxml2)
1234 ("perl" ,perl)
f6292baf 1235 ("python-2" ,python-2)
3d88855d
DM
1236 ("mime-info" ,shared-mime-info)
1237 ("startup-notification" ,startup-notification)))
e8435c4d
JL
1238 (arguments
1239 '(#:configure-flags
9716f621
MH
1240 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant"
1241 "--enable-ldap")
ff4192ff
DM
1242 #:make-flags
1243 ;; Disable updating icon cache since it's done by the profile hook.
1244 ;; Conflict with other packages in the profile would be inevitable
1245 ;; otherwise.
1246 '("gtk_update_icon_cache=true")
f6292baf
EB
1247 #:phases (modify-phases %standard-phases
1248 (add-before 'build 'patch-mime
1249 (lambda* (#:key inputs #:allow-other-keys)
1250 (substitute* "src/procmime.c"
1251 (("/usr/share/mime/globs")
1252 (string-append (assoc-ref inputs "mime-info")
1253 "/share/mime/globs"))))))))
e8435c4d
JL
1254 (synopsis "GTK-based Email client")
1255 (description
1256 "Claws-Mail is an email client (and news reader) based on GTK+. The
1257appearance and interface are designed to be familiar to new users coming from
1258other popular email clients, as well as experienced users. Almost all commands
1259are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
1260which can add many functionalities to the base client.")
ba5c926c 1261 (home-page "https://www.claws-mail.org/")
7e3b537c 1262 (license license:gpl3+))) ; most files are actually public domain or x11
e8435c4d 1263
d6e941bc
1264(define-public msmtp
1265 (package
1266 (name "msmtp")
5d2b9b07 1267 (version "1.8.12")
d6e941bc
1268 (source
1269 (origin
1270 (method url-fetch)
1a80f1a9 1271 (uri (string-append "https://marlam.de/msmtp/releases/"
d23d1ddf
LF
1272 "/msmtp-" version ".tar.xz"))
1273 (sha256
5d2b9b07 1274 (base32 "0m33m5bc7ajmgy7vivnzj3mhybg37259hx79xypj769kfyafyvx8"))))
d6e941bc
1275 (build-system gnu-build-system)
1276 (inputs
91b3a6d4 1277 `(("libsecret" ,libsecret)
d6e941bc
1278 ("gnutls" ,gnutls)
1279 ("zlib" ,zlib)
1280 ("gsasl" ,gsasl)))
1281 (native-inputs
1282 `(("pkg-config" ,pkg-config)))
1a80f1a9 1283 (home-page "https://marlam.de/msmtp/")
d6e941bc
1284 (arguments
1285 `(#:configure-flags (list "--with-libgsasl"
1286 "--with-libidn"
823e2ed4
LF
1287 "--with-tls=gnutls")
1288 #:phases
1289 (modify-phases %standard-phases
34e549d8 1290 (add-after 'install 'install-additional-files
823e2ed4
LF
1291 (lambda* (#:key outputs #:allow-other-keys)
1292 (let* ((out (assoc-ref outputs "out"))
1293 (bin (string-append out "/bin"))
1294 (doc (string-append out "/share/doc/msmtp"))
34e549d8
EF
1295 (msmtpq "scripts/msmtpq")
1296 (vimfiles (string-append out "/share/vim/vimfiles/plugin")))
823e2ed4
LF
1297 (install-file (string-append msmtpq "/msmtpq") bin)
1298 (install-file (string-append msmtpq "/msmtp-queue") bin)
1299 (install-file (string-append msmtpq "/README.msmtpq") doc)
34e549d8 1300 (install-file "scripts/vim/msmtp.vim" vimfiles)
b93b7b25
EF
1301 ;; Don't rely on netcat being in the PATH to test for a
1302 ;; connection, instead try tp ing debian.org.
1303 (substitute* (string-append bin "/msmtpq")
1304 (("EMAIL_CONN_TEST=n") "EMAIL_CONN_TEST=p"))
823e2ed4 1305 #t))))))
d6e941bc
1306 (synopsis
1307 "Simple and easy to use SMTP client with decent sendmail compatibility")
1308 (description
1309 "msmtp is an SMTP client. In the default mode, it transmits a mail to
1310an SMTP server (for example at a free mail provider) which takes care of further
1311delivery.")
7e3b537c 1312 (license license:gpl3+)))
d6e941bc 1313
66cc3ab2
TUBK
1314(define-public exim
1315 (package
1316 (name "exim")
125aacaa 1317 (version "4.94")
66cc3ab2
TUBK
1318 (source
1319 (origin
1320 (method url-fetch)
c9b99e88
TGR
1321 (uri (let ((file-name (string-append "exim-" version ".tar.xz")))
1322 (list (string-append "https://ftp.exim.org/pub/exim/exim4/"
1323 file-name)
1324 ;; ‘Fix’ releases (exim-x.y.z.f) are kept separately.
1325 (string-append "https://ftp.exim.org/pub/exim/exim4/fixes/"
1326 file-name)
1327 ;; After a new non-fix release, the old one is moved here.
1328 (string-append "https://ftp.exim.org/pub/exim/exim4/old/"
1329 file-name))))
66cc3ab2 1330 (sha256
125aacaa 1331 (base32 "1nsb2i5mqxfz1sl1bmbxmpb2qiaf3wffhfiw4j9vfpagy3xfhzpp"))))
66cc3ab2
TUBK
1332 (build-system gnu-build-system)
1333 (inputs
15871b52 1334 `(("bdb" ,bdb-5.3) ; ‘#error Version 6 and later BDB API is not supported’
cda8250b 1335 ("gnutls" ,gnutls/dane)
66cc3ab2
TUBK
1336 ("gzip" ,gzip)
1337 ("bzip2" ,bzip2)
1338 ("xz" ,xz)
66cc3ab2 1339 ("perl" ,perl)
c315d370 1340 ("libnsl" ,libnsl)
66cc3ab2
TUBK
1341 ("libxt" ,libxt)
1342 ("libxaw" ,libxaw)))
1343 (native-inputs
42773138 1344 `(("pcre" ,pcre "bin")
cda8250b
TGR
1345 ("perl" ,perl)
1346 ("pkg-config" ,pkg-config)))
66cc3ab2
TUBK
1347 (arguments
1348 '(#:phases
dc1d3cde
KK
1349 (modify-phases %standard-phases
1350 (replace 'configure
1351 ;; We'd use #:make-flags but the top-level Makefile calls others
1352 ;; recursively, so just set all variables this way.
1353 (lambda* (#:key outputs inputs #:allow-other-keys)
1354 (substitute* '("Makefile" "OS/Makefile-Default")
1355 (("(RM_COMMAND=).*" all var)
1356 (string-append var "rm\n")))
1357 (copy-file "src/EDITME" "Local/Makefile")
1358 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
1359 (let ((out (assoc-ref outputs "out"))
1360 (gzip (assoc-ref inputs "gzip"))
1361 (bzip2 (assoc-ref inputs "bzip2"))
1362 (xz (assoc-ref inputs "xz")))
1363 (substitute* '("Local/Makefile")
1364 (("(BIN_DIRECTORY=).*" all var)
1365 (string-append var out "/bin\n"))
1366 (("(CONFIGURE_FILE=).*" all var)
1367 (string-append var out "/etc/exim.conf\n"))
1368 (("(EXIM_USER=).*" all var)
1369 (string-append var "nobody\n"))
1370 (("(FIXED_NEVER_USERS=).*" all var)
15871b52 1371 (string-append var "\n")) ; XXX no root in build environment
dc1d3cde
KK
1372 (("(COMPRESS_COMMAND=).*" all var)
1373 (string-append var gzip "/bin/gzip\n"))
1374 (("(ZCAT_COMMAND=).*" all var)
cda8250b
TGR
1375 (string-append var gzip "/bin/zcat\n"))
1376 (("# (USE_GNUTLS(|_PC)=.*)" all line)
1377 (string-append line "\n")))
1378 ;; This file has hard-coded relative file names for tools despite
1379 ;; the zcat configuration above.
dc1d3cde
KK
1380 (substitute* '("src/exigrep.src")
1381 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
1382 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
1383 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
1384 (("'lzma'") (string-append "'" xz "/bin/lzma'"))))
1385 #t))
1386 (add-before 'build 'fix-sh-paths
1387 (lambda* (#:key inputs #:allow-other-keys)
1388 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
1389 (("SHELL=/bin/sh") "SHELL=sh"))
1390 (substitute* '("scripts/Configure-config.h")
1391 (("\\| /bin/sh") "| sh"))
1392 (let ((bash (assoc-ref inputs "bash")))
1393 (substitute* '("scripts/Configure-eximon")
1394 (("#!/bin/sh") (string-append "#!" bash "/bin/sh"))))
bb335e84
TGR
1395 #t))
1396 (add-before 'build 'build-reproducibly
1397 (lambda _
1398 ;; The ‘compilation number’ is incremented for every build from the
1399 ;; same source tree. It appears to vary over different (parallel?)
1400 ;; builds. Make it a ‘constant number’ instead.
1401 (substitute* "src/version.c"
1402 (("#include \"cnumber.h\"") "1")))))
cda8250b
TGR
1403 #:make-flags
1404 (list "CC=gcc"
1405 "INSTALL_ARG=-no_chown")
1406 ;; No 'check' target. There is a test suite in test/, which assumes that
1407 ;; certain build options were (not) used and that it can freely ‘sudo’.
66cc3ab2 1408 #:tests? #f))
85a9ffcb 1409 (home-page "https://www.exim.org/")
66cc3ab2
TUBK
1410 (synopsis
1411 "Message Transfer Agent (MTA) developed at the University of Cambridge")
1412 (description
1413 "Exim is a message transfer agent (MTA) developed at the University of
1414Cambridge for use on Unix systems connected to the Internet. In style it is
1415similar to Smail 3, but its facilities are more general. There is a great
1416deal of flexibility in the way mail can be routed, and there are extensive
1417facilities for checking incoming mail.")
7e3b537c 1418 (license license:gpl2+)))
66cc3ab2 1419
7d2b784b
MW
1420(define-public dovecot
1421 (package
1422 (name "dovecot")
3fc0f877 1423 ;; Also update dovecot-pigeonhole when updating to a new minor version.
e77989bd 1424 (version "2.3.11.3")
7d2b784b
MW
1425 (source
1426 (origin
1427 (method url-fetch)
c8608faf 1428 (uri (string-append "https://www.dovecot.org/releases/"
7d2b784b 1429 (version-major+minor version) "/"
2fa1a3a8 1430 "dovecot-" version ".tar.gz"))
c03b355f 1431 (sha256
e77989bd 1432 (base32 "1p5gp8jbavcsaara5mfn5cbrnlxssajnchczbgmmfzr7228fmnfk"))))
7d2b784b
MW
1433 (build-system gnu-build-system)
1434 (native-inputs
1435 `(("pkg-config" ,pkg-config)))
1436 (inputs
2bc3ec3b 1437 `(("bzip2" ,bzip2)
9e2a49db
AA
1438 ("clucene" ,clucene)
1439 ("icu4c" ,icu4c)
8826b792 1440 ("libsodium" ,libsodium) ; extra password algorithms
c6872990 1441 ("libstemmer" ,libstemmer)
84ce7c5a
PL
1442 ;; FIXME: The 'test-backtrace' tests fail on arm when using glibc's
1443 ;; backtrace_symbol() function so fallback to using libunwind.
1444 ,@(if (target-arm?)
1445 `(("libunwind" ,libunwind))
1446 '())
2bc3ec3b
TGR
1447 ("linux-pam" ,linux-pam)
1448 ("lz4" ,lz4)
1449 ("openssl" ,openssl)
fd5c70f8 1450 ("sqlite" ,sqlite)
cc16c576
TGR
1451 ("zlib" ,zlib)
1452 ("zstd" ,zstd "lib")))
7d2b784b
MW
1453 (arguments
1454 `(#:configure-flags '("--sysconfdir=/etc"
d6894b95 1455 "--localstatedir=/var"
9e2a49db 1456 "--with-sqlite" ; not auto-detected
c6872990 1457 "--with-lucene") ; not auto-detected
f762e49f
TGR
1458 #:phases
1459 (modify-phases %standard-phases
f762e49f
TGR
1460 (add-after 'unpack 'patch-file-names
1461 (lambda _
1462 (substitute* "src/lib-program-client/test-program-client-local.c"
1463 (("(/bin/| )cat") (which "cat"))
1464 (("/bin/echo") (which "echo"))
1465 (("/bin/false") (which "false"))
1466 (("/bin/sh") (which "bash"))
1467 (("head") (which "head"))
1468 (("sleep") (which "sleep")))
1469 (substitute* (list "src/lib-smtp/test-bin/sendmail-exit-1.sh"
1470 "src/lib-smtp/test-bin/sendmail-success.sh")
1471 (("cat") (which "cat")))
37fc44ea
TGR
1472 #t))
1473 (replace 'install
54151d1a 1474 (lambda* (#:key make-flags #:allow-other-keys)
37fc44ea
TGR
1475 ;; Simple hack to avoid installing a trivial README in /etc.
1476 (apply invoke "make" "install" "sysconfdir=/tmp/bogus"
1477 make-flags))))))
c8608faf 1478 (home-page "https://www.dovecot.org")
7d2b784b
MW
1479 (synopsis "Secure POP3/IMAP server")
1480 (description
1481 "Dovecot is a mail server whose major goals are security and reliability.
1482It supports mbox/Maildir and its own dbox/mdbox formats.")
1483 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
1484 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
1485 ;; Unicode, Inc. License Agreement for Data Files and Software.
7e3b537c
TGR
1486 (license (list license:lgpl2.1 license:expat
1487 (license:non-copyleft "file://COPYING")))))
7d2b784b 1488
3fc0f877
AA
1489(define-public dovecot-pigeonhole
1490 (let ((dovecot-version (version-major+minor (package-version dovecot))))
1491 (package
1492 (name "dovecot-pigeonhole")
1493 (version "0.5.11")
1494 (source
1495 (origin
1496 (method url-fetch)
1497 (uri (string-append
1498 "https://pigeonhole.dovecot.org/releases/" dovecot-version "/"
1499 "dovecot-" dovecot-version "-pigeonhole-" version ".tar.gz"))
1500 (sha256
1501 (base32 "1w5mryv6izh1gv7davnl94rb0pvh5bxl2bydzbfla1b83x22m5qb"))
1502 (modules '((guix build utils)))
1503 (snippet
1504 '(begin
1505 ;; RFC licencing is ad-hoc and rarely free. Remove them all.
1506 (delete-file-recursively "doc/rfc")
1507 (substitute* "configure"
1508 (("doc/rfc/Makefile") ""))
1509 (substitute* "doc/Makefile.in"
1510 (("rfc ") ""))
1511 #t))))
1512 (build-system gnu-build-system)
1513 (arguments
1514 `(#:configure-flags
1515 (list "--disable-static"
1516 "--with-dovecot-install-dirs=no"
1517 (string-append "--with-dovecot="
1518 (assoc-ref %build-inputs "dovecot")
1519 "/lib/dovecot")
1520 (string-append "--docdir="
1521 (assoc-ref %outputs "out")
1522 "/share/doc/" ,name "-" ,version)
1523 (string-append "--with-moduledir="
1524 (assoc-ref %outputs "out")
1525 "/lib/dovecot"))
1526 #:phases
1527 (modify-phases %standard-phases
1528 (add-after 'unpack 'patch-file-names
1529 (lambda* (#:key outputs #:allow-other-keys)
1530 (let* ((out (assoc-ref outputs "out"))
1531 (libexec (string-append out "/libexec/dovecot")))
1532 (substitute* "src/managesieve/managesieve-settings.c"
1533 (("\\.executable = \"managesieve\"")
1534 (string-append ".executable = \"" libexec
1535 "/managesieve\"")))
1536 (substitute* "src/managesieve-login/managesieve-login-settings.c"
1537 (("\\.executable = \"managesieve-login\"")
1538 (string-append ".executable = \"" libexec
1539 "/managesieve-login\"")))
1540 #t))))))
1541 (native-inputs
1542 `(("pkg-config" ,pkg-config)))
1543 (inputs
1544 `(("dovecot" ,dovecot)))
1545 (home-page "https://pigeonhole.dovecot.org")
1546 (synopsis "Dovecot Sieve mail filtering plug-in and ManageSieve service")
1547 (description
1548 "Pigeonhole adds support for the Sieve language (RFC 5228) and the
1549ManageSieve protocol (RFC 5804) to the Dovecot e-mail server.
1550
1551@dfn{Sieve} is a language for filtering incoming mail. Messages can be
1552forwarded or sorted into separate folders. Unwanted messages can be rejected
1553or discarded, and, when the user is not available, the Sieve interpreter can
1554send an automated reply.
1555
1556Sieve is meant to be simple, extensible, and system-independent. The
1557intention is to make it impossible to write anything more complex (and
1558dangerous) than simple mail filters. Unlike most other mail filtering script
1559languages, Sieve does not allow users to execute arbitrary programmes.
1560
1561Through the @dfn{ManageSieve} protocol, users can remotely manage their Sieve
1562scripts without needing file system access. The server accepts only valid
1563scripts to prevent embarrassing errors later on.")
1564 (license license:lgpl2.1))))
1565
944a5cdd 1566(define-public dovecot-trees
cf47a8a5 1567 (package
1568 (name "dovecot-trees")
1569 (version "2.1.0")
1570 (source
1571 (origin
1572 (method url-fetch)
1573 (uri (string-append "https://0xacab.org/riseuplabs/trees/repository/"
1574 "archive.tar.gz?ref=v" version))
1575 (file-name (string-append name "-" version ".tar.gz"))
1576 (sha256
1577 (base32
0e66f4a1
TGR
1578 "0rkk10b1bsjz979sc864vpgcdchy7yxwmyv4ik50lar1h6awdnrf"))
1579 (patches
1580 (search-patches "dovecot-trees-support-dovecot-2.3.patch"))))
cf47a8a5 1581 (build-system gnu-build-system)
1582 (native-inputs
1583 `(("automake" ,automake)
1584 ("autoconf" ,autoconf)
1585 ("libtool" ,libtool)
1586 ("dovecot" ,dovecot)
1587 ("pkg-config" ,pkg-config)))
1588 (inputs
1589 `(("libsodium" ,libsodium)))
1590 (arguments
1591 `(#:tests? #f ;No tests exist.
1592 #:configure-flags (list (string-append "--with-dovecot="
1593 (assoc-ref %build-inputs "dovecot")
7b0efd4c 1594 "/lib/dovecot"))))
cf47a8a5 1595 (home-page "https://0xacab.org/riseuplabs/trees")
1596 (synopsis "NaCL-based Dovecot email storage encryption plugin")
1597 (description
1598 "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
944a5cdd 1599Dovecot encryption plugin. This plugin adds individually encrypted mail
1600storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
1601which uses OpenSSL and RSA keypairs. TREES works in a similar way, but uses
1602the Sodium crypto library (based on NaCL).
1603
1604How it works:
1605@enumerate
1606@item On IMAP log in, the user's cleartext password is passed to the plugin.
1607@item The plugin creates an argon2 digest from the password.
1608@item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
1609@item Inside the secretbox is stored a Curve25519 private key.
1610@item The Curve25519 private key is used to decrypt each individual message,
b3a47662 1611using libsodium sealed boxes.
944a5cdd 1612@item New mail is encrypted as it arrives using the Curve25519 public key.
1613@end enumerate\n")
7e3b537c 1614 (license license:agpl3)))
944a5cdd 1615
a4651f64 1616(define-public dovecot-libsodium-plugin
1617 (let ((commit "044de73c01c35385df0105f6b387bec5d5317ce7")
1618 (revision "1"))
1619 (package
1620 (name "dovecot-libsodium-plugin")
1621 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
1622 (source
1623 (origin
1624 (method git-fetch)
1625 (uri (git-reference
1626 (url "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1627 (commit commit)))
1628 (file-name (string-append name "-" version "-checkout"))
1629 (sha256
1630 (base32
1631 "13h07l7xy713zchnj2p9fhvq7fdl4zy1ai94li3ygkqjjj8hrgas"))))
1632 (build-system gnu-build-system)
1633 (native-inputs
1634 `(("automake" ,automake)
1635 ("autoconf" ,autoconf)
1636 ("libtool" ,libtool)
1637 ("dovecot" ,dovecot)
1638 ("pkg-config" ,pkg-config)))
1639 (inputs
1640 `(("libsodium" ,libsodium)))
1641 (arguments
1642 `(#:tests? #f ;No tests exist.
1643 #:configure-flags (list (string-append "--with-dovecot="
1644 (assoc-ref %build-inputs "dovecot")
1f53fdae 1645 "/lib/dovecot"))))
a4651f64 1646 (home-page "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1647 (synopsis "Libsodium password hashing schemes plugin for Dovecot")
1648 (description
8826b792
TGR
1649 "@code{dovecot-libsodium-plugin} provides a libsodium password
1650hashing scheme (such as scrypt) plug-in for @code{Dovecot}.")
7e3b537c 1651 (license license:gpl3+))))
a4651f64 1652
81ce19f4
1653(define-public isync
1654 (package
1655 (name "isync")
3866a9ae 1656 (version "1.3.3")
81ce19f4
1657 (source
1658 (origin
1659 (method url-fetch)
1660 (uri (string-append "mirror://sourceforge/isync/isync/"
1661 version "/isync-" version ".tar.gz"))
1662 (sha256 (base32
3866a9ae 1663 "10n8ykag0q3ws6fc15xqyg3v980v5nq3kzpablly2rh2z7vkn8gj"))))
81ce19f4 1664 (build-system gnu-build-system)
49490231
LF
1665 (native-inputs
1666 `(("perl" ,perl)))
81ce19f4
1667 (inputs
1668 `(("bdb" ,bdb)
a052d5ab 1669 ("cyrus-sasl" ,cyrus-sasl)
1fdab9d3 1670 ("openssl" ,openssl-1.0)
a66fb3a1 1671 ("zlib" ,zlib)))
0eea5596 1672 (home-page "https://isync.sourceforge.io/")
81ce19f4
1673 (synopsis "Mailbox synchronization program")
1674 (description
f6cd8586 1675 "isync/mbsync is a command-line tool for two-way synchronization of
81ce19f4 1676mailboxes. Currently Maildir and IMAP are supported types.")
7e3b537c 1677 (license license:gpl2+)))
81ce19f4 1678
26b8de19
EB
1679(define-public perl-email-abstract
1680 (package
1681 (name "perl-email-abstract")
1682 (version "3.008")
1683 (source
1684 (origin
1685 (method url-fetch)
1686 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1687 "Email-Abstract-" version ".tar.gz"))
1688 (sha256
1689 (base32
1690 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
1691 (build-system perl-build-system)
1692 (propagated-inputs
1693 `(("perl-email-simple" ,perl-email-simple)
a2190ccc 1694 ("perl-module-pluggable" ,perl-module-pluggable)
26b8de19 1695 ("perl-mro-compat" ,perl-mro-compat)))
9aba9b12 1696 (home-page "https://metacpan.org/release/Email-Abstract")
26b8de19
EB
1697 (synopsis "Interface to mail representations")
1698 (description "Email::Abstract provides module writers with the ability to
1699write simple, representation-independent mail handling code.")
7e3b537c 1700 (license license:perl-license)))
26b8de19 1701
ebda902f
EB
1702(define-public perl-email-address
1703 (package
1704 (name "perl-email-address")
b6c7df92 1705 (version "1.912")
ebda902f
EB
1706 (source
1707 (origin
1708 (method url-fetch)
1709 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1710 "Email-Address-" version ".tar.gz"))
1711 (sha256
b6c7df92 1712 (base32 "1vzr0vx4zsw4zbc9xdffc31wnkc1raqmyfiyws06fbyck197i8qg"))))
ebda902f 1713 (build-system perl-build-system)
9aba9b12 1714 (home-page "https://metacpan.org/release/Email-Address")
ebda902f
EB
1715 (synopsis "Email address parsing and creation")
1716 (description "Email::Address implements a regex-based RFC 2822 parser that
1717locates email addresses in strings and returns a list of Email::Address
1718objects found. Alternatively you may construct objects manually.")
7e3b537c 1719 (license license:perl-license)))
ebda902f 1720
944d3b4b
SB
1721(define-public perl-email-address-xs
1722 (package
1723 (name "perl-email-address-xs")
1724 (version "1.04")
1725 (source
1726 (origin
1727 (method url-fetch)
1728 (uri (string-append "mirror://cpan/authors/id/P/PA/PALI/"
1729 "Email-Address-XS-" version ".tar.gz"))
1730 (sha256
1731 (base32
1732 "0gjrrl81z3sfwavgx5kwjd87gj44mlnbbqsm3dgdv1xllw26spwr"))))
1733 (build-system perl-build-system)
1734 (home-page "https://metacpan.org/release/Email-Address-XS")
1735 (synopsis "Parse and format RFC 5322 email addresses and groups")
1736 (description
1737 "Email::Address::XS implements RFC 5322 parser and formatter of email
1738addresses and groups. Unlike Email::Address, this module does not use regular
1739expressions for parsing but instead is implemented in XS and uses shared code
1740from Dovecot IMAP server.")
7e3b537c 1741 (license license:perl-license)))
944d3b4b 1742
aa86a3be
EB
1743(define-public perl-email-date-format
1744 (package
1745 (name "perl-email-date-format")
1746 (version "1.005")
1747 (source
1748 (origin
1749 (method url-fetch)
1750 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1751 "Email-Date-Format-" version ".tar.gz"))
1752 (sha256
1753 (base32
1754 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
1755 (build-system perl-build-system)
9aba9b12 1756 (home-page "https://metacpan.org/release/Email-Date-Format")
aa86a3be
EB
1757 (synopsis "Produce RFC 2822 date strings")
1758 (description "Email::Date::Format provides a means for generating an RFC
17592822 compliant datetime string.")
7e3b537c 1760 (license license:perl-license)))
aa86a3be 1761
08bf7095
EB
1762(define-public perl-email-messageid
1763 (package
1764 (name "perl-email-messageid")
1fb37ef0 1765 (version "1.406")
08bf7095
EB
1766 (source
1767 (origin
1768 (method url-fetch)
1769 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1770 "Email-MessageID-" version ".tar.gz"))
1771 (sha256
1772 (base32
1fb37ef0 1773 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
08bf7095 1774 (build-system perl-build-system)
9aba9b12 1775 (home-page "https://metacpan.org/release/Email-MessageID")
08bf7095
EB
1776 (synopsis "Generate world unique message-ids")
1777 (description "Email::MessageID generates recommended message-ids to
1778identify a message uniquely.")
7e3b537c 1779 (license license:perl-license)))
08bf7095 1780
0a4c49f6
EB
1781(define-public perl-email-mime
1782 (package
1783 (name "perl-email-mime")
4f50fd75 1784 (version "1.946")
0a4c49f6
EB
1785 (source
1786 (origin
1787 (method url-fetch)
1788 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1789 "Email-MIME-" version ".tar.gz"))
1790 (sha256
1791 (base32
4f50fd75 1792 "0z1k3i0lzp2k421gc8f3wq0jbqflkbw2xqd2k7n7pmv56417kvk8"))))
0a4c49f6
EB
1793 (build-system perl-build-system)
1794 (propagated-inputs
1795 `(("perl-email-address" ,perl-email-address)
1796 ("perl-email-messageid" ,perl-email-messageid)
1797 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1798 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1799 ("perl-email-simple" ,perl-email-simple)
4f50fd75
TGR
1800 ("perl-mime-types" ,perl-mime-types)
1801 ("perl-module-runtime" ,perl-module-runtime)))
9aba9b12 1802 (home-page "https://metacpan.org/release/Email-MIME")
0a4c49f6
EB
1803 (synopsis "MIME message handling")
1804 (description "Email::MIME is an extension of the Email::Simple module, to
1805handle MIME encoded messages. It takes a message as a string, splits it up
1806into its constituent parts, and allows you access to various parts of the
1807message. Headers are decoded from MIME encoding.")
7e3b537c 1808 (license license:perl-license)))
0a4c49f6 1809
55025bb5
EB
1810(define-public perl-email-mime-contenttype
1811 (package
1812 (name "perl-email-mime-contenttype")
9b5fc20c 1813 (version "1.022")
55025bb5
EB
1814 (source
1815 (origin
1816 (method url-fetch)
1817 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1818 "Email-MIME-ContentType-" version ".tar.gz"))
1819 (sha256
1820 (base32
9b5fc20c 1821 "042kxhs3bp1ab9z0mbr1wy21ld4lxd6v2a2mmrashqnsn2075fws"))))
55025bb5
EB
1822 (build-system perl-build-system)
1823 (native-inputs
1824 `(("perl-capture-tiny" ,perl-capture-tiny)))
9aba9b12 1825 (home-page "https://metacpan.org/release/Email-MIME-ContentType")
55025bb5
EB
1826 (synopsis "Parse MIME Content-Type headers")
1827 (description "Email::MIME::ContentType parses a MIME Content-Type
1828header.")
7e3b537c 1829 (license license:perl-license)))
55025bb5 1830
02e29936
EB
1831(define-public perl-email-mime-encodings
1832 (package
1833 (name "perl-email-mime-encodings")
1834 (version "1.315")
1835 (source
1836 (origin
1837 (method url-fetch)
1838 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1839 "Email-MIME-Encodings-" version ".tar.gz"))
1840 (sha256
1841 (base32
1842 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1843 (build-system perl-build-system)
1844 (native-inputs
1845 `(("perl-capture-tiny" ,perl-capture-tiny)))
9aba9b12 1846 (home-page "https://metacpan.org/release/Email-MIME-Encodings")
02e29936
EB
1847 (synopsis "Unified interface to MIME encoding and decoding")
1848 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
7e3b537c 1849 (license license:perl-license)))
02e29936 1850
a24c5420
EB
1851(define-public perl-email-sender
1852 (package
1853 (name "perl-email-sender")
0fd6f28d 1854 (version "1.300034")
a24c5420
EB
1855 (source
1856 (origin
1857 (method url-fetch)
1858 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1859 "Email-Sender-" version ".tar.gz"))
1860 (sha256
0fd6f28d 1861 (base32 "14aj9kqa9dr2bdhzn2qvjj2mffj8wjb5397z8qw7qg057fk3ib05"))))
a24c5420
EB
1862 (build-system perl-build-system)
1863 (native-inputs
1864 `(("perl-capture-tiny" ,perl-capture-tiny)))
1865 (propagated-inputs
1866 `(("perl-email-abstract" ,perl-email-abstract)
1867 ("perl-email-address" ,perl-email-address)
1868 ("perl-email-simple" ,perl-email-simple)
1869 ("perl-list-moreutils" ,perl-list-moreutils)
1870 ("perl-module-runtime" ,perl-module-runtime)
1871 ("perl-moo" ,perl-moo)
1872 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1873 ("perl-sub-exporter" ,perl-sub-exporter)
1874 ("perl-throwable" ,perl-throwable)
1875 ("perl-try-tiny" ,perl-try-tiny)))
9aba9b12 1876 (home-page "https://metacpan.org/release/Email-Sender")
a24c5420
EB
1877 (synopsis "Perl library for sending email")
1878 (description "Email::Sender replaces the old and sometimes problematic
1879Email::Send library.")
7e3b537c 1880 (license license:perl-license)))
a24c5420 1881
151ef3ed
EB
1882(define-public perl-email-simple
1883 (package
1884 (name "perl-email-simple")
3a2f1d93 1885 (version "2.216")
151ef3ed
EB
1886 (source
1887 (origin
1888 (method url-fetch)
1889 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1890 "Email-Simple-" version ".tar.gz"))
1891 (sha256
1892 (base32
3a2f1d93 1893 "1m4brbjvalyp5kjqslqv4155dzwg977shxin208i7lc8236n6pyq"))))
151ef3ed
EB
1894 (build-system perl-build-system)
1895 (propagated-inputs
1896 `(("perl-email-date-format" ,perl-email-date-format)))
9aba9b12 1897 (home-page "https://metacpan.org/release/Email-Simple")
151ef3ed
EB
1898 (synopsis "Parsing of RFC 2822 messages")
1899 (description "Email::Simple provides simple parsing of RFC 2822 message
1900format and headers.")
7e3b537c 1901 (license license:perl-license)))
151ef3ed 1902
f5dceecb
AW
1903(define-public libesmtp
1904 (package
1905 (name "libesmtp")
1906 (version "1.0.6")
1907 (source
1908 (origin
1909 (method url-fetch)
049e02ea
LF
1910 (uri (list (string-append "https://pkgs.fedoraproject.org/repo/pkgs/"
1911 "libesmtp/libesmtp-" version ".tar.bz2/"
1912 "bf3915e627fd8f35524a8fdfeed979c8/libesmtp-"
1913 version ".tar.bz2")
1914 ;; XXX This site is offline, so we fetch Fedora's cached copy
1915 ;; of the source tarball.
1916 (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1917 version ".tar.bz2")))
f5dceecb
AW
1918 (sha256
1919 (base32
1920 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1921 (build-system gnu-build-system)
1922 (propagated-inputs
1923 `(("openssl" ,openssl)))
1924 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1925 (synopsis "Library for sending mail via remote hosts using SMTP")
1926 (description "libESMTP is an SMTP client which manages posting (or
1927submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1928It may be used as part of a Mail User Agent (MUA) or other program that must
1929be able to post electronic mail where mail functionality may not be that
1930program's primary purpose.")
7e3b537c 1931 (license (list license:lgpl2.1+ license:gpl2+))))
f5dceecb 1932
f8ae32a2
AW
1933(define-public esmtp
1934 (package
1935 (name "esmtp")
1936 (version "1.2")
1937 (source
1938 (origin
1939 (method git-fetch)
1940 (uri (git-reference
b0e7b699 1941 (url "https://github.com/andywingo/esmtp")
f8ae32a2
AW
1942 (commit "01bf9fc")))
1943 (sha256
1944 (base32
1945 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1946 (file-name (string-append name "-" version "-checkout"))))
1947 (arguments
1948 `(#:phases (modify-phases %standard-phases
73c0e477
EF
1949 (replace 'bootstrap
1950 (lambda _ (invoke "autoreconf" "-vfi"))))))
f8ae32a2
AW
1951 (build-system gnu-build-system)
1952 (native-inputs
1953 `(("bison" ,bison)
1954 ("flex" ,flex)
1955 ("autoconf" ,autoconf)
1956 ("automake" ,automake)
1957 ("libtool" ,libtool)))
1958 (inputs
718c5dd6 1959 `(("libesmtp" ,libesmtp)))
3b3b60d0 1960 (home-page "https://sourceforge.net/projects/esmtp/")
f8ae32a2
AW
1961 (synopsis "Relay-only mail transfer agent (MTA)")
1962 (description "Esmtp is a simple relay-only mail transfer agent built using
1963libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1964user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1965page for more on configuration. This package also provides minimal
1966compatibility shims for the @command{sendmail}, @command{mailq}, and
1967@command{newaliases} commands.")
7e3b537c 1968 (license license:gpl2+)))
f8ae32a2 1969
34dd26af
CAW
1970(define-public fdm
1971 (package
1972 (name "fdm")
9a0681d1 1973 (version "2.0")
34dd26af
CAW
1974 (source (origin
1975 (method url-fetch)
1976 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
9a0681d1 1977 version "/fdm-" version ".tar.gz"))
34dd26af 1978 (sha256
9a0681d1 1979 (base32 "196fs1z8y7p12wmqn1bylzz94szl58yv2aby3p30nmwjnyv8rch6"))))
34dd26af
CAW
1980 (build-system gnu-build-system)
1981 (inputs
1982 `(("tdb" ,tdb)
1983 ("openssl" ,openssl)
1984 ("zlib" ,zlib)))
1985 (home-page "https://github.com/nicm/fdm")
1986 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1987 (description "fdm is a program designed to fetch mail from POP3
1988or IMAP servers, or receive local mail from stdin, and
1989deliver it in various ways.")
1990 (license
1991 ;; Why point to a source file? Well, all the individual files have a
1992 ;; copy of this license in their headers, but there's no seprate file
1993 ;; with that information.
7e3b537c
TGR
1994 (license:non-copyleft
1995 "https://github.com/nicm/fdm/blob/master/command.c"))))
34dd26af 1996
e90819c4
LG
1997
1998(define-public procmail
1999 (package
2000 (name "procmail")
2001 (version "3.22")
2002 (source
2003 (origin
2004 (method url-fetch)
2005 (uri (string-append
2006 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
2007 version
2008 ".tar.gz"))
2009 (sha256
2010 (base32
2011 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
2012 ;; The following patch fixes an ambiguous definition of
2013 ;; getline() in formail.c. The patch is provided by Debian as
2014 ;; patch 24.
1d982d78 2015 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
c297e965
LF
2016 "procmail-CVE-2014-3618.patch"
2017 "procmail-CVE-2017-16844.patch"))))
e90819c4
LG
2018 (arguments
2019 `(#:phases (modify-phases %standard-phases
2020 (replace 'configure
2021 (lambda _
2022 (substitute* "Makefile"
2023 (("/bin/sh")
2024 (which "sh"))
2025 (("/usr")
2026 (assoc-ref %outputs "out"))
2027 (("/bin/rm")
2028 (which "rm")))
2029 #t)))
2030 #:tests? #f)) ;; There are no tests indicating a successful
2031 ;; build. Some tests of basic locking mechanisms provided by the
8f65585b 2032 ;; file system are performed during 'make install'. However, these
e90819c4
LG
2033 ;; are performed before the actual build process.
2034 (build-system gnu-build-system)
05aa576b 2035 (inputs `(("exim" ,exim)))
e90819c4
LG
2036 (home-page "http://www.procmail.org/")
2037 (synopsis "Versatile mail delivery agent (MDA)")
2038 (description "Procmail is a mail delivery agent (MDA) featuring support
2039for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
2040can be sorted into separate files/directories and arbitrary commands can be
2041executed on mail arrival. Procmail is considered stable, but is no longer
2042maintained.")
7e3b537c
TGR
2043 (license license:gpl2+))) ;; procmail allows to choose the
2044 ;; nonfree Artistic License 1.0
2045 ;; as alternative to the GPL2+.
2046 ;; This option is not listed here.
e90819c4 2047
61c30e9d
LF
2048(define-public khard
2049 (package
2050 (name "khard")
9a95985f 2051 (version "0.17.0")
61c30e9d
LF
2052 (source (origin
2053 (method url-fetch)
2054 (uri (pypi-uri name version))
2055 (sha256
2056 (base32
9a95985f 2057 "062nv4xkfsjc11k9m52dh6xjn9z68a4a6x1s8z05wwv4jbp1lkhn"))))
61c30e9d
LF
2058 (build-system python-build-system)
2059 (arguments
2385012b
EF
2060 `(#:phases
2061 (modify-phases %standard-phases
70333ee6 2062 (add-after 'install 'install-completions
2385012b
EF
2063 (lambda* (#:key outputs #:allow-other-keys)
2064 (let* ((out (assoc-ref outputs "out"))
70333ee6
EF
2065 (zsh (string-append out "/share/zsh/site-functions")))
2066 (copy-recursively "misc/zsh" zsh)
2385012b 2067 #t))))))
82680f80
TLC
2068 (native-inputs
2069 `(("python-setuptools-scm" ,python-setuptools-scm)))
d312bbfa 2070 (inputs
224b1c83
EF
2071 `(("python-atomicwrites" ,python-atomicwrites)
2072 ("python-configobj" ,python-configobj)
224b1c83
EF
2073 ("python-ruamel.yaml" ,python-ruamel.yaml)
2074 ("python-unidecode" ,python-unidecode)
2075 ("python-vobject" ,python-vobject)))
61c30e9d
LF
2076 (synopsis "Console address book using CardDAV")
2077 (description "Khard is an address book for the console. It creates, reads,
2078modifies and removes CardDAV address book entries at your local machine. For
2079synchronizing with a remote address book, @command{vdirsyncer} is recommended.
2080Khard can also be used from within the email client @command{mutt}.")
2081 (home-page "https://github.com/scheibler/khard")
7e3b537c 2082 (license license:gpl3+)))
be0c5733
DM
2083
2084(define-public perl-mail-spf
27f172a9
TGR
2085 (package
2086 (name "perl-mail-spf")
2087 (version "2.9.0")
2088 (source
2089 (origin
2090 (method url-fetch)
2091 (uri (string-append
2092 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-v"
be0c5733
DM
2093 version
2094 ".tar.gz"))
27f172a9
TGR
2095 (sha256
2096 (base32 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
2097 (build-system perl-build-system)
2098 (native-inputs
2099 `(("perl-module-build" ,perl-module-build)
2100 ("perl-net-dns-resolver-programmable"
2101 ,perl-net-dns-resolver-programmable)))
2102 (arguments
2103 `(#:phases
2104 (modify-phases %standard-phases
2105 (add-before 'configure 'modify-Build.PL
2106 (lambda* (#:key outputs #:allow-other-keys)
2107 (substitute* "Build.PL"
2108 (("'/usr/sbin'") (string-append "'"
2109 (assoc-ref outputs "out")
2110 "/sbin'")))
be0c5733 2111 #t)))))
27f172a9
TGR
2112 (inputs
2113 `(("perl-error" ,perl-error)
2114 ("perl-net-dns" ,perl-net-dns)
2115 ("perl-netaddr-ip" ,perl-netaddr-ip)
2116 ("perl-uri" ,perl-uri)))
2117 (home-page "https://metacpan.org/release/Mail-SPF")
2118 (synopsis "Perl implementation of Sender Policy Framework")
2119 (description "Mail::SPF is the Sender Policy Framework implemented
be0c5733 2120in Perl.")
7e3b537c 2121 (license license:bsd-3)))
24262239 2122
f115d817
JL
2123(define-public perl-mail-authenticationresults
2124 (package
2125 (name "perl-mail-authenticationresults")
2126 (version "1.20180923")
2127 (source (origin
2128 (method url-fetch)
2129 (uri (string-append
2130 "mirror://cpan/authors/id/M/MB/MBRADSHAW/"
2131 "Mail-AuthenticationResults-" version ".tar.gz"))
2132 (sha256
2133 (base32
2134 "1g1wym9vcbhldwvi4w5pl0fhd4jh2icj975awf4wr5xmkli9mxbz"))))
2135 (build-system perl-build-system)
2136 (native-inputs
2137 `(("perl-test-exception" ,perl-test-exception)))
2138 (home-page "https://metacpan.org/release/Mail-AuthenticationResults")
2139 (synopsis "Object Oriented Authentication-Results Headers")
2140 (description "Mail::AuthenticationResults parses the message header field
2141that indicates the message authentication status as per RFC7601. This module
2142is not fully compliant with the RFC but it tries to implement most styles of
2143Authentication-Results header seen in the wild.")
7e3b537c 2144 (license license:perl-license)))
f115d817 2145
930c52ae
JL
2146(define-public perl-mail-dkim
2147 (package
2148 (name "perl-mail-dkim")
3b27ffec 2149 (version "0.58")
930c52ae
JL
2150 (source (origin
2151 (method url-fetch)
2152 (uri (string-append
2153 "mirror://cpan/authors/id/M/MB/MBRADSHAW/Mail-DKIM-"
2154 version
2155 ".tar.gz"))
2156 (sha256
2157 (base32
3b27ffec 2158 "0cgkal65qqcy57b21lgij90ba36wl66byw9i76g5yhwaa8ms8hqa"))))
930c52ae
JL
2159 (build-system perl-build-system)
2160 (propagated-inputs
2161 `(("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
2162 ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
2163 ("perl-mailtools" ,perl-mailtools)
2164 ("perl-net-dns" ,perl-net-dns)))
2165 (native-inputs
2166 `(("perl-net-dns-resolver-mock" ,perl-net-dns-resolver-mock)
2167 ("perl-test-requiresinternet" ,perl-test-requiresinternet)
2168 ("perl-yaml-libyaml" ,perl-yaml-libyaml)))
2169 (home-page "https://metacpan.org/release/Mail-DKIM")
2170 (synopsis "Signs/verifies Internet mail with DKIM/DomainKey signatures")
2171 (description "Mail::DKIM is a Perl module that implements the new Domain
2172Keys Identified Mail (DKIM) standard, and the older Yahoo! DomainKeys standard,
2173both of which sign and verify emails using digital signatures and DNS records.
2174Mail-DKIM can be used by any Perl program that wants to provide support for
2175DKIM and/or DomainKeys.")
7e3b537c 2176 (license license:gpl3+)))
930c52ae 2177
8582202c
JL
2178(define-public dkimproxy
2179 (package
2180 (name "dkimproxy")
2181 (version "1.4.1")
2182 (source (origin
2183 (method url-fetch)
2184 (uri (string-append
2185 "mirror://sourceforge/dkimproxy/dkimproxy/"
2186 version "/dkimproxy-" version ".tar.gz"))
2187 (sha256
2188 (base32
66e39000
TGR
2189 "1gc5c7lg2qrlck7b0lvjfqr824ch6jkrzkpsn0gjvlzg7hfmld75"))
2190 (patches
2191 (search-patches "dkimproxy-add-ipv6-support.patch"))))
8582202c
JL
2192 (build-system gnu-build-system)
2193 (arguments
2194 `(#:phases
2195 (modify-phases %standard-phases
2196 (add-after 'install 'make-wrapper
2197 (lambda* (#:key inputs outputs #:allow-other-keys)
8c07824c
TGR
2198 (let* ((out (assoc-ref outputs "out"))
2199 (wrap.pl (lambda (scripts keys)
2200 (for-each
2201 (lambda (script)
2202 (wrap-program (string-append out script)
2203 `("PERL5LIB" ":" prefix
2204 ,(map (λ (input)
2205 (string-append
2206 (assoc-ref inputs input)
2207 "/lib/perl5/site_perl"))
2208 keys))))
2209 scripts))))
2210 (wrap.pl (list "/bin/dkimproxy.in"
2211 "/bin/dkimproxy.out")
2212 (list "perl-crypt-openssl-rsa"
2213 "perl-io-socket-inet6"
2214 "perl-mailtools"
2215 "perl-mail-authenticationresults"
2216 "perl-mail-dkim"
2217 "perl-net-dns"
2218 "perl-net-server"
2219 "perl-socket6"))
28e4c3bb
TGR
2220 (wrap.pl (list "/bin/dkim_responder.pl")
2221 (list "perl-crypt-openssl-rsa"
2222 "perl-mail-dkim"
2223 "perl-mailtools"
2224 "perl-mime-tools"
2225 "perl-net-dns"
2226 "perl-timedate"))
8c07824c 2227 #t))))))
8582202c
JL
2228 (inputs
2229 `(("perl" ,perl)
2230 ("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
66e39000 2231 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
8582202c
JL
2232 ("perl-mailtools" ,perl-mailtools)
2233 ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
2234 ("perl-mail-dkim" ,perl-mail-dkim)
28e4c3bb 2235 ("perl-mime-tools" ,perl-mime-tools)
8582202c 2236 ("perl-net-dns" ,perl-net-dns)
66e39000 2237 ("perl-net-server" ,perl-net-server)
28e4c3bb
TGR
2238 ("perl-socket6" ,perl-socket6)
2239 ("perl-timedate" ,perl-timedate)))
8582202c 2240 (home-page "http://dkimproxy.sourceforge.net/")
d045dce1
TGR
2241 (synopsis "SMTP proxy to sign and verify Internet mail with DKIM headers")
2242 (description
2243 "DKIMproxy is an SMTP proxy that signs and verifies Internet mail using the
2244@code{Mail::DKIM} Perl module. It comprises two separate proxies: an outbound
8582202c 2245proxy for signing outgoing email, and an inbound proxy for verifying signatures
d045dce1
TGR
2246of incoming messages.
2247
2248It was designed for Postfix, but can be used to add DKIM support to nearly any
2249existing mail server. With Postfix, the proxies can operate as either
8582202c 2250@code{Before-Queue} or @code{After-Queue} content filters.")
7e3b537c 2251 (license license:gpl2+)))
8582202c 2252
24262239
CL
2253(define-public mb2md
2254 (package
2255 (name "mb2md")
2256 (version "3.20")
2257 (source (origin
2258 (method url-fetch)
2259 (uri (string-append
2260 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
2261 version ".pl.gz"))
2262 (sha256
2263 (base32
2264 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
2265 (build-system trivial-build-system)
2266 (arguments
2267 '(#:modules ((guix build utils))
2268 #:builder
2269 (begin
2270 (use-modules (guix build utils))
2271 (let* ((source (assoc-ref %build-inputs "source"))
2272 (out (assoc-ref %outputs "out"))
2273 (bin (string-append out "/bin"))
2274 (perl (assoc-ref %build-inputs "perl"))
2275 (gzip (assoc-ref %build-inputs "gzip"))
2276 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
2277 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
2278 (mkdir-p bin)
2279 (with-directory-excursion bin
2280 (copy-file source "mb2md.gz")
e3cfef22 2281 (invoke (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
24262239
CL
2282 (substitute* "mb2md"
2283 (("#!/usr/bin/perl")
2284 (string-append "#!/usr/bin/perl -I " perl5lib)))
2285 (patch-shebang "mb2md" (list (string-append perl "/bin")))
2286 (chmod "mb2md" #o555))
2287 #t))))
c695fb76 2288 (native-inputs `(("gzip" ,gzip)))
24262239
CL
2289 (inputs `(("perl" ,perl)
2290 ("perl-timedate" ,perl-timedate)))
2291 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
2292 (synopsis "Mbox to maildir converter")
2293 (description
2294 "Mb2md is a Perl script that takes one or more mbox format files and
2295converts them to maildir format directories.")
7e3b537c 2296 (license license:public-domain)))
e0d7b421
AI
2297
2298(define-public mpop
2299 (package
2300 (name "mpop")
bfdce9ff 2301 (version "1.4.10")
e0d7b421
AI
2302 (source
2303 (origin
2304 (method url-fetch)
1497b95c 2305 (uri (string-append "https://marlam.de/mpop/releases/"
822c8501 2306 "mpop-" version ".tar.xz"))
e0d7b421 2307 (sha256
bfdce9ff 2308 (base32 "1243hazpiwgvz2m3p48cdh0yw1019i6xjxgc7qyhmxcdy0inb6wy"))))
e0d7b421
AI
2309 (build-system gnu-build-system)
2310 (inputs
fb5ecdec 2311 `(("gnutls" ,gnutls)))
e0d7b421
AI
2312 (native-inputs
2313 `(("pkg-config" ,pkg-config)))
1497b95c 2314 (home-page "https://marlam.de/mpop/")
e0d7b421
AI
2315 (synopsis "POP3 mail client")
2316 (description "mpop is a small and fast POP3 client suitable as a
2317fetchmail replacement.
2318
2319mpop supports multiple accounts, header based mail filtering, delivery
40b1cee6
TGR
2320to mbox files, maildir folders or an @acronym{MDA, Mail Delivery Agent},
2321TLS/SSL, several authentication methods, @acronym{IDN, Internationalized Domain
2322Names} and SOCKS proxies.")
7e3b537c 2323 (license license:gpl3+)))
74c0282c 2324
2325(define-public mhonarc
2326 (package
2327 (name "mhonarc")
2328 (version "2.6.19")
2329 (source
2330 (origin
2331 (method url-fetch)
2332 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
2333 version ".tar.gz"))
2334 (sha256
2335 (base32
2336 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
2337 (build-system perl-build-system)
2338 (home-page "https://www.mhonarc.org/")
2339 (synopsis "Create HTML archives of mail/news messages")
2340 (description
2341 "MHonArc is a Perl mail-to-HTML converter. MHonArc
2342provides HTML mail archiving with index, mail thread linking,
2343etc; plus other capabilities including support for MIME and
2344powerful user customization features.")
7e3b537c 2345 (license license:gpl2+)))
5d87088c 2346
5d87088c
JD
2347(define-public sendmail
2348 (package
2349 (name "sendmail")
2350 (version "8.15.2")
2351 (source
2352 (origin
2353 (method url-fetch)
2354 (uri (string-append
2355 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
2356 version ".tar.gz"))
2357 (sha256
2358 (base32
2359 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
2360 (build-system gnu-build-system)
2361 (arguments
2362 `(#:phases
2363 (modify-phases %standard-phases
2364 (add-before 'build 'replace-/bin/sh
2365 (lambda _
2366 (substitute*
2367 (append
2368 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
2369 "contrib/mmuegel" "devtools/bin/configure.sh")
2370 (find-files "." ".*\\.m4")
2371 (find-files "." ".*\\.cf"))
19527952 2372 (("/bin/sh") (which "sh")))
5d87088c
JD
2373
2374 (substitute* "devtools/bin/Build"
19527952 2375 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
5d87088c
JD
2376 #t))
2377 (replace 'configure
2378 (lambda _
2379
2380 ;; Render harmless any attempts to chown or chgrp
2381 (substitute* "devtools/bin/install.sh"
2382 (("owner=\\$2") "owner=''")
2383 (("group=\\$2") "group=''"))
2384
2385 (with-output-to-file "devtools/Site/site.config.m4"
2386 (lambda ()
2387 (format #t "
2388define(`confCC', `gcc')
2389define(`confOPTIMIZE', `-g -O2')
2390define(`confLIBS', `-lresolv')
2391define(`confINSTALL', `~a/devtools/bin/install.sh')
2392define(`confDEPEND_TYPE', `CC-M')
2393define(`confINST_DEP', `')
55492129
TGR
2394" (getcwd))))
2395 #t))
5d87088c
JD
2396 (replace 'build
2397 (lambda _
55492129
TGR
2398 (invoke "sh" "Build")
2399 (with-directory-excursion "cf/cf"
2400 (copy-file "generic-linux.mc" "sendmail.mc")
2401 (invoke "sh" "Build" "sendmail.cf"))
2402 #t))
5d87088c
JD
2403 (add-before 'install 'pre-install
2404 (lambda _
2405 (let ((out (assoc-ref %outputs "out")))
2406 (mkdir-p (string-append out "/usr/bin"))
2407 (mkdir-p (string-append out "/usr/sbin"))
2408 (mkdir-p (string-append out "/etc/mail"))
2409 (setenv "DESTDIR" out)
2410 (with-directory-excursion "cf/cf"
55492129
TGR
2411 (invoke "sh" "Build" "install-cf"))
2412 #t))))
5d87088c
JD
2413 ;; There is no make check. There are some post installation tests, but those
2414 ;; require root privileges
2415 #:tests? #f))
2416 (inputs
2417 `(("m4" ,m4)
2418 ("perl" ,perl)))
2419 (home-page "http://sendmail.org")
2420 (synopsis
2421 "Highly configurable Mail Transfer Agent (MTA)")
2422 (description
2423 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
2424Allman. It is highly configurable and supports many delivery methods and many
2425transfer protocols.")
7e3b537c
TGR
2426 (license (license:non-copyleft "file://LICENSE"
2427 "See LICENSE in the distribution."))))
5d87088c 2428
8cced06f
TGR
2429(define-public sieve-connect
2430 (package
2431 (name "sieve-connect")
2432 (version "0.90")
2433 (source
2434 (origin
2435 (method url-fetch)
2436 (uri (string-append "https://people.spodhuis.org/phil.pennock/software/"
2437 "sieve-connect-" version ".tar.bz2"))
2438 (sha256
2439 (base32 "00vnyzr67yr2ilnprbd388gfnwmrmbdx1jsig9d0n5q902jqn62a"))))
2440 (build-system gnu-build-system)
2441 (arguments
2442 `(#:make-flags
2443 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2444 #:tests? #f ; no test suite
2445 #:phases
2446 (modify-phases %standard-phases
2447 (delete 'configure) ; no configure script
2448 (add-before 'install 'create-output-directories
2449 (lambda* (#:key outputs #:allow-other-keys)
2450 (let ((out (assoc-ref outputs "out")))
2451 (for-each (lambda (subdirectory)
2452 (mkdir-p (string-append out "/" subdirectory)))
2453 (list "bin"
2454 "man/man1"))
2455 #t)))
2456 (add-after 'install 'wrap-program
2457 (lambda* (#:key inputs outputs #:allow-other-keys)
2458 (let ((out (assoc-ref outputs "out"))
2459 (path (getenv "PERL5LIB")))
2460 (wrap-script (string-append out "/bin/sieve-connect")
2461 `("PERL5LIB" ":" = (,path)))
2462 #t))))))
2463 (inputs
2464 `(("guile" ,guile-3.0) ; for wrap-script
2465 ("perl" ,perl)
2466 ("perl-authen-sasl" ,perl-authen-sasl)
2467 ("perl-io-socket-inet6" ,perl-io-socket-inet6)
2468 ("perl-io-socket-ssl" ,perl-io-socket-ssl)
2469 ("perl-net-dns" ,perl-net-dns)
2470 ("perl-socket6" ,perl-socket6)
2471 ("perl-term-readkey" ,perl-term-readkey)
2472 ("perl-term-readline" ,perl-term-readline-gnu)))
2473 (home-page
2474 "https://people.spodhuis.org/phil.pennock/software/#sieve-connect")
2475 (synopsis "ManageSieve client for managing Sieve e-mail filters")
2476 (description
2477 "Sieve-connect lets you view, upload, edit, delete, and otherwise manage
2478Sieve scripts on any mail server that speaks the @dfn{ManageSieve} protocol,
2479as specifed in RFC 5804.
2480
2481@dfn{Sieve} (RFC 5228) is a specialised language for e-mail filtering. Sieve
2482scripts are stored on the server and run whenever mail arrives. They can
2483automatically sort new messages into folders, silently reject them, send an
2484automated response, and more.
2485
2486@command{sieve-connect} is designed to be both a tool which can be invoked
2487from scripts as well as a decent interactive client. It supports TLS for
2488connection privacy, as well as authentication with SASL or GSSAPI client
2489certificates. It should be a drop-in replacement for @command{sieveshell}
2490from the Cyrus IMAP project.")
2491 (license license:bsd-3)))
2492
8b53366c 2493(define-public opensmtpd
2494 (package
2495 (name "opensmtpd")
6381565d 2496 (version "6.7.1p1")
4eb57ca8
TGR
2497 (source
2498 (origin
2499 (method url-fetch)
2500 (uri (string-append "https://www.opensmtpd.org/archives/"
2501 "opensmtpd-" version ".tar.gz"))
2502 (sha256
6381565d 2503 (base32 "1jh8vxfajm1mvp1v5yh6llrhjzv0n9fgab88mlwllwqynhcfjy3l"))))
4eb57ca8
TGR
2504 (build-system gnu-build-system)
2505 (inputs
2506 `(("bdb" ,bdb)
2507 ("libasr" ,libasr)
2508 ("libevent" ,libevent)
ba6b48b8 2509 ("libressl" ,libressl) ; recommended, and supports e.g. ECDSA
4eb57ca8
TGR
2510 ("linux-pam" ,linux-pam)
2511 ("zlib" ,zlib)))
2512 (native-inputs
2513 `(("bison" ,bison)
2514 ("groff" ,groff))) ; for man pages
2515 (arguments
2516 `(#:configure-flags
2517 (list "--localstatedir=/var"
2518 ;; This is the default only if it exists at build time—it doesn't.
2519 "--with-path-socket=/var/run"
2520 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt"
2521 "--with-user-smtpd=smtpd"
2522 "--with-user-queue=smtpq" "--with-group-queue=smtpq"
2523 "--with-auth-pam"
2524 "--with-table-db")
2525 #:phases
2526 (modify-phases %standard-phases
838c4b10
MC
2527 ;; See: https://github.com/OpenSMTPD/OpenSMTPD/issues/1069.
2528 (add-after 'unpack 'fix-smtpctl-encrypt-bug
2529 (lambda _
2530 (substitute* "smtpd/smtpctl.c"
2531 (("\"encrypt\", \"--\",")
2532 "\"encrypt\","))
2533 #t))
4eb57ca8
TGR
2534 ;; Fix some incorrectly hard-coded external tool file names.
2535 (add-after 'unpack 'patch-FHS-file-names
2536 (lambda _
2537 (substitute* "smtpd/smtpctl.c"
2538 ;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't.
2539 (("/bin/cat") (which "cat")))
2540 (substitute* "smtpd/mda_unpriv.c"
2541 (("/bin/sh") (which "sh")))
2542 #t))
2543 ;; OpenSMTPD provides a single smtpctl utility to control both the
2544 ;; daemon and the local submission subsystem. To accomodate systems
2545 ;; that require historical interfaces such as sendmail, newaliases or
2546 ;; makemap, smtpctl operates in compatibility mode if called with the
2547 ;; historical name.
2548 (add-after 'install 'install-compability-links
2549 (lambda* (#:key outputs #:allow-other-keys)
2550 (let* ((out (assoc-ref outputs "out"))
2551 (sbin (string-append out "/sbin/")))
2552 (for-each (lambda (command)
2553 (symlink "smtpctl" (string-append sbin command)))
2554 (list "mailq" "makemap" "newaliases"
2555 "send-mail" "sendmail")))
2556 #t)))))
2557 (synopsis "Lightweight SMTP daemon")
2558 (description
2559 "OpenSMTPD is an implementation of server-side @acronym{SMTP, Simple Mail
2560Transfer Protocol}, with some additional standard extensions. It allows
2561ordinary machines to exchange e-mails with other systems speaking the SMTP
2562protocol, or to deliver them to local users.
2563
2564In order to simplify the use of SMTP, OpenSMTPD implements a smaller set of
2565functionality than those available in other SMTP daemons. The objective is to
2566provide enough features to satisfy typical usage at the risk of unsuitability
2567to esoteric or niche requirements.")
2568 (home-page "https://www.opensmtpd.org")
7e3b537c
TGR
2569 (license (list license:bsd-2 license:bsd-3 license:bsd-4
2570 (license:non-copyleft "file://COPYING")
2571 license:public-domain license:isc license:openssl))))
4eb57ca8 2572
152ffe7c 2573(define-public opensmtpd-extras
2574 (package
2575 (name "opensmtpd-extras")
4fdf4b6c 2576 (version "6.7.1")
152ffe7c 2577 (source (origin
2578 (method url-fetch)
2579 (uri (string-append "https://www.opensmtpd.org/archives/"
6422615f 2580 "opensmtpd-extras-" version ".tar.gz"))
152ffe7c 2581 (sha256
2582 (base32
4fdf4b6c 2583 "1b1mx71bvmv92lbm08wr2p60g3qhikvv3n15zsr6dcwbk9aqahzq"))))
152ffe7c 2584 (build-system gnu-build-system)
4fdf4b6c
TGR
2585 (native-inputs
2586 `(("pkg-config" ,pkg-config)))
152ffe7c 2587 (inputs
2588 `(("libressl" ,libressl)
2589 ("libevent" ,libevent)
4fdf4b6c 2590 ("mysql" ,mysql)
152ffe7c 2591 ("opensmtpd" ,opensmtpd)
152ffe7c 2592 ("postgresql" ,postgresql)
4fdf4b6c
TGR
2593 ("python" ,python-2)
2594 ("sqlite" ,sqlite)))
152ffe7c 2595 (arguments
4fdf4b6c
TGR
2596 `(#:configure-flags
2597 (list "--sysconfdir=/etc"
2598 "--localstatedir=/var"
2599
2600 "--with-queue-null"
2601 "--with-queue-python"
2602 "--with-queue-ram"
2603 "--with-queue-stub"
2604
2605 "--with-table-ldap"
2606 "--with-table-mysql"
2607 "--with-table-postgres"
2608 ;; "--with-table-redis" ; TODO: package hiredis
2609 "--with-table-socketmap"
2610 "--with-table-passwd"
2611 "--with-table-python"
2612 "--with-table-sqlite"
2613 "--with-table-stub"
2614
2615 "--with-scheduler-ram"
2616 "--with-scheduler-stub"
2617 "--with-scheduler-python"
2618
2619 "--with-user-smtpd=smtpd"
2620
2621 ;; We have to configure it like this because the default checks for
2622 ;; for example Python in /usr/{,local/}bin and fails otherwise.
2623 (string-append "--with-python="
2624 (assoc-ref %build-inputs "python")))))
2625 (home-page "https://www.opensmtpd.org")
152ffe7c 2626 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
2627 (description
2628 "This package provides extra tables, filters, and various other addons
2629for OpenSMTPD to extend its functionality.")
7e3b537c
TGR
2630 (license (list license:bsd-2 license:bsd-3 ; openbsd-compat
2631 license:isc)))) ; everything else
6d3dda4f 2632
62035656
TGR
2633(define libopensmtpd
2634 ;; Private source dependency of opensmtpd-filter-dkimsign (by the same
2635 ;; author), until any project actually uses it in its compiled form.
2636 (let ((revision 48))
2637 (package
2638 (name "libopensmtpd")
2639 (version (format #f "0.0.0-~a" revision))
2640 (source
2641 (origin
2642 (method svn-fetch)
2643 (uri (svn-reference
2644 (url "http://imperialat.at/dev/libopensmtpd/")
2645 (revision revision)))
2646 (sha256
2647 (base32 "04fgibpi6q0c3468ww3z7gsvraz0gyfps0c2dj8mdyri636c0x0s"))
2648 (file-name (git-file-name name version))))
2649 (build-system gnu-build-system)
2650 (arguments
2651 `(#:make-flags
2652 (list "-f" "Makefile.gnu"
2653 (string-append "CC=" ,(cc-for-target))
2654 (string-append "LOCALBASE=" (assoc-ref %outputs "out")))
2655 #:tests? #f ; no test suite
2656 #:phases
2657 (modify-phases %standard-phases
2658 (add-after 'unpack 'inherit-ownership
2659 (lambda _
2660 (substitute* "Makefile.gnu"
2661 (("-o \\$\\{BINOWN\\} -g \\$\\{BINGRP\\}") ""))
2662 #t))
2663 (delete 'configure) ; no configure script
2664 (add-before 'install 'create-output-directories
2665 (lambda* (#:key outputs #:allow-other-keys)
2666 (let ((out (assoc-ref outputs "out")))
2667 (mkdir-p (string-append out "/lib"))
2668 #t)))
2669 (add-after 'install 'install-header-file
2670 (lambda* (#:key make-flags outputs #:allow-other-keys)
2671 (let ((out (assoc-ref outputs "out")))
2672 (mkdir-p (string-append out "/include"))
2673 (apply invoke "make" "includes" make-flags))))
2674 (add-after 'install 'install-man-page
2675 (lambda* (#:key outputs #:allow-other-keys)
2676 (let* ((out (assoc-ref outputs "out"))
2677 (man3 (string-append out "/share/man/man3")))
2678 ;; There is no make target for this.
2679 (install-file "osmtpd_run.3" man3)
2680 #t))))))
2681 (inputs
2682 `(("libevent" ,libevent)))
2683 (home-page "http://imperialat.at/dev/libopensmtpd/")
2684 (synopsis "OpenSMTPd filter C API")
2685 (description
2686 "The @code{osmtpd} API is an event-based C programming interface for
2687writing OpenSMTPd filters.")
2688 (license license:expat))))
2689
2690(define-public opensmtpd-filter-dkimsign
2691 (package
2692 (name "opensmtpd-filter-dkimsign")
2693 ;; The .arch repackaging provides not only a usable Makefile, but patches
2694 ;; the source to actually build on GNU, e.g., by making pledge() optional.
2695 ;; It's effectively the portable branch that upstream lacks at this time.
2696 (version "0.2.arch2") ; also update both native-inputs
2697 (source
2698 (origin
2699 (method git-fetch)
2700 (uri (git-reference
2701 (url "https://github.com/de-vri-es/filter-dkimsign")
2702 (commit (string-append "v" version))))
2703 (sha256
2704 (base32 "1dv6184h0gq2safnc7ln4za3arbafzc1xwkgwmiihqcjvdyxig0c"))
2705 (file-name (git-file-name name version))))
2706 (build-system gnu-build-system)
2707 (arguments
2708 `(#:make-flags
2709 (list (string-append "CC=" ,(cc-for-target)))
2710 #:tests? #f ; no test suite
2711 #:phases
2712 (modify-phases %standard-phases
2713 (replace 'unpack
2714 (lambda* (#:key source inputs #:allow-other-keys)
2715 (copy-recursively source "filter-dkimsign")
2716 (copy-recursively (assoc-ref inputs "libopensmtpd-source")
2717 "libopensmtpd")
2718 (copy-file (assoc-ref inputs "Makefile") "Makefile")
2719 #t))
2720 (delete 'configure) ; no configure script
2721 (replace 'install
2722 (lambda* (#:key outputs #:allow-other-keys)
2723 (let* ((out (assoc-ref outputs "out"))
2724 (libexec (string-append out "/libexec/opensmtpd"))
2725 (man8 (string-append out "/share/man/man8")))
2726 (chdir "filter-dkimsign")
2727 (install-file "filter-dkimsign" libexec)
2728 (install-file "filter-dkimsign.8" man8)
2729 #t))))))
2730 (native-inputs
2731 `(("Makefile"
2732 ,(origin
2733 (method url-fetch)
2734 (uri (string-append
2735 "https://aur.archlinux.org/cgit/aur.git/plain/Makefile"
2736 "?h=opensmtpd-filter-dkimsign"
2737 "&id=58393470477a2ff2a58f9d72f5d851698067539f"))
2738 (sha256
2739 (base32 "0da5qr9hfjkf07ybvfva967njmf2x0b82z020r6v5f93jzsbqx92"))
2740 (file-name (string-append name "-" version "-Makefile"))))
2741 ("libopensmtpd-source" ,(package-source libopensmtpd))))
2742 (inputs
2743 `(("libevent" ,libevent)
2744 ("libressl" ,libressl))) ; openssl works too but follow opensmtpd
2745 (home-page "http://imperialat.at/dev/filter-dkimsign/")
2746 (synopsis "OpenSMTPd filter for signing mail with DKIM")
2747 (description
2748 "The @command{filter-dkimsign} OpenSMTPd filter signs outgoing e-mail
2749messages with @acronym{DKIM, DomainKeys Identified Mail} (RFC 4871).")
2750 (license license:expat)))
2751
b0c8358f
EF
2752(define-public mailman
2753 (package
2754 (name "mailman")
2755 (version "3.3.1")
2756 (source
2757 (origin
2758 (method url-fetch)
2759 (uri (pypi-uri "mailman" version))
2760 (sha256
2761 (base32
2762 "0idfiv48jjgc0jq4731094ddhraqq8bxnwmjk6sg5ask0jss9kxq"))))
2763 (build-system python-build-system)
2764 (propagated-inputs
2765 `(("gunicorn" ,gunicorn)
2766 ("python-aiosmtpd" ,python-aiosmtpd)
2767 ("python-alembic" ,python-alembic)
2768 ("python-atpublic" ,python-atpublic)
2769 ("python-authheaders" ,python-authheaders)
2770 ("python-authres" ,python-authres)
2771 ("python-click" ,python-click)
2772 ("python-dateutil" ,python-dateutil)
2773 ("python-dnspython" ,python-dnspython)
2774 ("python-falcon" ,python-falcon)
2775 ("python-flufl-bounce" ,python-flufl-bounce)
2776 ("python-flufl-i18n" ,python-flufl-i18n)
2777 ("python-flufl-lock" ,python-flufl-lock)
2778 ("python-importlib-resources" ,python-importlib-resources)
2779 ("python-lazr-config" ,python-lazr-config)
2780 ("python-passlib" ,python-passlib)
2781 ("python-requests" ,python-requests)
2782 ("python-sqlalchemy" ,python-sqlalchemy)
2783 ("python-zope-component" ,python-zope-component)
2784 ("python-zope-configuration" ,python-zope-configuration)
2785 ("python-zope-event" ,python-zope-event)
2786 ("python-zope-interface" ,python-zope-interface)))
2787 (native-inputs
2788 `(("python-nose" ,python-nose)))
2789 (home-page "https://www.list.org")
2790 (synopsis "Mailing list manager")
2791 (description
2792 "GNU Mailman is software for managing email discussion and mailing
2793lists. Both users and administrators generally perform their actions in a
2794web interface, although email and command-line interfaces are also provided.
2795The system features built-in archiving, automatic bounce processing, content
2796filtering, digest delivery, and more.")
2797 (license license:gpl3+)))
2798
6d3dda4f 2799(define-public python-mailmanclient
2800 (package
2801 (name "python-mailmanclient")
f1742465 2802 (version "3.3.1")
6d3dda4f 2803 (source
2804 (origin
2805 (method url-fetch)
2806 (uri (pypi-uri "mailmanclient" version))
2807 (sha256
2808 (base32
f1742465 2809 "0pjgzpvhdb6ql8asb20xr8d01m646zpghmcp9fmscks0n1k4di4g"))))
6d3dda4f 2810 (build-system python-build-system)
2811 (arguments
2812 `(#:tests? #f)) ; Requires mailman running
f22efa01 2813 (propagated-inputs
f1742465
EF
2814 `(("python-requests" ,python-requests)))
2815 ;(native-inputs
2816 ; `(("mailman" ,mailman)
2817 ; ("python-falcon" ,python-falcon)
2818 ; ("python-pytest" ,python-pytest)
2819 ; ("python-pytest-services" ,python-pytest-services)))
2820 (home-page "https://www.list.org/")
6d3dda4f 2821 (synopsis "Python bindings for the Mailman 3 REST API")
2822 (description
2823 "The mailmanclient library provides official Python bindings for
2824the GNU Mailman 3 REST API.")
f1742465 2825 (properties `((python2-variant . ,(delay python2-mailmanclient))))
7e3b537c 2826 (license license:lgpl3+)))
6d3dda4f 2827
f1742465 2828;; This is the last version which supports Python-2.
6d3dda4f 2829(define-public python2-mailmanclient
f1742465
EF
2830 (let ((base (package-with-python2
2831 (strip-python2-variant python-mailmanclient))))
2832 (package
2833 (inherit base)
2834 (version "3.1.1")
2835 (source
2836 (origin
2837 (method url-fetch)
2838 (uri (pypi-uri "mailmanclient" version))
2839 (sha256
2840 (base32
2841 "0fdfs5g3pf30v2i7w18pdkv9xnfxmfcv66mzv56dck0a1igq07m3"))))
2842 (propagated-inputs
2843 `(("python2-six" ,python2-six)
2844 ("python2-httplib2" ,python2-httplib2))))))
3163a289 2845
2846(define-public mlmmj
2847 (package
2848 (name "mlmmj")
28b48c87 2849 (version "1.3.0")
3163a289 2850 (source
2851 (origin
2852 (method url-fetch)
2853 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
2854 version ".tar.bz2"))
2855 (sha256
2856 (base32
28b48c87 2857 "0hpj10qad821ci11si8xc2qnmkzfn90y13s43fm4fca38f0qjp8w"))))
3163a289 2858 (build-system gnu-build-system)
2859 (inputs
2860 `(("perl" ,perl))) ; For "contrib/web/"
2861 (native-inputs
2862 `(("pkg-config" ,pkg-config)))
2863 (arguments
2864 `(#:configure-flags
2865 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
2866 ;; It opens the files control/mimedeny and control/mimestrip to get a list
2867 ;; of mimetypes for parts of multipart/mime messages that should be denied
2868 ;; or stripped. The parts then get stripped directly when the mail is
2869 ;; received. mlmmj-receive-strip also appends an extra header
2870 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
2871 ;; mime parts
2872 (list "--enable-receive-strip")
2873 #:phases
2874 (modify-phases %standard-phases
2875 (add-before 'install 'install-contrib
2876 (lambda* (#:key outputs #:allow-other-keys)
2877 (let* ((out (assoc-ref outputs "out"))
2878 (share (string-append out "/share/mlmmj"))
2879 (contrib (string-append share "/contrib/web"))
2880 (texts (string-append share "/listtexts")))
2881 (copy-recursively "contrib/web/" contrib)
2882 (copy-recursively "listtexts" texts)
2883 (rename-file texts (string-append share "/texts"))
2884 #t))))))
2885 (home-page "http://mlmmj.org")
2886 (synopsis "Mailing list managing made joyful")
2887 (description
2888 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
2889It works with many different Mail Transport Agents (MTAs) and is simple for a
d1e4ad1b 2890system administrator to install, configure and integrate with other software.
3163a289 2891As it uses very few resources, and requires no daemons, it is ideal for
2892installation on systems where resources are limited. Its features include:
2893@enumerate
2894@item Archive, Custom headers / footer,
2895@item Fully automated bounce handling (similar to ezmlm),
2896@item Complete requeueing functionality, Moderation functionality, Subject prefix,
2897@item Subscribers only posting, Regular expression access control,
2898@item Functionality to retrieve old posts, Web interface, Digests,
2899@item No-mail subscription, VERP support,
2900@item Delivery Status Notification (RFC1891) support,
2901@item Rich and customisable texts for automated operations.
2902@end enumerate\n")
2903 (license license:expat)))
3a263368 2904
ba7816a2
EF
2905(define-public python-django-mailman3
2906 (package
2907 (name "python-django-mailman3")
2908 (version "1.3.4")
2909 (source
2910 (origin
2911 (method url-fetch)
2912 (uri (pypi-uri "django-mailman3" version))
2913 (sha256
2914 (base32
2915 "1yrm7wpjy34xai72vn2vkhc9131cdrbqy08rrabf36kynj5vcdvy"))))
2916 (build-system python-build-system)
2917 (arguments
2918 '(#:phases
2919 (modify-phases %standard-phases
2920 (replace 'check
2921 (lambda _
2922 (setenv "DJANGO_SETTINGS_MODULE"
2923 "django_mailman3.tests.settings_test")
2924 (invoke "django-admin" "test"
2925 "--pythonpath=."))))))
2926 (propagated-inputs
2927 `(("python-django" ,python-django)
2928 ("python-django-allauth" ,python-django-allauth)
2929 ("python-django-gravatar2" ,python-django-gravatar2)
2930 ("python-mailmanclient" ,python-mailmanclient)
2931 ("python-pytz" ,python-pytz)))
2932 (native-inputs
2933 `(("python-mock" ,python-mock)))
2934 (home-page "https://gitlab.com/mailman/django-mailman3")
2935 (synopsis "Django library to help interaction with Mailman")
2936 (description
2937 "This package contains libraries and templates for Django-based interfaces
2938interacting with Mailman.")
ff7a6c6d 2939 (properties `((python2-variant . ,(delay python2-django-mailman3))))
ba7816a2
EF
2940 (license license:gpl3+)))
2941
2942;; This is the last version to support Python-2.
ea3b9f7b 2943(define-public python2-django-mailman3
8a3741e6 2944 (package
ea3b9f7b 2945 (name "python2-django-mailman3")
bdf0c644 2946 (version "1.1.0")
8a3741e6 2947 (source
2948 (origin
2949 (method url-fetch)
2950 (uri (pypi-uri "django-mailman3" version))
2951 (sha256
2952 (base32
bdf0c644 2953 "1xjdkgfjwhgyrp5nxw65dcpcsr98ygj6856sp0bwkrmyxpd1xxk2"))))
8a3741e6 2954 (build-system python-build-system)
ea3b9f7b
CB
2955 (arguments
2956 `(#:phases
2957 (modify-phases %standard-phases
2958 (replace 'check
2959 (lambda _
dcfdaa15
TGR
2960 (invoke "django-admin"
2961 "test"
2962 "--settings=django_mailman3.tests.settings_test"
2963 "django_mailman3"))))
ea3b9f7b 2964 #:python ,python-2))
8a3741e6 2965 (inputs
ea3b9f7b 2966 `(("python2-django" ,python2-django)))
8a3741e6 2967 (propagated-inputs
ea3b9f7b
CB
2968 `(("python2-requests" ,python2-requests)
2969 ("python2-requests-oauthlib" ,python2-requests-oauthlib)
2970 ("python2-openid" ,python2-openid)
2971 ("python2-mailmanclient" ,python2-mailmanclient)
2972 ("python2-django-allauth" ,python2-django-allauth)
2973 ("python2-django-gravatar2" ,python2-django-gravatar2)
2974 ("python2-pytz" ,python2-pytz)))
8a3741e6 2975 (home-page "https://gitlab.com/mailman/django-mailman3")
2976 (synopsis "Django library for Mailman UIs")
2977 (description
2978 "Libraries and templates for Django-based interfaces
2979interacting with Mailman.")
7e3b537c 2980 (license license:gpl3+)))
8a3741e6 2981
a3bdebef
EF
2982(define-public python-mailman-hyperkitty
2983 (package
2984 (name "python-mailman-hyperkitty")
2985 (version "1.1.0")
2986 (source
2987 (origin
2988 (method url-fetch)
2989 (uri (pypi-uri "mailman-hyperkitty" version))
2990 (sha256
2991 (base32
2992 "1lfqa9admhvdv71f528jmz2wl0i5cv77v6l64px2pm4zqr9ckkjx"))
2993 (patches
2994 (list
2995 (origin
2996 ;; see: https://gitlab.com/mailman/mailman-hyperkitty/issues/17
2997 ;; fixes test_archive_message_unserializable
2998 (method url-fetch)
2999 (uri "https://salsa.debian.org/mailman-team/mailman-hyperkitty/raw/debian/1.1.0-9/debian/patches/0002-Skip-the-test_archive_message_unserializable.patch")
3000 (sha256
3001 (base32
3002 "0p1fwm46c4bl81lvsg3kjhn2r1lwgkpgxamb3xyqn7h9qdrw10hw")))))))
3003 (build-system python-build-system)
3004 (propagated-inputs
3005 `(("python-requests" ,python-requests)
3006 ("python-zope-interface" ,python-zope-interface)))
3007 (inputs
3008 `(("mailman" ,mailman)))
3009 (native-inputs
3010 `(("python-mock" ,python-mock)
3011 ("python-nose" ,python-nose)
3012 ("python-nose2" ,python-nose2)))
3013 (home-page "https://gitlab.com/mailman/mailman-hyperkitty/")
3014 (synopsis "Mailman archiver plugin for HyperKitty")
3015 (description
3016 "Mailman3 allows emails sent to its mailing lists to be archived by any
3017software provided that there is a plugin (loadable by Mailman3) designed to
3018communicate with it properly. This module contains a Mailman3 archiver plugin
3019which sends emails to HyperKitty, the official Mailman3 web archiver.")
3020 (license license:gpl3+)))
3021
6fe7d216
EF
3022(define-public python-hyperkitty
3023 (package
3024 (name "python-hyperkitty")
3025 (version "1.3.3")
3026 (source
3027 (origin
3028 (method url-fetch)
3029 (uri (pypi-uri "HyperKitty" version))
3030 (sha256
3031 (base32
3032 "0p85r9q6mn5as5b39xp9hkkipnk0156acx540n2ygk3qb3jd4a5n"))))
3033 (build-system python-build-system)
3034 (arguments
3035 '(#:phases
3036 (modify-phases %standard-phases
3037 (replace 'check
3038 (lambda _
3039 ;; It is unclear why this test fails.
3040 (substitute* "hyperkitty/tests/commands/test_import.py"
3041 (("def test_bad_content_type_part_two")
3042 "@SkipTest\n def test_bad_content_type_part_two"))
3043 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
3044 (invoke "example_project/manage.py" "test"
3045 "--settings=hyperkitty.tests.settings_test"))))))
3046 (propagated-inputs
3047 `(("python-dateutil" ,python-dateutil)
3048 ("python-django" ,python-django)
3049 ("python-django-compressor" ,python-django-compressor)
3050 ("python-django-extensions" ,python-django-extensions)
3051 ("python-django-gravatar2" ,python-django-gravatar2)
3052 ("python-django-haystack" ,python-django-haystack)
3053 ("python-django-mailman3" ,python-django-mailman3)
3054 ("python-django-q" ,python-django-q)
3055 ("python-djangorestframework" ,python-djangorestframework)
3056 ("python-flufl-lock" ,python-flufl-lock)
3057 ("python-mailmanclient" ,python-mailmanclient)
3058 ("python-networkx" ,python-networkx)
3059 ("python-pytz" ,python-pytz)
3060 ("python-robot-detection" ,python-robot-detection)))
3061 (native-inputs
3062 `(("python-beautifulsoup4" ,python-beautifulsoup4)
3063 ("python-elasticsearch" ,python-elasticsearch)
3064 ("python-isort" ,python-isort)
3065 ("python-mock" ,python-mock)
3066 ("python-whoosh" ,python-whoosh)))
3067 (home-page "https://gitlab.com/mailman/hyperkitty")
3068 (synopsis "Web interface to access GNU Mailman v3 archives")
3069 (description
3070 "The hyperkitty Django app provides a web user interface to access GNU
3071Mailman3 archives, and manage it. This interface uses django, and requires
3072some configuration.")
3073 (license license:gpl3))) ; Some files are gpl2+
3074
d99a2add 3075(define-public postorius
3076 (package
3077 (name "postorius")
faec049c 3078 (version "1.3.3")
d99a2add 3079 (source
3080 (origin
3081 (method url-fetch)
faec049c 3082 (uri (pypi-uri "postorius" version))
d99a2add 3083 (sha256
3084 (base32
faec049c 3085 "08jn23gblbkfl09qlykbpsmp39mmach3sl69h1j5cd5kkx839rwa"))))
d99a2add 3086 (build-system python-build-system)
3087 (arguments
faec049c
EF
3088 '(#:phases
3089 (modify-phases %standard-phases
3090 (replace 'check
3091 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3092 (add-installed-pythonpath inputs outputs)
3093 (if tests?
3094 (invoke "python" "example_project/manage.py" "test"
3095 "--settings=test_settings" "postorius")
3096 #t))))
3097 #:tests? #f)) ; Tests try to run a mailman instance to test against.
d99a2add 3098 (inputs
faec049c
EF
3099 `(("python-django" ,python-django)
3100 ("python-django-mailman3" ,python-django-mailman3)
3101 ("python-mailmanclient" ,python-mailmanclient)
3102 ("python-readme-renderer" ,python-readme-renderer)))
3103 (native-inputs
3104 `(("python-beautifulsoup4" ,python-beautifulsoup4)
3105 ("python-isort" ,python-isort)
3106 ("python-mock" ,python-mock)
3107 ("python-vcrpy" ,python-vcrpy)))
d99a2add 3108 (home-page "https://gitlab.com/mailman/postorius")
3109 (synopsis "Web user interface for GNU Mailman")
3110 (description
3111 "Postorius is a Django app which provides a web user interface
3112to access GNU Mailman.")
7e3b537c 3113 (license (list license:gpl3+ license:lgpl3+))))
d99a2add 3114
3a263368 3115(define-public blists
3116 (package
3117 (name "blists")
18b1589b 3118 (version "2.0")
3a263368 3119 (source
3120 (origin
3121 (method url-fetch)
3122 (uri (string-append "http://download.openwall.net/pub/projects/"
3123 "blists/blists-" version ".tar.gz"))
3124 (sha256
3125 (base32
18b1589b 3126 "1xll5wn7py3bbncbwrj172f56nz75c9gwfsa80rwd96ss9gfmp3c"))))
3a263368 3127 (build-system gnu-build-system)
3128 (arguments
3129 `(#:tests? #f ; No tests
3130 #:phases
3131 (modify-phases %standard-phases
3132 (delete 'configure)
3133 (replace 'install
3134 (lambda* (#:key outputs #:allow-other-keys)
3135 (let* ((out (assoc-ref outputs "out"))
3136 (bin (string-append out "/bin")))
3137 (install-file "bindex" bin)
3138 (install-file "bit" bin)
3139 #t))))))
3140 (home-page "http://www.openwall.com/blists/")
3141 (synopsis "Web interface to mailing list archives")
3142 (description
3143 "Blists is a web interface to mailing list archives that works off
3144indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
3145@code{bindex} generates or updates the index file (incremental updates
3146are supported). @code{bit} is a CGI/SSI program that generates web pages
3147on the fly. Both programs are written in C and are very fast.")
3148 (license license:expat)))
ed428a58
AI
3149
3150(define-public swaks
3151 (package
3152 (name "swaks")
f8072794 3153 (version "20190914.0")
ed428a58
AI
3154 (source
3155 (origin
3156 (method url-fetch)
3157 (uri (string-append
d72f59a4 3158 "https://jetmore.org/john/code/swaks/files/swaks-"
ed428a58
AI
3159 version ".tar.gz"))
3160 (sha256
3161 (base32
f8072794 3162 "12awq5z4sdd54cxprj834zajxhkpy4jwhzf1fhigcx1zbhdaacsp"))))
ed428a58
AI
3163 (build-system perl-build-system)
3164 (inputs
3165 `(("perl-net-dns" ,perl-net-dns)
3166 ("perl-net-ssleay" ,perl-net-ssleay)))
3167 (arguments
3168 `(#:tests? #f ; No tests
3169 #:phases
3170 (modify-phases %standard-phases
3171 (delete 'configure)
3172 (replace 'build
3173 (lambda _
d72f59a4 3174 (invoke "pod2man" "doc/ref.pod" "swaks.1")))
ed428a58
AI
3175 (replace 'install
3176 (lambda* (#:key outputs #:allow-other-keys)
3177 (let ((out (assoc-ref outputs "out")))
3178 (install-file "swaks" (string-append out "/bin"))
3179 (install-file "swaks.1" (string-append out "/share/man/man1")))
3180 #t))
3181 (add-after 'install 'wrap-program
3182 (lambda* (#:key outputs #:allow-other-keys)
3183 (wrap-program (string-append (assoc-ref outputs "out")
3184 "/bin/swaks")
3185 `("PERL5LIB" ":" = (,(getenv "PERL5LIB"))))
3186 #t)))))
d72f59a4 3187 (home-page "https://jetmore.org/john/code/swaks/")
ed428a58
AI
3188 (synopsis "Featureful SMTP test tool")
3189 (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
3190test tool. It handles SMTP features and extensions such as TLS,
3191authentication, and pipelining; multiple versions of the SMTP protocol
3192including SMTP, ESMTP, and LMTP; and multiple transport methods including
3193unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
3194Options can be specified in environment variables, configuration files, and
3195the command line allowing maximum configurability and ease of use for
3196operators and scripters.")
7e3b537c 3197 (license license:gpl2+)))
b0eb2af2 3198
3199(define-public alpine
3200 (package
3201 (name "alpine")
0acbcaa9 3202 (version "2.23.2")
b0eb2af2 3203 (source
3204 (origin
0ca25073 3205 (method git-fetch)
b0eb2af2 3206 ;; There are two versions: the plain continuation of Alpine without extra
3207 ;; patches and the version which adds extra fixes. Every distro uses
3208 ;; the patched version, and so do we to not break expectations.
32f9cc33 3209 ;; http://alpine.freeiz.com/alpine/readme/README.patches
0ca25073
TGR
3210 (uri (git-reference
3211 (url "http://repo.or.cz/alpine.git")
0acbcaa9 3212 (commit (string-append "v" version))))
0ca25073 3213 (file-name (git-file-name name version))
b0eb2af2 3214 (sha256
0acbcaa9 3215 (base32 "16ldmmcymrnpnbfc1kb2rhac7nzlc87wjawic4wfinkphd124d1y"))
bc0eb347
TGR
3216 (modules '((guix build utils)))
3217 (snippet
3218 '(begin
3219 ;; Remove pre-built binaries scattered across the source repository.
3220 (for-each delete-file (find-files "." "\\.(dll|exe)"))
3221 #t))))
b0eb2af2 3222 (build-system gnu-build-system)
3223 (arguments
aa784dc8 3224 `(#:make-flags
1ca44ae3 3225 (list (string-append "CC=" ,(cc-for-target)))
b0eb2af2 3226 #:configure-flags (list (string-append "--with-ssl-include-dir="
3227 (assoc-ref %build-inputs "openssl")
3228 "/include/openssl")
3229 (string-append "--with-ssl-dir="
3230 (assoc-ref %build-inputs "openssl"))
3231 (string-append "--with-ssl-certs-dir="
3232 "/etc/ssl/certs/")
3233 (string-append "--with-ssl-lib-dir="
3234 (assoc-ref %build-inputs "openssl")
3235 "/lib")
3236 (string-append "--with-interactive-spellcheck="
3237 (assoc-ref %build-inputs "aspell")
03b6c474
TGR
3238 "/bin/aspell")
3239 "--with-date-stamp=Thu 1 Jan 01:00:01 CET 1970")
b0eb2af2 3240 #:phases
3241 (modify-phases %standard-phases
d28692a7
TGR
3242 (add-after 'unpack 'assume-shadow-passwords
3243 ;; Alpine's configure script confuses ‘shadow password support’ with
3244 ;; ‘/etc/shadow exists in the build environment’. It does not.
3245 (lambda _
3246 (substitute* "configure"
3247 (("test -f /etc/shadow") "true"))
3248 #t))
b0eb2af2 3249 (add-after 'unpack 'make-reproducible
3250 (lambda _
3251 ;; This removes time-dependent code to make alpine reproducible.
3252 (substitute* "pico/blddate.c"
3253 (("%02d-%s-%d") "1970-01-01"))
b0eb2af2 3254 #t)))))
3255 (inputs
3256 `(("ncurses" ,ncurses)
3257 ("openssl" ,openssl)
3258 ("gnutls" ,gnutls)
3259 ("openldap" ,openldap)
3260 ("cyrus-sasl" ,cyrus-sasl)
3261 ("mit-krb5" ,mit-krb5)
3262 ("aspell" ,aspell)
3263 ("tcl" ,tcl)
3264 ("linux-pam" ,linux-pam)))
da83224d 3265 (home-page "https://repo.or.cz/alpine.git")
b0eb2af2 3266 (synopsis "Alternatively Licensed Program for Internet News and Email")
3267 (description
3268 "Alpine is a text-based mail and news client. Alpine includes several
3269tools and applications:
3270@enumerate
3271@item alpine, the Alpine mailer
3272@item pico, the standalone text editor, GNU nano's predecessor
3273@item pilot, the standalone file system navigator
3274@end enumerate\n")
7e3b537c 3275 (license license:asl2.0)))
7c16151a
RS
3276
3277(define-public balsa
3278 (package
3279 (name "balsa")
e8c1e27f 3280 (version "2.6.1")
7c16151a
RS
3281 (source
3282 (origin
3283 (method url-fetch)
e9201659 3284 (uri (string-append "https://pawsa.fedorapeople.org/balsa/"
8f3f2c9b 3285 "balsa-" version ".tar.bz2"))
7c16151a 3286 (sha256
e8c1e27f 3287 (base32 "1xkxx801p7sbfkn0bh3cz85wra4xf1z1zhjqqc80z1z1nln7fhb4"))))
7c16151a
RS
3288 (build-system gnu-build-system)
3289 (arguments
3290 `(#:configure-flags
3291 '(;; Balsa tries to install additional MIME icons
3292 ;; under gtk+ directory.
3293 "--enable-extra-mimeicons=no"
3294 "--with-gtksourceview"
3295 "--with-canberra"
3296 "--with-spell-checker=gtkspell"
3297 "--with-gpgme"
3298 "--with-sqlite"
3299 "--with-compface"
3300 "--with-ldap")))
3301 (inputs
3302 `(("cyrus-sasl" ,cyrus-sasl)
3303 ("enchant" ,enchant)
3304 ("gdk-pixbuf" ,gdk-pixbuf)
7ff2159b 3305 ("gmime" ,gmime)
7c16151a
RS
3306 ("gnutls" ,gnutls)
3307 ("gpgme" ,gpgme)
3308 ("gtk+" ,gtk+)
f58b10cb 3309 ("gtksourceview" ,gtksourceview-3)
7c16151a
RS
3310 ("gtkspell3" ,gtkspell3)
3311 ("libcanberra" ,libcanberra)
3312 ("libesmtp" ,libesmtp)
7ff2159b 3313 ("libical" ,libical)
7c16151a 3314 ("libnotify" ,libnotify)
7ff2159b 3315 ("libsecret" ,libsecret)
7c16151a
RS
3316 ("openldap" ,openldap)
3317 ("sqlite" ,sqlite)
3318 ("webkitgtk" ,webkitgtk)))
3319 (native-inputs
3320 `(("compface" ,compface)
3321 ("glib" ,glib "bin")
3322 ("intltool" ,intltool)
3323 ("pkg-config" ,pkg-config)
3324 ("yelp-tools" ,yelp-tools)))
3325 (home-page "https://pawsa.fedorapeople.org/balsa")
3326 (synopsis "E-mail client for GNOME")
3327 (description "Balsa is a highly configurable and robust mail client for
3328the GNOME desktop. It supports both POP3 and IMAP servers as well as the
3329mbox, maildir and mh local mailbox formats. Balsa also supports SMTP and/or
b95d5f62 3330the use of a local MTA such as Sendmail.")
7e3b537c 3331 (license license:gpl3+)))
1e52fd83
AI
3332
3333(define-public afew
3334 (package
3335 (name "afew")
3336 (version "1.2.0")
3337 (source
3338 (origin
3339 (method url-fetch)
3340 (uri (pypi-uri "afew" version))
3341 (sha256
3342 (base32
3343 "121w7bd53xyibllxxbfykjj76n81kn1vgjqd22izyh67y8qyyk5r"))))
3344 (build-system python-build-system)
3345 (inputs
3346 `(("python-chardet" ,python-chardet)
3347 ("python-notmuch" ,python-notmuch)))
3348 (native-inputs
3349 `(("python-setuptools-scm" ,python-setuptools-scm)))
3350 (home-page "https://github.com/afewmail/afew")
3351 (synopsis "Initial tagging script for notmuch mail")
3352 (description "afew is an initial tagging script for notmuch mail. It
3353provides automatic tagging each time new mail is registered with notmuch. It
3354can add tags based on email headers or Maildir folders and can handle spam and
3355killed threads.")
7e3b537c 3356 (license license:isc)))
1679923a
DM
3357
3358(define-public pan
3359 (package
3360 (name "pan")
de227459 3361 (version "0.146")
1679923a
DM
3362 (source
3363 (origin
3364 (method url-fetch)
3365 (uri (string-append "http://pan.rebelbase.com/download/releases/"
3366 version "/source/" name "-" version ".tar.bz2"))
3367 (sha256
de227459 3368 (base32 "17agd27sn4a7nahvkpg0w39kv74njgdrrygs74bbvpaj8rk2hb55"))))
1679923a
DM
3369 (arguments
3370 `(#:configure-flags '("--with-gtk3" "--with-gtkspell" "--with-gnutls"
3371 "--enable-libnotify" "--enable-manual"
3372 "--enable-gkr")
3373 #:phases
3374 (modify-phases %standard-phases
3375 (add-before 'configure 'patch-gpg2
3376 (lambda* (#:key inputs #:allow-other-keys)
3377 (substitute* "pan/usenet-utils/gpg.cc"
3378 (("\"gpg2\"") (string-append "\""
3379 (assoc-ref inputs "gnupg")
3380 "/bin/gpg\"")))
3381 #t)))))
3382 (inputs
8e020519 3383 `(("gmime" ,gmime-2.6)
1679923a
DM
3384 ("gnupg" ,gnupg)
3385 ("gnutls" ,gnutls)
3386 ("gtk+" ,gtk+)
3387 ("gtkspell3" ,gtkspell3)
3388 ("libnotify" ,libnotify)
3389 ("libsecret" ,libsecret)
3390 ("libxml2" ,libxml2)
3391 ("zlib" ,zlib)))
3392 (native-inputs
3393 `(("gettext-minimal" ,gettext-minimal)
3394 ("itstool" ,itstool)
3395 ("pkg-config" ,pkg-config)))
3396 (build-system gnu-build-system)
3397 (home-page "http://pan.rebelbase.com/")
3398 (synopsis "Pan newsreader")
3399 (description "@code{pan} is a Usenet newsreader that's good at both text
3400and binaries. It supports offline reading, scoring and killfiles, yEnc, NZB,
3401PGP handling, multiple servers, and secure connections.")
3402 ;; License of the docs: fdl-1.1; Others: gpl2.
7e3b537c 3403 (license (list license:fdl1.1+ license:gpl2))))
ae7c1c37
JL
3404
3405(define-public imapfilter
3406 (package
3407 (name "imapfilter")
29a87ed1 3408 (version "2.6.16")
ae7c1c37
JL
3409 (source
3410 (origin
b1d30f46
TGR
3411 (method git-fetch)
3412 (uri (git-reference
b0e7b699 3413 (url "https://github.com/lefcha/imapfilter")
b1d30f46
TGR
3414 (commit (string-append "v" version))))
3415 (file-name (git-file-name name version))
ae7c1c37 3416 (sha256
29a87ed1 3417 (base32 "0f65sg6hhv6778fxwsz4hvarbm97dsb8jj0mg7a9qs273r35pqck"))))
ae7c1c37
JL
3418 (build-system gnu-build-system)
3419 (arguments
3420 `(#:tests? #f
3421 #:make-flags
3422 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
3423 "CC=gcc")
3424 #:phases
3425 (modify-phases %standard-phases
29a87ed1 3426 (delete 'configure)))) ; no configure script
ae7c1c37
JL
3427 (native-inputs
3428 `(("lua" ,lua)
3429 ("pcre" ,pcre)
3430 ("openssl" ,openssl)))
3431 (home-page "https://github.com/lefcha/imapfilter")
3432 (synopsis "IMAP mail filtering utility")
3433 (description "IMAPFilter is a mail filtering utility. It connects
3434to remote mail servers using IMAP, sends searching queries to the server and
3435processes mailboxes based on the results. It can be used to delete, copy,
3436move, flag, etc. messages residing in mailboxes at the same or different mail
3437servers. The 4rev1 and 4 versions of IMAP are supported.")
3438 (license license:expat)))
dc8675af
EF
3439
3440(define-public urlscan
3441 (package
3442 (name "urlscan")
0ea04bad 3443 (version "0.9.5")
dc8675af
EF
3444 (source
3445 (origin
3446 (method url-fetch)
3447 (uri (pypi-uri "urlscan" version))
3448 (sha256
0ea04bad 3449 (base32 "07vcwirap0p4dkqrqblfn1q017slgd8m6qyijvbi3gxnr09pbyx2"))))
dc8675af
EF
3450 (build-system python-build-system)
3451 (propagated-inputs
3452 `(("python-urwid" ,python-urwid)))
3453 (home-page "https://github.com/firecat53/urlscan")
3454 (synopsis "View/select the URLs in an email message or file")
3455 (description
3456 "Urlscan is a small program that is designed to integrate with the
0ac65c8b 3457Mutt mail reader to allow you to easily launch a Web browser for URLs
dc8675af
EF
3458contained in email messages. It parses an email message or file and scans it
3459for URLs and email addresses. It then displays the URLs and their context
3460within the message, and allows you to choose one or more URLs to send to your
0ac65c8b
TGR
3461Web browser. Alternatively, it send a list of all URLs to standard output.
3462It is a replacement for the @command{urlview} program.")
7e3b537c 3463 (license license:gpl2)))
829785c1
EB
3464
3465(define-public tnef
3466 (package
3467 (name "tnef")
fe147c97 3468 (version "1.4.18")
829785c1
EB
3469 (source
3470 (origin
3471 (method git-fetch)
3472 (uri (git-reference
b0e7b699 3473 (url "https://github.com/verdammelt/tnef")
829785c1
EB
3474 (commit version)))
3475 (sha256
fe147c97 3476 (base32 "104g48mcm00bgiyzas2vf86331w7bnw7h3bc11ib4lp7rz6zqfck"))
829785c1
EB
3477 (file-name (git-file-name name version))))
3478 (build-system gnu-build-system)
3479 (native-inputs
3480 `(("autoconf" ,autoconf)
3481 ("automake" ,automake)))
3482 (arguments `(#:parallel-tests? #f)) ;tests are side-effect'y
3483 (home-page "https://github.com/verdammelt/tnef")
3484 (synopsis "Unpack @code{application/ms-tnef} attachments")
3485 (description
3486 "TNEF is a tar-like program that unpacks MIME attachments of type
3487@code{application/ms-tnef}.")
7e3b537c 3488 (license license:gpl2+)))
e3a47031
RW
3489
3490(define-public mumi
3fa02b2d
RW
3491 (let ((commit "5a578328199bab51a147fbadbce12c8d06959ed6")
3492 (revision "2"))
e3a47031
RW
3493 (package
3494 (name "mumi")
bc950c2f 3495 (version (git-version "0.0.1" revision commit))
e3a47031
RW
3496 (source (origin
3497 (method git-fetch)
3498 (uri (git-reference
3499 (url "https://git.elephly.net/software/mumi.git")
3500 (commit commit)))
3501 (file-name (git-file-name name version))
3502 (sha256
3503 (base32
3fa02b2d 3504 "0hngv82gd19l4q7nnbf97r120z1yagsmkp0x3lc8haza5q4mc12c"))))
e3a47031
RW
3505 (build-system gnu-build-system)
3506 (arguments
1214684b
LC
3507 `(#:modules ((guix build gnu-build-system)
3508 ((guix build guile-build-system)
3509 #:select (target-guile-effective-version))
3510 (guix build utils))
3511 #:imported-modules ((guix build guile-build-system)
3512 ,@%gnu-build-system-modules)
3513
8ff573d3
LC
3514 #:configure-flags '("--localstatedir=/var")
3515
1214684b 3516 #:phases
e3a47031
RW
3517 (modify-phases %standard-phases
3518 (add-after 'install 'wrap-executable
3519 (lambda* (#:key outputs #:allow-other-keys)
3520 (let* ((out (assoc-ref outputs "out"))
3521 (bin (string-append out "/bin"))
1214684b
LC
3522 (version (target-guile-effective-version))
3523 (scm (string-append out "/share/guile/site/" version))
3524 (go (string-append out "/lib/guile/" version
3525 "/site-ccache")))
e3a47031
RW
3526 (wrap-program (string-append bin "/mumi")
3527 `("GUILE_LOAD_PATH" ":" prefix
3528 (,scm ,(getenv "GUILE_LOAD_PATH")))
3529 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
3530 (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))
3531 #t))))))
3532 (inputs
bc950c2f 3533 `(("guile-email" ,guile-email)
3fa02b2d 3534 ("guile-fibers" ,guile-fibers)
f00f52a1 3535 ("guile-gcrypt" ,guile-gcrypt)
170c6b03 3536 ("guile-json" ,guile-json-3)
f00f52a1 3537 ("guile-redis" ,guile-redis)
e3a47031 3538 ("guile-syntax-highlight" ,guile-syntax-highlight)
f00f52a1 3539 ("guile-webutils" ,guile-webutils)
decf7f6c 3540 ("guile-xapian" ,guile-xapian)
bc950c2f 3541 ("guile" ,guile-3.0)
decf7f6c 3542 ("mailutils" ,mailutils)))
e3a47031
RW
3543 (native-inputs
3544 `(("autoconf" ,autoconf)
3545 ("automake" ,automake)
3546 ("pkg-config" ,pkg-config)))
3547 (home-page "https://git.elephly.net/software/mumi.git")
3548 (synopsis "Debbugs web interface")
3549 (description "Mumi is a Debbugs web interface.")
7e3b537c 3550 (license license:agpl3+))))
e1c58440
RW
3551
3552(define-public ytnef
3553 (package
3554 (name "ytnef")
3555 (version "1.9.3")
3556 (source (origin
3557 (method git-fetch)
3558 (uri (git-reference
b0e7b699 3559 (url "https://github.com/Yeraze/ytnef")
e1c58440
RW
3560 (commit (string-append "v" version))))
3561 (file-name (git-file-name name version))
3562 (sha256
3563 (base32
3564 "07h48s5qf08503pp9kafqbwipdqghiif22ghki7z8j67gyp04l6l"))))
3565 (build-system gnu-build-system)
3566 (native-inputs
3567 `(("autoconf" ,autoconf)
3568 ("automake" ,automake)
3569 ("libtool" ,libtool)))
3570 (home-page "https://github.com/Yeraze/ytnef/")
3571 (synopsis "TNEF stream reader for winmail.dat files")
3572 (description "This package provides a TNEF stream reader library and
3573related tools to process winmail.dat files.")
7e3b537c 3574 (license license:gpl2+)))
eff3a9b2
SB
3575
3576(define-public public-inbox
c87d737d
AI
3577 (package
3578 (name "public-inbox")
3579 (version "1.5.0")
3580 (source
3581 (origin (method git-fetch)
3582 (uri (git-reference
3583 (url "https://public-inbox.org")
3584 (commit (string-append "v" version))))
3585 (sha256
3586 (base32
3587 "03zj7shdl3vibs7k5lr673bwcf8j1xx8is3mjz34ca4cdh6p5j2k"))
3588 (file-name (git-file-name name version))))
3589 (build-system perl-build-system)
3590 (arguments
3591 '(#:phases
3592 (modify-phases %standard-phases
3593 (add-before 'configure 'qualify-paths
3594 (lambda _
3595 ;; Use absolute paths for 'xapian-compact'.
3596 (let ((xapian-compact (which "xapian-compact")))
3597 (substitute* "script/public-inbox-compact"
3598 (("xapian-compact") xapian-compact)))
3599 #t))
3600 (add-before 'check 'pre-check
3601 (lambda _
3602 (substitute* "t/spawn.t"
3603 (("\\['env'\\]") (string-append "['" (which "env") "']")))
3604 (substitute* "t/ds-leak.t"
3605 (("/bin/sh") (which "sh")))
3606 (invoke "./certs/create-certs.perl")
3607 ;; XXX: This test fails due to zombie process is not reaped by
3608 ;; the builder.
3609 (substitute* "t/httpd-unix.t"
3610 (("^SKIP: \\{") "SKIP: { skip('Guix');"))
3611 #t))
3612 (add-after 'install 'wrap-programs
3613 (lambda* (#:key inputs outputs #:allow-other-keys)
3614 (let ((out (assoc-ref outputs "out")))
3615 (for-each
3616 (lambda (prog)
3617 (wrap-program prog
3618 ;; Let those scripts find their perl modules.
3619 `("PERL5LIB" ":" prefix
3620 (,(string-append out "/lib/perl5/site_perl")
3621 ,(getenv "PERL5LIB")))
3622 ;; 'git' is invoked in various files of the PublicInbox
3623 ;; perl module.
3624 `("PATH" ":" prefix
3625 (,(string-append (assoc-ref inputs "git") "/bin")))))
3626 (find-files (string-append out "/bin"))))
3627 #t)))))
3628 (native-inputs
3629 `(("xapian" ,xapian)
3630 ;; For testing.
3631 ("lsof" ,lsof)
3632 ("openssl" ,openssl)))
3633 (inputs
3634 `(("git" ,git)
3635 ("perl-dbd-sqlite" ,perl-dbd-sqlite)
3636 ("perl-dbi" ,perl-dbi)
3637 ("perl-email-address-xs" ,perl-email-address-xs)
3638 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
3639 ("perl-email-mime" ,perl-email-mime)
3640 ("perl-email-simple" ,perl-email-simple)
3641 ("perl-net-server" ,perl-net-server)
3642 ("perl-filesys-notify-simple" ,perl-filesys-notify-simple)
3643 ("perl-plack-middleware-deflater" ,perl-plack-middleware-deflater)
3644 ("perl-plack-middleware-reverseproxy" ,perl-plack-middleware-reverseproxy)
3645 ("perl-plack" ,perl-plack)
3646 ("perl-search-xapian" ,perl-search-xapian)
3647 ("perl-timedate" ,perl-timedate)
3648 ("perl-uri-escape" ,perl-uri-escape)
3649 ;; For testing.
3650 ("perl-ipc-run" ,perl-ipc-run)
3651 ("perl-xml-feed" ,perl-xml-feed)))
3652 (home-page "https://public-inbox.org/README.html")
3653 (synopsis "Archive mailing lists in git repositories")
3654 (description
3655 "public-inbox implements the sharing of an email inbox via git to
eff3a9b2
SB
3656complement or replace traditional mailing lists. Readers may read via NNTP,
3657Atom feeds or HTML archives.")
c87d737d 3658 (license license:agpl3+)))
660611e5
EB
3659
3660(define-public sylpheed
3661 (package
3662 (name "sylpheed")
3663 (version "3.7.0")
3664 (source (origin
3665 (method url-fetch)
3666 (uri (string-append "https://sylpheed.sraoss.jp/sylpheed/v3.7/"
3667 name "-" version ".tar.xz"))
3668 (sha256
3669 (base32
3670 "0j9y5vdzch251s264diw9clrn88dn20bqqkwfmis9l7m8vmwasqd"))))
3671 (build-system gnu-build-system)
3672 (native-inputs
3673 `(("pkg-config" ,pkg-config)))
3674 (inputs
3675 `(("bogofilter" ,bogofilter)
3676 ("compface" ,compface)
3677 ("gnupg" ,gnupg-1)
3678 ("gpgme" ,gpgme)
3679 ("gtk+-2.0" ,gtk+-2)
3680 ("gtkspell" ,gtkspell3)
3681 ("libnsl" ,libnsl)
3682 ("openldap" ,openldap)
3683 ("openssl" ,openssl)))
3684 (home-page "https://sylpheed.sraoss.jp/en/")
3685 (synopsis "Lightweight GTK+ email client")
3686 (description
3687 "Sylpheed is a simple, lightweight but featureful, and easy-to-use e-mail
3688client. Sylpheed provides intuitive user-interface. Sylpheed is also
3689designed for keyboard-oriented operation.")
7e3b537c 3690 (license license:gpl2+)))
99d48f7a
EF
3691
3692(define-public python-authres
3693 (package
3694 (name "python-authres")
3695 (version "1.2.0")
3696 (source
3697 (origin
3698 (method url-fetch)
3699 (uri (pypi-uri "authres" version))
3700 (sha256
3701 (base32
3702 "1dr5zpqnb54h4f5ax8334l1dcp8j9083d7v4vdi1xqkwmnavklck"))))
3703 (build-system python-build-system)
3704 (arguments
3705 '(#:phases
3706 (modify-phases %standard-phases
3707 (replace 'check
3708 ;; Run doctests as described in the README.
3709 (lambda _
3710 (invoke "python" "-m" "authres" "-v"))))))
3711 (home-page "https://launchpad.net/authentication-results-python")
70134af9 3712 (synopsis "Authentication-Results email header creator and parser")
99d48f7a 3713 (description
70134af9
TGR
3714 "This Python module can be used to generate and parse RFC 5451/7001/7601
3715@code{Authentication-Results} email headers. It supports extensions such as:
99d48f7a
EF
3716@itemize
3717@item RFC 5617 DKIM/ADSP
70134af9
TGR
3718@item RFC 6008 DKIM signature identification (@code{header.b})
3719@item RFC 6212 @acronym{VBR, Vouch By Reference}
3720@item RFC 6577 @acronym{SPF, Sender Policy Framework}
3721@item RFC 7281 @code{Authentication-Results} registration for S/MIME
3722@item RFC 7293 The @code{Require-Recipient-Valid-Since} header field
3723@item RFC 7489 @acronym{DMARC, Domain-based Message Authentication Reporting
3724and Conformance}
3725@item @acronym{ARC, Authenticated Received Chain}
3726(draft-ietf-dmarc-arc-protocol-08)
3727@end itemize\n")
99d48f7a 3728 (license license:asl2.0)))
5c4332e5
EF
3729
3730(define-public python-dkimpy
3731 (package
3732 (name "python-dkimpy")
bf2727c1 3733 (version "1.0.5")
5c4332e5
EF
3734 (source
3735 (origin
3736 (method url-fetch)
3737 (uri (pypi-uri "dkimpy" version))
3738 (sha256
bf2727c1 3739 (base32 "088iz5cqjqh4c7141d94pvn13bh25aizqlrifwv6fs5g16zj094s"))))
5c4332e5
EF
3740 (build-system python-build-system)
3741 (arguments
3742 '(#:phases
3743 (modify-phases %standard-phases
3744 (add-after 'patch-source-shebangs 'patch-more-source
3745 (lambda* (#:key inputs #:allow-other-keys)
3746 (let ((openssl (assoc-ref inputs "openssl")))
3747 (substitute* "dkim/dknewkey.py"
3748 (("/usr/bin/openssl") (string-append openssl "/bin/openssl"))))
3749 #t))
3750 (replace 'check
3751 (lambda _
3752 (invoke "python" "test.py"))))))
3753 (propagated-inputs
3754 `(("python-dnspython" ,python-dnspython)))
3755 (native-inputs
3756 `(("python-authres" ,python-authres)
3757 ("python-pynacl" ,python-pynacl)))
3758 (inputs
3759 `(("openssl" ,openssl)))
3760 (home-page "https://launchpad.net/dkimpy")
3761 (synopsis "DKIM (DomainKeys Identified Mail)")
3762 (description "Python module that implements @dfn{DKIM} (DomainKeys
3763Identified Mail) email signing and verification (RFC6376). It also provides
3764helper scripts for command line signing and verification. It supports DKIM
3765signing/verifying of ed25519-sha256 signatures (RFC 8463). It also supports
3766the RFC 8617 Authenticated Received Chain (ARC) protocol.")
3767 (license license:bsd-3)))
83dd7825
EF
3768
3769(define-public python-authheaders
3770 (package
3771 (name "python-authheaders")
3772 (version "0.13.0")
3773 (source
3774 (origin
3775 (method url-fetch)
3776 (uri (pypi-uri "authheaders" version))
3777 (sha256
3778 (base32
3779 "14k6i72k5f8dyvps8vc0aq0cczc8lvqpgjfjzsy6qqychjvjcmwk"))))
3780 (build-system python-build-system)
3781 (propagated-inputs
3782 `(("python-authres" ,python-authres)
3783 ("python-dkimpy" ,python-dkimpy)
3784 ("python-dnspython" ,python-dnspython)
3785 ("python-publicsuffix2" ,python-publicsuffix2)))
3786 (home-page "https://github.com/ValiMail/authentication-headers")
3787 (synopsis "Library wrapping email authentication header verification and generation")
3788 (description
3789 "This is a Python library for the generation of email authentication
3790headers. The library can perform DKIM, SPF, and DMARC validation, and the
3791results are packaged into the Authentication-Results header. The library can
3792DKIM and ARC sign messages and output the corresponding signature headers.")
3793 ;; The package's metadata claims it were MIT licensed, but the source file
3794 ;; headers disagree. MPL-2 for the public suffix list.
3795 (license (list license:zpl2.1 license:zlib license:mpl2.0))))
3a98604f
EF
3796
3797(define-public python-aiosmtpd
3798 (package
3799 (name "python-aiosmtpd")
525304e1 3800 (version "1.2.1")
3a98604f 3801 (source
525304e1
TGR
3802 (origin
3803 (method git-fetch)
3804 (uri (git-reference
3805 (url "https://github.com/aio-libs/aiosmtpd")
3806 (commit version)))
3807 (sha256
3808 (base32 "14c30dm6jzxiblnsah53fdv68vqhxwvb9x0aq9bc4vcdas747vr7"))
3809 (file-name (git-file-name name version))))
3a98604f
EF
3810 (build-system python-build-system)
3811 (arguments
3812 '(#:phases
3813 (modify-phases %standard-phases
525304e1 3814 (add-after 'unpack 'delete-failing-tests
3a98604f 3815 (lambda _
525304e1 3816 ;; This test uses an expired certificate.
3a98604f
EF
3817 (delete-file "aiosmtpd/tests/test_smtps.py")
3818 #t))
3819 (replace 'check
3820 (lambda _
3821 (invoke "python" "-m" "nose2" "-v"))))))
3822 (native-inputs
3823 `(("python-flufl-testing" ,python-flufl-testing)
3824 ("python-nose2" ,python-nose2)))
3825 (propagated-inputs
3826 `(("python-atpublic" ,python-atpublic)))
3827 (home-page "https://aiosmtpd.readthedocs.io/")
3828 (synopsis "Asyncio based SMTP server")
3829 (description
3830 "This project is a reimplementation of the Python stdlib @code{smtpd.py}
3831based on asyncio.")
3832 (license (list license:asl2.0
3833 license:lgpl3)))) ; only for setup_helpers.py