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