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