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