nls: Update 'fr' translation.
[jackhill/guix/guix.git] / gnu / packages / mail.scm
... / ...
CommitLineData
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 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 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 Eric Bavier <bavier@member.fsf.org>
10;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
11;;; Copyright © 2015, 2016, 2017, 2018 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 Nils Gillmann <ng0@n0.is>
19;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
20;;; Copyright © 2016, 2017, 2018 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 Tobias Geerinckx-Rice <me@tobias.gr>
26;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
27;;; Copyright © 2018 Pierre Langlois <pierre.langlois@gmx.com>
28;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
29;;;
30;;; This file is part of GNU Guix.
31;;;
32;;; GNU Guix is free software; you can redistribute it and/or modify it
33;;; under the terms of the GNU General Public License as published by
34;;; the Free Software Foundation; either version 3 of the License, or (at
35;;; your option) any later version.
36;;;
37;;; GNU Guix is distributed in the hope that it will be useful, but
38;;; WITHOUT ANY WARRANTY; without even the implied warranty of
39;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40;;; GNU General Public License for more details.
41;;;
42;;; You should have received a copy of the GNU General Public License
43;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
44
45(define-module (gnu packages mail)
46 #:use-module (gnu packages)
47 #:use-module (gnu packages aspell)
48 #:use-module (gnu packages autotools)
49 #:use-module (gnu packages base)
50 #:use-module (gnu packages backup)
51 #:use-module (gnu packages bash)
52 #:use-module (gnu packages bison)
53 #:use-module (gnu packages calendar)
54 #:use-module (gnu packages check)
55 #:use-module (gnu packages crypto)
56 #:use-module (gnu packages curl)
57 #:use-module (gnu packages cyrus-sasl)
58 #:use-module (gnu packages databases)
59 #:use-module (gnu packages dejagnu)
60 #:use-module (gnu packages django)
61 #:use-module (gnu packages dns)
62 #:use-module (gnu packages documentation)
63 #:use-module (gnu packages emacs)
64 #:use-module (gnu packages enchant)
65 #:use-module (gnu packages ghostscript)
66 #:use-module (gnu packages gettext)
67 #:use-module (gnu packages glib)
68 #:use-module (gnu packages gnome)
69 #:use-module (gnu packages gnupg)
70 #:use-module (gnu packages groff)
71 #:use-module (gnu packages gsasl)
72 #:use-module (gnu packages gtk)
73 #:use-module (gnu packages guile)
74 #:use-module (gnu packages flex)
75 #:use-module (gnu packages kerberos)
76 #:use-module (gnu packages libcanberra)
77 #:use-module (gnu packages libevent)
78 #:use-module (gnu packages libidn)
79 #:use-module (gnu packages linux)
80 #:use-module (gnu packages lua)
81 #:use-module (gnu packages m4)
82 #:use-module (gnu packages ncurses)
83 #:use-module (gnu packages openldap)
84 #:use-module (gnu packages pcre)
85 #:use-module (gnu packages perl)
86 #:use-module (gnu packages python)
87 #:use-module (gnu packages python-web)
88 #:use-module (gnu packages readline)
89 #:use-module (gnu packages search)
90 #:use-module (gnu packages texinfo)
91 #:use-module (gnu packages compression)
92 #:use-module (gnu packages glib)
93 #:use-module (gnu packages pkg-config)
94 #:use-module (gnu packages flex)
95 #:use-module (gnu packages gdb)
96 #:use-module (gnu packages man)
97 #:use-module (gnu packages ruby)
98 #:use-module (gnu packages samba)
99 #:use-module (gnu packages screen)
100 #:use-module (gnu packages tcl)
101 #:use-module (gnu packages time)
102 #:use-module (gnu packages tls)
103 #:use-module (gnu packages networking)
104 #:use-module (gnu packages web)
105 #:use-module (gnu packages webkit)
106 #:use-module (gnu packages w3m)
107 #:use-module (gnu packages xml)
108 #:use-module (gnu packages xorg)
109 #:use-module (gnu packages docbook)
110 #:use-module ((guix licenses)
111 #:select (fdl1.1+ gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+
112 non-copyleft (expat . license:expat) bsd-3
113 public-domain bsd-4 isc (openssl . license:openssl)
114 bsd-2 x11-style agpl3 asl2.0 perl-license))
115 #:use-module (guix packages)
116 #:use-module (guix download)
117 #:use-module (guix git-download)
118 #:use-module (guix utils)
119 #:use-module (guix build-system gnu)
120 #:use-module (guix build-system perl)
121 #:use-module (guix build-system python)
122 #:use-module (guix build-system trivial))
123
124(define-public mailutils
125 (package
126 (name "mailutils")
127 (version "3.4")
128 (source (origin
129 (method url-fetch)
130 (uri (string-append "mirror://gnu/mailutils/mailutils-"
131 version ".tar.bz2"))
132 (sha256
133 (base32
134 "1dn71p85wlyisnwsb485sk3q5v393k3dizsa9fmimskdwjwgk3ch"))
135 (patches
136 (search-patches "mailutils-uninitialized-memory.patch"))
137 (snippet
138 ;; For a rebuild of the Flex/Bison byproducts touched by the
139 ;; patch above.
140 '(begin
141 (for-each delete-file
142 '("mh/mh_alias_lex.c"
143 "libmailutils/cfg/parser.c"))
144 #t))))
145 (build-system gnu-build-system)
146 (arguments
147 '(#:phases
148 (modify-phases %standard-phases
149 (add-before 'check 'prepare-test-suite
150 (lambda _
151 ;; Use the right file name for `cat'.
152 (substitute* "testsuite/lib/mailutils.exp"
153 (("/bin/cat")
154 (which "cat")))
155
156 ;; Tests try to invoke 'maidag' such that it looks up the
157 ;; 'root' user, which does not exist in the build
158 ;; environment.
159 (substitute* "maidag/tests/testsuite"
160 (("root <") "nobody <")
161 (("spool/root") "spool/nobody")
162 (("root@localhost") "nobody@localhost"))
163
164 ;; The 'pipeact.at' tests generate a shell script; make
165 ;; sure it uses the right shell.
166 (substitute* '("sieve/tests/testsuite"
167 "mh/tests/testsuite")
168 (("#! /bin/sh")
169 (string-append "#!" (which "sh"))))
170
171 (substitute* "mh/tests/testsuite"
172 (("moreproc: /bin/cat")
173 (string-append "moreproc: " (which "cat"))))
174
175 ;; XXX: The comsatd tests rely on being able to open
176 ;; /dev/tty, but that gives ENODEV in the build
177 ;; environment. Thus, ignore test failures here.
178 (substitute* "comsat/tests/Makefile.in"
179 (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
180 (string-append "-" all)))
181
182 ;; 'frm' tests expect write access to $HOME.
183 (setenv "HOME" (getcwd))
184
185 ;; Avoid the message "I'm going to create the standard MH path
186 ;; for you", which would lead to one test failure (when diffing
187 ;; stdout of 'fmtcheck'.)
188 (call-with-output-file ".mh_profile"
189 (lambda (port)
190 (format port "Path: ~a/Mail-for-tests~%"
191 (getcwd))))
192
193 #t)))
194 ;; TODO: Add `--with-sql'.
195 #:configure-flags '("--sysconfdir=/etc")
196 #:parallel-tests? #f))
197 (native-inputs
198 ;; Note: Bison and Flex needed due to
199 ;; 'mailutils-uninitialized-memory.patch'.
200 `(("bison" ,bison)
201 ("flex" ,flex)
202 ("perl" ,perl))) ;for 'gylwrap'
203 (inputs
204 `(("dejagnu" ,dejagnu)
205 ("m4" ,m4)
206 ("texinfo" ,texinfo)
207 ("guile" ,guile-2.0)
208 ("gnutls" ,gnutls)
209 ("ncurses" ,ncurses)
210 ("readline" ,readline)
211 ("linux-pam" ,linux-pam)
212 ("libltdl" ,libltdl)
213 ("gdbm" ,gdbm)))
214 (home-page "https://mailutils.org")
215 (synopsis "Utilities and library for reading and serving mail")
216 (description
217 "GNU Mailutils is a collection of programs for managing, viewing and
218processing electronic mail. It contains both utilities and server daemons
219and all operate in a protocol-agnostic way. The underlying libraries are
220also available, simplifying the addition of mail capabilities to new
221software.")
222 (license
223 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
224 (list gpl3+ lgpl3+))))
225
226(define-public fetchmail
227 (package
228 (name "fetchmail")
229 (version "6.3.26")
230 (source (origin
231 (method url-fetch)
232 (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-"
233 version ".tar.xz"))
234 (sha256
235 (base32
236 "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r"))))
237 (build-system gnu-build-system)
238 (inputs
239 `(("openssl" ,openssl)))
240 (arguments
241 `(#:configure-flags (list (string-append "--with-ssl="
242 (assoc-ref %build-inputs "openssl")))))
243 (home-page "http://www.fetchmail.info/")
244 (synopsis "Remote-mail retrieval and forwarding utility")
245 (description
246 "Fetchmail is a full-featured, robust, well-documented remote-mail
247retrieval and forwarding utility intended to be used over on-demand
248TCP/IP links (such as SLIP or PPP connections). It supports every
249remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
250KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
251and IPSEC.
252
253Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
254so it can then be read by normal mail user agents such as mutt, elm
255or BSD Mail. It allows all your system MTA's filtering, forwarding, and
256aliasing facilities to work just as they would on normal mail.")
257 (license gpl2+))) ; most files are actually public domain or x11
258
259(define-public mutt
260 (package
261 (name "mutt")
262 (version "1.10.0")
263 (source (origin
264 (method url-fetch)
265 (uri (string-append "https://bitbucket.org/mutt/mutt/downloads/"
266 "mutt-" version ".tar.gz"))
267 (sha256
268 (base32
269 "0nskymwr2cdapxlfv0ysz3bjwhb4kcvl5a3c39237k7r1vwva582"))
270 (patches (search-patches "mutt-store-references.patch"))))
271 (build-system gnu-build-system)
272 (inputs
273 `(("cyrus-sasl" ,cyrus-sasl)
274 ("gdbm" ,gdbm)
275 ("gpgme" ,gpgme)
276 ("ncurses" ,ncurses)
277 ("openssl" ,openssl)
278 ("perl" ,perl)))
279 (arguments
280 `(#:configure-flags '("--enable-smtp"
281 "--enable-imap"
282 "--enable-pop"
283 "--enable-gpgme"
284 "--enable-hcache" ; for header caching
285 "--enable-sidebar"
286 "--with-ssl"
287 "--with-sasl"
288 ;; so that mutt does not check whether the path
289 ;; exists, which it does not in the chroot
290 "--with-mailpath=/var/mail")))
291 (home-page "http://www.mutt.org/")
292 (synopsis "Mail client")
293 (description
294 "Mutt is a small but very powerful text-based mail client for Unix
295operating systems.")
296 (license gpl2+)))
297
298(define-public neomutt
299 (package
300 (name "neomutt")
301 (version "20180323")
302 (source
303 (origin
304 (method url-fetch)
305 (uri (string-append "https://github.com/" name "/" name
306 "/archive/" name "-" version ".tar.gz"))
307 (sha256
308 (base32
309 "12v7zkm809cvjxfz0n7jb4qa410ns1ydyf0gjin99vbdrlj88jac"))))
310 (build-system gnu-build-system)
311 (inputs
312 `(("cyrus-sasl" ,cyrus-sasl)
313 ("gdbm" ,gdbm)
314 ("gpgme" ,gpgme)
315 ("ncurses" ,ncurses)
316 ("gnutls" ,gnutls)
317 ("openssl" ,openssl) ;For smime
318 ("perl" ,perl)
319 ("kyotocabinet" ,kyotocabinet)
320 ("libxslt" ,libxslt)
321 ("libidn" ,libidn)
322 ("libxml2" ,libxml2)
323 ("lmdb" ,lmdb)
324 ("notmuch" ,notmuch)))
325 (native-inputs
326 `(("automake" ,automake)
327 ("gettext-minimal" ,gettext-minimal)
328 ("pkg-config" ,pkg-config)
329 ("docbook-xsl" ,docbook-xsl)
330 ("docbook-xml" ,docbook-xml-4.2)
331 ("w3m" ,w3m)
332 ("tcl" ,tcl)))
333 (arguments
334 `(#:tests? #f
335 #:configure-flags
336 (list "--gpgme"
337
338 ;; database, implies header caching
339 "--disable-tokyocabinet"
340 "--disable-qdbm"
341 "--disable-bdb"
342 "--lmdb"
343 "--kyotocabinet"
344
345 "--gdbm"
346
347 "--gnutls"
348 "--disable-ssl"
349 "--sasl"
350 (string-append "--with-sasl="
351 (assoc-ref %build-inputs "cyrus-sasl"))
352
353
354 "--smime"
355 "--notmuch"
356 "--idn"
357
358 ;; If we do not set this, neomutt wants to check
359 ;; whether the path exists, which it does not
360 ;; in the chroot. The workaround is this.
361 "--with-mailpath=/var/mail"
362
363 "--with-ui=ncurses"
364 (string-append "--with-ncurses="
365 (assoc-ref %build-inputs "ncurses"))
366 (string-append "--prefix="
367 (assoc-ref %outputs "out"))
368 "--debug")
369 #:phases
370 (modify-phases %standard-phases
371 ;; TODO: autosetup is meant to be included in the source,
372 ;; but we should package autosetup and use our own version of it.
373 (add-before 'configure 'fix-sasl-test
374 (lambda _
375 ;; Upstream suggestion to fix the failing sasl autosetup test.
376 (substitute* "auto.def"
377 (("cc-with \\[list -cflags -I\\$prefix/include -libs")
378 "cc-with [list -includes stddef.h -cflags -I$prefix/include -libs"))
379 #t))
380 (replace 'configure
381 (lambda* (#:key outputs inputs configure-flags #:allow-other-keys)
382 (let* ((out (assoc-ref outputs "out"))
383 (flags `(,@configure-flags))
384 (bash (which "bash")))
385 (setenv "SHELL" bash)
386 (setenv "CONFIG_SHELL" bash)
387 (apply invoke bash
388 (string-append (getcwd) "/configure")
389 flags)))))))
390 (home-page "https://www.neomutt.org/")
391 (synopsis "Command-line mail reader based on Mutt")
392 (description
393 "NeoMutt is a command-line mail reader which is based on mutt.
394It adds a large amount of new and improved features to mutt.")
395 (license gpl2+)))
396
397(define-public gmime
398 (package
399 (name "gmime")
400 (version "3.2.0")
401 (source (origin
402 (method url-fetch)
403 (uri (string-append "mirror://gnome/sources/gmime/"
404 (version-major+minor version)
405 "/gmime-" version ".tar.xz"))
406 (sha256
407 (base32
408 "1q6palbpf6lh6bvy9ly26q5apl5k0z0r4mvl6zzqh90rz4rn1v3m"))))
409 (build-system gnu-build-system)
410 (native-inputs
411 `(("pkg-config" ,pkg-config)
412 ("gnupg" ,gnupg))) ; for tests only
413 (inputs `(("glib" ,glib)
414 ("gpgme" ,gpgme)
415 ("zlib" ,zlib)))
416 (arguments
417 `(#:phases
418 (modify-phases %standard-phases
419 (add-after
420 'unpack 'patch-paths-in-tests
421 (lambda _
422 ;; The test programs run several programs using 'system' with
423 ;; hard-coded paths. Here we patch them all.
424 ;; We use ISO-8859-1 here because test-iconv.c contains
425 ;; raw byte sequences in several different encodings.
426 (with-fluids ((%default-port-encoding #f))
427 (substitute* (find-files "tests" "\\.c$")
428 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
429 (let* ((base (basename prog-path))
430 (prog (which base)))
431 (string-append pre
432 (or prog (error "not found: " base)))))))
433 #t)))))
434 (home-page "http://spruce.sourceforge.net/gmime/")
435 (synopsis "MIME message parser and creator library")
436 (description
437 "GMime provides a core library and set of utilities which may be used for
438the creation and parsing of messages using the Multipurpose Internet Mail
439Extension (MIME).")
440 (license (list lgpl2.1+ gpl2+ gpl3+))))
441
442;; Some packages are not ready for GMime 3 yet.
443(define-public gmime-2.6
444 (package
445 (inherit gmime)
446 (version "2.6.23")
447 (source (origin
448 (method url-fetch)
449 (uri (string-append "mirror://gnome/sources/gmime/"
450 (version-major+minor version)
451 "/gmime-" version ".tar.xz"))
452 (sha256
453 (base32
454 "0slzlzcr3h8jikpz5a5amqd0csqh2m40gdk910ws2hnaf5m6hjbi"))))))
455
456(define-public bogofilter
457 (package
458 (name "bogofilter")
459 (version "1.2.4")
460 (source (origin
461 (method url-fetch)
462 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-"
463 version "/bogofilter-"
464 version ".tar.bz2"))
465 (sha256
466 (base32
467 "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1"))))
468 (build-system gnu-build-system)
469 (arguments
470 '(#:phases
471 (modify-phases %standard-phases
472 (add-before 'check 'pre-check
473 (lambda _
474 (substitute* "src/tests/t.frame"
475 (("GREP=/bin/grep")
476 (string-append "GREP=" (which "grep") "\n")))
477 #t)))))
478 (native-inputs `(("flex" ,flex)))
479 (inputs `(("bdb" ,bdb)))
480 (home-page "http://bogofilter.sourceforge.net/")
481 (synopsis "Mail classifier based on a Bayesian filter")
482 (description
483 "Bogofilter is a mail filter that classifies mail as spam or ham
484 (non-spam) by a statistical analysis of the message's header and
485content (body). The program is able to learn from the user's classifications
486and corrections. It is based on a Bayesian filter.")
487 (license gpl2)))
488
489(define-public offlineimap
490 (package
491 (name "offlineimap")
492 (version "7.2.0")
493 (source (origin
494 (method url-fetch)
495 (uri (string-append "https://github.com/OfflineIMAP/offlineimap/"
496 "archive/v" version ".tar.gz"))
497 (file-name (string-append name "-" version ".tar.gz"))
498 (sha256
499 (base32
500 "1i7pzm1vrj98jcyn1ygsg1yp0gqlsssnc25451icvivysvdwdj5n"))))
501 (build-system python-build-system)
502 (native-inputs
503 `(("asciidoc" ,asciidoc)))
504 (inputs `(("python2-pysqlite" ,python2-pysqlite)
505 ("python2-six" ,python2-six)))
506 (arguments
507 ;; The setup.py script expects python-2.
508 `(#:python ,python-2
509 ;; Tests require a modifiable IMAP account.
510 #:tests? #f
511 #:phases
512 (modify-phases %standard-phases
513 (add-after 'build 'build-documentation
514 (lambda _
515 (substitute* "docs/Makefile"
516 ;; Prevent xmllint and xsltproc from downloading a DTD file.
517 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
518 (zero? (system* "make" "-C" "docs" "man"))))
519 (add-after 'install 'install-documentation
520 (lambda* (#:key outputs #:allow-other-keys)
521 (let* ((out (assoc-ref outputs "out"))
522 (man (string-append out "/share/man")))
523 (install-file "docs/offlineimap.1" (string-append man "/man1"))
524 (install-file "docs/offlineimapui.7" (string-append man "/man7"))
525 #t)))
526 (add-after 'install-documentation 'wrap-binary
527 (lambda* (#:key outputs #:allow-other-keys)
528 (let* ((out (assoc-ref outputs "out"))
529 (bin (string-append out "/bin/offlineimap")))
530 (wrap-program bin
531 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
532 #t))))))
533 (home-page "http://www.offlineimap.org")
534 (synopsis "Sync emails between two repositories")
535 (description
536 "OfflineImap synchronizes emails between two repositories, so that you
537can read the same mailbox from multiple computers. It supports IMAP as REMOTE
538repository and Maildir/IMAP as LOCAL repository.")
539 (license gpl2+)))
540
541(define-public emacs-mew
542 (package
543 (name "emacs-mew")
544 (version "6.7")
545 (source (origin
546 (method url-fetch)
547 (uri (string-append "http://mew.org/Release/mew-"
548 version ".tar.gz"))
549 (sha256
550 (base32
551 "03fzky2kz73vgx4cbps2psbbnrgqgkk5q7jwfldisymkzr9iz03y"))))
552 (native-inputs
553 `(("emacs" ,emacs)))
554 (propagated-inputs
555 `(("ruby-sqlite3" ,ruby-sqlite3) ; optional for the database of messages
556 ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
557 (build-system gnu-build-system)
558 (arguments
559 (let ((elisp-dir "/share/emacs/site-lisp/guix.d/mew")
560 (icon-dir "/share/mew"))
561 `(#:modules ((guix build gnu-build-system)
562 (guix build utils)
563 (guix build emacs-utils))
564 #:imported-modules (,@%gnu-build-system-modules
565 (guix build emacs-utils))
566 #:configure-flags
567 (list (string-append "--with-elispdir=" %output ,elisp-dir)
568 (string-append "--with-etcdir=" %output ,icon-dir))
569 #:phases
570 (modify-phases %standard-phases
571 (add-after 'configure 'patch-mew-icon-directory
572 (lambda* (#:key outputs #:allow-other-keys)
573 (emacs-substitute-sexps "mew-key.el"
574 ("(def.* mew-icon-directory"
575 `(progn
576 (add-to-list 'image-load-path 'mew-icon-directory)
577 ,(string-append (assoc-ref outputs "out") ,icon-dir))))
578 #t))
579 (add-after 'install 'generate-autoloads
580 (lambda* (#:key outputs #:allow-other-keys)
581 (emacs-generate-autoloads
582 "mew" (string-append (assoc-ref outputs "out") ,elisp-dir))
583 #t)))
584 #:tests? #f)))
585 (home-page "http://www.mew.org")
586 (synopsis "Emacs e-mail client")
587 (description "Mew (Messaging in the Emacs World) is a user interface
588for text messages, multimedia messages (MIME), news articles and
589security functionality including PGP, S/MIME, SSH, and SSL.")
590 (license bsd-3)))
591
592(define-public mu
593 (package
594 (name "mu")
595 (version "1.0")
596 (source (origin
597 (method url-fetch)
598 (uri (string-append "https://github.com/djcb/mu/releases/"
599 "download/v" version "/mu-"
600 version ".tar.xz"))
601 (sha256
602 (base32
603 "04x5azl19gszw2h7argq666gf9xs4hy9q7w9cbqxvy08n56xqsln"))))
604 (build-system gnu-build-system)
605 (native-inputs
606 `(("pkg-config" ,pkg-config)
607 ("glib" ,glib "bin") ; for gtester
608 ("emacs" ,emacs-minimal)
609 ("tzdata" ,tzdata-for-tests))) ;for mu/test/test-mu-query.c
610 ;; TODO: Add webkit and gtk to build the mug GUI.
611 (inputs
612 `(("xapian" ,xapian)
613 ("guile" ,guile-2.2)
614 ("glib" ,glib)
615 ("gmime" ,gmime-2.6)))
616 (arguments
617 `(#:modules ((guix build gnu-build-system)
618 (guix build utils)
619 (guix build emacs-utils))
620 #:imported-modules (,@%gnu-build-system-modules
621 (guix build emacs-utils))
622 #:phases
623 (modify-phases %standard-phases
624 (add-after 'unpack 'patch-configure
625 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
626 ;; so our Emacs package can't find it. Setting "--with-lispdir"
627 ;; configure flag doesn't help because "mu4e" will be added to
628 ;; the lispdir anyway, so we have to modify "configure.ac".
629 (lambda _
630 (substitute* "configure"
631 (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") "")
632 ;; Use latest Guile
633 (("guile-2.0") "guile-2.2"))
634 (substitute* '("guile/Makefile.in"
635 "guile/mu/Makefile.in")
636 (("share/guile/site/2.0/") "share/guile/site/2.2/"))
637 #t))
638 (add-after 'patch-configure 'fix-date-tests
639 ;; Loosen test tolerances to prevent failures caused by daylight
640 ;; saving time (DST). See: https://github.com/djcb/mu/issues/1214.
641 (lambda _
642 (substitute* "lib/parser/test-utils.cc"
643 (("\\* 60 \\* 60, 1 },")
644 "* 60 * 60, 3600 + 1 },"))
645 #t))
646 (add-before 'install 'fix-ffi
647 (lambda* (#:key outputs #:allow-other-keys)
648 (substitute* "guile/mu.scm"
649 (("\"libguile-mu\"")
650 (format #f "\"~a/lib/libguile-mu\""
651 (assoc-ref outputs "out"))))
652 #t))
653 (add-before 'check 'check-tz-setup
654 (lambda* (#:key inputs #:allow-other-keys)
655 ;; For mu/test/test-mu-query.c
656 (setenv "TZDIR"
657 (string-append (assoc-ref inputs "tzdata")
658 "/share/zoneinfo"))
659 #t))
660 (add-after 'install 'install-emacs-autoloads
661 (lambda* (#:key outputs #:allow-other-keys)
662 (emacs-generate-autoloads
663 "mu4e"
664 (string-append (assoc-ref outputs "out")
665 "/share/emacs/site-lisp"))
666 #t)))))
667 (home-page "http://www.djcbsoftware.nl/code/mu/")
668 (synopsis "Quickly find emails")
669 (description
670 "Mu is a tool for dealing with e-mail messages stored in the
671Maildir-format. Mu's purpose in life is to help you to quickly find the
672messages you need; in addition, it allows you to view messages, extract
673attachments, create new maildirs, and so on.")
674 (license gpl3+)))
675
676(define-public alot
677 (package
678 (name "alot")
679 (version "0.5.1")
680 (source (origin
681 (method url-fetch)
682 ;; package author intends on distributing via github rather
683 ;; than pypi:
684 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
685 (uri (string-append "https://github.com/pazz/alot/archive/"
686 version ".tar.gz"))
687 (file-name (string-append "alot-" version ".tar.gz"))
688 (sha256
689 (base32
690 "0wax30hjzmkqfml7hig1dqw1v1y63yc0cgbzl96x58b9h2ggqx3a"))))
691 (build-system python-build-system)
692 (arguments
693 `(;; python 3 is currently unsupported, more info:
694 ;; https://github.com/pazz/alot/blob/master/docs/source/faq.rst
695 #:python ,python-2))
696 (native-inputs
697 `(("python2-mock" ,python2-mock)))
698 (inputs
699 `(("python2-magic" ,python2-magic)
700 ("python2-configobj" ,python2-configobj)
701 ("python2-twisted" ,python2-twisted)
702 ("python2-urwid" ,python2-urwid)
703 ("python2-urwidtrees" ,python2-urwidtrees)
704 ("python2-pygpgme" ,python2-pygpgme)
705 ("python2-notmuch" ,python2-notmuch)))
706 (home-page "https://github.com/pazz/alot")
707 (synopsis "Commandline MUA using notmuch")
708 (description
709 "Alot is an experimental terminal mail user agent (MUA) based on
710@code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
711 (license gpl3+)))
712
713(define-public notifymuch
714 (let
715 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
716 (revision "1"))
717 (package
718 (name "notifymuch")
719 (version (string-append "0.1-" revision "." (string-take commit 7)))
720 (source
721 (origin
722 (method git-fetch)
723 (uri (git-reference
724 (url "https://github.com/kspi/notifymuch.git")
725 (commit commit)))
726 (sha256
727 (base32
728 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
729 (file-name (string-append name "-" version "-checkout"))))
730 (build-system python-build-system)
731 (inputs
732 `(("python-notmuch" ,python-notmuch)
733 ("python-pygobject" ,python-pygobject)
734 ("gobject-introspection" ,gobject-introspection)
735 ("libnotify" ,libnotify)
736 ("gtk+" ,gtk+)))
737 (arguments
738 `(#:phases
739 (modify-phases %standard-phases
740 (add-after 'install 'wrap-binary
741 (lambda* (#:key outputs #:allow-other-keys)
742 (let* ((out (assoc-ref outputs "out"))
743 (bin (string-append out "/bin/notifymuch")))
744 (wrap-program bin
745 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
746 `("GI_TYPELIB_PATH" ":" prefix
747 (,(getenv "GI_TYPELIB_PATH")
748 ,(string-append out "/lib/girepository-1.0")))))
749 #t)))))
750 (home-page "https://github.com/kspi/notifymuch")
751 (synopsis "Displays notifications for changes in the notmuch email database")
752 (description "notifymuch displays desktop notifications for messages in
753the notmuch database. The notifications are sent using libnotify to a
754notification daemon. The query to find messages to send a notification about
755is configurable, and a notification for the same message will not be send
756within a configurable period (defaults to 48 hours). To use notifymuch, run
757@command{notifymuch} after new mail is indexed, this can be automated by
758invoking @command{notifymuch} from the post-new hook.")
759 (license gpl3))))
760
761(define-public notmuch
762 (package
763 (name "notmuch")
764 (version "0.26.2")
765 (source (origin
766 (method url-fetch)
767 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
768 version ".tar.gz"))
769 (sha256
770 (base32
771 "0fqf6wwvqlccq9qdnd0mky7fx0kbkczd28blf045s0vsvdjii70h"))))
772 (build-system gnu-build-system)
773 (arguments
774 `(#:modules ((guix build gnu-build-system)
775 ((guix build emacs-build-system) #:prefix emacs:)
776 (guix build utils))
777 #:imported-modules (,@%gnu-build-system-modules
778 (guix build emacs-build-system)
779 (guix build emacs-utils))
780 #:make-flags (list "V=1") ; Verbose test output.
781 #:phases (modify-phases %standard-phases
782 (add-after 'unpack 'patch-notmuch-lib.el
783 (lambda _
784 (substitute* "emacs/notmuch-lib.el"
785 (("/bin/sh") (which "sh")))
786 #t))
787 (replace 'configure
788 (lambda* (#:key outputs #:allow-other-keys)
789 (setenv "CC" "gcc")
790 (setenv "CONFIG_SHELL" (which "sh"))
791
792 (let* ((out (assoc-ref outputs "out"))
793 (elisp
794 (string-append out "/share/emacs/site-lisp/guix.d/"
795 ,name "-" ,version)))
796 (zero?
797 (system*
798 "./configure"
799 (string-append "--prefix=" out)
800 (string-append "--emacslispdir=" elisp)
801 (string-append "--emacsetcdir=" elisp))))))
802 (add-before 'check 'prepare-test-environment
803 (lambda _
804 (setenv "TEST_CC" "gcc")
805 ;; Patch various inline shell invocations.
806 (substitute* (find-files "test" "\\.sh$")
807 (("/bin/sh") (which "sh")))
808 #t))
809 (add-after 'install 'make-autoloads
810 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
811 (native-inputs
812 `(("bash-completion" ,bash-completion)
813 ("emacs" ,emacs-no-x) ; Minimal lacks libxml, needed for some tests.
814 ("pkg-config" ,pkg-config)
815 ("python" ,python-2)
816 ("python-docutils" ,python2-docutils)
817 ("python-sphinx" ,python2-sphinx)
818
819 ;; The following are required for tests only.
820 ("which" ,which)
821 ("dtach" ,dtach)
822 ("gnupg" ,gnupg)
823 ("man" ,man-db)
824 ("perl" ,perl)))
825 (inputs
826 `(("glib" ,glib)
827 ("gmime" ,gmime)
828 ("talloc" ,talloc)
829 ("xapian" ,xapian)
830 ("zlib" ,zlib)))
831 (home-page "https://notmuchmail.org/")
832 (synopsis "Thread-based email index, search, and tagging")
833 (description
834 "Notmuch is a command-line based program for indexing, searching, read-
835ing, and tagging large collections of email messages.")
836 (license gpl3+)))
837
838(define-public notmuch-addrlookup-c
839 ;; This commit includes a compatibility fix for notmuch-0.25, and is not
840 ;; currently part of any release. Please update this package when
841 ;; notmuch-addrlookup-c-9 is released.
842 (let ((commit "88f156d04990a71c6ad6fc2757b537b44e3c4d00")
843 (revision "1")) ;Guix package revision
844 (package
845 (name "notmuch-addrlookup-c")
846 (version (string-append "8-" revision "."
847 (string-take commit 7)))
848 (source (origin
849 (method git-fetch)
850 (uri (git-reference
851 (url "https://github.com/aperezdc/notmuch-addrlookup-c.git")
852 (commit commit)))
853 (file-name (string-append name "-" version "-checkout"))
854 (sha256
855 (base32
856 "0v0wzs7qzy4n1hbql8s10qrwgalcxdzbxf8pj6cii1pv2jwmkxbm"))))
857 (build-system gnu-build-system)
858 (arguments
859 '(#:tests? #f ; no tests
860 #:make-flags (list "CC=gcc"
861 (string-append "PREFIX="
862 (assoc-ref %outputs "out")))
863 #:phases (modify-phases %standard-phases
864 (delete 'configure)
865 ;; Remove vim code completion config, it's not needed to
866 ;; build (or be patched).
867 (add-before 'patch-source-shebangs 'delete-ycm-file
868 (lambda _ (delete-file ".ycm_extra_conf.py")))
869 (replace 'install
870 (lambda* (#:key outputs #:allow-other-keys)
871 (let ((bin (string-append
872 (assoc-ref outputs "out") "/bin")))
873 (install-file "notmuch-addrlookup" bin)))))))
874 (native-inputs
875 `(("pkg-config" ,pkg-config)))
876 (inputs
877 `(("glib" ,glib)
878 ("notmuch" ,notmuch)))
879 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
880 (synopsis "Address lookup tool for Notmuch")
881 (description "This is an address lookup tool using a Notmuch database,
882useful for email address completion.")
883 (license license:expat))))
884
885(define-public python-notmuch
886 (package
887 (name "python-notmuch")
888 (version (package-version notmuch))
889 ;; Notmuch python bindings are now unavailable on pypi. The
890 ;; bindings are distributed via the notmuch release tarball.
891 (source (package-source notmuch))
892 (build-system python-build-system)
893 (inputs `(("notmuch" ,notmuch)))
894 (arguments
895 `(#:tests? #f ; no "test" target
896 #:phases
897 (modify-phases %standard-phases
898 ;; This python package lives in a subdirectory of the notmuch source
899 ;; tree, so chdir into it before building.
900 (add-after 'unpack 'enter-python-dir
901 (lambda _ (chdir "bindings/python") #t))
902 ;; Make sure the correct notmuch shared library gets loaded.
903 (add-before 'build 'set-libnotmuch-file-name
904 (lambda* (#:key inputs #:allow-other-keys)
905 (let ((notmuch (assoc-ref inputs "notmuch")))
906 (substitute* "notmuch/globals.py"
907 (("libnotmuch\\.so\\.")
908 (string-append notmuch "/lib/libnotmuch.so.")))
909 #t))))))
910 (home-page (package-home-page notmuch))
911 (synopsis "Python bindings of the Notmuch mail indexing library")
912 (description
913 "This package provides Python bindings to use the Notmuch mail indexing
914and search library.")
915 (license gpl3+)))
916
917(define-public python2-notmuch
918 (package-with-python2 python-notmuch))
919
920(define-public getmail
921 (package
922 (name "getmail")
923 (version "5.6")
924 (source
925 (origin
926 (method url-fetch)
927 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
928 name "-" version ".tar.gz"))
929 (sha256
930 (base32
931 "16nmvj80szr6yvcxxgmxn2lxqpjqqj4xg5a0b66zhvck6j42q3a6"))))
932 (build-system python-build-system)
933 (arguments
934 `(#:tests? #f ; no tests
935 #:python ,python-2))
936 (home-page "http://pyropus.ca/software/getmail/")
937 (synopsis "Mail retriever")
938 (description
939 "A flexible, extensible mail retrieval system with support for
940POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
941arbitrary message filtering, single-user and domain-mailboxes, and many other
942useful features.")
943
944 ;; License is specified in file '__init__.py'.
945 (license gpl2)))
946
947(define-public libetpan
948 (package
949 (name "libetpan")
950 (version "1.8")
951 (source (origin
952 (method url-fetch)
953 (uri (string-append "https://github.com/dinhviethoa/" name
954 "/archive/" version ".tar.gz"))
955 (file-name (string-append name "-" version ".tar.gz"))
956 (sha256
957 (base32 "1sxnaglp5hb0z78sgnfzva4x8m4flqhicvm1dz0krkxdmfsafrsf"))))
958 (build-system gnu-build-system)
959 (native-inputs `(("autoconf" ,autoconf-wrapper)
960 ("automake" ,automake)
961 ("libtool" ,libtool)
962 ("pkg-config" ,pkg-config)))
963 (propagated-inputs
964 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
965 ;; libraries need to be propagated.
966 `(("cyrus-sasl" ,cyrus-sasl)
967 ("openssl" ,openssl)))
968 (inputs
969 `(("curl" ,curl)
970 ("expat" ,expat)
971 ("zlib" ,zlib)))
972 (arguments
973 '(#:phases
974 (modify-phases %standard-phases
975 (add-after 'unpack 'autogen
976 (lambda _
977 (setenv "NOCONFIGURE" "true")
978 (zero? (system* "sh" "autogen.sh")))))
979 #:configure-flags
980 '("--disable-static" "--disable-db")))
981 (home-page "http://www.etpan.org/libetpan.html")
982 (synopsis "Portable middleware for email access")
983 (description
984 "The purpose of this mail library is to provide a portable, efficient
985framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
986provides an API for C language. It's the low-level API used by MailCore and
987MailCore 2.")
988 (license bsd-3)))
989
990(define-public compface
991 (package
992 (name "compface")
993 (version "1.5.2")
994 (source (origin
995 (method url-fetch)
996 (uri (string-append "https://ftp.heanet.ie/mirrors/"
997 "ftp.xemacs.org/aux/"
998 name "-" version ".tar.gz"))
999 (sha256
1000 (base32
1001 "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
1002 (build-system gnu-build-system)
1003 (arguments
1004 `(#:tests? #f))
1005 (synopsis "Portrait image compressor")
1006 (description "This packages takes your 48x48x1 portrait image and
1007compresses it.")
1008 (home-page "http://www.cs.indiana.edu/pub/faces/")
1009 (license (x11-style "file://README"))))
1010
1011(define-public claws-mail
1012 (package
1013 (name "claws-mail")
1014 (version "3.16.0")
1015 (source (origin
1016 (method url-fetch)
1017 (uri (string-append
1018 "http://www.claws-mail.org/releases/" name "-" version
1019 ".tar.xz"))
1020 (sha256
1021 (base32
1022 "1awpr3s7n8bq8p3w10a4j6lg5bizjxyiqp4rqzc2j8cn7lyi64n2"))))
1023 (build-system gnu-build-system)
1024 (native-inputs `(("pkg-config" ,pkg-config)))
1025 (inputs `(("bogofilter" ,bogofilter)
1026 ("curl" ,curl)
1027 ("dbus-glib" ,dbus-glib)
1028 ("enchant" ,enchant)
1029 ("expat" ,expat)
1030 ("ghostscript" ,ghostscript)
1031 ("hicolor-icon-theme" ,hicolor-icon-theme)
1032 ("gnupg" ,gnupg)
1033 ("gnutls" ,gnutls)
1034 ("gpgme" ,gpgme)
1035 ("gtk" ,gtk+-2)
1036 ("libarchive" ,libarchive)
1037 ("libcanberra" ,libcanberra)
1038 ("libetpan" ,libetpan)
1039 ("libical" ,libical)
1040 ("libnotify" ,libnotify)
1041 ("libsm" ,libsm)
1042 ("libxml2" ,libxml2)
1043 ("perl" ,perl)
1044 ("python-2" ,python-2)
1045 ("mime-info" ,shared-mime-info)))
1046 (arguments
1047 '(#:configure-flags
1048 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant")
1049 #:make-flags
1050 ;; Disable updating icon cache since it's done by the profile hook.
1051 ;; Conflict with other packages in the profile would be inevitable
1052 ;; otherwise.
1053 '("gtk_update_icon_cache=true")
1054 #:phases (modify-phases %standard-phases
1055 (add-before 'build 'patch-mime
1056 (lambda* (#:key inputs #:allow-other-keys)
1057 (substitute* "src/procmime.c"
1058 (("/usr/share/mime/globs")
1059 (string-append (assoc-ref inputs "mime-info")
1060 "/share/mime/globs"))))))))
1061 (synopsis "GTK-based Email client")
1062 (description
1063 "Claws-Mail is an email client (and news reader) based on GTK+. The
1064appearance and interface are designed to be familiar to new users coming from
1065other popular email clients, as well as experienced users. Almost all commands
1066are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
1067which can add many functionalities to the base client.")
1068 (home-page "http://www.claws-mail.org/")
1069 (license gpl3+))) ; most files are actually public domain or x11
1070
1071(define-public msmtp
1072 (package
1073 (name "msmtp")
1074 (version "1.6.6")
1075 (source
1076 (origin
1077 (method url-fetch)
1078 (uri (string-append "mirror://sourceforge/msmtp/msmtp/" version
1079 "/msmtp-" version ".tar.xz"))
1080 (sha256
1081 (base32
1082 "0ppvww0sb09bnsrpqnvlrn8vx231r24xn2iiwpy020mxc8gxn5fs"))))
1083 (build-system gnu-build-system)
1084 (inputs
1085 `(("libidn" ,libidn)
1086 ("libsecret" ,libsecret)
1087 ("gnutls" ,gnutls)
1088 ("zlib" ,zlib)
1089 ("gsasl" ,gsasl)))
1090 (native-inputs
1091 `(("pkg-config" ,pkg-config)))
1092 (home-page "http://msmtp.sourceforge.net/")
1093 (arguments
1094 `(#:configure-flags (list "--with-libgsasl"
1095 "--with-libidn"
1096 "--with-tls=gnutls")
1097 #:phases
1098 (modify-phases %standard-phases
1099 (add-after 'install 'install-msmtpq
1100 (lambda* (#:key outputs #:allow-other-keys)
1101 (let* ((out (assoc-ref outputs "out"))
1102 (bin (string-append out "/bin"))
1103 (doc (string-append out "/share/doc/msmtp"))
1104 (msmtpq (string-append "scripts/msmtpq")))
1105 (install-file (string-append msmtpq "/msmtpq") bin)
1106 (install-file (string-append msmtpq "/msmtp-queue") bin)
1107 (install-file (string-append msmtpq "/README.msmtpq") doc)
1108 #t))))))
1109 (synopsis
1110 "Simple and easy to use SMTP client with decent sendmail compatibility")
1111 (description
1112 "msmtp is an SMTP client. In the default mode, it transmits a mail to
1113an SMTP server (for example at a free mail provider) which takes care of further
1114delivery.")
1115 (license gpl3+)))
1116
1117(define-public exim
1118 (package
1119 (name "exim")
1120 (version "4.90.1")
1121 (source
1122 (origin
1123 (method url-fetch)
1124 (uri (list (string-append "https://ftp.exim.org/pub/exim/exim4/exim-"
1125 version ".tar.bz2")
1126 (string-append "https://ftp.exim.org/pub/exim/exim4/old/exim-"
1127 version ".tar.bz2")))
1128 (sha256
1129 (base32
1130 "1w6blvvrd87c649j8xpag034md2w1ib0db9c4ijqbzc5dh2i1xfq"))))
1131 (build-system gnu-build-system)
1132 (inputs
1133 `(("bdb" ,bdb)
1134 ("gnutls" ,gnutls)
1135 ("gzip" ,gzip)
1136 ("bzip2" ,bzip2)
1137 ("xz" ,xz)
1138 ("perl" ,perl)
1139 ("libxt" ,libxt)
1140 ("libxaw" ,libxaw)))
1141 (native-inputs
1142 `(("pcre" ,pcre "bin")
1143 ("perl" ,perl)))
1144 (arguments
1145 '(#:phases
1146 (modify-phases %standard-phases
1147 (replace 'configure
1148 ;; We'd use #:make-flags but the top-level Makefile calls others
1149 ;; recursively, so just set all variables this way.
1150 (lambda* (#:key outputs inputs #:allow-other-keys)
1151 (substitute* '("Makefile" "OS/Makefile-Default")
1152 (("(RM_COMMAND=).*" all var)
1153 (string-append var "rm\n")))
1154 (copy-file "src/EDITME" "Local/Makefile")
1155 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
1156 (let ((out (assoc-ref outputs "out"))
1157 (gzip (assoc-ref inputs "gzip"))
1158 (bzip2 (assoc-ref inputs "bzip2"))
1159 (xz (assoc-ref inputs "xz")))
1160 (substitute* '("Local/Makefile")
1161 (("(BIN_DIRECTORY=).*" all var)
1162 (string-append var out "/bin\n"))
1163 (("(CONFIGURE_FILE=).*" all var)
1164 (string-append var out "/etc/exim.conf\n"))
1165 (("(EXIM_USER=).*" all var)
1166 (string-append var "nobody\n"))
1167 (("(FIXED_NEVER_USERS=).*" all var)
1168 (string-append var "\n")) ;XXX no root in build environment
1169 (("(COMPRESS_COMMAND=).*" all var)
1170 (string-append var gzip "/bin/gzip\n"))
1171 (("(ZCAT_COMMAND=).*" all var)
1172 (string-append var gzip "/bin/zcat\n")))
1173 ;; This file has hardcoded names for tools despite the zcat
1174 ;; configuration above.
1175 (substitute* '("src/exigrep.src")
1176 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
1177 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
1178 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
1179 (("'lzma'") (string-append "'" xz "/bin/lzma'"))))
1180 #t))
1181 (add-before 'build 'fix-sh-paths
1182 (lambda* (#:key inputs #:allow-other-keys)
1183 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
1184 (("SHELL=/bin/sh") "SHELL=sh"))
1185 (substitute* '("scripts/Configure-config.h")
1186 (("\\| /bin/sh") "| sh"))
1187 (let ((bash (assoc-ref inputs "bash")))
1188 (substitute* '("scripts/Configure-eximon")
1189 (("#!/bin/sh") (string-append "#!" bash "/bin/sh"))))
1190 #t)))
1191 #:make-flags '("INSTALL_ARG=-no_chown")
1192 ;; No 'check' target.
1193 #:tests? #f))
1194 (home-page "https://www.exim.org/")
1195 (synopsis
1196 "Message Transfer Agent (MTA) developed at the University of Cambridge")
1197 (description
1198 "Exim is a message transfer agent (MTA) developed at the University of
1199Cambridge for use on Unix systems connected to the Internet. In style it is
1200similar to Smail 3, but its facilities are more general. There is a great
1201deal of flexibility in the way mail can be routed, and there are extensive
1202facilities for checking incoming mail.")
1203 (license gpl2+)))
1204
1205(define-public dovecot
1206 (package
1207 (name "dovecot")
1208 (version "2.3.1")
1209 (source
1210 (origin
1211 (method url-fetch)
1212 (uri (string-append "https://www.dovecot.org/releases/"
1213 (version-major+minor version) "/"
1214 name "-" version ".tar.gz"))
1215 (sha256 (base32
1216 "14zva4f8k64x86sm9n21cp2yvrpph6k6k52bm22a00pxjwdq50q8"))))
1217 (build-system gnu-build-system)
1218 (native-inputs
1219 `(("pkg-config" ,pkg-config)))
1220 (inputs
1221 `(("openssl" ,openssl)
1222 ("zlib" ,zlib)
1223 ("bzip2" ,bzip2)
1224 ("sqlite" ,sqlite)
1225 ("linux-pam" ,linux-pam)))
1226 (arguments
1227 `(#:configure-flags '("--sysconfdir=/etc"
1228 "--localstatedir=/var")
1229 #:phases (modify-phases %standard-phases
1230 (add-before
1231 'configure 'pre-configure
1232 (lambda _
1233 ;; Simple hack to avoid installing in /etc.
1234 (substitute* '("doc/Makefile.in"
1235 "doc/example-config/Makefile.in")
1236 (("pkgsysconfdir = .*")
1237 "pkgsysconfdir = /tmp/etc"))
1238 #t))
1239 (add-after
1240 'unpack 'patch-other-file-names
1241 (lambda _
1242 (substitute*
1243 "src/lib-program-client/test-program-client-local.c"
1244 (("(/bin/| )cat") (which "cat"))
1245 (("/bin/echo") (which "echo"))
1246 (("/bin/false") (which "false"))
1247 (("/bin/sh") (which "bash"))
1248 (("head") (which "head"))
1249 (("sleep") (which "sleep")))
1250 #t)))))
1251 (home-page "https://www.dovecot.org")
1252 (synopsis "Secure POP3/IMAP server")
1253 (description
1254 "Dovecot is a mail server whose major goals are security and reliability.
1255It supports mbox/Maildir and its own dbox/mdbox formats.")
1256 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
1257 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
1258 ;; Unicode, Inc. License Agreement for Data Files and Software.
1259 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
1260
1261(define-public dovecot-trees
1262 (package
1263 (name "dovecot-trees")
1264 (version "2.1.0")
1265 (source
1266 (origin
1267 (method url-fetch)
1268 (uri (string-append "https://0xacab.org/riseuplabs/trees/repository/"
1269 "archive.tar.gz?ref=v" version))
1270 (file-name (string-append name "-" version ".tar.gz"))
1271 (sha256
1272 (base32
1273 "0rkk10b1bsjz979sc864vpgcdchy7yxwmyv4ik50lar1h6awdnrf"))))
1274 (build-system gnu-build-system)
1275 (native-inputs
1276 `(("automake" ,automake)
1277 ("autoconf" ,autoconf)
1278 ("libtool" ,libtool)
1279 ("dovecot" ,dovecot)
1280 ("pkg-config" ,pkg-config)))
1281 (inputs
1282 `(("libsodium" ,libsodium)))
1283 (arguments
1284 `(#:tests? #f ;No tests exist.
1285 #:configure-flags (list (string-append "--with-dovecot="
1286 (assoc-ref %build-inputs "dovecot")
1287 "/lib/dovecot"))
1288 #:phases
1289 (modify-phases %standard-phases
1290 (add-after 'unpack 'autogen
1291 (lambda _
1292 (zero? (system* "sh" "autogen.sh")))))))
1293 (home-page "https://0xacab.org/riseuplabs/trees")
1294 (synopsis "NaCL-based Dovecot email storage encryption plugin")
1295 (description
1296 "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
1297Dovecot encryption plugin. This plugin adds individually encrypted mail
1298storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
1299which uses OpenSSL and RSA keypairs. TREES works in a similar way, but uses
1300the Sodium crypto library (based on NaCL).
1301
1302How it works:
1303@enumerate
1304@item On IMAP log in, the user's cleartext password is passed to the plugin.
1305@item The plugin creates an argon2 digest from the password.
1306@item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
1307@item Inside the secretbox is stored a Curve25519 private key.
1308@item The Curve25519 private key is used to decrypt each individual message,
1309using lidsodium sealed boxes.
1310@item New mail is encrypted as it arrives using the Curve25519 public key.
1311@end enumerate\n")
1312 (license agpl3)))
1313
1314(define-public dovecot-libsodium-plugin
1315 (let ((commit "044de73c01c35385df0105f6b387bec5d5317ce7")
1316 (revision "1"))
1317 (package
1318 (name "dovecot-libsodium-plugin")
1319 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
1320 (source
1321 (origin
1322 (method git-fetch)
1323 (uri (git-reference
1324 (url "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1325 (commit commit)))
1326 (file-name (string-append name "-" version "-checkout"))
1327 (sha256
1328 (base32
1329 "13h07l7xy713zchnj2p9fhvq7fdl4zy1ai94li3ygkqjjj8hrgas"))))
1330 (build-system gnu-build-system)
1331 (native-inputs
1332 `(("automake" ,automake)
1333 ("autoconf" ,autoconf)
1334 ("libtool" ,libtool)
1335 ("dovecot" ,dovecot)
1336 ("pkg-config" ,pkg-config)))
1337 (inputs
1338 `(("libsodium" ,libsodium)))
1339 (arguments
1340 `(#:tests? #f ;No tests exist.
1341 #:configure-flags (list (string-append "--with-dovecot="
1342 (assoc-ref %build-inputs "dovecot")
1343 "/lib/dovecot"))
1344 #:phases
1345 (modify-phases %standard-phases
1346 (add-after 'unpack 'autogen
1347 (lambda _
1348 (zero? (system* "sh" "autogen.sh")))))))
1349 (home-page "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1350 (synopsis "Libsodium password hashing schemes plugin for Dovecot")
1351 (description
1352 "@code{dovecot-libsodium-plugin} provides libsodium password
1353hashing schemes plugin for @code{Dovecot}.")
1354 (license gpl3+))))
1355
1356(define-public isync
1357 (package
1358 (name "isync")
1359 (version "1.3.0")
1360 (source
1361 (origin
1362 (method url-fetch)
1363 (uri (string-append "mirror://sourceforge/isync/isync/"
1364 version "/isync-" version ".tar.gz"))
1365 (sha256 (base32
1366 "173wd7x8y5sp94slzwlnb7zhgs32r57zl9xspl2rf4g3fqwmhpwd"))))
1367 (build-system gnu-build-system)
1368 (native-inputs
1369 `(("perl" ,perl)))
1370 (inputs
1371 `(("bdb" ,bdb)
1372 ("cyrus-sasl" ,cyrus-sasl)
1373 ("openssl" ,openssl)
1374 ("zlib" ,zlib)))
1375 (home-page "http://isync.sourceforge.net/")
1376 (synopsis "Mailbox synchronization program")
1377 (description
1378 "isync/mbsync is a command-line tool for two-way synchronization of
1379mailboxes. Currently Maildir and IMAP are supported types.")
1380 (license gpl2+)))
1381
1382(define-public perl-email-abstract
1383 (package
1384 (name "perl-email-abstract")
1385 (version "3.008")
1386 (source
1387 (origin
1388 (method url-fetch)
1389 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1390 "Email-Abstract-" version ".tar.gz"))
1391 (sha256
1392 (base32
1393 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
1394 (build-system perl-build-system)
1395 (propagated-inputs
1396 `(("perl-email-simple" ,perl-email-simple)
1397 ("perl-module-pluggable" ,perl-module-pluggable)
1398 ("perl-mro-compat" ,perl-mro-compat)))
1399 (home-page "http://search.cpan.org/dist/Email-Abstract")
1400 (synopsis "Interface to mail representations")
1401 (description "Email::Abstract provides module writers with the ability to
1402write simple, representation-independent mail handling code.")
1403 (license perl-license)))
1404
1405(define-public perl-email-address
1406 (package
1407 (name "perl-email-address")
1408 (version "1.909")
1409 (source
1410 (origin
1411 (method url-fetch)
1412 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1413 "Email-Address-" version ".tar.gz"))
1414 (sha256
1415 (base32
1416 "0l7x6sl06j9ffgfz5f9vgms2b5axd4cgp5fj03ivb3kia4km6b3g"))))
1417 (build-system perl-build-system)
1418 (home-page "http://search.cpan.org/dist/Email-Address")
1419 (synopsis "Email address parsing and creation")
1420 (description "Email::Address implements a regex-based RFC 2822 parser that
1421locates email addresses in strings and returns a list of Email::Address
1422objects found. Alternatively you may construct objects manually.")
1423 (license perl-license)))
1424
1425(define-public perl-email-date-format
1426 (package
1427 (name "perl-email-date-format")
1428 (version "1.005")
1429 (source
1430 (origin
1431 (method url-fetch)
1432 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1433 "Email-Date-Format-" version ".tar.gz"))
1434 (sha256
1435 (base32
1436 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
1437 (build-system perl-build-system)
1438 (home-page "http://search.cpan.org/dist/Email-Date-Format")
1439 (synopsis "Produce RFC 2822 date strings")
1440 (description "Email::Date::Format provides a means for generating an RFC
14412822 compliant datetime string.")
1442 (license perl-license)))
1443
1444(define-public perl-email-messageid
1445 (package
1446 (name "perl-email-messageid")
1447 (version "1.406")
1448 (source
1449 (origin
1450 (method url-fetch)
1451 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1452 "Email-MessageID-" version ".tar.gz"))
1453 (sha256
1454 (base32
1455 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
1456 (build-system perl-build-system)
1457 (home-page "http://search.cpan.org/dist/Email-MessageID")
1458 (synopsis "Generate world unique message-ids")
1459 (description "Email::MessageID generates recommended message-ids to
1460identify a message uniquely.")
1461 (license perl-license)))
1462
1463(define-public perl-email-mime
1464 (package
1465 (name "perl-email-mime")
1466 (version "1.946")
1467 (source
1468 (origin
1469 (method url-fetch)
1470 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1471 "Email-MIME-" version ".tar.gz"))
1472 (sha256
1473 (base32
1474 "0z1k3i0lzp2k421gc8f3wq0jbqflkbw2xqd2k7n7pmv56417kvk8"))))
1475 (build-system perl-build-system)
1476 (propagated-inputs
1477 `(("perl-email-address" ,perl-email-address)
1478 ("perl-email-messageid" ,perl-email-messageid)
1479 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1480 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1481 ("perl-email-simple" ,perl-email-simple)
1482 ("perl-mime-types" ,perl-mime-types)
1483 ("perl-module-runtime" ,perl-module-runtime)))
1484 (home-page "http://search.cpan.org/dist/Email-MIME")
1485 (synopsis "MIME message handling")
1486 (description "Email::MIME is an extension of the Email::Simple module, to
1487handle MIME encoded messages. It takes a message as a string, splits it up
1488into its constituent parts, and allows you access to various parts of the
1489message. Headers are decoded from MIME encoding.")
1490 (license perl-license)))
1491
1492(define-public perl-email-mime-contenttype
1493 (package
1494 (name "perl-email-mime-contenttype")
1495 (version "1.022")
1496 (source
1497 (origin
1498 (method url-fetch)
1499 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1500 "Email-MIME-ContentType-" version ".tar.gz"))
1501 (sha256
1502 (base32
1503 "042kxhs3bp1ab9z0mbr1wy21ld4lxd6v2a2mmrashqnsn2075fws"))))
1504 (build-system perl-build-system)
1505 (native-inputs
1506 `(("perl-capture-tiny" ,perl-capture-tiny)))
1507 (home-page "http://search.cpan.org/dist/Email-MIME-ContentType")
1508 (synopsis "Parse MIME Content-Type headers")
1509 (description "Email::MIME::ContentType parses a MIME Content-Type
1510header.")
1511 (license perl-license)))
1512
1513(define-public perl-email-mime-encodings
1514 (package
1515 (name "perl-email-mime-encodings")
1516 (version "1.315")
1517 (source
1518 (origin
1519 (method url-fetch)
1520 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1521 "Email-MIME-Encodings-" version ".tar.gz"))
1522 (sha256
1523 (base32
1524 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1525 (build-system perl-build-system)
1526 (native-inputs
1527 `(("perl-capture-tiny" ,perl-capture-tiny)))
1528 (home-page "http://search.cpan.org/dist/Email-MIME-Encodings")
1529 (synopsis "Unified interface to MIME encoding and decoding")
1530 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
1531 (license perl-license)))
1532
1533(define-public perl-email-sender
1534 (package
1535 (name "perl-email-sender")
1536 (version "1.300031")
1537 (source
1538 (origin
1539 (method url-fetch)
1540 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1541 "Email-Sender-" version ".tar.gz"))
1542 (sha256
1543 (base32
1544 "052g0slw3h2lzn93j71fi47nfawww2aph4jhr3c860ji70lkf4n4"))))
1545 (build-system perl-build-system)
1546 (native-inputs
1547 `(("perl-capture-tiny" ,perl-capture-tiny)))
1548 (propagated-inputs
1549 `(("perl-email-abstract" ,perl-email-abstract)
1550 ("perl-email-address" ,perl-email-address)
1551 ("perl-email-simple" ,perl-email-simple)
1552 ("perl-list-moreutils" ,perl-list-moreutils)
1553 ("perl-module-runtime" ,perl-module-runtime)
1554 ("perl-moo" ,perl-moo)
1555 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1556 ("perl-sub-exporter" ,perl-sub-exporter)
1557 ("perl-throwable" ,perl-throwable)
1558 ("perl-try-tiny" ,perl-try-tiny)))
1559 (home-page "http://search.cpan.org/dist/Email-Sender")
1560 (synopsis "Perl library for sending email")
1561 (description "Email::Sender replaces the old and sometimes problematic
1562Email::Send library.")
1563 (license perl-license)))
1564
1565(define-public perl-email-simple
1566 (package
1567 (name "perl-email-simple")
1568 (version "2.214")
1569 (source
1570 (origin
1571 (method url-fetch)
1572 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1573 "Email-Simple-" version ".tar.gz"))
1574 (sha256
1575 (base32
1576 "14kb86hi0m0bqc7kxpm4x5kvfsyj2x86gggbvpxhx9hy8hvjpw5j"))))
1577 (build-system perl-build-system)
1578 (propagated-inputs
1579 `(("perl-email-date-format" ,perl-email-date-format)))
1580 (home-page "http://search.cpan.org/dist/Email-Simple")
1581 (synopsis "Parsing of RFC 2822 messages")
1582 (description "Email::Simple provides simple parsing of RFC 2822 message
1583format and headers.")
1584 (license perl-license)))
1585
1586(define-public libesmtp
1587 (package
1588 (name "libesmtp")
1589 (version "1.0.6")
1590 (source
1591 (origin
1592 (method url-fetch)
1593 (uri (list (string-append "https://pkgs.fedoraproject.org/repo/pkgs/"
1594 "libesmtp/libesmtp-" version ".tar.bz2/"
1595 "bf3915e627fd8f35524a8fdfeed979c8/libesmtp-"
1596 version ".tar.bz2")
1597 ;; XXX This site is offline, so we fetch Fedora's cached copy
1598 ;; of the source tarball.
1599 (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1600 version ".tar.bz2")))
1601 (sha256
1602 (base32
1603 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1604 (build-system gnu-build-system)
1605 (propagated-inputs
1606 `(("openssl" ,openssl)))
1607 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1608 (synopsis "Library for sending mail via remote hosts using SMTP")
1609 (description "libESMTP is an SMTP client which manages posting (or
1610submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1611It may be used as part of a Mail User Agent (MUA) or other program that must
1612be able to post electronic mail where mail functionality may not be that
1613program's primary purpose.")
1614 (license (list lgpl2.1+ gpl2+))))
1615
1616(define-public esmtp
1617 (package
1618 (name "esmtp")
1619 (version "1.2")
1620 (source
1621 (origin
1622 (method git-fetch)
1623 (uri (git-reference
1624 (url "https://github.com/andywingo/esmtp.git")
1625 (commit "01bf9fc")))
1626 (sha256
1627 (base32
1628 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1629 (file-name (string-append name "-" version "-checkout"))))
1630 (arguments
1631 `(#:phases (modify-phases %standard-phases
1632 (replace 'bootstrap
1633 (lambda _ (invoke "autoreconf" "-vfi"))))))
1634 (build-system gnu-build-system)
1635 (native-inputs
1636 `(("bison" ,bison)
1637 ("flex" ,flex)
1638 ("autoconf" ,autoconf)
1639 ("automake" ,automake)
1640 ("libtool" ,libtool)))
1641 (inputs
1642 `(("libesmtp" ,libesmtp)))
1643 (home-page "https://sourceforge.net/projects/esmtp/")
1644 (synopsis "Relay-only mail transfer agent (MTA)")
1645 (description "Esmtp is a simple relay-only mail transfer agent built using
1646libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1647user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1648page for more on configuration. This package also provides minimal
1649compatibility shims for the @command{sendmail}, @command{mailq}, and
1650@command{newaliases} commands.")
1651 (license gpl2+)))
1652
1653(define-public fdm
1654 (package
1655 (name "fdm")
1656 (version "1.9")
1657 (source (origin
1658 (method url-fetch)
1659 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1660 version "/fdm-"
1661 version ".tar.gz"))
1662 (file-name (string-append name "-" version ".tar.gz"))
1663 (sha256
1664 (base32 "054rscijahiza5f9qha79rg3siji3bk5mk10f8c2vqx7m4w6qh8n"))))
1665 (build-system gnu-build-system)
1666 (inputs
1667 `(("tdb" ,tdb)
1668 ("openssl" ,openssl)
1669 ("zlib" ,zlib)))
1670 (home-page "https://github.com/nicm/fdm")
1671 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1672 (description "fdm is a program designed to fetch mail from POP3
1673or IMAP servers, or receive local mail from stdin, and
1674deliver it in various ways.")
1675 (license
1676 ;; Why point to a source file? Well, all the individual files have a
1677 ;; copy of this license in their headers, but there's no seprate file
1678 ;; with that information.
1679 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
1680
1681
1682(define-public procmail
1683 (package
1684 (name "procmail")
1685 (version "3.22")
1686 (source
1687 (origin
1688 (method url-fetch)
1689 (uri (string-append
1690 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1691 version
1692 ".tar.gz"))
1693 (sha256
1694 (base32
1695 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1696 ;; The following patch fixes an ambiguous definition of
1697 ;; getline() in formail.c. The patch is provided by Debian as
1698 ;; patch 24.
1699 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
1700 "procmail-CVE-2014-3618.patch"
1701 "procmail-CVE-2017-16844.patch"))))
1702 (arguments
1703 `(#:phases (modify-phases %standard-phases
1704 (replace 'configure
1705 (lambda _
1706 (substitute* "Makefile"
1707 (("/bin/sh")
1708 (which "sh"))
1709 (("/usr")
1710 (assoc-ref %outputs "out"))
1711 (("/bin/rm")
1712 (which "rm")))
1713 #t)))
1714 #:tests? #f)) ;; There are no tests indicating a successful
1715 ;; build. Some tests of basic locking mechanisms provided by the
1716 ;; file system are performed during 'make install'. However, these
1717 ;; are performed before the actual build process.
1718 (build-system gnu-build-system)
1719 (inputs `(("exim" ,exim)))
1720 (home-page "http://www.procmail.org/")
1721 (synopsis "Versatile mail delivery agent (MDA)")
1722 (description "Procmail is a mail delivery agent (MDA) featuring support
1723for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1724can be sorted into separate files/directories and arbitrary commands can be
1725executed on mail arrival. Procmail is considered stable, but is no longer
1726maintained.")
1727 (license gpl2+))) ;; procmail allows to choose the
1728 ;; nonfree Artistic License 1.0
1729 ;; as alternative to the GPL2+.
1730 ;; This option is not listed here.
1731
1732(define-public khard
1733 (package
1734 (name "khard")
1735 (version "0.11.4")
1736 (source (origin
1737 (method url-fetch)
1738 (uri (pypi-uri name version))
1739 (sha256
1740 (base32
1741 "1shhlq6ljbd8095hd82v4mw56rjcfxf1ymmgknbgh8gix02nsxw1"))))
1742 (build-system python-build-system)
1743 (arguments
1744 `(#:phases
1745 (modify-phases %standard-phases
1746 (add-after 'install 'install-doc
1747 (lambda* (#:key outputs #:allow-other-keys)
1748 (let* ((out (assoc-ref outputs "out"))
1749 (doc (string-append out "/share/doc/khard")))
1750 (copy-recursively "misc/khard" doc)
1751 #t))))
1752 ;; FIXME: check phase fails with
1753 ;; "Config file /tmp/.config/khard/khard.conf not available"
1754 #:tests? #f))
1755 (propagated-inputs
1756 `(("python-vobject" ,python-vobject)
1757 ("python-pyyaml" ,python-pyyaml)
1758 ("python-atomicwrites" ,python-atomicwrites)
1759 ("python-configobj" ,python-configobj)))
1760 (synopsis "Console address book using CardDAV")
1761 (description "Khard is an address book for the console. It creates, reads,
1762modifies and removes CardDAV address book entries at your local machine. For
1763synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1764Khard can also be used from within the email client @command{mutt}.")
1765 (home-page "https://github.com/scheibler/khard")
1766 (license gpl3+)))
1767
1768(define-public perl-mail-spf
1769 (package
1770 (name "perl-mail-spf")
1771 (version "v2.9.0")
1772 (source
1773 (origin
1774 (method url-fetch)
1775 (uri (string-append
1776 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-"
1777 version
1778 ".tar.gz"))
1779 (sha256
1780 (base32
1781 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1782 (build-system perl-build-system)
1783 (native-inputs
1784 `(("perl-module-build" ,perl-module-build)
1785 ("perl-net-dns-resolver-programmable"
1786 ,perl-net-dns-resolver-programmable)))
1787 (arguments
1788 `(#:phases (modify-phases %standard-phases
1789 (add-before 'configure 'modify-Build.PL
1790 (lambda* (#:key outputs #:allow-other-keys)
1791 (substitute* "Build.PL"
1792 (("'/usr/sbin'") (string-append "'"
1793 (assoc-ref outputs "out")
1794 "/sbin'")))
1795 #t)))))
1796 (inputs
1797 `(("perl-error" ,perl-error)
1798 ("perl-net-dns" ,perl-net-dns)
1799 ("perl-netaddr-ip" ,perl-netaddr-ip)
1800 ("perl-uri" ,perl-uri)))
1801 (home-page
1802 "http://search.cpan.org/dist/Mail-SPF")
1803 (synopsis
1804 "Perl implementation of Sender Policy Framework")
1805 (description "Mail::SPF is the Sender Policy Framework implemented
1806in Perl.")
1807 (license bsd-3)))
1808
1809(define-public mb2md
1810 (package
1811 (name "mb2md")
1812 (version "3.20")
1813 (source (origin
1814 (method url-fetch)
1815 (uri (string-append
1816 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
1817 version ".pl.gz"))
1818 (sha256
1819 (base32
1820 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
1821 (build-system trivial-build-system)
1822 (arguments
1823 '(#:modules ((guix build utils))
1824 #:builder
1825 (begin
1826 (use-modules (guix build utils))
1827 (let* ((source (assoc-ref %build-inputs "source"))
1828 (out (assoc-ref %outputs "out"))
1829 (bin (string-append out "/bin"))
1830 (perl (assoc-ref %build-inputs "perl"))
1831 (gzip (assoc-ref %build-inputs "gzip"))
1832 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
1833 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
1834 (mkdir-p bin)
1835 (with-directory-excursion bin
1836 (copy-file source "mb2md.gz")
1837 (invoke (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
1838 (substitute* "mb2md"
1839 (("#!/usr/bin/perl")
1840 (string-append "#!/usr/bin/perl -I " perl5lib)))
1841 (patch-shebang "mb2md" (list (string-append perl "/bin")))
1842 (chmod "mb2md" #o555))
1843 #t))))
1844 (native-inputs `(("gzip" ,gzip)))
1845 (inputs `(("perl" ,perl)
1846 ("perl-timedate" ,perl-timedate)))
1847 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
1848 (synopsis "Mbox to maildir converter")
1849 (description
1850 "Mb2md is a Perl script that takes one or more mbox format files and
1851converts them to maildir format directories.")
1852 (license public-domain)))
1853
1854(define-public mpop
1855 (package
1856 (name "mpop")
1857 (version "1.2.6")
1858 (source
1859 (origin
1860 (method url-fetch)
1861 (uri (string-append "mirror://sourceforge/mpop/mpop/" version
1862 "/mpop-" version ".tar.xz"))
1863 (sha256
1864 (base32
1865 "0p1ix63jh64dibrlccch8q7gxl9nn18wd2qpyr5z1h4gs2fpmv4z"))))
1866 (build-system gnu-build-system)
1867 (inputs
1868 `(("gnutls" ,gnutls)
1869 ("libidn" ,libidn)))
1870 (native-inputs
1871 `(("pkg-config" ,pkg-config)))
1872 (arguments
1873 `(#:configure-flags (list "--with-tls=gnutls")))
1874 (home-page "http://mpop.sourceforge.net/")
1875 (synopsis "POP3 mail client")
1876 (description "mpop is a small and fast POP3 client suitable as a
1877fetchmail replacement.
1878
1879mpop supports multiple accounts, header based mail filtering, delivery
1880to mbox files, maildir folders or a Mail Delivery Agent (MDA),
1881TLS/SSL, several authentication methods, Internationalized Domain
1882Names (IDN) and SOCKS proxies.")
1883 (license gpl3+)))
1884
1885(define-public mhonarc
1886 (package
1887 (name "mhonarc")
1888 (version "2.6.19")
1889 (source
1890 (origin
1891 (method url-fetch)
1892 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
1893 version ".tar.gz"))
1894 (sha256
1895 (base32
1896 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
1897 (build-system perl-build-system)
1898 (home-page "https://www.mhonarc.org/")
1899 (synopsis "Create HTML archives of mail/news messages")
1900 (description
1901 "MHonArc is a Perl mail-to-HTML converter. MHonArc
1902provides HTML mail archiving with index, mail thread linking,
1903etc; plus other capabilities including support for MIME and
1904powerful user customization features.")
1905 (license gpl2+)))
1906
1907
1908(define-public sendmail
1909 (package
1910 (name "sendmail")
1911 (version "8.15.2")
1912 (source
1913 (origin
1914 (method url-fetch)
1915 (uri (string-append
1916 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
1917 version ".tar.gz"))
1918 (sha256
1919 (base32
1920 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
1921 (build-system gnu-build-system)
1922 (arguments
1923 `(#:phases
1924 (modify-phases %standard-phases
1925 (add-before 'build 'replace-/bin/sh
1926 (lambda _
1927 (substitute*
1928 (append
1929 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
1930 "contrib/mmuegel" "devtools/bin/configure.sh")
1931 (find-files "." ".*\\.m4")
1932 (find-files "." ".*\\.cf"))
1933 (("/bin/sh") (which "sh")))
1934
1935 (substitute* "devtools/bin/Build"
1936 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
1937 #t))
1938 (replace 'configure
1939 (lambda _
1940
1941 ;; Render harmless any attempts to chown or chgrp
1942 (substitute* "devtools/bin/install.sh"
1943 (("owner=\\$2") "owner=''")
1944 (("group=\\$2") "group=''"))
1945
1946 (with-output-to-file "devtools/Site/site.config.m4"
1947 (lambda ()
1948 (format #t "
1949define(`confCC', `gcc')
1950define(`confOPTIMIZE', `-g -O2')
1951define(`confLIBS', `-lresolv')
1952define(`confINSTALL', `~a/devtools/bin/install.sh')
1953define(`confDEPEND_TYPE', `CC-M')
1954define(`confINST_DEP', `')
1955" (getcwd))))))
1956 (replace 'build
1957 (lambda _
1958 (and (zero? (system* "sh" "Build"))
1959 (with-directory-excursion "cf/cf"
1960 (begin
1961 (copy-file "generic-linux.mc" "sendmail.mc")
1962 (zero? (system* "sh" "Build" "sendmail.cf")))))))
1963 (add-before 'install 'pre-install
1964 (lambda _
1965 (let ((out (assoc-ref %outputs "out")))
1966 (mkdir-p (string-append out "/usr/bin"))
1967 (mkdir-p (string-append out "/usr/sbin"))
1968 (mkdir-p (string-append out "/etc/mail"))
1969 (setenv "DESTDIR" out)
1970 (with-directory-excursion "cf/cf"
1971 (zero? (system* "sh" "Build" "install-cf")))))))
1972 ;; There is no make check. There are some post installation tests, but those
1973 ;; require root privileges
1974 #:tests? #f))
1975 (inputs
1976 `(("m4" ,m4)
1977 ("perl" ,perl)))
1978 (home-page "http://sendmail.org")
1979 (synopsis
1980 "Highly configurable Mail Transfer Agent (MTA)")
1981 (description
1982 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
1983Allman. It is highly configurable and supports many delivery methods and many
1984transfer protocols.")
1985 (license (non-copyleft "file://LICENSE"
1986 "See LICENSE in the distribution."))))
1987
1988(define-public opensmtpd
1989 (package
1990 (name "opensmtpd")
1991 (version "6.0.3p1")
1992 (source (origin
1993 (method url-fetch)
1994 (uri (string-append "https://www.opensmtpd.org/archives/"
1995 name "-" version ".tar.gz"))
1996 (sha256
1997 (base32
1998 "10bsfsnlg9d9i6l2izdnxp05s3ri8fvwzqxvx1jmarc852382619"))
1999 ;; Fixed upstream: <github.com/OpenSMTPD/OpenSMTPD/pull/835>.
2000 (patches (search-patches "opensmtpd-fix-crash.patch"))))
2001 (build-system gnu-build-system)
2002 (inputs
2003 `(("bdb" ,bdb)
2004 ("libressl" ,libressl)
2005 ("libevent" ,libevent)
2006 ("libasr" ,libasr)
2007 ("linux-pam" ,linux-pam)
2008 ("zlib" ,zlib)))
2009 (native-inputs
2010 `(("bison" ,bison)
2011 ("groff" ,groff)))
2012 (arguments
2013 `(#:configure-flags
2014 (list "--with-table-db" "--with-auth-pam" "--localstatedir=/var"
2015 "--with-user-smtpd=smtpd" "--with-user-queue=smtpq"
2016 "--with-group-queue=smtpq"
2017 "--with-path-socket=/var/run" ; not default (./configure lies)
2018 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt")
2019 #:phases
2020 (modify-phases %standard-phases
2021 ;; Fix some incorrectly hard-coded external tool file names.
2022 (add-after 'unpack 'patch-FHS-file-names
2023 (lambda* (#:key inputs #:allow-other-keys)
2024 (substitute* "smtpd/smtpctl.c"
2025 (("/bin/cat") (which "cat"))
2026 (("/bin/sh") (which "sh")))
2027 #t))
2028 ;; OpenSMTPD provides a single utility smtpctl to control the daemon and
2029 ;; the local submission subsystem. To accomodate systems that require
2030 ;; historical interfaces such as sendmail, newaliases or makemap, the
2031 ;; smtpctl utility can operate in compatibility mode if called with the
2032 ;; historical name.
2033 (add-after 'install 'install-compability-links
2034 (lambda* (#:key outputs #:allow-other-keys)
2035 (let* ((out (assoc-ref outputs "out"))
2036 (sbin (string-append out "/sbin/")))
2037 (for-each (lambda (command)
2038 (symlink "smtpctl" (string-append sbin command)))
2039 '("makemap" "sendmail" "send-mail"
2040 "newaliases" "mailq")))
2041 #t)))))
2042 (synopsis "Lightweight SMTP daemon")
2043 (description
2044 "OpenSMTPD is an implementation of the server-side SMTP protocol, with
2045some additional standard extensions. It allows ordinary machines to exchange
2046e-mails with other systems speaking the SMTP protocol.")
2047 (home-page "https://www.opensmtpd.org")
2048 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
2049 public-domain isc license:openssl))))
2050
2051(define-public opensmtpd-extras
2052 (package
2053 (name "opensmtpd-extras")
2054 (version "5.7.1")
2055 (source (origin
2056 (method url-fetch)
2057 (uri (string-append "https://www.opensmtpd.org/archives/"
2058 name "-" version ".tar.gz"))
2059 (sha256
2060 (base32
2061 "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm"))))
2062 (build-system gnu-build-system)
2063 (inputs
2064 `(("libressl" ,libressl)
2065 ("libevent" ,libevent)
2066 ("libasr" ,libasr)
2067 ("python-2" ,python-2)
2068 ("opensmtpd" ,opensmtpd)
2069 ("perl" ,perl)
2070 ("lua" ,lua)
2071 ("postgresql" ,postgresql)
2072 ("sqlite" ,sqlite)
2073 ("linux-pam" ,linux-pam)))
2074 (native-inputs
2075 `(("bison" ,bison)
2076 ("pkg-config" ,pkg-config)
2077 ("groff" ,groff)
2078 ("automake" ,automake)
2079 ("autoconf" ,autoconf)))
2080 (arguments
2081 `(;; We have to configure it like this because the default checks for for example
2082 ;; python in /usr/local/bin, /usr/bin and fails otherwise.
2083 #:configure-flags (list
2084 "--with-filter-clamav" "--with-filter-dkim-signer"
2085 "--with-filter-dnsbl" "--with-filter-lua"
2086 "--with-filter-monkey" "--with-filter-pause"
2087 "--with-filter-perl" "--with-filter-python"
2088 "--with-filter-regex" "--with-filter-spamassassin"
2089 "--with-filter-stub" "--with-filter-trace"
2090 "--with-filter-void"
2091
2092 "--with-queue-null" "--with-queue-python"
2093 "--with-queue-ram" "--with-queue-stub"
2094
2095 "--with-scheduler-python" "--with-scheduler-ram"
2096 "--with-scheduler-stub"
2097
2098 "--with-table-ldap" ; "--with-table-mysql"
2099 "--with-table-passwd" "--with-table-postgres"
2100 "--with-table-python" "--with-table-socketmap"
2101 "--with-table-sqlite" "--with-table-stub"
2102 ;;"--with-table-redis" ; TODO: package hiredis
2103
2104 "--with-user=smtpd" "--with-privsep-user=smtpd"
2105 "--localstatedir=/var" "--sysconfdir=/etc"
2106 "--with-lua-type=lua" ; can use lua or luajit
2107
2108 (string-append "--with-python="
2109 (assoc-ref %build-inputs "python-2"))
2110 (string-append "--with-lua="
2111 (assoc-ref %build-inputs "lua")))))
2112 (license (list bsd-2 bsd-3 bsd-4
2113 public-domain isc license:openssl))
2114 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
2115 (description
2116 "This package provides extra tables, filters, and various other addons
2117for OpenSMTPD to extend its functionality.")
2118 (home-page "https://www.opensmtpd.org")))
2119
2120(define-public python-mailmanclient
2121 (package
2122 (name "python-mailmanclient")
2123 (version "3.1.1")
2124 (source
2125 (origin
2126 (method url-fetch)
2127 (uri (pypi-uri "mailmanclient" version))
2128 (sha256
2129 (base32
2130 "0fdfs5g3pf30v2i7w18pdkv9xnfxmfcv66mzv56dck0a1igq07m3"))))
2131 (build-system python-build-system)
2132 (arguments
2133 `(#:tests? #f)) ; Requires mailman running
2134 (propagated-inputs
2135 `(("python-six" ,python-six)
2136 ("python-httplib2" ,python-httplib2)))
2137 (home-page "https://launchpad.net/mailman.client")
2138 (synopsis "Python bindings for the Mailman 3 REST API")
2139 (description
2140 "The mailmanclient library provides official Python bindings for
2141the GNU Mailman 3 REST API.")
2142 (license lgpl3+)))
2143
2144(define-public python2-mailmanclient
2145 (package-with-python2 python-mailmanclient))
2146
2147(define-public mlmmj
2148 (package
2149 (name "mlmmj")
2150 (version "1.3.0")
2151 (source
2152 (origin
2153 (method url-fetch)
2154 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
2155 version ".tar.bz2"))
2156 (sha256
2157 (base32
2158 "0hpj10qad821ci11si8xc2qnmkzfn90y13s43fm4fca38f0qjp8w"))))
2159 (build-system gnu-build-system)
2160 (inputs
2161 `(("perl" ,perl))) ; For "contrib/web/"
2162 (native-inputs
2163 `(("pkg-config" ,pkg-config)))
2164 (arguments
2165 `(#:configure-flags
2166 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
2167 ;; It opens the files control/mimedeny and control/mimestrip to get a list
2168 ;; of mimetypes for parts of multipart/mime messages that should be denied
2169 ;; or stripped. The parts then get stripped directly when the mail is
2170 ;; received. mlmmj-receive-strip also appends an extra header
2171 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
2172 ;; mime parts
2173 (list "--enable-receive-strip")
2174 #:phases
2175 (modify-phases %standard-phases
2176 (add-before 'install 'install-contrib
2177 (lambda* (#:key outputs #:allow-other-keys)
2178 (let* ((out (assoc-ref outputs "out"))
2179 (share (string-append out "/share/mlmmj"))
2180 (contrib (string-append share "/contrib/web"))
2181 (texts (string-append share "/listtexts")))
2182 (copy-recursively "contrib/web/" contrib)
2183 (copy-recursively "listtexts" texts)
2184 (rename-file texts (string-append share "/texts"))
2185 #t))))))
2186 (home-page "http://mlmmj.org")
2187 (synopsis "Mailing list managing made joyful")
2188 (description
2189 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
2190It works with many different Mail Transport Agents (MTAs) and is simple for a
2191system administrator to install, configure and integrate with other software.
2192As it uses very few resources, and requires no daemons, it is ideal for
2193installation on systems where resources are limited. Its features include:
2194@enumerate
2195@item Archive, Custom headers / footer,
2196@item Fully automated bounce handling (similar to ezmlm),
2197@item Complete requeueing functionality, Moderation functionality, Subject prefix,
2198@item Subscribers only posting, Regular expression access control,
2199@item Functionality to retrieve old posts, Web interface, Digests,
2200@item No-mail subscription, VERP support,
2201@item Delivery Status Notification (RFC1891) support,
2202@item Rich and customisable texts for automated operations.
2203@end enumerate\n")
2204 (license license:expat)))
2205
2206(define-public python2-django-mailman3
2207 (package
2208 (name "python2-django-mailman3")
2209 (version "1.1.0")
2210 (source
2211 (origin
2212 (method url-fetch)
2213 (uri (pypi-uri "django-mailman3" version))
2214 (sha256
2215 (base32
2216 "1xjdkgfjwhgyrp5nxw65dcpcsr98ygj6856sp0bwkrmyxpd1xxk2"))))
2217 (build-system python-build-system)
2218 (arguments
2219 `(#:phases
2220 (modify-phases %standard-phases
2221 (replace 'check
2222 (lambda _
2223 (zero?
2224 (system*
2225 "django-admin"
2226 "test"
2227 "--settings=django_mailman3.tests.settings_test"
2228 "django_mailman3")))))
2229 #:python ,python-2))
2230 (inputs
2231 `(("python2-django" ,python2-django)))
2232 (propagated-inputs
2233 `(("python2-requests" ,python2-requests)
2234 ("python2-requests-oauthlib" ,python2-requests-oauthlib)
2235 ("python2-openid" ,python2-openid)
2236 ("python2-mailmanclient" ,python2-mailmanclient)
2237 ("python2-django-allauth" ,python2-django-allauth)
2238 ("python2-django-gravatar2" ,python2-django-gravatar2)
2239 ("python2-pytz" ,python2-pytz)))
2240 (home-page "https://gitlab.com/mailman/django-mailman3")
2241 (synopsis "Django library for Mailman UIs")
2242 (description
2243 "Libraries and templates for Django-based interfaces
2244interacting with Mailman.")
2245 (license gpl3+)))
2246
2247(define-public postorius
2248 (package
2249 (name "postorius")
2250 (version "1.0.3")
2251 (source
2252 (origin
2253 (method url-fetch)
2254 (uri (pypi-uri "postorius" version "+post2.tar.gz"))
2255 (file-name (string-append name "-" version ".tar.gz"))
2256 (sha256
2257 (base32
2258 "1wymcpv2icjjy8h1ni52p6dr7wwxf71ivqgbqhzx4i82yqphcaq5"))))
2259 (build-system python-build-system)
2260 (arguments
2261 `(; One test dependency relies on Persona, which was shut down in
2262 ;; November 2016.
2263 #:tests? #f
2264 ;; The part of the frontend of Mailman is still python 2.7.
2265 #:python ,python-2))
2266 (inputs
2267 `(("python2-django" ,python2-django)
2268 ("python2-django-mailman3" ,python2-django-mailman3)
2269 ("python2-mailmanclient" ,python2-mailmanclient)))
2270 (home-page "https://gitlab.com/mailman/postorius")
2271 (synopsis "Web user interface for GNU Mailman")
2272 (description
2273 "Postorius is a Django app which provides a web user interface
2274to access GNU Mailman.")
2275 (license (list gpl3+ lgpl3+))))
2276
2277(define-public blists
2278 (package
2279 (name "blists")
2280 (version "2.0")
2281 (source
2282 (origin
2283 (method url-fetch)
2284 (uri (string-append "http://download.openwall.net/pub/projects/"
2285 "blists/blists-" version ".tar.gz"))
2286 (sha256
2287 (base32
2288 "1xll5wn7py3bbncbwrj172f56nz75c9gwfsa80rwd96ss9gfmp3c"))))
2289 (build-system gnu-build-system)
2290 (arguments
2291 `(#:tests? #f ; No tests
2292 #:phases
2293 (modify-phases %standard-phases
2294 (delete 'configure)
2295 (replace 'install
2296 (lambda* (#:key outputs #:allow-other-keys)
2297 (let* ((out (assoc-ref outputs "out"))
2298 (bin (string-append out "/bin")))
2299 (install-file "bindex" bin)
2300 (install-file "bit" bin)
2301 #t))))))
2302 (home-page "http://www.openwall.com/blists/")
2303 (synopsis "Web interface to mailing list archives")
2304 (description
2305 "Blists is a web interface to mailing list archives that works off
2306indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
2307@code{bindex} generates or updates the index file (incremental updates
2308are supported). @code{bit} is a CGI/SSI program that generates web pages
2309on the fly. Both programs are written in C and are very fast.")
2310 (license license:expat)))
2311
2312(define-public swaks
2313 (package
2314 (name "swaks")
2315 (version "20170101.0")
2316 (source
2317 (origin
2318 (method url-fetch)
2319 (uri (string-append
2320 "https://jetmore.org/john/code/swaks/files/swaks-"
2321 version ".tar.gz"))
2322 (sha256
2323 (base32
2324 "0pli4mlhasnqqxmmxalwyg3x7n2vhcbgsnp2xgddamjavv82vrl4"))))
2325 (build-system perl-build-system)
2326 (inputs
2327 `(("perl-net-dns" ,perl-net-dns)
2328 ("perl-net-ssleay" ,perl-net-ssleay)))
2329 (arguments
2330 `(#:tests? #f ; No tests
2331 #:phases
2332 (modify-phases %standard-phases
2333 (delete 'configure)
2334 (replace 'build
2335 (lambda _
2336 (invoke "pod2man" "doc/ref.pod" "swaks.1")))
2337 (replace 'install
2338 (lambda* (#:key outputs #:allow-other-keys)
2339 (let ((out (assoc-ref outputs "out")))
2340 (install-file "swaks" (string-append out "/bin"))
2341 (install-file "swaks.1" (string-append out "/share/man/man1")))
2342 #t))
2343 (add-after 'install 'wrap-program
2344 (lambda* (#:key outputs #:allow-other-keys)
2345 (wrap-program (string-append (assoc-ref outputs "out")
2346 "/bin/swaks")
2347 `("PERL5LIB" ":" = (,(getenv "PERL5LIB"))))
2348 #t)))))
2349 (home-page "https://jetmore.org/john/code/swaks/")
2350 (synopsis "Featureful SMTP test tool")
2351 (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
2352test tool. It handles SMTP features and extensions such as TLS,
2353authentication, and pipelining; multiple versions of the SMTP protocol
2354including SMTP, ESMTP, and LMTP; and multiple transport methods including
2355unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
2356Options can be specified in environment variables, configuration files, and
2357the command line allowing maximum configurability and ease of use for
2358operators and scripters.")
2359 (license gpl2+)))
2360
2361(define-public alpine
2362 (package
2363 (name "alpine")
2364 (version "2.21.999")
2365 (source
2366 (origin
2367 (method url-fetch)
2368 ;; There are two versions: the plain continuation of Alpine without extra
2369 ;; patches and the version which adds extra fixes. Every distro uses
2370 ;; the patched version, and so do we to not break expectations.
2371 ;; http://alpine.freeiz.com/alpine/readme/README.patches
2372 (uri (string-append "http://repo.or.cz/alpine.git/snapshot/"
2373 "349642a84039a4b026513c32a3b4f8594acd50df.tar.gz"))
2374 (file-name (string-append name "-" version ".tar.gz"))
2375 (sha256
2376 (base32
2377 "1rkvlfk3q7h9jcvaj91pk7l087bq4b38j30060jaw21zz94b90np"))))
2378 (build-system gnu-build-system)
2379 (arguments
2380 `(#:make-flags (list "CC=gcc")
2381 #:configure-flags (list (string-append "--with-ssl-include-dir="
2382 (assoc-ref %build-inputs "openssl")
2383 "/include/openssl")
2384 (string-append "--with-ssl-dir="
2385 (assoc-ref %build-inputs "openssl"))
2386 (string-append "--with-ssl-certs-dir="
2387 "/etc/ssl/certs/")
2388 (string-append "--with-ssl-lib-dir="
2389 (assoc-ref %build-inputs "openssl")
2390 "/lib")
2391 (string-append "--with-interactive-spellcheck="
2392 (assoc-ref %build-inputs "aspell")
2393 "/bin/aspell"))
2394 #:phases
2395 (modify-phases %standard-phases
2396 (add-after 'unpack 'make-reproducible
2397 (lambda _
2398 ;; This removes time-dependent code to make alpine reproducible.
2399 (substitute* "pico/blddate.c"
2400 (("%02d-%s-%d") "1970-01-01"))
2401 (substitute* (list "alpine/Makefile.in"
2402 "web/src/alpined.d/Makefile.in")
2403 (("`date`") "1970-01-01"))
2404 #t)))))
2405 (inputs
2406 `(("ncurses" ,ncurses)
2407 ("openssl" ,openssl)
2408 ("gnutls" ,gnutls)
2409 ("openldap" ,openldap)
2410 ("cyrus-sasl" ,cyrus-sasl)
2411 ("mit-krb5" ,mit-krb5)
2412 ("aspell" ,aspell)
2413 ("tcl" ,tcl)
2414 ("linux-pam" ,linux-pam)))
2415 (home-page "http://repo.or.cz/alpine.git")
2416 (synopsis "Alternatively Licensed Program for Internet News and Email")
2417 (description
2418 "Alpine is a text-based mail and news client. Alpine includes several
2419tools and applications:
2420@enumerate
2421@item alpine, the Alpine mailer
2422@item pico, the standalone text editor, GNU nano's predecessor
2423@item pilot, the standalone file system navigator
2424@end enumerate\n")
2425 (license asl2.0)))
2426
2427(define-public balsa
2428 (package
2429 (name "balsa")
2430 (version "2.5.3")
2431 (source
2432 (origin
2433 (method url-fetch)
2434 (uri (string-append "https://pawsa.fedorapeople.org/balsa/balsa-"
2435 version ".tar.bz2"))
2436 (sha256
2437 (base32
2438 "15jkwp3ylbwd8iha4dr37z1xb6mkk31ym90vv3h2a5xk2rmym5mq"))))
2439 (build-system gnu-build-system)
2440 (arguments
2441 `(#:configure-flags
2442 '(;; Balsa tries to install additional MIME icons
2443 ;; under gtk+ directory.
2444 "--enable-extra-mimeicons=no"
2445 "--with-gtksourceview"
2446 "--with-canberra"
2447 "--with-spell-checker=gtkspell"
2448 "--with-gpgme"
2449 "--with-sqlite"
2450 "--with-compface"
2451 "--with-ldap")))
2452 (inputs
2453 `(("cyrus-sasl" ,cyrus-sasl)
2454 ("enchant" ,enchant)
2455 ("gdk-pixbuf" ,gdk-pixbuf)
2456 ("gmime" ,gmime-2.6)
2457 ("gnutls" ,gnutls)
2458 ("gpgme" ,gpgme)
2459 ("gtk+" ,gtk+)
2460 ("gtksourceview" ,gtksourceview)
2461 ("gtkspell3" ,gtkspell3)
2462 ("libcanberra" ,libcanberra)
2463 ("libesmtp" ,libesmtp)
2464 ("libnotify" ,libnotify)
2465 ("openldap" ,openldap)
2466 ("sqlite" ,sqlite)
2467 ("webkitgtk" ,webkitgtk)))
2468 (native-inputs
2469 `(("compface" ,compface)
2470 ("glib" ,glib "bin")
2471 ("intltool" ,intltool)
2472 ("pkg-config" ,pkg-config)
2473 ("yelp-tools" ,yelp-tools)))
2474 (home-page "https://pawsa.fedorapeople.org/balsa")
2475 (synopsis "E-mail client for GNOME")
2476 (description "Balsa is a highly configurable and robust mail client for
2477the GNOME desktop. It supports both POP3 and IMAP servers as well as the
2478mbox, maildir and mh local mailbox formats. Balsa also supports SMTP and/or
2479the use of a local MTA such as Sendmail.")
2480 (license gpl3+)))
2481
2482(define-public afew
2483 (package
2484 (name "afew")
2485 (version "1.2.0")
2486 (source
2487 (origin
2488 (method url-fetch)
2489 (uri (pypi-uri "afew" version))
2490 (sha256
2491 (base32
2492 "121w7bd53xyibllxxbfykjj76n81kn1vgjqd22izyh67y8qyyk5r"))))
2493 (build-system python-build-system)
2494 (inputs
2495 `(("python-chardet" ,python-chardet)
2496 ("python-notmuch" ,python-notmuch)))
2497 (native-inputs
2498 `(("python-setuptools-scm" ,python-setuptools-scm)))
2499 (home-page "https://github.com/afewmail/afew")
2500 (synopsis "Initial tagging script for notmuch mail")
2501 (description "afew is an initial tagging script for notmuch mail. It
2502provides automatic tagging each time new mail is registered with notmuch. It
2503can add tags based on email headers or Maildir folders and can handle spam and
2504killed threads.")
2505 (license isc)))
2506
2507(define-public pan
2508 (package
2509 (name "pan")
2510 (version "0.145")
2511 (source
2512 (origin
2513 (method url-fetch)
2514 (uri (string-append "http://pan.rebelbase.com/download/releases/"
2515 version "/source/" name "-" version ".tar.bz2"))
2516 (sha256
2517 (base32
2518 "1b4wamv33hprghcjk903bpvnd233yxyrm18qnh13alc8h1553nk8"))))
2519 (arguments
2520 `(#:configure-flags '("--with-gtk3" "--with-gtkspell" "--with-gnutls"
2521 "--enable-libnotify" "--enable-manual"
2522 "--enable-gkr")
2523 #:phases
2524 (modify-phases %standard-phases
2525 (add-before 'configure 'patch-gpg2
2526 (lambda* (#:key inputs #:allow-other-keys)
2527 (substitute* "pan/usenet-utils/gpg.cc"
2528 (("\"gpg2\"") (string-append "\""
2529 (assoc-ref inputs "gnupg")
2530 "/bin/gpg\"")))
2531 #t)))))
2532 (inputs
2533 `(("gmime" ,gmime-2.6)
2534 ("gnupg" ,gnupg)
2535 ("gnutls" ,gnutls)
2536 ("gtk+" ,gtk+)
2537 ("gtkspell3" ,gtkspell3)
2538 ("libnotify" ,libnotify)
2539 ("libsecret" ,libsecret)
2540 ("libxml2" ,libxml2)
2541 ("zlib" ,zlib)))
2542 (native-inputs
2543 `(("gettext-minimal" ,gettext-minimal)
2544 ("itstool" ,itstool)
2545 ("pkg-config" ,pkg-config)))
2546 (build-system gnu-build-system)
2547 (home-page "http://pan.rebelbase.com/")
2548 (synopsis "Pan newsreader")
2549 (description "@code{pan} is a Usenet newsreader that's good at both text
2550and binaries. It supports offline reading, scoring and killfiles, yEnc, NZB,
2551PGP handling, multiple servers, and secure connections.")
2552 ;; License of the docs: fdl-1.1; Others: gpl2.
2553 (license (list fdl1.1+ gpl2))))