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