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