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