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