gnu: docker-cli: Don't install the same executable twice.
[jackhill/guix/guix.git] / gnu / packages / mail.scm
CommitLineData
a661e420 1;;; GNU Guix --- Functional package management for GNU
3f3c0ab4 2;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
ee2b2d2f 3;;; Copyright © 2014, 2015, 2017 Mark H Weaver <mhw@netris.org>
29a7c98a 4;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
98e9e22f 5;;; Copyright © 2014 Sou Bunnbu <iyzsong@gmail.com>
f58f767b 6;;; Copyright © 2014 Julien Lepiller <julien@lepiller.eu>
66cc3ab2 7;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
17dd4329 8;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
829785c1 9;;; Copyright © 2015, 2016, 2018 Eric Bavier <bavier@member.fsf.org>
2e88d113 10;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
73c0e477 11;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
34dd26af 12;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
8a75c589 13;;; Copyright © 2016 Al McElrath <hello@yrns.org>
823e2ed4 14;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
e90819c4 15;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
99404fff 16;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
3f81ca32 17;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
4a78fd46 18;;; Copyright © 2016, 2017, 2018 Nils Gillmann <ng0@n0.is>
24262239 19;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
d72f59a4 20;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
5d87088c 21;;; Copyright © 2016 John Darrington <jmd@gnu.org>
8e020519 22;;; Copyright © 2016, 2018 Marius Bakke <mbakke@fastmail.com>
3e9750c3 23;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
6800c797 24;;; Copyright © 2017 Kyle Meyer <kyle@kyleam.com>
864f3f1d 25;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
e9201659 26;;; Copyright © 2017, 2018 Rene Saavedra <pacoon@protonmail.com>
e5fdc334 27;;; Copyright © 2018 Pierre Langlois <pierre.langlois@gmx.com>
c115a1c8 28;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
c315d370 29;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
a661e420
LC
30;;;
31;;; This file is part of GNU Guix.
32;;;
33;;; GNU Guix is free software; you can redistribute it and/or modify it
34;;; under the terms of the GNU General Public License as published by
35;;; the Free Software Foundation; either version 3 of the License, or (at
36;;; your option) any later version.
37;;;
38;;; GNU Guix is distributed in the hope that it will be useful, but
39;;; WITHOUT ANY WARRANTY; without even the implied warranty of
40;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41;;; GNU General Public License for more details.
42;;;
43;;; You should have received a copy of the GNU General Public License
44;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
45
1fdd3ee2 46(define-module (gnu packages mail)
59a43334 47 #:use-module (gnu packages)
b0eb2af2 48 #:use-module (gnu packages aspell)
d983a14f 49 #:use-module (gnu packages autotools)
e8435c4d 50 #:use-module (gnu packages backup)
938078a3 51 #:use-module (gnu packages base)
ee886454 52 #:use-module (gnu packages bash)
f8ae32a2 53 #:use-module (gnu packages bison)
fc9a93cb 54 #:use-module (gnu packages calendar)
ac257f12 55 #:use-module (gnu packages check)
938078a3 56 #:use-module (gnu packages compression)
944a5cdd 57 #:use-module (gnu packages crypto)
f58f767b 58 #:use-module (gnu packages curl)
4fd6bf53 59 #:use-module (gnu packages cyrus-sasl)
81ce19f4 60 #:use-module (gnu packages databases)
d983a14f 61 #:use-module (gnu packages dejagnu)
8a3741e6 62 #:use-module (gnu packages django)
8b53366c 63 #:use-module (gnu packages dns)
938078a3 64 #:use-module (gnu packages docbook)
7a6213cb 65 #:use-module (gnu packages documentation)
d2938d59 66 #:use-module (gnu packages emacs)
e8435c4d 67 #:use-module (gnu packages enchant)
938078a3 68 #:use-module (gnu packages gdb)
aa20b004 69 #:use-module (gnu packages gettext)
938078a3 70 #:use-module (gnu packages ghostscript)
d2938d59 71 #:use-module (gnu packages glib)
e8435c4d 72 #:use-module (gnu packages gnome)
524e1df6 73 #:use-module (gnu packages gnupg)
152ffe7c 74 #:use-module (gnu packages groff)
d6e941bc 75 #:use-module (gnu packages gsasl)
e8435c4d 76 #:use-module (gnu packages gtk)
1ffa7090 77 #:use-module (gnu packages guile)
f8ae32a2 78 #:use-module (gnu packages flex)
b0eb2af2 79 #:use-module (gnu packages kerberos)
e8435c4d 80 #:use-module (gnu packages libcanberra)
8b53366c 81 #:use-module (gnu packages libevent)
d6e941bc 82 #:use-module (gnu packages libidn)
d983a14f 83 #:use-module (gnu packages linux)
152ffe7c 84 #:use-module (gnu packages lua)
d983a14f 85 #:use-module (gnu packages m4)
938078a3 86 #:use-module (gnu packages man)
1ffa7090 87 #:use-module (gnu packages ncurses)
938078a3 88 #:use-module (gnu packages networking)
b0eb2af2 89 #:use-module (gnu packages openldap)
c315d370 90 #:use-module (gnu packages onc-rpc)
66cc3ab2 91 #:use-module (gnu packages pcre)
13f04f48 92 #:use-module (gnu packages perl)
938078a3 93 #:use-module (gnu packages pkg-config)
3919a31a 94 #:use-module (gnu packages python)
1b2f753d 95 #:use-module (gnu packages python-web)
1ffa7090 96 #:use-module (gnu packages readline)
938078a3 97 #:use-module (gnu packages ruby)
d2938d59 98 #:use-module (gnu packages search)
224b1c83 99 #:use-module (gnu packages serialization)
1bd3f849 100 #:use-module (gnu packages samba)
6cf27c89 101 #:use-module (gnu packages screen)
b0eb2af2 102 #:use-module (gnu packages tcl)
938078a3 103 #:use-module (gnu packages texinfo)
33dc54b0 104 #:use-module (gnu packages time)
a7fd7b68 105 #:use-module (gnu packages tls)
938078a3 106 #:use-module (gnu packages w3m)
be0c5733 107 #:use-module (gnu packages web)
7c16151a 108 #:use-module (gnu packages webkit)
e8435c4d 109 #:use-module (gnu packages xorg)
938078a3 110 #:use-module (gnu packages xml)
d983a14f 111 #:use-module ((guix licenses)
74c903ed
RW
112 #:select (fdl1.1+
113 agpl3+
114 gpl2 gpl2+ gpl3 gpl3+ lgpl2.1 lgpl2.1+ lgpl3+
24262239 115 non-copyleft (expat . license:expat) bsd-3
8b53366c 116 public-domain bsd-4 isc (openssl . license:openssl)
2f3108ad 117 bsd-2 x11-style agpl3 asl2.0 perl-license))
a661e420
LC
118 #:use-module (guix packages)
119 #:use-module (guix download)
f8ae32a2 120 #:use-module (guix git-download)
29a7c98a 121 #:use-module (guix utils)
681a6588 122 #:use-module (guix build-system gnu)
e3a47031 123 #:use-module (guix build-system guile)
ebda902f 124 #:use-module (guix build-system perl)
24262239
CL
125 #:use-module (guix build-system python)
126 #:use-module (guix build-system trivial))
a661e420
LC
127
128(define-public mailutils
129 (package
130 (name "mailutils")
20a3df0f 131 (version "3.5")
a661e420
LC
132 (source (origin
133 (method url-fetch)
134 (uri (string-append "mirror://gnu/mailutils/mailutils-"
20a3df0f 135 version ".tar.xz"))
a661e420
LC
136 (sha256
137 (base32
20a3df0f 138 "1wx275w38fwni2abc8g7g3irbk332vr34byxd72zqfdiznsqgims"))))
a661e420
LC
139 (build-system gnu-build-system)
140 (arguments
de75f0b1
EF
141 '(#:phases
142 (modify-phases %standard-phases
baa6790b 143 (add-before 'check 'prepare-test-suite
de75f0b1
EF
144 (lambda _
145 ;; Use the right file name for `cat'.
146 (substitute* "testsuite/lib/mailutils.exp"
147 (("/bin/cat")
148 (which "cat")))
14253017 149
de75f0b1
EF
150 ;; Tests try to invoke 'maidag' such that it looks up the
151 ;; 'root' user, which does not exist in the build
152 ;; environment.
153 (substitute* "maidag/tests/testsuite"
154 (("root <") "nobody <")
155 (("spool/root") "spool/nobody")
156 (("root@localhost") "nobody@localhost"))
14253017 157
de75f0b1
EF
158 ;; The 'pipeact.at' tests generate a shell script; make
159 ;; sure it uses the right shell.
160 (substitute* '("sieve/tests/testsuite"
161 "mh/tests/testsuite")
162 (("#! /bin/sh")
163 (string-append "#!" (which "sh"))))
14253017 164
de75f0b1
EF
165 (substitute* "mh/tests/testsuite"
166 (("moreproc: /bin/cat")
167 (string-append "moreproc: " (which "cat"))))
14253017 168
de75f0b1
EF
169 ;; XXX: The comsatd tests rely on being able to open
170 ;; /dev/tty, but that gives ENODEV in the build
171 ;; environment. Thus, ignore test failures here.
172 (substitute* "comsat/tests/Makefile.in"
173 (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
174 (string-append "-" all)))
14253017 175
baa6790b
LC
176 ;; 'frm' tests expect write access to $HOME.
177 (setenv "HOME" (getcwd))
178
179 ;; Avoid the message "I'm going to create the standard MH path
180 ;; for you", which would lead to one test failure (when diffing
181 ;; stdout of 'fmtcheck'.)
182 (call-with-output-file ".mh_profile"
183 (lambda (port)
184 (format port "Path: ~a/Mail-for-tests~%"
185 (getcwd))))
186
de75f0b1
EF
187 #t)))
188 ;; TODO: Add `--with-sql'.
ac3b4b12
LC
189 #:configure-flags (list "--sysconfdir=/etc"
190
191 ;; Add "/2.2" to the installation directory.
192 (string-append "--with-guile-site-dir="
193 (assoc-ref %outputs "out")
194 "/share/guile/site/2.2"))
195
a661e420 196 #:parallel-tests? #f))
3f3c0ab4 197 (native-inputs
20a3df0f 198 `(("perl" ,perl))) ;for 'gylwrap'
a661e420
LC
199 (inputs
200 `(("dejagnu" ,dejagnu)
201 ("m4" ,m4)
202 ("texinfo" ,texinfo)
20a3df0f 203 ("guile" ,guile-2.2)
1f889cac 204 ("gsasl" ,gsasl)
a661e420
LC
205 ("gnutls" ,gnutls)
206 ("ncurses" ,ncurses)
abe5d2dc 207 ("readline" ,readline)
a661e420 208 ("linux-pam" ,linux-pam)
3246cc91 209 ("libltdl" ,libltdl)
01eafd38 210 ("gdbm" ,gdbm)))
6fd52309 211 (home-page "https://mailutils.org")
f50d2669 212 (synopsis "Utilities and library for reading and serving mail")
a661e420 213 (description
79c311b8
LC
214 "GNU Mailutils is a collection of programs for managing, viewing and
215processing electronic mail. It contains both utilities and server daemons
216and all operate in a protocol-agnostic way. The underlying libraries are
217also available, simplifying the addition of mail capabilities to new
218software.")
a661e420
LC
219 (license
220 ;; Libraries are under LGPLv3+, and programs under GPLv3+.
221 (list gpl3+ lgpl3+))))
d983a14f
AE
222
223(define-public fetchmail
224 (package
225 (name "fetchmail")
226 (version "6.3.26")
227 (source (origin
228 (method url-fetch)
229 (uri (string-append "mirror://sourceforge/fetchmail/branch_6.3/fetchmail-"
230 version ".tar.xz"))
231 (sha256
232 (base32
233 "0l78ayvi9dm8hd190gl139cs2xqsrf7r9ncilslw20mgvd6cbd3r"))))
234 (build-system gnu-build-system)
235 (inputs
236 `(("openssl" ,openssl)))
237 (arguments
238 `(#:configure-flags (list (string-append "--with-ssl="
239 (assoc-ref %build-inputs "openssl")))))
07af3e5e 240 (home-page "http://www.fetchmail.info/")
ae2189a9 241 (synopsis "Remote-mail retrieval and forwarding utility")
d983a14f
AE
242 (description
243 "Fetchmail is a full-featured, robust, well-documented remote-mail
244retrieval and forwarding utility intended to be used over on-demand
245TCP/IP links (such as SLIP or PPP connections). It supports every
246remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
247KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
248and IPSEC.
249
250Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
251so it can then be read by normal mail user agents such as mutt, elm
252or BSD Mail. It allows all your system MTA's filtering, forwarding, and
253aliasing facilities to work just as they would on normal mail.")
254 (license gpl2+))) ; most files are actually public domain or x11
13f04f48
AE
255
256(define-public mutt
257 (package
258 (name "mutt")
15285938 259 (version "1.11.0")
13f04f48
AE
260 (source (origin
261 (method url-fetch)
7736bae9
LF
262 (uri (string-append "https://bitbucket.org/mutt/mutt/downloads/"
263 "mutt-" version ".tar.gz"))
13f04f48
AE
264 (sha256
265 (base32
15285938 266 "1qqhkhlzvjj0iih8vm0wfagv4fzqqy1wnsb4sqsfv7w06ccjdjcj"))
fc1adab1 267 (patches (search-patches "mutt-store-references.patch"))))
13f04f48
AE
268 (build-system gnu-build-system)
269 (inputs
4fd6bf53 270 `(("cyrus-sasl" ,cyrus-sasl)
b0bb0136 271 ("gdbm" ,gdbm)
524e1df6 272 ("gpgme" ,gpgme)
4fd6bf53 273 ("ncurses" ,ncurses)
13f04f48
AE
274 ("openssl" ,openssl)
275 ("perl" ,perl)))
276 (arguments
277 `(#:configure-flags '("--enable-smtp"
278 "--enable-imap"
279 "--enable-pop"
524e1df6 280 "--enable-gpgme"
b0bb0136 281 "--enable-hcache" ; for header caching
0323fe80 282 "--enable-sidebar"
13f04f48 283 "--with-ssl"
4fd6bf53 284 "--with-sasl"
13f04f48
AE
285 ;; so that mutt does not check whether the path
286 ;; exists, which it does not in the chroot
287 "--with-mailpath=/var/mail")))
288 (home-page "http://www.mutt.org/")
289 (synopsis "Mail client")
290 (description
291 "Mutt is a small but very powerful text-based mail client for Unix
292operating systems.")
293 (license gpl2+)))
681a6588 294
7596ddf3 295(define-public neomutt
296 (package
7596ddf3 297 (name "neomutt")
46add561 298 (version "20180716")
7596ddf3 299 (source
300 (origin
301 (method url-fetch)
302 (uri (string-append "https://github.com/" name "/" name
303 "/archive/" name "-" version ".tar.gz"))
7596ddf3 304 (sha256
305 (base32
46add561 306 "0072in2d6znwqq461shsaxlf40r4zr7w3j9848qvm4xlh1lq52dx"))))
32fc1ec3 307 (build-system gnu-build-system)
7596ddf3 308 (inputs
309 `(("cyrus-sasl" ,cyrus-sasl)
310 ("gdbm" ,gdbm)
311 ("gpgme" ,gpgme)
312 ("ncurses" ,ncurses)
313 ("gnutls" ,gnutls)
314 ("openssl" ,openssl) ;For smime
315 ("perl" ,perl)
5c95465e 316 ("kyotocabinet" ,kyotocabinet)
7596ddf3 317 ("libxslt" ,libxslt)
318 ("libidn" ,libidn)
319 ("libxml2" ,libxml2)
5c95465e 320 ("lmdb" ,lmdb)
7596ddf3 321 ("notmuch" ,notmuch)))
322 (native-inputs
54a402dd 323 `(("automake" ,automake)
aa20b004 324 ("gettext-minimal" ,gettext-minimal)
54a402dd 325 ("pkg-config" ,pkg-config)
326 ("docbook-xsl" ,docbook-xsl)
f58764d8 327 ("docbook-xml" ,docbook-xml-4.2)
54a402dd 328 ("w3m" ,w3m)
329 ("tcl" ,tcl)))
7596ddf3 330 (arguments
54a402dd 331 `(#:tests? #f
332 #:configure-flags
333 (list "--gpgme"
7596ddf3 334
335 ;; database, implies header caching
54a402dd 336 "--disable-tokyocabinet"
337 "--disable-qdbm"
338 "--disable-bdb"
339 "--lmdb"
340 "--kyotocabinet"
341
342 "--gdbm"
343
344 "--gnutls"
345 "--disable-ssl"
346 "--sasl"
347 (string-append "--with-sasl="
348 (assoc-ref %build-inputs "cyrus-sasl"))
7596ddf3 349
7596ddf3 350
54a402dd 351 "--smime"
352 "--notmuch"
353 "--idn"
7596ddf3 354
355 ;; If we do not set this, neomutt wants to check
356 ;; whether the path exists, which it does not
357 ;; in the chroot. The workaround is this.
358 "--with-mailpath=/var/mail"
359
54a402dd 360 "--with-ui=ncurses"
361 (string-append "--with-ncurses="
362 (assoc-ref %build-inputs "ncurses"))
363 (string-append "--prefix="
364 (assoc-ref %outputs "out"))
365 "--debug")
7596ddf3 366 #:phases
367 (modify-phases %standard-phases
54a402dd 368 ;; TODO: autosetup is meant to be included in the source,
369 ;; but we should package autosetup and use our own version of it.
54a402dd 370 (add-before 'configure 'fix-sasl-test
7596ddf3 371 (lambda _
54a402dd 372 ;; Upstream suggestion to fix the failing sasl autosetup test.
373 (substitute* "auto.def"
374 (("cc-with \\[list -cflags -I\\$prefix/include -libs")
375 "cc-with [list -includes stddef.h -cflags -I$prefix/include -libs"))
376 #t))
377 (replace 'configure
378 (lambda* (#:key outputs inputs configure-flags #:allow-other-keys)
379 (let* ((out (assoc-ref outputs "out"))
380 (flags `(,@configure-flags))
381 (bash (which "bash")))
382 (setenv "SHELL" bash)
383 (setenv "CONFIG_SHELL" bash)
384 (apply invoke bash
385 (string-append (getcwd) "/configure")
386 flags)))))))
7596ddf3 387 (home-page "https://www.neomutt.org/")
388 (synopsis "Command-line mail reader based on Mutt")
389 (description
390 "NeoMutt is a command-line mail reader which is based on mutt.
32fc1ec3 391It adds a large amount of new and improved features to mutt.")
392 (license gpl2+)))
7596ddf3 393
681a6588
MW
394(define-public gmime
395 (package
396 (name "gmime")
8e020519 397 (version "3.2.0")
681a6588
MW
398 (source (origin
399 (method url-fetch)
75630043 400 (uri (string-append "mirror://gnome/sources/gmime/"
29a7c98a 401 (version-major+minor version)
681a6588
MW
402 "/gmime-" version ".tar.xz"))
403 (sha256
404 (base32
8e020519 405 "1q6palbpf6lh6bvy9ly26q5apl5k0z0r4mvl6zzqh90rz4rn1v3m"))))
681a6588
MW
406 (build-system gnu-build-system)
407 (native-inputs
408 `(("pkg-config" ,pkg-config)
409 ("gnupg" ,gnupg))) ; for tests only
410 (inputs `(("glib" ,glib)
411 ("gpgme" ,gpgme)
412 ("zlib" ,zlib)))
413 (arguments
414 `(#:phases
cc955356
EF
415 (modify-phases %standard-phases
416 (add-after
417 'unpack 'patch-paths-in-tests
418 (lambda _
419 ;; The test programs run several programs using 'system' with
ae83dcf6 420 ;; hard-coded paths. Here we patch them all.
421 ;; We use ISO-8859-1 here because test-iconv.c contains
cc955356
EF
422 ;; raw byte sequences in several different encodings.
423 (with-fluids ((%default-port-encoding #f))
424 (substitute* (find-files "tests" "\\.c$")
425 (("(system *\\(\")(/[^ ]*)" all pre prog-path)
426 (let* ((base (basename prog-path))
ae83dcf6 427 (prog (which base)))
cc955356 428 (string-append pre
8e020519
MB
429 (or prog (error "not found: " base)))))))
430 #t)))))
681a6588
MW
431 (home-page "http://spruce.sourceforge.net/gmime/")
432 (synopsis "MIME message parser and creator library")
433 (description
434 "GMime provides a core library and set of utilities which may be used for
435the creation and parsing of messages using the Multipurpose Internet Mail
436Extension (MIME).")
437 (license (list lgpl2.1+ gpl2+ gpl3+))))
438
8e020519
MB
439;; Some packages are not ready for GMime 3 yet.
440(define-public gmime-2.6
441 (package
442 (inherit gmime)
443 (version "2.6.23")
444 (source (origin
445 (method url-fetch)
446 (uri (string-append "mirror://gnome/sources/gmime/"
447 (version-major+minor version)
448 "/gmime-" version ".tar.xz"))
449 (sha256
450 (base32
451 "0slzlzcr3h8jikpz5a5amqd0csqh2m40gdk910ws2hnaf5m6hjbi"))))))
452
a7e59c50
LC
453(define-public bogofilter
454 (package
455 (name "bogofilter")
456 (version "1.2.4")
457 (source (origin
458 (method url-fetch)
459 (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-"
460 version "/bogofilter-"
461 version ".tar.bz2"))
462 (sha256
463 (base32
464 "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1"))))
465 (build-system gnu-build-system)
466 (arguments
c55fa42b
EF
467 '(#:phases
468 (modify-phases %standard-phases
469 (add-before 'check 'pre-check
470 (lambda _
471 (substitute* "src/tests/t.frame"
472 (("GREP=/bin/grep")
473 (string-append "GREP=" (which "grep") "\n")))
474 #t)))))
a7e59c50
LC
475 (native-inputs `(("flex" ,flex)))
476 (inputs `(("bdb" ,bdb)))
477 (home-page "http://bogofilter.sourceforge.net/")
478 (synopsis "Mail classifier based on a Bayesian filter")
479 (description
480 "Bogofilter is a mail filter that classifies mail as spam or ham
481 (non-spam) by a statistical analysis of the message's header and
482content (body). The program is able to learn from the user's classifications
483and corrections. It is based on a Bayesian filter.")
484 (license gpl2)))
485
3919a31a
EB
486(define-public offlineimap
487 (package
488 (name "offlineimap")
081915c1 489 (version "7.2.2")
3919a31a 490 (source (origin
bc7c9f77
MB
491 (method git-fetch)
492 (uri (git-reference
493 (url "https://github.com/OfflineIMAP/offlineimap")
494 (commit (string-append "v" version))))
495 (file-name (git-file-name name version))
3919a31a
EB
496 (sha256
497 (base32
081915c1 498 "11nj7y9fa7v6vcxk3wr8smfgm3mxxnmq3l8q69rrjxlfzcv7dl8m"))))
3919a31a 499 (build-system python-build-system)
7a6213cb 500 (native-inputs
4b0e6367 501 `(("asciidoc" ,asciidoc)))
a4ea25d3
EF
502 (inputs `(("python2-pysqlite" ,python2-pysqlite)
503 ("python2-six" ,python2-six)))
3919a31a
EB
504 (arguments
505 ;; The setup.py script expects python-2.
506 `(#:python ,python-2
507 ;; Tests require a modifiable IMAP account.
42aa73b3
EF
508 #:tests? #f
509 #:phases
510 (modify-phases %standard-phases
7a6213cb
MB
511 (add-after 'build 'build-documentation
512 (lambda _
513 (substitute* "docs/Makefile"
514 ;; Prevent xmllint and xsltproc from downloading a DTD file.
515 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
7232c3f5 516 (invoke "make" "-C" "docs" "man")))
7a6213cb
MB
517 (add-after 'install 'install-documentation
518 (lambda* (#:key outputs #:allow-other-keys)
519 (let* ((out (assoc-ref outputs "out"))
520 (man (string-append out "/share/man")))
521 (install-file "docs/offlineimap.1" (string-append man "/man1"))
522 (install-file "docs/offlineimapui.7" (string-append man "/man7"))
523 #t)))
524 (add-after 'install-documentation 'wrap-binary
525 (lambda* (#:key outputs #:allow-other-keys)
42aa73b3
EF
526 (let* ((out (assoc-ref outputs "out"))
527 (bin (string-append out "/bin/offlineimap")))
528 (wrap-program bin
529 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
530 #t))))))
684633e2 531 (home-page "https://www.offlineimap.org")
31e98ca6 532 (synopsis "Sync emails between two repositories")
3919a31a
EB
533 (description
534 "OfflineImap synchronizes emails between two repositories, so that you
535can read the same mailbox from multiple computers. It supports IMAP as REMOTE
536repository and Maildir/IMAP as LOCAL repository.")
7886e23b 537 (license gpl2+)))
3919a31a 538
3e9750c3
TD
539(define-public emacs-mew
540 (package
541 (name "emacs-mew")
542 (version "6.7")
543 (source (origin
544 (method url-fetch)
8502ff7a 545 (uri (string-append "https://mew.org/Release/mew-"
3e9750c3
TD
546 version ".tar.gz"))
547 (sha256
548 (base32
549 "03fzky2kz73vgx4cbps2psbbnrgqgkk5q7jwfldisymkzr9iz03y"))))
550 (native-inputs
551 `(("emacs" ,emacs)))
552 (propagated-inputs
553 `(("ruby-sqlite3" ,ruby-sqlite3) ; optional for the database of messages
554 ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
555 (build-system gnu-build-system)
556 (arguments
557 (let ((elisp-dir "/share/emacs/site-lisp/guix.d/mew")
558 (icon-dir "/share/mew"))
559 `(#:modules ((guix build gnu-build-system)
560 (guix build utils)
561 (guix build emacs-utils))
562 #:imported-modules (,@%gnu-build-system-modules
563 (guix build emacs-utils))
564 #:configure-flags
565 (list (string-append "--with-elispdir=" %output ,elisp-dir)
566 (string-append "--with-etcdir=" %output ,icon-dir))
567 #:phases
568 (modify-phases %standard-phases
569 (add-after 'configure 'patch-mew-icon-directory
570 (lambda* (#:key outputs #:allow-other-keys)
571 (emacs-substitute-sexps "mew-key.el"
572 ("(def.* mew-icon-directory"
573 `(progn
574 (add-to-list 'image-load-path 'mew-icon-directory)
575 ,(string-append (assoc-ref outputs "out") ,icon-dir))))
576 #t))
577 (add-after 'install 'generate-autoloads
578 (lambda* (#:key outputs #:allow-other-keys)
579 (emacs-generate-autoloads
580 "mew" (string-append (assoc-ref outputs "out") ,elisp-dir))
581 #t)))
582 #:tests? #f)))
8502ff7a 583 (home-page "https://mew.org")
3e9750c3
TD
584 (synopsis "Emacs e-mail client")
585 (description "Mew (Messaging in the Emacs World) is a user interface
586for text messages, multimedia messages (MIME), news articles and
587security functionality including PGP, S/MIME, SSH, and SSL.")
588 (license bsd-3)))
589
d2938d59
EB
590(define-public mu
591 (package
592 (name "mu")
e5fdc334 593 (version "1.0")
d2938d59
EB
594 (source (origin
595 (method url-fetch)
e7b9da24 596 (uri (string-append "https://github.com/djcb/mu/releases/"
e5fdc334
PL
597 "download/v" version "/mu-"
598 version ".tar.xz"))
d2938d59
EB
599 (sha256
600 (base32
e5fdc334 601 "04x5azl19gszw2h7argq666gf9xs4hy9q7w9cbqxvy08n56xqsln"))))
d2938d59
EB
602 (build-system gnu-build-system)
603 (native-inputs
604 `(("pkg-config" ,pkg-config)
9fd571a2 605 ("glib" ,glib "bin") ; for gtester
63298f14 606 ("emacs" ,emacs-minimal)
efe2a283 607 ("tzdata" ,tzdata-for-tests))) ;for mu/test/test-mu-query.c
d2938d59
EB
608 ;; TODO: Add webkit and gtk to build the mug GUI.
609 (inputs
610 `(("xapian" ,xapian)
d59ec129 611 ("guile" ,guile-2.2)
d2938d59 612 ("glib" ,glib)
8e020519 613 ("gmime" ,gmime-2.6)))
d2938d59 614 (arguments
704f2196
AK
615 `(#:modules ((guix build gnu-build-system)
616 (guix build utils)
617 (guix build emacs-utils))
618 #:imported-modules (,@%gnu-build-system-modules
619 (guix build emacs-utils))
620 #:phases
99404fff 621 (modify-phases %standard-phases
e62e975b 622 (add-after 'unpack 'patch-configure
789bda83
AK
623 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
624 ;; so our Emacs package can't find it. Setting "--with-lispdir"
625 ;; configure flag doesn't help because "mu4e" will be added to
626 ;; the lispdir anyway, so we have to modify "configure.ac".
627 (lambda _
e62e975b 628 (substitute* "configure"
d59ec129
RW
629 (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") "")
630 ;; Use latest Guile
631 (("guile-2.0") "guile-2.2"))
632 (substitute* '("guile/Makefile.in"
633 "guile/mu/Makefile.in")
634 (("share/guile/site/2.0/") "share/guile/site/2.2/"))
789bda83 635 #t))
3481c714
MC
636 (add-after 'patch-configure 'fix-date-tests
637 ;; Loosen test tolerances to prevent failures caused by daylight
638 ;; saving time (DST). See: https://github.com/djcb/mu/issues/1214.
639 (lambda _
640 (substitute* "lib/parser/test-utils.cc"
641 (("\\* 60 \\* 60, 1 },")
642 "* 60 * 60, 3600 + 1 },"))
643 #t))
c9dc4577
RW
644 (add-before 'install 'fix-ffi
645 (lambda* (#:key outputs #:allow-other-keys)
646 (substitute* "guile/mu.scm"
647 (("\"libguile-mu\"")
648 (format #f "\"~a/lib/libguile-mu\""
649 (assoc-ref outputs "out"))))
650 #t))
99404fff
AK
651 (add-before 'check 'check-tz-setup
652 (lambda* (#:key inputs #:allow-other-keys)
653 ;; For mu/test/test-mu-query.c
654 (setenv "TZDIR"
655 (string-append (assoc-ref inputs "tzdata")
656 "/share/zoneinfo"))
704f2196
AK
657 #t))
658 (add-after 'install 'install-emacs-autoloads
659 (lambda* (#:key outputs #:allow-other-keys)
660 (emacs-generate-autoloads
661 "mu4e"
662 (string-append (assoc-ref outputs "out")
663 "/share/emacs/site-lisp"))
99404fff 664 #t)))))
d2938d59
EB
665 (home-page "http://www.djcbsoftware.nl/code/mu/")
666 (synopsis "Quickly find emails")
667 (description
668 "Mu is a tool for dealing with e-mail messages stored in the
669Maildir-format. Mu's purpose in life is to help you to quickly find the
670messages you need; in addition, it allows you to view messages, extract
671attachments, create new maildirs, and so on.")
672 (license gpl3+)))
673
a2cb16b0
TS
674(define-public alot
675 (package
676 (name "alot")
3f81ca32 677 (version "0.5.1")
a2cb16b0
TS
678 (source (origin
679 (method url-fetch)
1b94f182
TS
680 ;; package author intends on distributing via github rather
681 ;; than pypi:
682 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
a2cb16b0
TS
683 (uri (string-append "https://github.com/pazz/alot/archive/"
684 version ".tar.gz"))
685 (file-name (string-append "alot-" version ".tar.gz"))
686 (sha256
687 (base32
3f81ca32 688 "0wax30hjzmkqfml7hig1dqw1v1y63yc0cgbzl96x58b9h2ggqx3a"))))
a2cb16b0
TS
689 (build-system python-build-system)
690 (arguments
3f81ca32 691 `(;; python 3 is currently unsupported, more info:
fe3b8862 692 ;; https://github.com/pazz/alot/blob/master/docs/source/faq.rst
a2cb16b0 693 #:python ,python-2))
3f81ca32
TS
694 (native-inputs
695 `(("python2-mock" ,python2-mock)))
a2cb16b0
TS
696 (inputs
697 `(("python2-magic" ,python2-magic)
698 ("python2-configobj" ,python2-configobj)
699 ("python2-twisted" ,python2-twisted)
700 ("python2-urwid" ,python2-urwid)
701 ("python2-urwidtrees" ,python2-urwidtrees)
702 ("python2-pygpgme" ,python2-pygpgme)
703 ("python2-notmuch" ,python2-notmuch)))
704 (home-page "https://github.com/pazz/alot")
cfcfc6ab 705 (synopsis "Command-line MUA using @code{notmuch}")
a2cb16b0 706 (description
cfcfc6ab 707 "Alot is an experimental terminal mail user agent (@dfn{MUA}) based on
a2cb16b0
TS
708@code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
709 (license gpl3+)))
710
0350a8bb
HG
711(define-public notifymuch
712 (let
713 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
714 (revision "1"))
715 (package
716 (name "notifymuch")
717 (version (string-append "0.1-" revision "." (string-take commit 7)))
718 (source
719 (origin
720 (method git-fetch)
721 (uri (git-reference
722 (url "https://github.com/kspi/notifymuch.git")
723 (commit commit)))
724 (sha256
725 (base32
726 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
727 (file-name (string-append name "-" version "-checkout"))))
728 (build-system python-build-system)
729 (inputs
730 `(("python-notmuch" ,python-notmuch)
731 ("python-pygobject" ,python-pygobject)
732 ("gobject-introspection" ,gobject-introspection)
733 ("libnotify" ,libnotify)
734 ("gtk+" ,gtk+)))
735 (arguments
736 `(#:phases
737 (modify-phases %standard-phases
738 (add-after 'install 'wrap-binary
739 (lambda* (#:key outputs #:allow-other-keys)
740 (let* ((out (assoc-ref outputs "out"))
741 (bin (string-append out "/bin/notifymuch")))
742 (wrap-program bin
743 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
744 `("GI_TYPELIB_PATH" ":" prefix
745 (,(getenv "GI_TYPELIB_PATH")
746 ,(string-append out "/lib/girepository-1.0")))))
747 #t)))))
748 (home-page "https://github.com/kspi/notifymuch")
749 (synopsis "Displays notifications for changes in the notmuch email database")
750 (description "notifymuch displays desktop notifications for messages in
751the notmuch database. The notifications are sent using libnotify to a
752notification daemon. The query to find messages to send a notification about
753is configurable, and a notification for the same message will not be send
754within a configurable period (defaults to 48 hours). To use notifymuch, run
755@command{notifymuch} after new mail is indexed, this can be automated by
756invoking @command{notifymuch} from the post-new hook.")
757 (license gpl3))))
758
1bd3f849
DT
759(define-public notmuch
760 (package
761 (name "notmuch")
a908ffd1 762 (version "0.28")
1bd3f849
DT
763 (source (origin
764 (method url-fetch)
866fade9 765 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
1bd3f849
DT
766 version ".tar.gz"))
767 (sha256
768 (base32
a908ffd1 769 "0dqarmjc8544m2w7bqrqmvsfy55fw82707z3lz9cql8nr777bjmc"))))
1bd3f849
DT
770 (build-system gnu-build-system)
771 (arguments
d738f134
AI
772 `(#:modules ((guix build gnu-build-system)
773 ((guix build emacs-build-system) #:prefix emacs:)
774 (guix build utils))
775 #:imported-modules (,@%gnu-build-system-modules
776 (guix build emacs-build-system)
777 (guix build emacs-utils))
778 #:make-flags (list "V=1") ; Verbose test output.
eb537f57 779 #:phases (modify-phases %standard-phases
6cf27c89
MB
780 (add-after 'unpack 'patch-notmuch-lib.el
781 (lambda _
782 (substitute* "emacs/notmuch-lib.el"
783 (("/bin/sh") (which "sh")))
784 #t))
eb537f57
DT
785 (replace 'configure
786 (lambda* (#:key outputs #:allow-other-keys)
787 (setenv "CC" "gcc")
788 (setenv "CONFIG_SHELL" (which "sh"))
ee886454 789
d738f134
AI
790 (let* ((out (assoc-ref outputs "out"))
791 (elisp
792 (string-append out "/share/emacs/site-lisp/guix.d/"
793 ,name "-" ,version)))
82d2dfa0
TGR
794 (invoke "./configure"
795 (string-append "--prefix=" out)
796 (string-append "--emacslispdir=" elisp)
797 (string-append "--emacsetcdir=" elisp)))))
6cf27c89
MB
798 (add-before 'check 'prepare-test-environment
799 (lambda _
800 (setenv "TEST_CC" "gcc")
801 ;; Patch various inline shell invocations.
802 (substitute* (find-files "test" "\\.sh$")
803 (("/bin/sh") (which "sh")))
d738f134
AI
804 #t))
805 (add-after 'install 'make-autoloads
806 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
1bd3f849 807 (native-inputs
2c5b91dc 808 `(("bash-completion" ,bash-completion)
6cf27c89 809 ("emacs" ,emacs-no-x) ; Minimal lacks libxml, needed for some tests.
2c5b91dc 810 ("pkg-config" ,pkg-config)
ee886454 811 ("python" ,python-2)
eb537f57 812 ("python-docutils" ,python2-docutils)
6cf27c89
MB
813 ("python-sphinx" ,python2-sphinx)
814
815 ;; The following are required for tests only.
816 ("which" ,which)
817 ("dtach" ,dtach)
818 ("gnupg" ,gnupg)
819 ("man" ,man-db)
820 ("perl" ,perl)))
1bd3f849 821 (inputs
2c5b91dc 822 `(("glib" ,glib)
1bd3f849
DT
823 ("gmime" ,gmime)
824 ("talloc" ,talloc)
825 ("xapian" ,xapian)
826 ("zlib" ,zlib)))
540d6cc7 827 (home-page "https://notmuchmail.org/")
1bd3f849
DT
828 (synopsis "Thread-based email index, search, and tagging")
829 (description
830 "Notmuch is a command-line based program for indexing, searching, read-
831ing, and tagging large collections of email messages.")
832 (license gpl3+)))
833
8a75c589 834(define-public notmuch-addrlookup-c
a5d6b0a3
TS
835 ;; This commit includes a compatibility fix for notmuch-0.25, and is not
836 ;; currently part of any release. Please update this package when
837 ;; notmuch-addrlookup-c-9 is released.
838 (let ((commit "88f156d04990a71c6ad6fc2757b537b44e3c4d00")
839 (revision "1")) ;Guix package revision
840 (package
841 (name "notmuch-addrlookup-c")
842 (version (string-append "8-" revision "."
843 (string-take commit 7)))
844 (source (origin
845 (method git-fetch)
846 (uri (git-reference
847 (url "https://github.com/aperezdc/notmuch-addrlookup-c.git")
848 (commit commit)))
849 (file-name (string-append name "-" version "-checkout"))
850 (sha256
851 (base32
852 "0v0wzs7qzy4n1hbql8s10qrwgalcxdzbxf8pj6cii1pv2jwmkxbm"))))
853 (build-system gnu-build-system)
854 (arguments
855 '(#:tests? #f ; no tests
856 #:make-flags (list "CC=gcc"
857 (string-append "PREFIX="
858 (assoc-ref %outputs "out")))
859 #:phases (modify-phases %standard-phases
860 (delete 'configure)
861 ;; Remove vim code completion config, it's not needed to
862 ;; build (or be patched).
863 (add-before 'patch-source-shebangs 'delete-ycm-file
864 (lambda _ (delete-file ".ycm_extra_conf.py")))
865 (replace 'install
866 (lambda* (#:key outputs #:allow-other-keys)
867 (let ((bin (string-append
868 (assoc-ref outputs "out") "/bin")))
869 (install-file "notmuch-addrlookup" bin)))))))
870 (native-inputs
871 `(("pkg-config" ,pkg-config)))
872 (inputs
873 `(("glib" ,glib)
874 ("notmuch" ,notmuch)))
875 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
876 (synopsis "Address lookup tool for Notmuch")
877 (description "This is an address lookup tool using a Notmuch database,
8a75c589 878useful for email address completion.")
a5d6b0a3 879 (license license:expat))))
8a75c589 880
4b6909bc
TS
881(define-public python-notmuch
882 (package
883 (name "python-notmuch")
540d6cc7 884 (version (package-version notmuch))
4b6909bc
TS
885 ;; Notmuch python bindings are now unavailable on pypi. The
886 ;; bindings are distributed via the notmuch release tarball.
887 (source (package-source notmuch))
888 (build-system python-build-system)
889 (inputs `(("notmuch" ,notmuch)))
890 (arguments
891 `(#:tests? #f ; no "test" target
892 #:phases
893 (modify-phases %standard-phases
894 ;; This python package lives in a subdirectory of the notmuch source
895 ;; tree, so chdir into it before building.
896 (add-after 'unpack 'enter-python-dir
897 (lambda _ (chdir "bindings/python") #t))
898 ;; Make sure the correct notmuch shared library gets loaded.
899 (add-before 'build 'set-libnotmuch-file-name
900 (lambda* (#:key inputs #:allow-other-keys)
901 (let ((notmuch (assoc-ref inputs "notmuch")))
902 (substitute* "notmuch/globals.py"
903 (("libnotmuch\\.so\\.")
904 (string-append notmuch "/lib/libnotmuch.so.")))
905 #t))))))
540d6cc7 906 (home-page (package-home-page notmuch))
4b6909bc
TS
907 (synopsis "Python bindings of the Notmuch mail indexing library")
908 (description
909 "This package provides Python bindings to use the Notmuch mail indexing
910and search library.")
911 (license gpl3+)))
912
1c74da21 913(define-public python2-notmuch
caa6fc89 914 (package-with-python2 python-notmuch))
1c74da21 915
98e9e22f
SB
916(define-public getmail
917 (package
918 (name "getmail")
36e8cfa1 919 (version "5.6")
98e9e22f
SB
920 (source
921 (origin
922 (method url-fetch)
923 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
924 name "-" version ".tar.gz"))
925 (sha256
926 (base32
36e8cfa1 927 "16nmvj80szr6yvcxxgmxn2lxqpjqqj4xg5a0b66zhvck6j42q3a6"))))
98e9e22f
SB
928 (build-system python-build-system)
929 (arguments
930 `(#:tests? #f ; no tests
931 #:python ,python-2))
932 (home-page "http://pyropus.ca/software/getmail/")
933 (synopsis "Mail retriever")
934 (description
935 "A flexible, extensible mail retrieval system with support for
936POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
937arbitrary message filtering, single-user and domain-mailboxes, and many other
938useful features.")
939
940 ;; License is specified in file '__init__.py'.
941 (license gpl2)))
942
f58f767b
JL
943(define-public libetpan
944 (package
945 (name "libetpan")
8f2253af 946 (version "1.9.2")
f58f767b 947 (source (origin
aae96f8f
TGR
948 (method git-fetch)
949 (uri (git-reference
950 (url "https://github.com/dinhviethoa/libetpan.git")
951 (commit version)))
952 (file-name (git-file-name name version))
f58f767b 953 (sha256
8f2253af 954 (base32 "13jiy2ddxbp9f2mk1mip9sk8h97bva5m0pnq2mlvh5xhifs6gza4"))))
f58f767b 955 (build-system gnu-build-system)
464f5447 956 (native-inputs `(("autoconf" ,autoconf-wrapper)
f58f767b 957 ("automake" ,automake)
3246cc91 958 ("libtool" ,libtool)
f58f767b
JL
959 ("pkg-config" ,pkg-config)))
960 (propagated-inputs
961 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
962 ;; libraries need to be propagated.
963 `(("cyrus-sasl" ,cyrus-sasl)
964 ("openssl" ,openssl)))
965 (inputs
966 `(("curl" ,curl)
c1748912
EF
967 ("expat" ,expat)
968 ("zlib" ,zlib)))
f58f767b 969 (arguments
602460ea
EF
970 '(#:phases
971 (modify-phases %standard-phases
972 (add-after 'unpack 'autogen
973 (lambda _
974 (setenv "NOCONFIGURE" "true")
df22b95c 975 (invoke "sh" "autogen.sh"))))
f58f767b
JL
976 #:configure-flags
977 '("--disable-static" "--disable-db")))
81fb037f 978 (home-page "https://www.etpan.org/libetpan.html")
f58f767b
JL
979 (synopsis "Portable middleware for email access")
980 (description
981 "The purpose of this mail library is to provide a portable, efficient
982framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
983provides an API for C language. It's the low-level API used by MailCore and
984MailCore 2.")
a979eea9 985 (license bsd-3)))
f58f767b 986
ee6e780b
DM
987(define-public compface
988 (package
989 (name "compface")
990 (version "1.5.2")
991 (source (origin
992 (method url-fetch)
993 (uri (string-append "https://ftp.heanet.ie/mirrors/"
994 "ftp.xemacs.org/aux/"
995 name "-" version ".tar.gz"))
996 (sha256
997 (base32
998 "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
999 (build-system gnu-build-system)
1000 (arguments
1001 `(#:tests? #f))
1002 (synopsis "Portrait image compressor")
1003 (description "This packages takes your 48x48x1 portrait image and
1004compresses it.")
1005 (home-page "http://www.cs.indiana.edu/pub/faces/")
1006 (license (x11-style "file://README"))))
1007
e8435c4d
JL
1008(define-public claws-mail
1009 (package
1010 (name "claws-mail")
23ae876b 1011 (version "3.17.3")
e8435c4d
JL
1012 (source (origin
1013 (method url-fetch)
1014 (uri (string-append
ca6f5ab8 1015 "https://www.claws-mail.org/releases/claws-mail-" version
6ea4b094 1016 ".tar.xz"))
e8435c4d 1017 (sha256
ec92806a 1018 (base32
23ae876b 1019 "1wnj6c9cbmhphs2l6wfvndkk2g08rmxw0sl2c8k1k008dxd1ykjh"))))
e8435c4d
JL
1020 (build-system gnu-build-system)
1021 (native-inputs `(("pkg-config" ,pkg-config)))
1022 (inputs `(("bogofilter" ,bogofilter)
1023 ("curl" ,curl)
1024 ("dbus-glib" ,dbus-glib)
e8435c4d
JL
1025 ("enchant" ,enchant)
1026 ("expat" ,expat)
1027 ("ghostscript" ,ghostscript)
1028 ("hicolor-icon-theme" ,hicolor-icon-theme)
1029 ("gnupg" ,gnupg)
1030 ("gnutls" ,gnutls)
1031 ("gpgme" ,gpgme)
1032 ("gtk" ,gtk+-2)
1033 ("libarchive" ,libarchive)
1034 ("libcanberra" ,libcanberra)
1035 ("libetpan" ,libetpan)
fc9a93cb 1036 ("libical" ,libical)
e8435c4d
JL
1037 ("libnotify" ,libnotify)
1038 ("libsm" ,libsm)
1039 ("libxml2" ,libxml2)
1040 ("perl" ,perl)
f6292baf
EB
1041 ("python-2" ,python-2)
1042 ("mime-info" ,shared-mime-info)))
e8435c4d
JL
1043 (arguments
1044 '(#:configure-flags
f6292baf 1045 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant")
ff4192ff
DM
1046 #:make-flags
1047 ;; Disable updating icon cache since it's done by the profile hook.
1048 ;; Conflict with other packages in the profile would be inevitable
1049 ;; otherwise.
1050 '("gtk_update_icon_cache=true")
f6292baf
EB
1051 #:phases (modify-phases %standard-phases
1052 (add-before 'build 'patch-mime
1053 (lambda* (#:key inputs #:allow-other-keys)
1054 (substitute* "src/procmime.c"
1055 (("/usr/share/mime/globs")
1056 (string-append (assoc-ref inputs "mime-info")
1057 "/share/mime/globs"))))))))
e8435c4d
JL
1058 (synopsis "GTK-based Email client")
1059 (description
1060 "Claws-Mail is an email client (and news reader) based on GTK+. The
1061appearance and interface are designed to be familiar to new users coming from
1062other popular email clients, as well as experienced users. Almost all commands
1063are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
1064which can add many functionalities to the base client.")
ba5c926c 1065 (home-page "https://www.claws-mail.org/")
e8435c4d
JL
1066 (license gpl3+))) ; most files are actually public domain or x11
1067
d6e941bc
1068(define-public msmtp
1069 (package
1070 (name "msmtp")
1460e77a 1071 (version "1.8.1")
d6e941bc
1072 (source
1073 (origin
1074 (method url-fetch)
1a80f1a9 1075 (uri (string-append "https://marlam.de/msmtp/releases/"
d23d1ddf
LF
1076 "/msmtp-" version ".tar.xz"))
1077 (sha256
1078 (base32
1460e77a 1079 "1nm4vizrnrrnknc4mc8nr7grz9q76m1vraa0hsl5rfm34gnsg8ph"))))
d6e941bc
1080 (build-system gnu-build-system)
1081 (inputs
91b3a6d4 1082 `(("libsecret" ,libsecret)
d6e941bc
1083 ("gnutls" ,gnutls)
1084 ("zlib" ,zlib)
1085 ("gsasl" ,gsasl)))
1086 (native-inputs
1087 `(("pkg-config" ,pkg-config)))
1a80f1a9 1088 (home-page "https://marlam.de/msmtp/")
d6e941bc
1089 (arguments
1090 `(#:configure-flags (list "--with-libgsasl"
1091 "--with-libidn"
823e2ed4
LF
1092 "--with-tls=gnutls")
1093 #:phases
1094 (modify-phases %standard-phases
1095 (add-after 'install 'install-msmtpq
1096 (lambda* (#:key outputs #:allow-other-keys)
1097 (let* ((out (assoc-ref outputs "out"))
1098 (bin (string-append out "/bin"))
1099 (doc (string-append out "/share/doc/msmtp"))
1100 (msmtpq (string-append "scripts/msmtpq")))
1101 (install-file (string-append msmtpq "/msmtpq") bin)
1102 (install-file (string-append msmtpq "/msmtp-queue") bin)
1103 (install-file (string-append msmtpq "/README.msmtpq") doc)
1104 #t))))))
d6e941bc
1105 (synopsis
1106 "Simple and easy to use SMTP client with decent sendmail compatibility")
1107 (description
1108 "msmtp is an SMTP client. In the default mode, it transmits a mail to
1109an SMTP server (for example at a free mail provider) which takes care of further
1110delivery.")
1111 (license gpl3+)))
1112
66cc3ab2
TUBK
1113(define-public exim
1114 (package
1115 (name "exim")
354c493f 1116 (version "4.90.1")
66cc3ab2
TUBK
1117 (source
1118 (origin
1119 (method url-fetch)
354c493f 1120 (uri (list (string-append "https://ftp.exim.org/pub/exim/exim4/exim-"
fc6fdc05 1121 version ".tar.bz2")
354c493f 1122 (string-append "https://ftp.exim.org/pub/exim/exim4/old/exim-"
fc6fdc05 1123 version ".tar.bz2")))
66cc3ab2 1124 (sha256
513f8ab4 1125 (base32
354c493f 1126 "1w6blvvrd87c649j8xpag034md2w1ib0db9c4ijqbzc5dh2i1xfq"))))
66cc3ab2
TUBK
1127 (build-system gnu-build-system)
1128 (inputs
1129 `(("bdb" ,bdb)
1130 ("gnutls" ,gnutls)
1131 ("gzip" ,gzip)
1132 ("bzip2" ,bzip2)
1133 ("xz" ,xz)
66cc3ab2 1134 ("perl" ,perl)
c315d370 1135 ("libnsl" ,libnsl)
66cc3ab2
TUBK
1136 ("libxt" ,libxt)
1137 ("libxaw" ,libxaw)))
1138 (native-inputs
42773138
EF
1139 `(("pcre" ,pcre "bin")
1140 ("perl" ,perl)))
66cc3ab2
TUBK
1141 (arguments
1142 '(#:phases
dc1d3cde
KK
1143 (modify-phases %standard-phases
1144 (replace 'configure
1145 ;; We'd use #:make-flags but the top-level Makefile calls others
1146 ;; recursively, so just set all variables this way.
1147 (lambda* (#:key outputs inputs #:allow-other-keys)
1148 (substitute* '("Makefile" "OS/Makefile-Default")
1149 (("(RM_COMMAND=).*" all var)
1150 (string-append var "rm\n")))
1151 (copy-file "src/EDITME" "Local/Makefile")
1152 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
1153 (let ((out (assoc-ref outputs "out"))
1154 (gzip (assoc-ref inputs "gzip"))
1155 (bzip2 (assoc-ref inputs "bzip2"))
1156 (xz (assoc-ref inputs "xz")))
1157 (substitute* '("Local/Makefile")
1158 (("(BIN_DIRECTORY=).*" all var)
1159 (string-append var out "/bin\n"))
1160 (("(CONFIGURE_FILE=).*" all var)
1161 (string-append var out "/etc/exim.conf\n"))
1162 (("(EXIM_USER=).*" all var)
1163 (string-append var "nobody\n"))
1164 (("(FIXED_NEVER_USERS=).*" all var)
1165 (string-append var "\n")) ;XXX no root in build environment
1166 (("(COMPRESS_COMMAND=).*" all var)
1167 (string-append var gzip "/bin/gzip\n"))
1168 (("(ZCAT_COMMAND=).*" all var)
1169 (string-append var gzip "/bin/zcat\n")))
1170 ;; This file has hardcoded names for tools despite the zcat
1171 ;; configuration above.
1172 (substitute* '("src/exigrep.src")
1173 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
1174 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
1175 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
1176 (("'lzma'") (string-append "'" xz "/bin/lzma'"))))
1177 #t))
1178 (add-before 'build 'fix-sh-paths
1179 (lambda* (#:key inputs #:allow-other-keys)
1180 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
1181 (("SHELL=/bin/sh") "SHELL=sh"))
1182 (substitute* '("scripts/Configure-config.h")
1183 (("\\| /bin/sh") "| sh"))
1184 (let ((bash (assoc-ref inputs "bash")))
1185 (substitute* '("scripts/Configure-eximon")
1186 (("#!/bin/sh") (string-append "#!" bash "/bin/sh"))))
1187 #t)))
66cc3ab2
TUBK
1188 #:make-flags '("INSTALL_ARG=-no_chown")
1189 ;; No 'check' target.
1190 #:tests? #f))
85a9ffcb 1191 (home-page "https://www.exim.org/")
66cc3ab2
TUBK
1192 (synopsis
1193 "Message Transfer Agent (MTA) developed at the University of Cambridge")
1194 (description
1195 "Exim is a message transfer agent (MTA) developed at the University of
1196Cambridge for use on Unix systems connected to the Internet. In style it is
1197similar to Smail 3, but its facilities are more general. There is a great
1198deal of flexibility in the way mail can be routed, and there are extensive
1199facilities for checking incoming mail.")
1200 (license gpl2+)))
1201
7d2b784b
MW
1202(define-public dovecot
1203 (package
1204 (name "dovecot")
bc6062ae 1205 (version "2.3.4")
7d2b784b
MW
1206 (source
1207 (origin
1208 (method url-fetch)
c8608faf 1209 (uri (string-append "https://www.dovecot.org/releases/"
7d2b784b
MW
1210 (version-major+minor version) "/"
1211 name "-" version ".tar.gz"))
4d6ce834 1212 (sha256 (base32
bc6062ae 1213 "01ggzf7b3jpl89mjiqr7xbpbs181g2gjf6wzg70qaqfzz3ppc6yr"))))
7d2b784b
MW
1214 (build-system gnu-build-system)
1215 (native-inputs
1216 `(("pkg-config" ,pkg-config)))
1217 (inputs
1218 `(("openssl" ,openssl)
1219 ("zlib" ,zlib)
1220 ("bzip2" ,bzip2)
fd5c70f8
AW
1221 ("sqlite" ,sqlite)
1222 ("linux-pam" ,linux-pam)))
7d2b784b
MW
1223 (arguments
1224 `(#:configure-flags '("--sysconfdir=/etc"
1225 "--localstatedir=/var")
1226 #:phases (modify-phases %standard-phases
1227 (add-before
1228 'configure 'pre-configure
1229 (lambda _
15ff38f1 1230 ;; Simple hack to avoid installing in /etc.
7d2b784b
MW
1231 (substitute* '("doc/Makefile.in"
1232 "doc/example-config/Makefile.in")
1233 (("pkgsysconfdir = .*")
1234 "pkgsysconfdir = /tmp/etc"))
072f1e22
EF
1235 #t))
1236 (add-after
15ff38f1 1237 'unpack 'patch-other-file-names
072f1e22
EF
1238 (lambda _
1239 (substitute*
15ff38f1
TGR
1240 "src/lib-program-client/test-program-client-local.c"
1241 (("(/bin/| )cat") (which "cat"))
072f1e22 1242 (("/bin/echo") (which "echo"))
15ff38f1
TGR
1243 (("/bin/false") (which "false"))
1244 (("/bin/sh") (which "bash"))
1245 (("head") (which "head"))
1246 (("sleep") (which "sleep")))
7d2b784b 1247 #t)))))
c8608faf 1248 (home-page "https://www.dovecot.org")
7d2b784b
MW
1249 (synopsis "Secure POP3/IMAP server")
1250 (description
1251 "Dovecot is a mail server whose major goals are security and reliability.
1252It supports mbox/Maildir and its own dbox/mdbox formats.")
1253 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
1254 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
1255 ;; Unicode, Inc. License Agreement for Data Files and Software.
1256 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
1257
944a5cdd 1258(define-public dovecot-trees
cf47a8a5 1259 (package
1260 (name "dovecot-trees")
1261 (version "2.1.0")
1262 (source
1263 (origin
1264 (method url-fetch)
1265 (uri (string-append "https://0xacab.org/riseuplabs/trees/repository/"
1266 "archive.tar.gz?ref=v" version))
1267 (file-name (string-append name "-" version ".tar.gz"))
1268 (sha256
1269 (base32
0e66f4a1
TGR
1270 "0rkk10b1bsjz979sc864vpgcdchy7yxwmyv4ik50lar1h6awdnrf"))
1271 (patches
1272 (search-patches "dovecot-trees-support-dovecot-2.3.patch"))))
cf47a8a5 1273 (build-system gnu-build-system)
1274 (native-inputs
1275 `(("automake" ,automake)
1276 ("autoconf" ,autoconf)
1277 ("libtool" ,libtool)
1278 ("dovecot" ,dovecot)
1279 ("pkg-config" ,pkg-config)))
1280 (inputs
1281 `(("libsodium" ,libsodium)))
1282 (arguments
1283 `(#:tests? #f ;No tests exist.
1284 #:configure-flags (list (string-append "--with-dovecot="
1285 (assoc-ref %build-inputs "dovecot")
1286 "/lib/dovecot"))
1287 #:phases
1288 (modify-phases %standard-phases
d10092b8 1289 (add-after 'unpack 'autogen
cf47a8a5 1290 (lambda _
1a1f778e 1291 (invoke "sh" "autogen.sh"))))))
cf47a8a5 1292 (home-page "https://0xacab.org/riseuplabs/trees")
1293 (synopsis "NaCL-based Dovecot email storage encryption plugin")
1294 (description
1295 "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
944a5cdd 1296Dovecot encryption plugin. This plugin adds individually encrypted mail
1297storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
1298which uses OpenSSL and RSA keypairs. TREES works in a similar way, but uses
1299the Sodium crypto library (based on NaCL).
1300
1301How it works:
1302@enumerate
1303@item On IMAP log in, the user's cleartext password is passed to the plugin.
1304@item The plugin creates an argon2 digest from the password.
1305@item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
1306@item Inside the secretbox is stored a Curve25519 private key.
1307@item The Curve25519 private key is used to decrypt each individual message,
1308using lidsodium sealed boxes.
1309@item New mail is encrypted as it arrives using the Curve25519 public key.
1310@end enumerate\n")
cf47a8a5 1311 (license agpl3)))
944a5cdd 1312
a4651f64 1313(define-public dovecot-libsodium-plugin
1314 (let ((commit "044de73c01c35385df0105f6b387bec5d5317ce7")
1315 (revision "1"))
1316 (package
1317 (name "dovecot-libsodium-plugin")
1318 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
1319 (source
1320 (origin
1321 (method git-fetch)
1322 (uri (git-reference
1323 (url "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1324 (commit commit)))
1325 (file-name (string-append name "-" version "-checkout"))
1326 (sha256
1327 (base32
1328 "13h07l7xy713zchnj2p9fhvq7fdl4zy1ai94li3ygkqjjj8hrgas"))))
1329 (build-system gnu-build-system)
1330 (native-inputs
1331 `(("automake" ,automake)
1332 ("autoconf" ,autoconf)
1333 ("libtool" ,libtool)
1334 ("dovecot" ,dovecot)
1335 ("pkg-config" ,pkg-config)))
1336 (inputs
1337 `(("libsodium" ,libsodium)))
1338 (arguments
1339 `(#:tests? #f ;No tests exist.
1340 #:configure-flags (list (string-append "--with-dovecot="
1341 (assoc-ref %build-inputs "dovecot")
1342 "/lib/dovecot"))
1343 #:phases
1344 (modify-phases %standard-phases
d10092b8 1345 (add-after 'unpack 'autogen
a4651f64 1346 (lambda _
bc884ed8 1347 (invoke "sh" "autogen.sh"))))))
a4651f64 1348 (home-page "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1349 (synopsis "Libsodium password hashing schemes plugin for Dovecot")
1350 (description
1351 "@code{dovecot-libsodium-plugin} provides libsodium password
1352hashing schemes plugin for @code{Dovecot}.")
1353 (license gpl3+))))
1354
81ce19f4
1355(define-public isync
1356 (package
1357 (name "isync")
49490231 1358 (version "1.3.0")
81ce19f4
1359 (source
1360 (origin
1361 (method url-fetch)
1362 (uri (string-append "mirror://sourceforge/isync/isync/"
1363 version "/isync-" version ".tar.gz"))
1364 (sha256 (base32
49490231 1365 "173wd7x8y5sp94slzwlnb7zhgs32r57zl9xspl2rf4g3fqwmhpwd"))))
81ce19f4 1366 (build-system gnu-build-system)
49490231
LF
1367 (native-inputs
1368 `(("perl" ,perl)))
81ce19f4
1369 (inputs
1370 `(("bdb" ,bdb)
a052d5ab 1371 ("cyrus-sasl" ,cyrus-sasl)
a66fb3a1
TGR
1372 ("openssl" ,openssl)
1373 ("zlib" ,zlib)))
81ce19f4
1374 (home-page "http://isync.sourceforge.net/")
1375 (synopsis "Mailbox synchronization program")
1376 (description
f6cd8586 1377 "isync/mbsync is a command-line tool for two-way synchronization of
81ce19f4
1378mailboxes. Currently Maildir and IMAP are supported types.")
1379 (license gpl2+)))
1380
26b8de19
EB
1381(define-public perl-email-abstract
1382 (package
1383 (name "perl-email-abstract")
1384 (version "3.008")
1385 (source
1386 (origin
1387 (method url-fetch)
1388 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1389 "Email-Abstract-" version ".tar.gz"))
1390 (sha256
1391 (base32
1392 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
1393 (build-system perl-build-system)
1394 (propagated-inputs
1395 `(("perl-email-simple" ,perl-email-simple)
a2190ccc 1396 ("perl-module-pluggable" ,perl-module-pluggable)
26b8de19 1397 ("perl-mro-compat" ,perl-mro-compat)))
9aba9b12 1398 (home-page "https://metacpan.org/release/Email-Abstract")
26b8de19
EB
1399 (synopsis "Interface to mail representations")
1400 (description "Email::Abstract provides module writers with the ability to
1401write simple, representation-independent mail handling code.")
2f3108ad 1402 (license perl-license)))
26b8de19 1403
ebda902f
EB
1404(define-public perl-email-address
1405 (package
1406 (name "perl-email-address")
c8213ffc 1407 (version "1.909")
ebda902f
EB
1408 (source
1409 (origin
1410 (method url-fetch)
1411 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1412 "Email-Address-" version ".tar.gz"))
1413 (sha256
1414 (base32
c8213ffc 1415 "0l7x6sl06j9ffgfz5f9vgms2b5axd4cgp5fj03ivb3kia4km6b3g"))))
ebda902f 1416 (build-system perl-build-system)
9aba9b12 1417 (home-page "https://metacpan.org/release/Email-Address")
ebda902f
EB
1418 (synopsis "Email address parsing and creation")
1419 (description "Email::Address implements a regex-based RFC 2822 parser that
1420locates email addresses in strings and returns a list of Email::Address
1421objects found. Alternatively you may construct objects manually.")
2f3108ad 1422 (license perl-license)))
ebda902f 1423
aa86a3be
EB
1424(define-public perl-email-date-format
1425 (package
1426 (name "perl-email-date-format")
1427 (version "1.005")
1428 (source
1429 (origin
1430 (method url-fetch)
1431 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1432 "Email-Date-Format-" version ".tar.gz"))
1433 (sha256
1434 (base32
1435 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
1436 (build-system perl-build-system)
9aba9b12 1437 (home-page "https://metacpan.org/release/Email-Date-Format")
aa86a3be
EB
1438 (synopsis "Produce RFC 2822 date strings")
1439 (description "Email::Date::Format provides a means for generating an RFC
14402822 compliant datetime string.")
2f3108ad 1441 (license perl-license)))
aa86a3be 1442
08bf7095
EB
1443(define-public perl-email-messageid
1444 (package
1445 (name "perl-email-messageid")
1fb37ef0 1446 (version "1.406")
08bf7095
EB
1447 (source
1448 (origin
1449 (method url-fetch)
1450 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1451 "Email-MessageID-" version ".tar.gz"))
1452 (sha256
1453 (base32
1fb37ef0 1454 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
08bf7095 1455 (build-system perl-build-system)
9aba9b12 1456 (home-page "https://metacpan.org/release/Email-MessageID")
08bf7095
EB
1457 (synopsis "Generate world unique message-ids")
1458 (description "Email::MessageID generates recommended message-ids to
1459identify a message uniquely.")
2f3108ad 1460 (license perl-license)))
08bf7095 1461
0a4c49f6
EB
1462(define-public perl-email-mime
1463 (package
1464 (name "perl-email-mime")
4f50fd75 1465 (version "1.946")
0a4c49f6
EB
1466 (source
1467 (origin
1468 (method url-fetch)
1469 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1470 "Email-MIME-" version ".tar.gz"))
1471 (sha256
1472 (base32
4f50fd75 1473 "0z1k3i0lzp2k421gc8f3wq0jbqflkbw2xqd2k7n7pmv56417kvk8"))))
0a4c49f6
EB
1474 (build-system perl-build-system)
1475 (propagated-inputs
1476 `(("perl-email-address" ,perl-email-address)
1477 ("perl-email-messageid" ,perl-email-messageid)
1478 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1479 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1480 ("perl-email-simple" ,perl-email-simple)
4f50fd75
TGR
1481 ("perl-mime-types" ,perl-mime-types)
1482 ("perl-module-runtime" ,perl-module-runtime)))
9aba9b12 1483 (home-page "https://metacpan.org/release/Email-MIME")
0a4c49f6
EB
1484 (synopsis "MIME message handling")
1485 (description "Email::MIME is an extension of the Email::Simple module, to
1486handle MIME encoded messages. It takes a message as a string, splits it up
1487into its constituent parts, and allows you access to various parts of the
1488message. Headers are decoded from MIME encoding.")
2f3108ad 1489 (license perl-license)))
0a4c49f6 1490
55025bb5
EB
1491(define-public perl-email-mime-contenttype
1492 (package
1493 (name "perl-email-mime-contenttype")
9b5fc20c 1494 (version "1.022")
55025bb5
EB
1495 (source
1496 (origin
1497 (method url-fetch)
1498 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1499 "Email-MIME-ContentType-" version ".tar.gz"))
1500 (sha256
1501 (base32
9b5fc20c 1502 "042kxhs3bp1ab9z0mbr1wy21ld4lxd6v2a2mmrashqnsn2075fws"))))
55025bb5
EB
1503 (build-system perl-build-system)
1504 (native-inputs
1505 `(("perl-capture-tiny" ,perl-capture-tiny)))
9aba9b12 1506 (home-page "https://metacpan.org/release/Email-MIME-ContentType")
55025bb5
EB
1507 (synopsis "Parse MIME Content-Type headers")
1508 (description "Email::MIME::ContentType parses a MIME Content-Type
1509header.")
2f3108ad 1510 (license perl-license)))
55025bb5 1511
02e29936
EB
1512(define-public perl-email-mime-encodings
1513 (package
1514 (name "perl-email-mime-encodings")
1515 (version "1.315")
1516 (source
1517 (origin
1518 (method url-fetch)
1519 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1520 "Email-MIME-Encodings-" version ".tar.gz"))
1521 (sha256
1522 (base32
1523 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1524 (build-system perl-build-system)
1525 (native-inputs
1526 `(("perl-capture-tiny" ,perl-capture-tiny)))
9aba9b12 1527 (home-page "https://metacpan.org/release/Email-MIME-Encodings")
02e29936
EB
1528 (synopsis "Unified interface to MIME encoding and decoding")
1529 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
2f3108ad 1530 (license perl-license)))
02e29936 1531
a24c5420
EB
1532(define-public perl-email-sender
1533 (package
1534 (name "perl-email-sender")
801eb746 1535 (version "1.300031")
a24c5420
EB
1536 (source
1537 (origin
1538 (method url-fetch)
1539 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1540 "Email-Sender-" version ".tar.gz"))
1541 (sha256
1542 (base32
801eb746 1543 "052g0slw3h2lzn93j71fi47nfawww2aph4jhr3c860ji70lkf4n4"))))
a24c5420
EB
1544 (build-system perl-build-system)
1545 (native-inputs
1546 `(("perl-capture-tiny" ,perl-capture-tiny)))
1547 (propagated-inputs
1548 `(("perl-email-abstract" ,perl-email-abstract)
1549 ("perl-email-address" ,perl-email-address)
1550 ("perl-email-simple" ,perl-email-simple)
1551 ("perl-list-moreutils" ,perl-list-moreutils)
1552 ("perl-module-runtime" ,perl-module-runtime)
1553 ("perl-moo" ,perl-moo)
1554 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1555 ("perl-sub-exporter" ,perl-sub-exporter)
1556 ("perl-throwable" ,perl-throwable)
1557 ("perl-try-tiny" ,perl-try-tiny)))
9aba9b12 1558 (home-page "https://metacpan.org/release/Email-Sender")
a24c5420
EB
1559 (synopsis "Perl library for sending email")
1560 (description "Email::Sender replaces the old and sometimes problematic
1561Email::Send library.")
2f3108ad 1562 (license perl-license)))
a24c5420 1563
151ef3ed
EB
1564(define-public perl-email-simple
1565 (package
1566 (name "perl-email-simple")
3a2f1d93 1567 (version "2.216")
151ef3ed
EB
1568 (source
1569 (origin
1570 (method url-fetch)
1571 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1572 "Email-Simple-" version ".tar.gz"))
1573 (sha256
1574 (base32
3a2f1d93 1575 "1m4brbjvalyp5kjqslqv4155dzwg977shxin208i7lc8236n6pyq"))))
151ef3ed
EB
1576 (build-system perl-build-system)
1577 (propagated-inputs
1578 `(("perl-email-date-format" ,perl-email-date-format)))
9aba9b12 1579 (home-page "https://metacpan.org/release/Email-Simple")
151ef3ed
EB
1580 (synopsis "Parsing of RFC 2822 messages")
1581 (description "Email::Simple provides simple parsing of RFC 2822 message
1582format and headers.")
2f3108ad 1583 (license perl-license)))
151ef3ed 1584
f5dceecb
AW
1585(define-public libesmtp
1586 (package
1587 (name "libesmtp")
1588 (version "1.0.6")
1589 (source
1590 (origin
1591 (method url-fetch)
049e02ea
LF
1592 (uri (list (string-append "https://pkgs.fedoraproject.org/repo/pkgs/"
1593 "libesmtp/libesmtp-" version ".tar.bz2/"
1594 "bf3915e627fd8f35524a8fdfeed979c8/libesmtp-"
1595 version ".tar.bz2")
1596 ;; XXX This site is offline, so we fetch Fedora's cached copy
1597 ;; of the source tarball.
1598 (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1599 version ".tar.bz2")))
f5dceecb
AW
1600 (sha256
1601 (base32
1602 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1603 (build-system gnu-build-system)
1604 (propagated-inputs
1605 `(("openssl" ,openssl)))
1606 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1607 (synopsis "Library for sending mail via remote hosts using SMTP")
1608 (description "libESMTP is an SMTP client which manages posting (or
1609submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1610It may be used as part of a Mail User Agent (MUA) or other program that must
1611be able to post electronic mail where mail functionality may not be that
1612program's primary purpose.")
1613 (license (list lgpl2.1+ gpl2+))))
1614
f8ae32a2
AW
1615(define-public esmtp
1616 (package
1617 (name "esmtp")
1618 (version "1.2")
1619 (source
1620 (origin
1621 (method git-fetch)
1622 (uri (git-reference
1623 (url "https://github.com/andywingo/esmtp.git")
1624 (commit "01bf9fc")))
1625 (sha256
1626 (base32
1627 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1628 (file-name (string-append name "-" version "-checkout"))))
1629 (arguments
1630 `(#:phases (modify-phases %standard-phases
73c0e477
EF
1631 (replace 'bootstrap
1632 (lambda _ (invoke "autoreconf" "-vfi"))))))
f8ae32a2
AW
1633 (build-system gnu-build-system)
1634 (native-inputs
1635 `(("bison" ,bison)
1636 ("flex" ,flex)
1637 ("autoconf" ,autoconf)
1638 ("automake" ,automake)
1639 ("libtool" ,libtool)))
1640 (inputs
718c5dd6 1641 `(("libesmtp" ,libesmtp)))
3b3b60d0 1642 (home-page "https://sourceforge.net/projects/esmtp/")
f8ae32a2
AW
1643 (synopsis "Relay-only mail transfer agent (MTA)")
1644 (description "Esmtp is a simple relay-only mail transfer agent built using
1645libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1646user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1647page for more on configuration. This package also provides minimal
1648compatibility shims for the @command{sendmail}, @command{mailq}, and
1649@command{newaliases} commands.")
1650 (license gpl2+)))
1651
34dd26af
CAW
1652(define-public fdm
1653 (package
1654 (name "fdm")
1655 (version "1.9")
1656 (source (origin
1657 (method url-fetch)
1658 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1659 version "/fdm-"
1660 version ".tar.gz"))
1661 (file-name (string-append name "-" version ".tar.gz"))
1662 (sha256
1663 (base32 "054rscijahiza5f9qha79rg3siji3bk5mk10f8c2vqx7m4w6qh8n"))))
1664 (build-system gnu-build-system)
1665 (inputs
1666 `(("tdb" ,tdb)
1667 ("openssl" ,openssl)
1668 ("zlib" ,zlib)))
1669 (home-page "https://github.com/nicm/fdm")
1670 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1671 (description "fdm is a program designed to fetch mail from POP3
1672or IMAP servers, or receive local mail from stdin, and
1673deliver it in various ways.")
1674 (license
1675 ;; Why point to a source file? Well, all the individual files have a
1676 ;; copy of this license in their headers, but there's no seprate file
1677 ;; with that information.
16966d5b 1678 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
34dd26af 1679
e90819c4
LG
1680
1681(define-public procmail
1682 (package
1683 (name "procmail")
1684 (version "3.22")
1685 (source
1686 (origin
1687 (method url-fetch)
1688 (uri (string-append
1689 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1690 version
1691 ".tar.gz"))
1692 (sha256
1693 (base32
1694 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1695 ;; The following patch fixes an ambiguous definition of
1696 ;; getline() in formail.c. The patch is provided by Debian as
1697 ;; patch 24.
1d982d78 1698 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
c297e965
LF
1699 "procmail-CVE-2014-3618.patch"
1700 "procmail-CVE-2017-16844.patch"))))
e90819c4
LG
1701 (arguments
1702 `(#:phases (modify-phases %standard-phases
1703 (replace 'configure
1704 (lambda _
1705 (substitute* "Makefile"
1706 (("/bin/sh")
1707 (which "sh"))
1708 (("/usr")
1709 (assoc-ref %outputs "out"))
1710 (("/bin/rm")
1711 (which "rm")))
1712 #t)))
1713 #:tests? #f)) ;; There are no tests indicating a successful
1714 ;; build. Some tests of basic locking mechanisms provided by the
8f65585b 1715 ;; file system are performed during 'make install'. However, these
e90819c4
LG
1716 ;; are performed before the actual build process.
1717 (build-system gnu-build-system)
05aa576b 1718 (inputs `(("exim" ,exim)))
e90819c4
LG
1719 (home-page "http://www.procmail.org/")
1720 (synopsis "Versatile mail delivery agent (MDA)")
1721 (description "Procmail is a mail delivery agent (MDA) featuring support
1722for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1723can be sorted into separate files/directories and arbitrary commands can be
1724executed on mail arrival. Procmail is considered stable, but is no longer
1725maintained.")
1726 (license gpl2+))) ;; procmail allows to choose the
1727 ;; nonfree Artistic License 1.0
1728 ;; as alternative to the GPL2+.
1729 ;; This option is not listed here.
e90819c4 1730
61c30e9d
LF
1731(define-public khard
1732 (package
1733 (name "khard")
224b1c83 1734 (version "0.12.2")
61c30e9d
LF
1735 (source (origin
1736 (method url-fetch)
1737 (uri (pypi-uri name version))
1738 (sha256
1739 (base32
224b1c83 1740 "01y52qmab4cw9wmx87aahnxbyaxrxw8j2wx06mpcqsfvgk8d54wi"))))
61c30e9d
LF
1741 (build-system python-build-system)
1742 (arguments
a57495e2 1743 `(#:phases
61c30e9d 1744 (modify-phases %standard-phases
61c30e9d
LF
1745 (add-after 'install 'install-doc
1746 (lambda* (#:key outputs #:allow-other-keys)
1747 (let* ((out (assoc-ref outputs "out"))
1748 (doc (string-append out "/share/doc/khard")))
e9eafae2
MB
1749 (copy-recursively "misc/khard" doc)
1750 #t))))
224b1c83
EF
1751 ;; Tests are currently only runnable without preexisting data on
1752 ;; the development branch:
1753 ;; https://github.com/scheibler/khard/issues/176
e9eafae2 1754 #:tests? #f))
61c30e9d 1755 (propagated-inputs
224b1c83
EF
1756 `(("python-atomicwrites" ,python-atomicwrites)
1757 ("python-configobj" ,python-configobj)
a57495e2 1758 ("python-pyyaml" ,python-pyyaml)
224b1c83
EF
1759 ("python-ruamel.yaml" ,python-ruamel.yaml)
1760 ("python-unidecode" ,python-unidecode)
1761 ("python-vobject" ,python-vobject)))
61c30e9d
LF
1762 (synopsis "Console address book using CardDAV")
1763 (description "Khard is an address book for the console. It creates, reads,
1764modifies and removes CardDAV address book entries at your local machine. For
1765synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1766Khard can also be used from within the email client @command{mutt}.")
1767 (home-page "https://github.com/scheibler/khard")
1768 (license gpl3+)))
be0c5733
DM
1769
1770(define-public perl-mail-spf
1771 (package
1772 (name "perl-mail-spf")
1773 (version "v2.9.0")
1774 (source
1775 (origin
1776 (method url-fetch)
1777 (uri (string-append
1778 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-"
1779 version
1780 ".tar.gz"))
1781 (sha256
1782 (base32
1783 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1784 (build-system perl-build-system)
1785 (native-inputs
1786 `(("perl-module-build" ,perl-module-build)
1787 ("perl-net-dns-resolver-programmable"
1788 ,perl-net-dns-resolver-programmable)))
1789 (arguments
1790 `(#:phases (modify-phases %standard-phases
1791 (add-before 'configure 'modify-Build.PL
1792 (lambda* (#:key outputs #:allow-other-keys)
1793 (substitute* "Build.PL"
1794 (("'/usr/sbin'") (string-append "'"
1795 (assoc-ref outputs "out")
1796 "/sbin'")))
1797 #t)))))
1798 (inputs
1799 `(("perl-error" ,perl-error)
1800 ("perl-net-dns" ,perl-net-dns)
1801 ("perl-netaddr-ip" ,perl-netaddr-ip)
1802 ("perl-uri" ,perl-uri)))
1803 (home-page
9aba9b12 1804 "https://metacpan.org/release/Mail-SPF")
be0c5733
DM
1805 (synopsis
1806 "Perl implementation of Sender Policy Framework")
1807 (description "Mail::SPF is the Sender Policy Framework implemented
1808in Perl.")
1809 (license bsd-3)))
24262239
CL
1810
1811(define-public mb2md
1812 (package
1813 (name "mb2md")
1814 (version "3.20")
1815 (source (origin
1816 (method url-fetch)
1817 (uri (string-append
1818 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
1819 version ".pl.gz"))
1820 (sha256
1821 (base32
1822 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
1823 (build-system trivial-build-system)
1824 (arguments
1825 '(#:modules ((guix build utils))
1826 #:builder
1827 (begin
1828 (use-modules (guix build utils))
1829 (let* ((source (assoc-ref %build-inputs "source"))
1830 (out (assoc-ref %outputs "out"))
1831 (bin (string-append out "/bin"))
1832 (perl (assoc-ref %build-inputs "perl"))
1833 (gzip (assoc-ref %build-inputs "gzip"))
1834 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
1835 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
1836 (mkdir-p bin)
1837 (with-directory-excursion bin
1838 (copy-file source "mb2md.gz")
e3cfef22 1839 (invoke (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
24262239
CL
1840 (substitute* "mb2md"
1841 (("#!/usr/bin/perl")
1842 (string-append "#!/usr/bin/perl -I " perl5lib)))
1843 (patch-shebang "mb2md" (list (string-append perl "/bin")))
1844 (chmod "mb2md" #o555))
1845 #t))))
c695fb76 1846 (native-inputs `(("gzip" ,gzip)))
24262239
CL
1847 (inputs `(("perl" ,perl)
1848 ("perl-timedate" ,perl-timedate)))
1849 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
1850 (synopsis "Mbox to maildir converter")
1851 (description
1852 "Mb2md is a Perl script that takes one or more mbox format files and
1853converts them to maildir format directories.")
1854 (license public-domain)))
e0d7b421
AI
1855
1856(define-public mpop
1857 (package
1858 (name "mpop")
3e84ce51 1859 (version "1.4.0")
e0d7b421
AI
1860 (source
1861 (origin
1862 (method url-fetch)
1497b95c
TGR
1863 (uri (string-append "https://marlam.de/mpop/releases/"
1864 name "-" version ".tar.xz"))
e0d7b421
AI
1865 (sha256
1866 (base32
3e84ce51 1867 "14xsvpm5bc1wycisq882gqrnamnyi1q4rlk6anlw8ihzvwgm4h2j"))))
e0d7b421
AI
1868 (build-system gnu-build-system)
1869 (inputs
1870 `(("gnutls" ,gnutls)
1871 ("libidn" ,libidn)))
1872 (native-inputs
1873 `(("pkg-config" ,pkg-config)))
1497b95c 1874 (home-page "https://marlam.de/mpop/")
e0d7b421
AI
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+)))
74c0282c 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+)))
5d87088c
JD
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"))
19527952 1933 (("/bin/sh") (which "sh")))
5d87088c
JD
1934
1935 (substitute* "devtools/bin/Build"
19527952 1936 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
5d87088c
JD
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', `')
55492129
TGR
1955" (getcwd))))
1956 #t))
5d87088c
JD
1957 (replace 'build
1958 (lambda _
55492129
TGR
1959 (invoke "sh" "Build")
1960 (with-directory-excursion "cf/cf"
1961 (copy-file "generic-linux.mc" "sendmail.mc")
1962 (invoke "sh" "Build" "sendmail.cf"))
1963 #t))
5d87088c
JD
1964 (add-before 'install 'pre-install
1965 (lambda _
1966 (let ((out (assoc-ref %outputs "out")))
1967 (mkdir-p (string-append out "/usr/bin"))
1968 (mkdir-p (string-append out "/usr/sbin"))
1969 (mkdir-p (string-append out "/etc/mail"))
1970 (setenv "DESTDIR" out)
1971 (with-directory-excursion "cf/cf"
55492129
TGR
1972 (invoke "sh" "Build" "install-cf"))
1973 #t))))
5d87088c
JD
1974 ;; There is no make check. There are some post installation tests, but those
1975 ;; require root privileges
1976 #:tests? #f))
1977 (inputs
1978 `(("m4" ,m4)
1979 ("perl" ,perl)))
1980 (home-page "http://sendmail.org")
1981 (synopsis
1982 "Highly configurable Mail Transfer Agent (MTA)")
1983 (description
1984 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
1985Allman. It is highly configurable and supports many delivery methods and many
1986transfer protocols.")
1987 (license (non-copyleft "file://LICENSE"
1988 "See LICENSE in the distribution."))))
1989
8b53366c 1990(define-public opensmtpd
1991 (package
1992 (name "opensmtpd")
2f2ce920 1993 (version "6.0.3p1")
8b53366c 1994 (source (origin
1995 (method url-fetch)
1996 (uri (string-append "https://www.opensmtpd.org/archives/"
1997 name "-" version ".tar.gz"))
1998 (sha256
1999 (base32
d6dd64af
AZ
2000 "10bsfsnlg9d9i6l2izdnxp05s3ri8fvwzqxvx1jmarc852382619"))
2001 ;; Fixed upstream: <github.com/OpenSMTPD/OpenSMTPD/pull/835>.
2002 (patches (search-patches "opensmtpd-fix-crash.patch"))))
8b53366c 2003 (build-system gnu-build-system)
2004 (inputs
2005 `(("bdb" ,bdb)
2006 ("libressl" ,libressl)
2007 ("libevent" ,libevent)
2008 ("libasr" ,libasr)
2009 ("linux-pam" ,linux-pam)
2010 ("zlib" ,zlib)))
2011 (native-inputs
d7da7604
SB
2012 `(("bison" ,bison)
2013 ("groff" ,groff)))
8b53366c 2014 (arguments
ae1e2133 2015 `(#:configure-flags
a1b517f9 2016 (list "--with-table-db" "--with-auth-pam" "--localstatedir=/var"
ae1e2133
SB
2017 "--with-user-smtpd=smtpd" "--with-user-queue=smtpq"
2018 "--with-group-queue=smtpq"
2f2ce920 2019 "--with-path-socket=/var/run" ; not default (./configure lies)
ae1e2133 2020 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt")
8b53366c 2021 #:phases
2022 (modify-phases %standard-phases
19fed049
TGR
2023 ;; Fix some incorrectly hard-coded external tool file names.
2024 (add-after 'unpack 'patch-FHS-file-names
2025 (lambda* (#:key inputs #:allow-other-keys)
2026 (substitute* "smtpd/smtpctl.c"
2027 (("/bin/cat") (which "cat"))
2028 (("/bin/sh") (which "sh")))
2029 #t))
8b53366c 2030 ;; OpenSMTPD provides a single utility smtpctl to control the daemon and
2031 ;; the local submission subsystem. To accomodate systems that require
2032 ;; historical interfaces such as sendmail, newaliases or makemap, the
2033 ;; smtpctl utility can operate in compatibility mode if called with the
2034 ;; historical name.
a1eabab1
TGR
2035 (add-after 'install 'install-compability-links
2036 (lambda* (#:key outputs #:allow-other-keys)
2037 (let* ((out (assoc-ref outputs "out"))
8b53366c 2038 (sbin (string-append out "/sbin/")))
a1eabab1
TGR
2039 (for-each (lambda (command)
2040 (symlink "smtpctl" (string-append sbin command)))
8b53366c 2041 '("makemap" "sendmail" "send-mail"
2042 "newaliases" "mailq")))
2043 #t)))))
2044 (synopsis "Lightweight SMTP daemon")
2045 (description
2046 "OpenSMTPD is an implementation of the server-side SMTP protocol, with
2047some additional standard extensions. It allows ordinary machines to exchange
2048e-mails with other systems speaking the SMTP protocol.")
2049 (home-page "https://www.opensmtpd.org")
2050 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
19262a71 2051 public-domain isc license:openssl))))
152ffe7c 2052
2053(define-public opensmtpd-extras
2054 (package
2055 (name "opensmtpd-extras")
2056 (version "5.7.1")
2057 (source (origin
2058 (method url-fetch)
2059 (uri (string-append "https://www.opensmtpd.org/archives/"
2060 name "-" version ".tar.gz"))
2061 (sha256
2062 (base32
2063 "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm"))))
2064 (build-system gnu-build-system)
2065 (inputs
2066 `(("libressl" ,libressl)
2067 ("libevent" ,libevent)
2068 ("libasr" ,libasr)
2069 ("python-2" ,python-2)
2070 ("opensmtpd" ,opensmtpd)
2071 ("perl" ,perl)
2072 ("lua" ,lua)
2073 ("postgresql" ,postgresql)
2074 ("sqlite" ,sqlite)
2075 ("linux-pam" ,linux-pam)))
2076 (native-inputs
2077 `(("bison" ,bison)
2078 ("pkg-config" ,pkg-config)
2079 ("groff" ,groff)
2080 ("automake" ,automake)
2081 ("autoconf" ,autoconf)))
2082 (arguments
2083 `(;; We have to configure it like this because the default checks for for example
2084 ;; python in /usr/local/bin, /usr/bin and fails otherwise.
2085 #:configure-flags (list
2086 "--with-filter-clamav" "--with-filter-dkim-signer"
2087 "--with-filter-dnsbl" "--with-filter-lua"
2088 "--with-filter-monkey" "--with-filter-pause"
2089 "--with-filter-perl" "--with-filter-python"
2090 "--with-filter-regex" "--with-filter-spamassassin"
2091 "--with-filter-stub" "--with-filter-trace"
2092 "--with-filter-void"
2093
2094 "--with-queue-null" "--with-queue-python"
2095 "--with-queue-ram" "--with-queue-stub"
2096
2097 "--with-scheduler-python" "--with-scheduler-ram"
2098 "--with-scheduler-stub"
2099
2100 "--with-table-ldap" ; "--with-table-mysql"
2101 "--with-table-passwd" "--with-table-postgres"
2102 "--with-table-python" "--with-table-socketmap"
2103 "--with-table-sqlite" "--with-table-stub"
2104 ;;"--with-table-redis" ; TODO: package hiredis
2105
2106 "--with-user=smtpd" "--with-privsep-user=smtpd"
2107 "--localstatedir=/var" "--sysconfdir=/etc"
2108 "--with-lua-type=lua" ; can use lua or luajit
2109
2110 (string-append "--with-python="
2111 (assoc-ref %build-inputs "python-2"))
2112 (string-append "--with-lua="
2113 (assoc-ref %build-inputs "lua")))))
19262a71
LC
2114 (license (list bsd-2 bsd-3 bsd-4
2115 public-domain isc license:openssl))
152ffe7c 2116 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
2117 (description
2118 "This package provides extra tables, filters, and various other addons
2119for OpenSMTPD to extend its functionality.")
2120 (home-page "https://www.opensmtpd.org")))
6d3dda4f 2121
2122(define-public python-mailmanclient
2123 (package
2124 (name "python-mailmanclient")
c115a1c8 2125 (version "3.1.1")
6d3dda4f 2126 (source
2127 (origin
2128 (method url-fetch)
2129 (uri (pypi-uri "mailmanclient" version))
2130 (sha256
2131 (base32
c115a1c8 2132 "0fdfs5g3pf30v2i7w18pdkv9xnfxmfcv66mzv56dck0a1igq07m3"))))
6d3dda4f 2133 (build-system python-build-system)
2134 (arguments
2135 `(#:tests? #f)) ; Requires mailman running
f22efa01 2136 (propagated-inputs
6d3dda4f 2137 `(("python-six" ,python-six)
2138 ("python-httplib2" ,python-httplib2)))
2139 (home-page "https://launchpad.net/mailman.client")
2140 (synopsis "Python bindings for the Mailman 3 REST API")
2141 (description
2142 "The mailmanclient library provides official Python bindings for
2143the GNU Mailman 3 REST API.")
6d3dda4f 2144 (license lgpl3+)))
2145
2146(define-public python2-mailmanclient
5c31f4aa 2147 (package-with-python2 python-mailmanclient))
3163a289 2148
2149(define-public mlmmj
2150 (package
2151 (name "mlmmj")
28b48c87 2152 (version "1.3.0")
3163a289 2153 (source
2154 (origin
2155 (method url-fetch)
2156 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
2157 version ".tar.bz2"))
2158 (sha256
2159 (base32
28b48c87 2160 "0hpj10qad821ci11si8xc2qnmkzfn90y13s43fm4fca38f0qjp8w"))))
3163a289 2161 (build-system gnu-build-system)
2162 (inputs
2163 `(("perl" ,perl))) ; For "contrib/web/"
2164 (native-inputs
2165 `(("pkg-config" ,pkg-config)))
2166 (arguments
2167 `(#:configure-flags
2168 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
2169 ;; It opens the files control/mimedeny and control/mimestrip to get a list
2170 ;; of mimetypes for parts of multipart/mime messages that should be denied
2171 ;; or stripped. The parts then get stripped directly when the mail is
2172 ;; received. mlmmj-receive-strip also appends an extra header
2173 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
2174 ;; mime parts
2175 (list "--enable-receive-strip")
2176 #:phases
2177 (modify-phases %standard-phases
2178 (add-before 'install 'install-contrib
2179 (lambda* (#:key outputs #:allow-other-keys)
2180 (let* ((out (assoc-ref outputs "out"))
2181 (share (string-append out "/share/mlmmj"))
2182 (contrib (string-append share "/contrib/web"))
2183 (texts (string-append share "/listtexts")))
2184 (copy-recursively "contrib/web/" contrib)
2185 (copy-recursively "listtexts" texts)
2186 (rename-file texts (string-append share "/texts"))
2187 #t))))))
2188 (home-page "http://mlmmj.org")
2189 (synopsis "Mailing list managing made joyful")
2190 (description
2191 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
2192It works with many different Mail Transport Agents (MTAs) and is simple for a
d1e4ad1b 2193system administrator to install, configure and integrate with other software.
3163a289 2194As it uses very few resources, and requires no daemons, it is ideal for
2195installation on systems where resources are limited. Its features include:
2196@enumerate
2197@item Archive, Custom headers / footer,
2198@item Fully automated bounce handling (similar to ezmlm),
2199@item Complete requeueing functionality, Moderation functionality, Subject prefix,
2200@item Subscribers only posting, Regular expression access control,
2201@item Functionality to retrieve old posts, Web interface, Digests,
2202@item No-mail subscription, VERP support,
2203@item Delivery Status Notification (RFC1891) support,
2204@item Rich and customisable texts for automated operations.
2205@end enumerate\n")
2206 (license license:expat)))
3a263368 2207
ea3b9f7b 2208(define-public python2-django-mailman3
8a3741e6 2209 (package
ea3b9f7b 2210 (name "python2-django-mailman3")
bdf0c644 2211 (version "1.1.0")
8a3741e6 2212 (source
2213 (origin
2214 (method url-fetch)
2215 (uri (pypi-uri "django-mailman3" version))
2216 (sha256
2217 (base32
bdf0c644 2218 "1xjdkgfjwhgyrp5nxw65dcpcsr98ygj6856sp0bwkrmyxpd1xxk2"))))
8a3741e6 2219 (build-system python-build-system)
ea3b9f7b
CB
2220 (arguments
2221 `(#:phases
2222 (modify-phases %standard-phases
2223 (replace 'check
2224 (lambda _
dcfdaa15
TGR
2225 (invoke "django-admin"
2226 "test"
2227 "--settings=django_mailman3.tests.settings_test"
2228 "django_mailman3"))))
ea3b9f7b 2229 #:python ,python-2))
8a3741e6 2230 (inputs
ea3b9f7b 2231 `(("python2-django" ,python2-django)))
8a3741e6 2232 (propagated-inputs
ea3b9f7b
CB
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)))
8a3741e6 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
d99a2add 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
3a263368 2277(define-public blists
2278 (package
2279 (name "blists")
18b1589b 2280 (version "2.0")
3a263368 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
18b1589b 2288 "1xll5wn7py3bbncbwrj172f56nz75c9gwfsa80rwd96ss9gfmp3c"))))
3a263368 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)))
ed428a58
AI
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
d72f59a4 2320 "https://jetmore.org/john/code/swaks/files/swaks-"
ed428a58
AI
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 _
d72f59a4 2336 (invoke "pod2man" "doc/ref.pod" "swaks.1")))
ed428a58
AI
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)))))
d72f59a4 2349 (home-page "https://jetmore.org/john/code/swaks/")
ed428a58
AI
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+)))
b0eb2af2 2360
2361(define-public alpine
2362 (package
2363 (name "alpine")
05a40469 2364 (version "2.21.9999")
b0eb2af2 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.
32f9cc33 2371 ;; http://alpine.freeiz.com/alpine/readme/README.patches
78ba71b0 2372 (uri (string-append "http://repo.or.cz/alpine.git/snapshot/"
05a40469 2373 "d3e6f3932f2af9deca8eed09e30a55e9bd524362.tar.gz"))
78ba71b0 2374 (file-name (string-append name "-" version ".tar.gz"))
b0eb2af2 2375 (sha256
2376 (base32
05a40469 2377 "0w4qyybfdxi29r2z3giq0by6aa6v6nrgibh1xgv4d1vwwq4hw35w"))))
b0eb2af2 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)))
78ba71b0 2415 (home-page "http://repo.or.cz/alpine.git")
b0eb2af2 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)))
7c16151a
RS
2426
2427(define-public balsa
2428 (package
2429 (name "balsa")
e9201659 2430 (version "2.5.6")
7c16151a
RS
2431 (source
2432 (origin
2433 (method url-fetch)
e9201659
R
2434 (uri (string-append "https://pawsa.fedorapeople.org/balsa/"
2435 name "-" version ".tar.bz2"))
7c16151a
RS
2436 (sha256
2437 (base32
e9201659 2438 "17k6wcsl8gki7cskr3hhmfj6n54rha8ca3b6fzd8blsl5shsankx"))))
7c16151a
RS
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)
8e020519 2456 ("gmime" ,gmime-2.6)
7c16151a
RS
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
b95d5f62 2479the use of a local MTA such as Sendmail.")
7c16151a 2480 (license gpl3+)))
1e52fd83
AI
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)))
1679923a
DM
2506
2507(define-public pan
2508 (package
2509 (name "pan")
0eeade9b 2510 (version "0.145")
1679923a
DM
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
0eeade9b 2518 "1b4wamv33hprghcjk903bpvnd233yxyrm18qnh13alc8h1553nk8"))))
1679923a
DM
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
8e020519 2533 `(("gmime" ,gmime-2.6)
1679923a
DM
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))))
ae7c1c37
JL
2554
2555(define-public imapfilter
2556 (package
2557 (name "imapfilter")
88abd73e 2558 (version "2.6.12")
ae7c1c37
JL
2559 (source
2560 (origin
b1d30f46
TGR
2561 (method git-fetch)
2562 (uri (git-reference
2563 (url "https://github.com/lefcha/imapfilter.git")
2564 (commit (string-append "v" version))))
2565 (file-name (git-file-name name version))
ae7c1c37 2566 (sha256
88abd73e 2567 (base32 "0vzpc54fjf5vb5vx5w0fl20xvx1k9cg6a3hbl86mm8kwsqf3wrab"))))
ae7c1c37
JL
2568 (build-system gnu-build-system)
2569 (arguments
2570 `(#:tests? #f
2571 #:make-flags
2572 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2573 "CC=gcc")
2574 #:phases
2575 (modify-phases %standard-phases
2576 (delete 'configure)
2577 (add-after 'unpack 'fix-include-path
2578 (lambda* (#:key inputs #:allow-other-keys)
2579 (let ((pcre (assoc-ref inputs "pcre")))
2580 (substitute* "src/Makefile"
2581 (("INCDIRS =")
2582 (string-append "INCDIRS ="
2583 "-I" pcre "/include")))
2584 #t))))))
2585 (native-inputs
2586 `(("lua" ,lua)
2587 ("pcre" ,pcre)
2588 ("openssl" ,openssl)))
2589 (home-page "https://github.com/lefcha/imapfilter")
2590 (synopsis "IMAP mail filtering utility")
2591 (description "IMAPFilter is a mail filtering utility. It connects
2592to remote mail servers using IMAP, sends searching queries to the server and
2593processes mailboxes based on the results. It can be used to delete, copy,
2594move, flag, etc. messages residing in mailboxes at the same or different mail
2595servers. The 4rev1 and 4 versions of IMAP are supported.")
2596 (license license:expat)))
dc8675af
EF
2597
2598(define-public urlscan
2599 (package
2600 (name "urlscan")
d7571ff5 2601 (version "0.9.1")
dc8675af
EF
2602 (source
2603 (origin
2604 (method url-fetch)
2605 (uri (pypi-uri "urlscan" version))
2606 (sha256
2607 (base32
d7571ff5 2608 "0vpdyrx51sg9a8kswa7ibbcgcpvc7r03aq8x4n4c7v2xg0v3c7wb"))))
dc8675af
EF
2609 (build-system python-build-system)
2610 (propagated-inputs
2611 `(("python-urwid" ,python-urwid)))
2612 (home-page "https://github.com/firecat53/urlscan")
2613 (synopsis "View/select the URLs in an email message or file")
2614 (description
2615 "Urlscan is a small program that is designed to integrate with the
2616@code{mutt} mailreader to allow you to easily launch a Web browser for URLs
2617contained in email messages. It parses an email message or file and scans it
2618for URLs and email addresses. It then displays the URLs and their context
2619within the message, and allows you to choose one or more URLs to send to your
2620Web browser. Alternatively, it send a list of all URLs to stdout. It is a
2621replacement for the @code{urlview} program.")
2622 (license gpl2)))
829785c1
EB
2623
2624(define-public tnef
2625 (package
2626 (name "tnef")
2627 (version "1.4.17")
2628 (source
2629 (origin
2630 (method git-fetch)
2631 (uri (git-reference
2632 (url "https://github.com/verdammelt/tnef.git")
2633 (commit version)))
2634 (sha256
2635 (base32
2636 "0cq2xh5wd74qn6k2nnw5rayxgqhjl3jbzf4zlc4babcwxrv32ldh"))
2637 (file-name (git-file-name name version))))
2638 (build-system gnu-build-system)
2639 (native-inputs
2640 `(("autoconf" ,autoconf)
2641 ("automake" ,automake)))
2642 (arguments `(#:parallel-tests? #f)) ;tests are side-effect'y
2643 (home-page "https://github.com/verdammelt/tnef")
2644 (synopsis "Unpack @code{application/ms-tnef} attachments")
2645 (description
2646 "TNEF is a tar-like program that unpacks MIME attachments of type
2647@code{application/ms-tnef}.")
2648 (license gpl2+)))
e3a47031
RW
2649
2650(define-public mumi
e874f34d
RW
2651 (let ((commit "bfd96ce76b4600ae232e6548b26c9365095fd174")
2652 (revision "2"))
e3a47031
RW
2653 (package
2654 (name "mumi")
2655 (version (git-version "0.0.0" revision commit))
2656 (source (origin
2657 (method git-fetch)
2658 (uri (git-reference
2659 (url "https://git.elephly.net/software/mumi.git")
2660 (commit commit)))
2661 (file-name (git-file-name name version))
2662 (sha256
2663 (base32
e874f34d 2664 "05miwfi1bh0v9x2gvn15bwkb3gn4xy53z506ysjzns2y497zkc5h"))))
e3a47031
RW
2665 (build-system gnu-build-system)
2666 (arguments
2667 `(#:phases
2668 (modify-phases %standard-phases
2669 (add-after 'install 'wrap-executable
2670 (lambda* (#:key outputs #:allow-other-keys)
2671 (let* ((out (assoc-ref outputs "out"))
2672 (bin (string-append out "/bin"))
2673 (scm (string-append out "/share/guile/site/2.2"))
2674 (go (string-append out "/lib/guile/2.2/site-ccache")))
2675 (wrap-program (string-append bin "/mumi")
2676 `("GUILE_LOAD_PATH" ":" prefix
2677 (,scm ,(getenv "GUILE_LOAD_PATH")))
2678 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
2679 (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))
2680 #t))))))
2681 (inputs
2682 `(("guile-debbugs" ,guile-debbugs-next)
2683 ("guile-email" ,guile-email)
2684 ("guile-fibers" ,guile-fibers)
2685 ("guile-json" ,guile-json)
2686 ("guile-syntax-highlight" ,guile-syntax-highlight)
79ee97a1 2687 ("guile" ,guile-2.2)))
e3a47031
RW
2688 (native-inputs
2689 `(("autoconf" ,autoconf)
2690 ("automake" ,automake)
2691 ("pkg-config" ,pkg-config)))
2692 (home-page "https://git.elephly.net/software/mumi.git")
2693 (synopsis "Debbugs web interface")
2694 (description "Mumi is a Debbugs web interface.")
2695 (license agpl3+))))