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