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