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