gnu: claws-mail: Don't use NAME in source URI.
[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")
4c0df1a8 489 (version "7.2.1")
3919a31a
EB
490 (source (origin
491 (method url-fetch)
492 (uri (string-append "https://github.com/OfflineIMAP/offlineimap/"
493 "archive/v" version ".tar.gz"))
f586c877 494 (file-name (string-append name "-" version ".tar.gz"))
3919a31a
EB
495 (sha256
496 (base32
4c0df1a8 497 "1022xf2w1xax4vx4kzhlfbhaf0b72wkpvrcscvs4q8qk2ja68h8x"))))
3919a31a 498 (build-system python-build-system)
7a6213cb 499 (native-inputs
4b0e6367 500 `(("asciidoc" ,asciidoc)))
a4ea25d3
EF
501 (inputs `(("python2-pysqlite" ,python2-pysqlite)
502 ("python2-six" ,python2-six)))
3919a31a
EB
503 (arguments
504 ;; The setup.py script expects python-2.
505 `(#:python ,python-2
506 ;; Tests require a modifiable IMAP account.
42aa73b3
EF
507 #:tests? #f
508 #:phases
509 (modify-phases %standard-phases
7a6213cb
MB
510 (add-after 'build 'build-documentation
511 (lambda _
512 (substitute* "docs/Makefile"
513 ;; Prevent xmllint and xsltproc from downloading a DTD file.
514 (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
7232c3f5 515 (invoke "make" "-C" "docs" "man")))
7a6213cb
MB
516 (add-after 'install 'install-documentation
517 (lambda* (#:key outputs #:allow-other-keys)
518 (let* ((out (assoc-ref outputs "out"))
519 (man (string-append out "/share/man")))
520 (install-file "docs/offlineimap.1" (string-append man "/man1"))
521 (install-file "docs/offlineimapui.7" (string-append man "/man7"))
522 #t)))
523 (add-after 'install-documentation 'wrap-binary
524 (lambda* (#:key outputs #:allow-other-keys)
42aa73b3
EF
525 (let* ((out (assoc-ref outputs "out"))
526 (bin (string-append out "/bin/offlineimap")))
527 (wrap-program bin
528 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
529 #t))))))
3919a31a 530 (home-page "http://www.offlineimap.org")
31e98ca6 531 (synopsis "Sync emails between two repositories")
3919a31a
EB
532 (description
533 "OfflineImap synchronizes emails between two repositories, so that you
534can read the same mailbox from multiple computers. It supports IMAP as REMOTE
535repository and Maildir/IMAP as LOCAL repository.")
7886e23b 536 (license gpl2+)))
3919a31a 537
3e9750c3
TD
538(define-public emacs-mew
539 (package
540 (name "emacs-mew")
541 (version "6.7")
542 (source (origin
543 (method url-fetch)
8502ff7a 544 (uri (string-append "https://mew.org/Release/mew-"
3e9750c3
TD
545 version ".tar.gz"))
546 (sha256
547 (base32
548 "03fzky2kz73vgx4cbps2psbbnrgqgkk5q7jwfldisymkzr9iz03y"))))
549 (native-inputs
550 `(("emacs" ,emacs)))
551 (propagated-inputs
552 `(("ruby-sqlite3" ,ruby-sqlite3) ; optional for the database of messages
553 ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
554 (build-system gnu-build-system)
555 (arguments
556 (let ((elisp-dir "/share/emacs/site-lisp/guix.d/mew")
557 (icon-dir "/share/mew"))
558 `(#:modules ((guix build gnu-build-system)
559 (guix build utils)
560 (guix build emacs-utils))
561 #:imported-modules (,@%gnu-build-system-modules
562 (guix build emacs-utils))
563 #:configure-flags
564 (list (string-append "--with-elispdir=" %output ,elisp-dir)
565 (string-append "--with-etcdir=" %output ,icon-dir))
566 #:phases
567 (modify-phases %standard-phases
568 (add-after 'configure 'patch-mew-icon-directory
569 (lambda* (#:key outputs #:allow-other-keys)
570 (emacs-substitute-sexps "mew-key.el"
571 ("(def.* mew-icon-directory"
572 `(progn
573 (add-to-list 'image-load-path 'mew-icon-directory)
574 ,(string-append (assoc-ref outputs "out") ,icon-dir))))
575 #t))
576 (add-after 'install 'generate-autoloads
577 (lambda* (#:key outputs #:allow-other-keys)
578 (emacs-generate-autoloads
579 "mew" (string-append (assoc-ref outputs "out") ,elisp-dir))
580 #t)))
581 #:tests? #f)))
8502ff7a 582 (home-page "https://mew.org")
3e9750c3
TD
583 (synopsis "Emacs e-mail client")
584 (description "Mew (Messaging in the Emacs World) is a user interface
585for text messages, multimedia messages (MIME), news articles and
586security functionality including PGP, S/MIME, SSH, and SSL.")
587 (license bsd-3)))
588
d2938d59
EB
589(define-public mu
590 (package
591 (name "mu")
e5fdc334 592 (version "1.0")
d2938d59
EB
593 (source (origin
594 (method url-fetch)
e7b9da24 595 (uri (string-append "https://github.com/djcb/mu/releases/"
e5fdc334
PL
596 "download/v" version "/mu-"
597 version ".tar.xz"))
d2938d59
EB
598 (sha256
599 (base32
e5fdc334 600 "04x5azl19gszw2h7argq666gf9xs4hy9q7w9cbqxvy08n56xqsln"))))
d2938d59
EB
601 (build-system gnu-build-system)
602 (native-inputs
603 `(("pkg-config" ,pkg-config)
9fd571a2 604 ("glib" ,glib "bin") ; for gtester
63298f14 605 ("emacs" ,emacs-minimal)
efe2a283 606 ("tzdata" ,tzdata-for-tests))) ;for mu/test/test-mu-query.c
d2938d59
EB
607 ;; TODO: Add webkit and gtk to build the mug GUI.
608 (inputs
609 `(("xapian" ,xapian)
d59ec129 610 ("guile" ,guile-2.2)
d2938d59 611 ("glib" ,glib)
8e020519 612 ("gmime" ,gmime-2.6)))
d2938d59 613 (arguments
704f2196
AK
614 `(#:modules ((guix build gnu-build-system)
615 (guix build utils)
616 (guix build emacs-utils))
617 #:imported-modules (,@%gnu-build-system-modules
618 (guix build emacs-utils))
619 #:phases
99404fff 620 (modify-phases %standard-phases
e62e975b 621 (add-after 'unpack 'patch-configure
789bda83
AK
622 ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
623 ;; so our Emacs package can't find it. Setting "--with-lispdir"
624 ;; configure flag doesn't help because "mu4e" will be added to
625 ;; the lispdir anyway, so we have to modify "configure.ac".
626 (lambda _
e62e975b 627 (substitute* "configure"
d59ec129
RW
628 (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") "")
629 ;; Use latest Guile
630 (("guile-2.0") "guile-2.2"))
631 (substitute* '("guile/Makefile.in"
632 "guile/mu/Makefile.in")
633 (("share/guile/site/2.0/") "share/guile/site/2.2/"))
789bda83 634 #t))
3481c714
MC
635 (add-after 'patch-configure 'fix-date-tests
636 ;; Loosen test tolerances to prevent failures caused by daylight
637 ;; saving time (DST). See: https://github.com/djcb/mu/issues/1214.
638 (lambda _
639 (substitute* "lib/parser/test-utils.cc"
640 (("\\* 60 \\* 60, 1 },")
641 "* 60 * 60, 3600 + 1 },"))
642 #t))
c9dc4577
RW
643 (add-before 'install 'fix-ffi
644 (lambda* (#:key outputs #:allow-other-keys)
645 (substitute* "guile/mu.scm"
646 (("\"libguile-mu\"")
647 (format #f "\"~a/lib/libguile-mu\""
648 (assoc-ref outputs "out"))))
649 #t))
99404fff
AK
650 (add-before 'check 'check-tz-setup
651 (lambda* (#:key inputs #:allow-other-keys)
652 ;; For mu/test/test-mu-query.c
653 (setenv "TZDIR"
654 (string-append (assoc-ref inputs "tzdata")
655 "/share/zoneinfo"))
704f2196
AK
656 #t))
657 (add-after 'install 'install-emacs-autoloads
658 (lambda* (#:key outputs #:allow-other-keys)
659 (emacs-generate-autoloads
660 "mu4e"
661 (string-append (assoc-ref outputs "out")
662 "/share/emacs/site-lisp"))
99404fff 663 #t)))))
d2938d59
EB
664 (home-page "http://www.djcbsoftware.nl/code/mu/")
665 (synopsis "Quickly find emails")
666 (description
667 "Mu is a tool for dealing with e-mail messages stored in the
668Maildir-format. Mu's purpose in life is to help you to quickly find the
669messages you need; in addition, it allows you to view messages, extract
670attachments, create new maildirs, and so on.")
671 (license gpl3+)))
672
a2cb16b0
TS
673(define-public alot
674 (package
675 (name "alot")
3f81ca32 676 (version "0.5.1")
a2cb16b0
TS
677 (source (origin
678 (method url-fetch)
1b94f182
TS
679 ;; package author intends on distributing via github rather
680 ;; than pypi:
681 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
a2cb16b0
TS
682 (uri (string-append "https://github.com/pazz/alot/archive/"
683 version ".tar.gz"))
684 (file-name (string-append "alot-" version ".tar.gz"))
685 (sha256
686 (base32
3f81ca32 687 "0wax30hjzmkqfml7hig1dqw1v1y63yc0cgbzl96x58b9h2ggqx3a"))))
a2cb16b0
TS
688 (build-system python-build-system)
689 (arguments
3f81ca32 690 `(;; python 3 is currently unsupported, more info:
fe3b8862 691 ;; https://github.com/pazz/alot/blob/master/docs/source/faq.rst
a2cb16b0 692 #:python ,python-2))
3f81ca32
TS
693 (native-inputs
694 `(("python2-mock" ,python2-mock)))
a2cb16b0
TS
695 (inputs
696 `(("python2-magic" ,python2-magic)
697 ("python2-configobj" ,python2-configobj)
698 ("python2-twisted" ,python2-twisted)
699 ("python2-urwid" ,python2-urwid)
700 ("python2-urwidtrees" ,python2-urwidtrees)
701 ("python2-pygpgme" ,python2-pygpgme)
702 ("python2-notmuch" ,python2-notmuch)))
703 (home-page "https://github.com/pazz/alot")
cfcfc6ab 704 (synopsis "Command-line MUA using @code{notmuch}")
a2cb16b0 705 (description
cfcfc6ab 706 "Alot is an experimental terminal mail user agent (@dfn{MUA}) based on
a2cb16b0
TS
707@code{notmuch} mail. It is written in Python using the @code{urwid} toolkit.")
708 (license gpl3+)))
709
0350a8bb
HG
710(define-public notifymuch
711 (let
712 ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
713 (revision "1"))
714 (package
715 (name "notifymuch")
716 (version (string-append "0.1-" revision "." (string-take commit 7)))
717 (source
718 (origin
719 (method git-fetch)
720 (uri (git-reference
721 (url "https://github.com/kspi/notifymuch.git")
722 (commit commit)))
723 (sha256
724 (base32
725 "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
726 (file-name (string-append name "-" version "-checkout"))))
727 (build-system python-build-system)
728 (inputs
729 `(("python-notmuch" ,python-notmuch)
730 ("python-pygobject" ,python-pygobject)
731 ("gobject-introspection" ,gobject-introspection)
732 ("libnotify" ,libnotify)
733 ("gtk+" ,gtk+)))
734 (arguments
735 `(#:phases
736 (modify-phases %standard-phases
737 (add-after 'install 'wrap-binary
738 (lambda* (#:key outputs #:allow-other-keys)
739 (let* ((out (assoc-ref outputs "out"))
740 (bin (string-append out "/bin/notifymuch")))
741 (wrap-program bin
742 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
743 `("GI_TYPELIB_PATH" ":" prefix
744 (,(getenv "GI_TYPELIB_PATH")
745 ,(string-append out "/lib/girepository-1.0")))))
746 #t)))))
747 (home-page "https://github.com/kspi/notifymuch")
748 (synopsis "Displays notifications for changes in the notmuch email database")
749 (description "notifymuch displays desktop notifications for messages in
750the notmuch database. The notifications are sent using libnotify to a
751notification daemon. The query to find messages to send a notification about
752is configurable, and a notification for the same message will not be send
753within a configurable period (defaults to 48 hours). To use notifymuch, run
754@command{notifymuch} after new mail is indexed, this can be automated by
755invoking @command{notifymuch} from the post-new hook.")
756 (license gpl3))))
757
1bd3f849
DT
758(define-public notmuch
759 (package
760 (name "notmuch")
a908ffd1 761 (version "0.28")
1bd3f849
DT
762 (source (origin
763 (method url-fetch)
866fade9 764 (uri (string-append "https://notmuchmail.org/releases/notmuch-"
1bd3f849
DT
765 version ".tar.gz"))
766 (sha256
767 (base32
a908ffd1 768 "0dqarmjc8544m2w7bqrqmvsfy55fw82707z3lz9cql8nr777bjmc"))))
1bd3f849
DT
769 (build-system gnu-build-system)
770 (arguments
d738f134
AI
771 `(#:modules ((guix build gnu-build-system)
772 ((guix build emacs-build-system) #:prefix emacs:)
773 (guix build utils))
774 #:imported-modules (,@%gnu-build-system-modules
775 (guix build emacs-build-system)
776 (guix build emacs-utils))
777 #:make-flags (list "V=1") ; Verbose test output.
eb537f57 778 #:phases (modify-phases %standard-phases
6cf27c89
MB
779 (add-after 'unpack 'patch-notmuch-lib.el
780 (lambda _
781 (substitute* "emacs/notmuch-lib.el"
782 (("/bin/sh") (which "sh")))
783 #t))
eb537f57
DT
784 (replace 'configure
785 (lambda* (#:key outputs #:allow-other-keys)
786 (setenv "CC" "gcc")
787 (setenv "CONFIG_SHELL" (which "sh"))
ee886454 788
d738f134
AI
789 (let* ((out (assoc-ref outputs "out"))
790 (elisp
791 (string-append out "/share/emacs/site-lisp/guix.d/"
792 ,name "-" ,version)))
82d2dfa0
TGR
793 (invoke "./configure"
794 (string-append "--prefix=" out)
795 (string-append "--emacslispdir=" elisp)
796 (string-append "--emacsetcdir=" elisp)))))
6cf27c89
MB
797 (add-before 'check 'prepare-test-environment
798 (lambda _
799 (setenv "TEST_CC" "gcc")
800 ;; Patch various inline shell invocations.
801 (substitute* (find-files "test" "\\.sh$")
802 (("/bin/sh") (which "sh")))
d738f134
AI
803 #t))
804 (add-after 'install 'make-autoloads
805 (assoc-ref emacs:%standard-phases 'make-autoloads)))))
1bd3f849 806 (native-inputs
2c5b91dc 807 `(("bash-completion" ,bash-completion)
6cf27c89 808 ("emacs" ,emacs-no-x) ; Minimal lacks libxml, needed for some tests.
2c5b91dc 809 ("pkg-config" ,pkg-config)
ee886454 810 ("python" ,python-2)
eb537f57 811 ("python-docutils" ,python2-docutils)
6cf27c89
MB
812 ("python-sphinx" ,python2-sphinx)
813
814 ;; The following are required for tests only.
815 ("which" ,which)
816 ("dtach" ,dtach)
817 ("gnupg" ,gnupg)
818 ("man" ,man-db)
819 ("perl" ,perl)))
1bd3f849 820 (inputs
2c5b91dc 821 `(("glib" ,glib)
1bd3f849
DT
822 ("gmime" ,gmime)
823 ("talloc" ,talloc)
824 ("xapian" ,xapian)
825 ("zlib" ,zlib)))
540d6cc7 826 (home-page "https://notmuchmail.org/")
1bd3f849
DT
827 (synopsis "Thread-based email index, search, and tagging")
828 (description
829 "Notmuch is a command-line based program for indexing, searching, read-
830ing, and tagging large collections of email messages.")
831 (license gpl3+)))
832
8a75c589 833(define-public notmuch-addrlookup-c
a5d6b0a3
TS
834 ;; This commit includes a compatibility fix for notmuch-0.25, and is not
835 ;; currently part of any release. Please update this package when
836 ;; notmuch-addrlookup-c-9 is released.
837 (let ((commit "88f156d04990a71c6ad6fc2757b537b44e3c4d00")
838 (revision "1")) ;Guix package revision
839 (package
840 (name "notmuch-addrlookup-c")
841 (version (string-append "8-" revision "."
842 (string-take commit 7)))
843 (source (origin
844 (method git-fetch)
845 (uri (git-reference
846 (url "https://github.com/aperezdc/notmuch-addrlookup-c.git")
847 (commit commit)))
848 (file-name (string-append name "-" version "-checkout"))
849 (sha256
850 (base32
851 "0v0wzs7qzy4n1hbql8s10qrwgalcxdzbxf8pj6cii1pv2jwmkxbm"))))
852 (build-system gnu-build-system)
853 (arguments
854 '(#:tests? #f ; no tests
855 #:make-flags (list "CC=gcc"
856 (string-append "PREFIX="
857 (assoc-ref %outputs "out")))
858 #:phases (modify-phases %standard-phases
859 (delete 'configure)
860 ;; Remove vim code completion config, it's not needed to
861 ;; build (or be patched).
862 (add-before 'patch-source-shebangs 'delete-ycm-file
863 (lambda _ (delete-file ".ycm_extra_conf.py")))
864 (replace 'install
865 (lambda* (#:key outputs #:allow-other-keys)
866 (let ((bin (string-append
867 (assoc-ref outputs "out") "/bin")))
868 (install-file "notmuch-addrlookup" bin)))))))
869 (native-inputs
870 `(("pkg-config" ,pkg-config)))
871 (inputs
872 `(("glib" ,glib)
873 ("notmuch" ,notmuch)))
874 (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
875 (synopsis "Address lookup tool for Notmuch")
876 (description "This is an address lookup tool using a Notmuch database,
8a75c589 877useful for email address completion.")
a5d6b0a3 878 (license license:expat))))
8a75c589 879
4b6909bc
TS
880(define-public python-notmuch
881 (package
882 (name "python-notmuch")
540d6cc7 883 (version (package-version notmuch))
4b6909bc
TS
884 ;; Notmuch python bindings are now unavailable on pypi. The
885 ;; bindings are distributed via the notmuch release tarball.
886 (source (package-source notmuch))
887 (build-system python-build-system)
888 (inputs `(("notmuch" ,notmuch)))
889 (arguments
890 `(#:tests? #f ; no "test" target
891 #:phases
892 (modify-phases %standard-phases
893 ;; This python package lives in a subdirectory of the notmuch source
894 ;; tree, so chdir into it before building.
895 (add-after 'unpack 'enter-python-dir
896 (lambda _ (chdir "bindings/python") #t))
897 ;; Make sure the correct notmuch shared library gets loaded.
898 (add-before 'build 'set-libnotmuch-file-name
899 (lambda* (#:key inputs #:allow-other-keys)
900 (let ((notmuch (assoc-ref inputs "notmuch")))
901 (substitute* "notmuch/globals.py"
902 (("libnotmuch\\.so\\.")
903 (string-append notmuch "/lib/libnotmuch.so.")))
904 #t))))))
540d6cc7 905 (home-page (package-home-page notmuch))
4b6909bc
TS
906 (synopsis "Python bindings of the Notmuch mail indexing library")
907 (description
908 "This package provides Python bindings to use the Notmuch mail indexing
909and search library.")
910 (license gpl3+)))
911
1c74da21 912(define-public python2-notmuch
caa6fc89 913 (package-with-python2 python-notmuch))
1c74da21 914
98e9e22f
SB
915(define-public getmail
916 (package
917 (name "getmail")
36e8cfa1 918 (version "5.6")
98e9e22f
SB
919 (source
920 (origin
921 (method url-fetch)
922 (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
923 name "-" version ".tar.gz"))
924 (sha256
925 (base32
36e8cfa1 926 "16nmvj80szr6yvcxxgmxn2lxqpjqqj4xg5a0b66zhvck6j42q3a6"))))
98e9e22f
SB
927 (build-system python-build-system)
928 (arguments
929 `(#:tests? #f ; no tests
930 #:python ,python-2))
931 (home-page "http://pyropus.ca/software/getmail/")
932 (synopsis "Mail retriever")
933 (description
934 "A flexible, extensible mail retrieval system with support for
935POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
936arbitrary message filtering, single-user and domain-mailboxes, and many other
937useful features.")
938
939 ;; License is specified in file '__init__.py'.
940 (license gpl2)))
941
f58f767b
JL
942(define-public libetpan
943 (package
944 (name "libetpan")
9f1b186a 945 (version "1.9.1")
f58f767b 946 (source (origin
aae96f8f
TGR
947 (method git-fetch)
948 (uri (git-reference
949 (url "https://github.com/dinhviethoa/libetpan.git")
950 (commit version)))
951 (file-name (git-file-name name version))
f58f767b 952 (sha256
9f1b186a 953 (base32 "1628lb1qvxixl64ifvjjr839hmirpx532klhv2mr7m6gmn7nlci5"))))
f58f767b 954 (build-system gnu-build-system)
464f5447 955 (native-inputs `(("autoconf" ,autoconf-wrapper)
f58f767b 956 ("automake" ,automake)
3246cc91 957 ("libtool" ,libtool)
f58f767b
JL
958 ("pkg-config" ,pkg-config)))
959 (propagated-inputs
960 ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
961 ;; libraries need to be propagated.
962 `(("cyrus-sasl" ,cyrus-sasl)
963 ("openssl" ,openssl)))
964 (inputs
965 `(("curl" ,curl)
c1748912
EF
966 ("expat" ,expat)
967 ("zlib" ,zlib)))
f58f767b 968 (arguments
602460ea
EF
969 '(#:phases
970 (modify-phases %standard-phases
971 (add-after 'unpack 'autogen
972 (lambda _
973 (setenv "NOCONFIGURE" "true")
df22b95c 974 (invoke "sh" "autogen.sh"))))
f58f767b
JL
975 #:configure-flags
976 '("--disable-static" "--disable-db")))
81fb037f 977 (home-page "https://www.etpan.org/libetpan.html")
f58f767b
JL
978 (synopsis "Portable middleware for email access")
979 (description
980 "The purpose of this mail library is to provide a portable, efficient
981framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
982provides an API for C language. It's the low-level API used by MailCore and
983MailCore 2.")
a979eea9 984 (license bsd-3)))
f58f767b 985
ee6e780b
DM
986(define-public compface
987 (package
988 (name "compface")
989 (version "1.5.2")
990 (source (origin
991 (method url-fetch)
992 (uri (string-append "https://ftp.heanet.ie/mirrors/"
993 "ftp.xemacs.org/aux/"
994 name "-" version ".tar.gz"))
995 (sha256
996 (base32
997 "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
998 (build-system gnu-build-system)
999 (arguments
1000 `(#:tests? #f))
1001 (synopsis "Portrait image compressor")
1002 (description "This packages takes your 48x48x1 portrait image and
1003compresses it.")
1004 (home-page "http://www.cs.indiana.edu/pub/faces/")
1005 (license (x11-style "file://README"))))
1006
e8435c4d
JL
1007(define-public claws-mail
1008 (package
1009 (name "claws-mail")
7bbdd943 1010 (version "3.17.1")
e8435c4d
JL
1011 (source (origin
1012 (method url-fetch)
1013 (uri (string-append
ca6f5ab8 1014 "https://www.claws-mail.org/releases/claws-mail-" version
6ea4b094 1015 ".tar.xz"))
e8435c4d 1016 (sha256
ec92806a 1017 (base32
7bbdd943 1018 "1wknxbwyzm5xjh3cqmddcxmvp1rkp301qga5n5rgfi7vcd0myyvm"))))
e8435c4d
JL
1019 (build-system gnu-build-system)
1020 (native-inputs `(("pkg-config" ,pkg-config)))
1021 (inputs `(("bogofilter" ,bogofilter)
1022 ("curl" ,curl)
1023 ("dbus-glib" ,dbus-glib)
e8435c4d
JL
1024 ("enchant" ,enchant)
1025 ("expat" ,expat)
1026 ("ghostscript" ,ghostscript)
1027 ("hicolor-icon-theme" ,hicolor-icon-theme)
1028 ("gnupg" ,gnupg)
1029 ("gnutls" ,gnutls)
1030 ("gpgme" ,gpgme)
1031 ("gtk" ,gtk+-2)
1032 ("libarchive" ,libarchive)
1033 ("libcanberra" ,libcanberra)
1034 ("libetpan" ,libetpan)
fc9a93cb 1035 ("libical" ,libical)
e8435c4d
JL
1036 ("libnotify" ,libnotify)
1037 ("libsm" ,libsm)
1038 ("libxml2" ,libxml2)
1039 ("perl" ,perl)
f6292baf
EB
1040 ("python-2" ,python-2)
1041 ("mime-info" ,shared-mime-info)))
e8435c4d
JL
1042 (arguments
1043 '(#:configure-flags
f6292baf 1044 '("--enable-gnutls" "--enable-pgpmime-plugin" "--enable-enchant")
ff4192ff
DM
1045 #:make-flags
1046 ;; Disable updating icon cache since it's done by the profile hook.
1047 ;; Conflict with other packages in the profile would be inevitable
1048 ;; otherwise.
1049 '("gtk_update_icon_cache=true")
f6292baf
EB
1050 #:phases (modify-phases %standard-phases
1051 (add-before 'build 'patch-mime
1052 (lambda* (#:key inputs #:allow-other-keys)
1053 (substitute* "src/procmime.c"
1054 (("/usr/share/mime/globs")
1055 (string-append (assoc-ref inputs "mime-info")
1056 "/share/mime/globs"))))))))
e8435c4d
JL
1057 (synopsis "GTK-based Email client")
1058 (description
1059 "Claws-Mail is an email client (and news reader) based on GTK+. The
1060appearance and interface are designed to be familiar to new users coming from
1061other popular email clients, as well as experienced users. Almost all commands
1062are accessible with the keyboard. Plus, Claws-Mail is extensible via addons
1063which can add many functionalities to the base client.")
ba5c926c 1064 (home-page "https://www.claws-mail.org/")
e8435c4d
JL
1065 (license gpl3+))) ; most files are actually public domain or x11
1066
d6e941bc
1067(define-public msmtp
1068 (package
1069 (name "msmtp")
1460e77a 1070 (version "1.8.1")
d6e941bc
1071 (source
1072 (origin
1073 (method url-fetch)
1a80f1a9 1074 (uri (string-append "https://marlam.de/msmtp/releases/"
d23d1ddf
LF
1075 "/msmtp-" version ".tar.xz"))
1076 (sha256
1077 (base32
1460e77a 1078 "1nm4vizrnrrnknc4mc8nr7grz9q76m1vraa0hsl5rfm34gnsg8ph"))))
d6e941bc
1079 (build-system gnu-build-system)
1080 (inputs
91b3a6d4 1081 `(("libsecret" ,libsecret)
d6e941bc
1082 ("gnutls" ,gnutls)
1083 ("zlib" ,zlib)
1084 ("gsasl" ,gsasl)))
1085 (native-inputs
1086 `(("pkg-config" ,pkg-config)))
1a80f1a9 1087 (home-page "https://marlam.de/msmtp/")
d6e941bc
1088 (arguments
1089 `(#:configure-flags (list "--with-libgsasl"
1090 "--with-libidn"
823e2ed4
LF
1091 "--with-tls=gnutls")
1092 #:phases
1093 (modify-phases %standard-phases
1094 (add-after 'install 'install-msmtpq
1095 (lambda* (#:key outputs #:allow-other-keys)
1096 (let* ((out (assoc-ref outputs "out"))
1097 (bin (string-append out "/bin"))
1098 (doc (string-append out "/share/doc/msmtp"))
1099 (msmtpq (string-append "scripts/msmtpq")))
1100 (install-file (string-append msmtpq "/msmtpq") bin)
1101 (install-file (string-append msmtpq "/msmtp-queue") bin)
1102 (install-file (string-append msmtpq "/README.msmtpq") doc)
1103 #t))))))
d6e941bc
1104 (synopsis
1105 "Simple and easy to use SMTP client with decent sendmail compatibility")
1106 (description
1107 "msmtp is an SMTP client. In the default mode, it transmits a mail to
1108an SMTP server (for example at a free mail provider) which takes care of further
1109delivery.")
1110 (license gpl3+)))
1111
66cc3ab2
TUBK
1112(define-public exim
1113 (package
1114 (name "exim")
354c493f 1115 (version "4.90.1")
66cc3ab2
TUBK
1116 (source
1117 (origin
1118 (method url-fetch)
354c493f 1119 (uri (list (string-append "https://ftp.exim.org/pub/exim/exim4/exim-"
fc6fdc05 1120 version ".tar.bz2")
354c493f 1121 (string-append "https://ftp.exim.org/pub/exim/exim4/old/exim-"
fc6fdc05 1122 version ".tar.bz2")))
66cc3ab2 1123 (sha256
513f8ab4 1124 (base32
354c493f 1125 "1w6blvvrd87c649j8xpag034md2w1ib0db9c4ijqbzc5dh2i1xfq"))))
66cc3ab2
TUBK
1126 (build-system gnu-build-system)
1127 (inputs
1128 `(("bdb" ,bdb)
1129 ("gnutls" ,gnutls)
1130 ("gzip" ,gzip)
1131 ("bzip2" ,bzip2)
1132 ("xz" ,xz)
66cc3ab2 1133 ("perl" ,perl)
c315d370 1134 ("libnsl" ,libnsl)
66cc3ab2
TUBK
1135 ("libxt" ,libxt)
1136 ("libxaw" ,libxaw)))
1137 (native-inputs
42773138
EF
1138 `(("pcre" ,pcre "bin")
1139 ("perl" ,perl)))
66cc3ab2
TUBK
1140 (arguments
1141 '(#:phases
dc1d3cde
KK
1142 (modify-phases %standard-phases
1143 (replace 'configure
1144 ;; We'd use #:make-flags but the top-level Makefile calls others
1145 ;; recursively, so just set all variables this way.
1146 (lambda* (#:key outputs inputs #:allow-other-keys)
1147 (substitute* '("Makefile" "OS/Makefile-Default")
1148 (("(RM_COMMAND=).*" all var)
1149 (string-append var "rm\n")))
1150 (copy-file "src/EDITME" "Local/Makefile")
1151 (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
1152 (let ((out (assoc-ref outputs "out"))
1153 (gzip (assoc-ref inputs "gzip"))
1154 (bzip2 (assoc-ref inputs "bzip2"))
1155 (xz (assoc-ref inputs "xz")))
1156 (substitute* '("Local/Makefile")
1157 (("(BIN_DIRECTORY=).*" all var)
1158 (string-append var out "/bin\n"))
1159 (("(CONFIGURE_FILE=).*" all var)
1160 (string-append var out "/etc/exim.conf\n"))
1161 (("(EXIM_USER=).*" all var)
1162 (string-append var "nobody\n"))
1163 (("(FIXED_NEVER_USERS=).*" all var)
1164 (string-append var "\n")) ;XXX no root in build environment
1165 (("(COMPRESS_COMMAND=).*" all var)
1166 (string-append var gzip "/bin/gzip\n"))
1167 (("(ZCAT_COMMAND=).*" all var)
1168 (string-append var gzip "/bin/zcat\n")))
1169 ;; This file has hardcoded names for tools despite the zcat
1170 ;; configuration above.
1171 (substitute* '("src/exigrep.src")
1172 (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
1173 (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
1174 (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
1175 (("'lzma'") (string-append "'" xz "/bin/lzma'"))))
1176 #t))
1177 (add-before 'build 'fix-sh-paths
1178 (lambda* (#:key inputs #:allow-other-keys)
1179 (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
1180 (("SHELL=/bin/sh") "SHELL=sh"))
1181 (substitute* '("scripts/Configure-config.h")
1182 (("\\| /bin/sh") "| sh"))
1183 (let ((bash (assoc-ref inputs "bash")))
1184 (substitute* '("scripts/Configure-eximon")
1185 (("#!/bin/sh") (string-append "#!" bash "/bin/sh"))))
1186 #t)))
66cc3ab2
TUBK
1187 #:make-flags '("INSTALL_ARG=-no_chown")
1188 ;; No 'check' target.
1189 #:tests? #f))
85a9ffcb 1190 (home-page "https://www.exim.org/")
66cc3ab2
TUBK
1191 (synopsis
1192 "Message Transfer Agent (MTA) developed at the University of Cambridge")
1193 (description
1194 "Exim is a message transfer agent (MTA) developed at the University of
1195Cambridge for use on Unix systems connected to the Internet. In style it is
1196similar to Smail 3, but its facilities are more general. There is a great
1197deal of flexibility in the way mail can be routed, and there are extensive
1198facilities for checking incoming mail.")
1199 (license gpl2+)))
1200
7d2b784b
MW
1201(define-public dovecot
1202 (package
1203 (name "dovecot")
bc6062ae 1204 (version "2.3.4")
7d2b784b
MW
1205 (source
1206 (origin
1207 (method url-fetch)
c8608faf 1208 (uri (string-append "https://www.dovecot.org/releases/"
7d2b784b
MW
1209 (version-major+minor version) "/"
1210 name "-" version ".tar.gz"))
4d6ce834 1211 (sha256 (base32
bc6062ae 1212 "01ggzf7b3jpl89mjiqr7xbpbs181g2gjf6wzg70qaqfzz3ppc6yr"))))
7d2b784b
MW
1213 (build-system gnu-build-system)
1214 (native-inputs
1215 `(("pkg-config" ,pkg-config)))
1216 (inputs
1217 `(("openssl" ,openssl)
1218 ("zlib" ,zlib)
1219 ("bzip2" ,bzip2)
fd5c70f8
AW
1220 ("sqlite" ,sqlite)
1221 ("linux-pam" ,linux-pam)))
7d2b784b
MW
1222 (arguments
1223 `(#:configure-flags '("--sysconfdir=/etc"
1224 "--localstatedir=/var")
1225 #:phases (modify-phases %standard-phases
1226 (add-before
1227 'configure 'pre-configure
1228 (lambda _
15ff38f1 1229 ;; Simple hack to avoid installing in /etc.
7d2b784b
MW
1230 (substitute* '("doc/Makefile.in"
1231 "doc/example-config/Makefile.in")
1232 (("pkgsysconfdir = .*")
1233 "pkgsysconfdir = /tmp/etc"))
072f1e22
EF
1234 #t))
1235 (add-after
15ff38f1 1236 'unpack 'patch-other-file-names
072f1e22
EF
1237 (lambda _
1238 (substitute*
15ff38f1
TGR
1239 "src/lib-program-client/test-program-client-local.c"
1240 (("(/bin/| )cat") (which "cat"))
072f1e22 1241 (("/bin/echo") (which "echo"))
15ff38f1
TGR
1242 (("/bin/false") (which "false"))
1243 (("/bin/sh") (which "bash"))
1244 (("head") (which "head"))
1245 (("sleep") (which "sleep")))
7d2b784b 1246 #t)))))
c8608faf 1247 (home-page "https://www.dovecot.org")
7d2b784b
MW
1248 (synopsis "Secure POP3/IMAP server")
1249 (description
1250 "Dovecot is a mail server whose major goals are security and reliability.
1251It supports mbox/Maildir and its own dbox/mdbox formats.")
1252 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
1253 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
1254 ;; Unicode, Inc. License Agreement for Data Files and Software.
1255 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
1256
944a5cdd 1257(define-public dovecot-trees
cf47a8a5 1258 (package
1259 (name "dovecot-trees")
1260 (version "2.1.0")
1261 (source
1262 (origin
1263 (method url-fetch)
1264 (uri (string-append "https://0xacab.org/riseuplabs/trees/repository/"
1265 "archive.tar.gz?ref=v" version))
1266 (file-name (string-append name "-" version ".tar.gz"))
1267 (sha256
1268 (base32
0e66f4a1
TGR
1269 "0rkk10b1bsjz979sc864vpgcdchy7yxwmyv4ik50lar1h6awdnrf"))
1270 (patches
1271 (search-patches "dovecot-trees-support-dovecot-2.3.patch"))))
cf47a8a5 1272 (build-system gnu-build-system)
1273 (native-inputs
1274 `(("automake" ,automake)
1275 ("autoconf" ,autoconf)
1276 ("libtool" ,libtool)
1277 ("dovecot" ,dovecot)
1278 ("pkg-config" ,pkg-config)))
1279 (inputs
1280 `(("libsodium" ,libsodium)))
1281 (arguments
1282 `(#:tests? #f ;No tests exist.
1283 #:configure-flags (list (string-append "--with-dovecot="
1284 (assoc-ref %build-inputs "dovecot")
1285 "/lib/dovecot"))
1286 #:phases
1287 (modify-phases %standard-phases
d10092b8 1288 (add-after 'unpack 'autogen
cf47a8a5 1289 (lambda _
1a1f778e 1290 (invoke "sh" "autogen.sh"))))))
cf47a8a5 1291 (home-page "https://0xacab.org/riseuplabs/trees")
1292 (synopsis "NaCL-based Dovecot email storage encryption plugin")
1293 (description
1294 "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
944a5cdd 1295Dovecot encryption plugin. This plugin adds individually encrypted mail
1296storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
1297which uses OpenSSL and RSA keypairs. TREES works in a similar way, but uses
1298the Sodium crypto library (based on NaCL).
1299
1300How it works:
1301@enumerate
1302@item On IMAP log in, the user's cleartext password is passed to the plugin.
1303@item The plugin creates an argon2 digest from the password.
1304@item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
1305@item Inside the secretbox is stored a Curve25519 private key.
1306@item The Curve25519 private key is used to decrypt each individual message,
1307using lidsodium sealed boxes.
1308@item New mail is encrypted as it arrives using the Curve25519 public key.
1309@end enumerate\n")
cf47a8a5 1310 (license agpl3)))
944a5cdd 1311
a4651f64 1312(define-public dovecot-libsodium-plugin
1313 (let ((commit "044de73c01c35385df0105f6b387bec5d5317ce7")
1314 (revision "1"))
1315 (package
1316 (name "dovecot-libsodium-plugin")
1317 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
1318 (source
1319 (origin
1320 (method git-fetch)
1321 (uri (git-reference
1322 (url "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1323 (commit commit)))
1324 (file-name (string-append name "-" version "-checkout"))
1325 (sha256
1326 (base32
1327 "13h07l7xy713zchnj2p9fhvq7fdl4zy1ai94li3ygkqjjj8hrgas"))))
1328 (build-system gnu-build-system)
1329 (native-inputs
1330 `(("automake" ,automake)
1331 ("autoconf" ,autoconf)
1332 ("libtool" ,libtool)
1333 ("dovecot" ,dovecot)
1334 ("pkg-config" ,pkg-config)))
1335 (inputs
1336 `(("libsodium" ,libsodium)))
1337 (arguments
1338 `(#:tests? #f ;No tests exist.
1339 #:configure-flags (list (string-append "--with-dovecot="
1340 (assoc-ref %build-inputs "dovecot")
1341 "/lib/dovecot"))
1342 #:phases
1343 (modify-phases %standard-phases
d10092b8 1344 (add-after 'unpack 'autogen
a4651f64 1345 (lambda _
bc884ed8 1346 (invoke "sh" "autogen.sh"))))))
a4651f64 1347 (home-page "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1348 (synopsis "Libsodium password hashing schemes plugin for Dovecot")
1349 (description
1350 "@code{dovecot-libsodium-plugin} provides libsodium password
1351hashing schemes plugin for @code{Dovecot}.")
1352 (license gpl3+))))
1353
81ce19f4
1354(define-public isync
1355 (package
1356 (name "isync")
49490231 1357 (version "1.3.0")
81ce19f4
1358 (source
1359 (origin
1360 (method url-fetch)
1361 (uri (string-append "mirror://sourceforge/isync/isync/"
1362 version "/isync-" version ".tar.gz"))
1363 (sha256 (base32
49490231 1364 "173wd7x8y5sp94slzwlnb7zhgs32r57zl9xspl2rf4g3fqwmhpwd"))))
81ce19f4 1365 (build-system gnu-build-system)
49490231
LF
1366 (native-inputs
1367 `(("perl" ,perl)))
81ce19f4
1368 (inputs
1369 `(("bdb" ,bdb)
a052d5ab 1370 ("cyrus-sasl" ,cyrus-sasl)
a66fb3a1
TGR
1371 ("openssl" ,openssl)
1372 ("zlib" ,zlib)))
81ce19f4
1373 (home-page "http://isync.sourceforge.net/")
1374 (synopsis "Mailbox synchronization program")
1375 (description
f6cd8586 1376 "isync/mbsync is a command-line tool for two-way synchronization of
81ce19f4
1377mailboxes. Currently Maildir and IMAP are supported types.")
1378 (license gpl2+)))
1379
26b8de19
EB
1380(define-public perl-email-abstract
1381 (package
1382 (name "perl-email-abstract")
1383 (version "3.008")
1384 (source
1385 (origin
1386 (method url-fetch)
1387 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1388 "Email-Abstract-" version ".tar.gz"))
1389 (sha256
1390 (base32
1391 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
1392 (build-system perl-build-system)
1393 (propagated-inputs
1394 `(("perl-email-simple" ,perl-email-simple)
a2190ccc 1395 ("perl-module-pluggable" ,perl-module-pluggable)
26b8de19 1396 ("perl-mro-compat" ,perl-mro-compat)))
9aba9b12 1397 (home-page "https://metacpan.org/release/Email-Abstract")
26b8de19
EB
1398 (synopsis "Interface to mail representations")
1399 (description "Email::Abstract provides module writers with the ability to
1400write simple, representation-independent mail handling code.")
2f3108ad 1401 (license perl-license)))
26b8de19 1402
ebda902f
EB
1403(define-public perl-email-address
1404 (package
1405 (name "perl-email-address")
c8213ffc 1406 (version "1.909")
ebda902f
EB
1407 (source
1408 (origin
1409 (method url-fetch)
1410 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1411 "Email-Address-" version ".tar.gz"))
1412 (sha256
1413 (base32
c8213ffc 1414 "0l7x6sl06j9ffgfz5f9vgms2b5axd4cgp5fj03ivb3kia4km6b3g"))))
ebda902f 1415 (build-system perl-build-system)
9aba9b12 1416 (home-page "https://metacpan.org/release/Email-Address")
ebda902f
EB
1417 (synopsis "Email address parsing and creation")
1418 (description "Email::Address implements a regex-based RFC 2822 parser that
1419locates email addresses in strings and returns a list of Email::Address
1420objects found. Alternatively you may construct objects manually.")
2f3108ad 1421 (license perl-license)))
ebda902f 1422
aa86a3be
EB
1423(define-public perl-email-date-format
1424 (package
1425 (name "perl-email-date-format")
1426 (version "1.005")
1427 (source
1428 (origin
1429 (method url-fetch)
1430 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1431 "Email-Date-Format-" version ".tar.gz"))
1432 (sha256
1433 (base32
1434 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
1435 (build-system perl-build-system)
9aba9b12 1436 (home-page "https://metacpan.org/release/Email-Date-Format")
aa86a3be
EB
1437 (synopsis "Produce RFC 2822 date strings")
1438 (description "Email::Date::Format provides a means for generating an RFC
14392822 compliant datetime string.")
2f3108ad 1440 (license perl-license)))
aa86a3be 1441
08bf7095
EB
1442(define-public perl-email-messageid
1443 (package
1444 (name "perl-email-messageid")
1fb37ef0 1445 (version "1.406")
08bf7095
EB
1446 (source
1447 (origin
1448 (method url-fetch)
1449 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1450 "Email-MessageID-" version ".tar.gz"))
1451 (sha256
1452 (base32
1fb37ef0 1453 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
08bf7095 1454 (build-system perl-build-system)
9aba9b12 1455 (home-page "https://metacpan.org/release/Email-MessageID")
08bf7095
EB
1456 (synopsis "Generate world unique message-ids")
1457 (description "Email::MessageID generates recommended message-ids to
1458identify a message uniquely.")
2f3108ad 1459 (license perl-license)))
08bf7095 1460
0a4c49f6
EB
1461(define-public perl-email-mime
1462 (package
1463 (name "perl-email-mime")
4f50fd75 1464 (version "1.946")
0a4c49f6
EB
1465 (source
1466 (origin
1467 (method url-fetch)
1468 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1469 "Email-MIME-" version ".tar.gz"))
1470 (sha256
1471 (base32
4f50fd75 1472 "0z1k3i0lzp2k421gc8f3wq0jbqflkbw2xqd2k7n7pmv56417kvk8"))))
0a4c49f6
EB
1473 (build-system perl-build-system)
1474 (propagated-inputs
1475 `(("perl-email-address" ,perl-email-address)
1476 ("perl-email-messageid" ,perl-email-messageid)
1477 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1478 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1479 ("perl-email-simple" ,perl-email-simple)
4f50fd75
TGR
1480 ("perl-mime-types" ,perl-mime-types)
1481 ("perl-module-runtime" ,perl-module-runtime)))
9aba9b12 1482 (home-page "https://metacpan.org/release/Email-MIME")
0a4c49f6
EB
1483 (synopsis "MIME message handling")
1484 (description "Email::MIME is an extension of the Email::Simple module, to
1485handle MIME encoded messages. It takes a message as a string, splits it up
1486into its constituent parts, and allows you access to various parts of the
1487message. Headers are decoded from MIME encoding.")
2f3108ad 1488 (license perl-license)))
0a4c49f6 1489
55025bb5
EB
1490(define-public perl-email-mime-contenttype
1491 (package
1492 (name "perl-email-mime-contenttype")
9b5fc20c 1493 (version "1.022")
55025bb5
EB
1494 (source
1495 (origin
1496 (method url-fetch)
1497 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1498 "Email-MIME-ContentType-" version ".tar.gz"))
1499 (sha256
1500 (base32
9b5fc20c 1501 "042kxhs3bp1ab9z0mbr1wy21ld4lxd6v2a2mmrashqnsn2075fws"))))
55025bb5
EB
1502 (build-system perl-build-system)
1503 (native-inputs
1504 `(("perl-capture-tiny" ,perl-capture-tiny)))
9aba9b12 1505 (home-page "https://metacpan.org/release/Email-MIME-ContentType")
55025bb5
EB
1506 (synopsis "Parse MIME Content-Type headers")
1507 (description "Email::MIME::ContentType parses a MIME Content-Type
1508header.")
2f3108ad 1509 (license perl-license)))
55025bb5 1510
02e29936
EB
1511(define-public perl-email-mime-encodings
1512 (package
1513 (name "perl-email-mime-encodings")
1514 (version "1.315")
1515 (source
1516 (origin
1517 (method url-fetch)
1518 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1519 "Email-MIME-Encodings-" version ".tar.gz"))
1520 (sha256
1521 (base32
1522 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1523 (build-system perl-build-system)
1524 (native-inputs
1525 `(("perl-capture-tiny" ,perl-capture-tiny)))
9aba9b12 1526 (home-page "https://metacpan.org/release/Email-MIME-Encodings")
02e29936
EB
1527 (synopsis "Unified interface to MIME encoding and decoding")
1528 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
2f3108ad 1529 (license perl-license)))
02e29936 1530
a24c5420
EB
1531(define-public perl-email-sender
1532 (package
1533 (name "perl-email-sender")
801eb746 1534 (version "1.300031")
a24c5420
EB
1535 (source
1536 (origin
1537 (method url-fetch)
1538 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1539 "Email-Sender-" version ".tar.gz"))
1540 (sha256
1541 (base32
801eb746 1542 "052g0slw3h2lzn93j71fi47nfawww2aph4jhr3c860ji70lkf4n4"))))
a24c5420
EB
1543 (build-system perl-build-system)
1544 (native-inputs
1545 `(("perl-capture-tiny" ,perl-capture-tiny)))
1546 (propagated-inputs
1547 `(("perl-email-abstract" ,perl-email-abstract)
1548 ("perl-email-address" ,perl-email-address)
1549 ("perl-email-simple" ,perl-email-simple)
1550 ("perl-list-moreutils" ,perl-list-moreutils)
1551 ("perl-module-runtime" ,perl-module-runtime)
1552 ("perl-moo" ,perl-moo)
1553 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1554 ("perl-sub-exporter" ,perl-sub-exporter)
1555 ("perl-throwable" ,perl-throwable)
1556 ("perl-try-tiny" ,perl-try-tiny)))
9aba9b12 1557 (home-page "https://metacpan.org/release/Email-Sender")
a24c5420
EB
1558 (synopsis "Perl library for sending email")
1559 (description "Email::Sender replaces the old and sometimes problematic
1560Email::Send library.")
2f3108ad 1561 (license perl-license)))
a24c5420 1562
151ef3ed
EB
1563(define-public perl-email-simple
1564 (package
1565 (name "perl-email-simple")
3a2f1d93 1566 (version "2.216")
151ef3ed
EB
1567 (source
1568 (origin
1569 (method url-fetch)
1570 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1571 "Email-Simple-" version ".tar.gz"))
1572 (sha256
1573 (base32
3a2f1d93 1574 "1m4brbjvalyp5kjqslqv4155dzwg977shxin208i7lc8236n6pyq"))))
151ef3ed
EB
1575 (build-system perl-build-system)
1576 (propagated-inputs
1577 `(("perl-email-date-format" ,perl-email-date-format)))
9aba9b12 1578 (home-page "https://metacpan.org/release/Email-Simple")
151ef3ed
EB
1579 (synopsis "Parsing of RFC 2822 messages")
1580 (description "Email::Simple provides simple parsing of RFC 2822 message
1581format and headers.")
2f3108ad 1582 (license perl-license)))
151ef3ed 1583
f5dceecb
AW
1584(define-public libesmtp
1585 (package
1586 (name "libesmtp")
1587 (version "1.0.6")
1588 (source
1589 (origin
1590 (method url-fetch)
049e02ea
LF
1591 (uri (list (string-append "https://pkgs.fedoraproject.org/repo/pkgs/"
1592 "libesmtp/libesmtp-" version ".tar.bz2/"
1593 "bf3915e627fd8f35524a8fdfeed979c8/libesmtp-"
1594 version ".tar.bz2")
1595 ;; XXX This site is offline, so we fetch Fedora's cached copy
1596 ;; of the source tarball.
1597 (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1598 version ".tar.bz2")))
f5dceecb
AW
1599 (sha256
1600 (base32
1601 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1602 (build-system gnu-build-system)
1603 (propagated-inputs
1604 `(("openssl" ,openssl)))
1605 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1606 (synopsis "Library for sending mail via remote hosts using SMTP")
1607 (description "libESMTP is an SMTP client which manages posting (or
1608submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1609It may be used as part of a Mail User Agent (MUA) or other program that must
1610be able to post electronic mail where mail functionality may not be that
1611program's primary purpose.")
1612 (license (list lgpl2.1+ gpl2+))))
1613
f8ae32a2
AW
1614(define-public esmtp
1615 (package
1616 (name "esmtp")
1617 (version "1.2")
1618 (source
1619 (origin
1620 (method git-fetch)
1621 (uri (git-reference
1622 (url "https://github.com/andywingo/esmtp.git")
1623 (commit "01bf9fc")))
1624 (sha256
1625 (base32
1626 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1627 (file-name (string-append name "-" version "-checkout"))))
1628 (arguments
1629 `(#:phases (modify-phases %standard-phases
73c0e477
EF
1630 (replace 'bootstrap
1631 (lambda _ (invoke "autoreconf" "-vfi"))))))
f8ae32a2
AW
1632 (build-system gnu-build-system)
1633 (native-inputs
1634 `(("bison" ,bison)
1635 ("flex" ,flex)
1636 ("autoconf" ,autoconf)
1637 ("automake" ,automake)
1638 ("libtool" ,libtool)))
1639 (inputs
718c5dd6 1640 `(("libesmtp" ,libesmtp)))
3b3b60d0 1641 (home-page "https://sourceforge.net/projects/esmtp/")
f8ae32a2
AW
1642 (synopsis "Relay-only mail transfer agent (MTA)")
1643 (description "Esmtp is a simple relay-only mail transfer agent built using
1644libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1645user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1646page for more on configuration. This package also provides minimal
1647compatibility shims for the @command{sendmail}, @command{mailq}, and
1648@command{newaliases} commands.")
1649 (license gpl2+)))
1650
34dd26af
CAW
1651(define-public fdm
1652 (package
1653 (name "fdm")
1654 (version "1.9")
1655 (source (origin
1656 (method url-fetch)
1657 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1658 version "/fdm-"
1659 version ".tar.gz"))
1660 (file-name (string-append name "-" version ".tar.gz"))
1661 (sha256
1662 (base32 "054rscijahiza5f9qha79rg3siji3bk5mk10f8c2vqx7m4w6qh8n"))))
1663 (build-system gnu-build-system)
1664 (inputs
1665 `(("tdb" ,tdb)
1666 ("openssl" ,openssl)
1667 ("zlib" ,zlib)))
1668 (home-page "https://github.com/nicm/fdm")
1669 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1670 (description "fdm is a program designed to fetch mail from POP3
1671or IMAP servers, or receive local mail from stdin, and
1672deliver it in various ways.")
1673 (license
1674 ;; Why point to a source file? Well, all the individual files have a
1675 ;; copy of this license in their headers, but there's no seprate file
1676 ;; with that information.
16966d5b 1677 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
34dd26af 1678
e90819c4
LG
1679
1680(define-public procmail
1681 (package
1682 (name "procmail")
1683 (version "3.22")
1684 (source
1685 (origin
1686 (method url-fetch)
1687 (uri (string-append
1688 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1689 version
1690 ".tar.gz"))
1691 (sha256
1692 (base32
1693 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1694 ;; The following patch fixes an ambiguous definition of
1695 ;; getline() in formail.c. The patch is provided by Debian as
1696 ;; patch 24.
1d982d78 1697 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
c297e965
LF
1698 "procmail-CVE-2014-3618.patch"
1699 "procmail-CVE-2017-16844.patch"))))
e90819c4
LG
1700 (arguments
1701 `(#:phases (modify-phases %standard-phases
1702 (replace 'configure
1703 (lambda _
1704 (substitute* "Makefile"
1705 (("/bin/sh")
1706 (which "sh"))
1707 (("/usr")
1708 (assoc-ref %outputs "out"))
1709 (("/bin/rm")
1710 (which "rm")))
1711 #t)))
1712 #:tests? #f)) ;; There are no tests indicating a successful
1713 ;; build. Some tests of basic locking mechanisms provided by the
8f65585b 1714 ;; file system are performed during 'make install'. However, these
e90819c4
LG
1715 ;; are performed before the actual build process.
1716 (build-system gnu-build-system)
05aa576b 1717 (inputs `(("exim" ,exim)))
e90819c4
LG
1718 (home-page "http://www.procmail.org/")
1719 (synopsis "Versatile mail delivery agent (MDA)")
1720 (description "Procmail is a mail delivery agent (MDA) featuring support
1721for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1722can be sorted into separate files/directories and arbitrary commands can be
1723executed on mail arrival. Procmail is considered stable, but is no longer
1724maintained.")
1725 (license gpl2+))) ;; procmail allows to choose the
1726 ;; nonfree Artistic License 1.0
1727 ;; as alternative to the GPL2+.
1728 ;; This option is not listed here.
e90819c4 1729
61c30e9d
LF
1730(define-public khard
1731 (package
1732 (name "khard")
224b1c83 1733 (version "0.12.2")
61c30e9d
LF
1734 (source (origin
1735 (method url-fetch)
1736 (uri (pypi-uri name version))
1737 (sha256
1738 (base32
224b1c83 1739 "01y52qmab4cw9wmx87aahnxbyaxrxw8j2wx06mpcqsfvgk8d54wi"))))
61c30e9d
LF
1740 (build-system python-build-system)
1741 (arguments
a57495e2 1742 `(#:phases
61c30e9d 1743 (modify-phases %standard-phases
61c30e9d
LF
1744 (add-after 'install 'install-doc
1745 (lambda* (#:key outputs #:allow-other-keys)
1746 (let* ((out (assoc-ref outputs "out"))
1747 (doc (string-append out "/share/doc/khard")))
e9eafae2
MB
1748 (copy-recursively "misc/khard" doc)
1749 #t))))
224b1c83
EF
1750 ;; Tests are currently only runnable without preexisting data on
1751 ;; the development branch:
1752 ;; https://github.com/scheibler/khard/issues/176
e9eafae2 1753 #:tests? #f))
61c30e9d 1754 (propagated-inputs
224b1c83
EF
1755 `(("python-atomicwrites" ,python-atomicwrites)
1756 ("python-configobj" ,python-configobj)
a57495e2 1757 ("python-pyyaml" ,python-pyyaml)
224b1c83
EF
1758 ("python-ruamel.yaml" ,python-ruamel.yaml)
1759 ("python-unidecode" ,python-unidecode)
1760 ("python-vobject" ,python-vobject)))
61c30e9d
LF
1761 (synopsis "Console address book using CardDAV")
1762 (description "Khard is an address book for the console. It creates, reads,
1763modifies and removes CardDAV address book entries at your local machine. For
1764synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1765Khard can also be used from within the email client @command{mutt}.")
1766 (home-page "https://github.com/scheibler/khard")
1767 (license gpl3+)))
be0c5733
DM
1768
1769(define-public perl-mail-spf
1770 (package
1771 (name "perl-mail-spf")
1772 (version "v2.9.0")
1773 (source
1774 (origin
1775 (method url-fetch)
1776 (uri (string-append
1777 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-"
1778 version
1779 ".tar.gz"))
1780 (sha256
1781 (base32
1782 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1783 (build-system perl-build-system)
1784 (native-inputs
1785 `(("perl-module-build" ,perl-module-build)
1786 ("perl-net-dns-resolver-programmable"
1787 ,perl-net-dns-resolver-programmable)))
1788 (arguments
1789 `(#:phases (modify-phases %standard-phases
1790 (add-before 'configure 'modify-Build.PL
1791 (lambda* (#:key outputs #:allow-other-keys)
1792 (substitute* "Build.PL"
1793 (("'/usr/sbin'") (string-append "'"
1794 (assoc-ref outputs "out")
1795 "/sbin'")))
1796 #t)))))
1797 (inputs
1798 `(("perl-error" ,perl-error)
1799 ("perl-net-dns" ,perl-net-dns)
1800 ("perl-netaddr-ip" ,perl-netaddr-ip)
1801 ("perl-uri" ,perl-uri)))
1802 (home-page
9aba9b12 1803 "https://metacpan.org/release/Mail-SPF")
be0c5733
DM
1804 (synopsis
1805 "Perl implementation of Sender Policy Framework")
1806 (description "Mail::SPF is the Sender Policy Framework implemented
1807in Perl.")
1808 (license bsd-3)))
24262239
CL
1809
1810(define-public mb2md
1811 (package
1812 (name "mb2md")
1813 (version "3.20")
1814 (source (origin
1815 (method url-fetch)
1816 (uri (string-append
1817 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
1818 version ".pl.gz"))
1819 (sha256
1820 (base32
1821 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
1822 (build-system trivial-build-system)
1823 (arguments
1824 '(#:modules ((guix build utils))
1825 #:builder
1826 (begin
1827 (use-modules (guix build utils))
1828 (let* ((source (assoc-ref %build-inputs "source"))
1829 (out (assoc-ref %outputs "out"))
1830 (bin (string-append out "/bin"))
1831 (perl (assoc-ref %build-inputs "perl"))
1832 (gzip (assoc-ref %build-inputs "gzip"))
1833 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
1834 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
1835 (mkdir-p bin)
1836 (with-directory-excursion bin
1837 (copy-file source "mb2md.gz")
e3cfef22 1838 (invoke (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
24262239
CL
1839 (substitute* "mb2md"
1840 (("#!/usr/bin/perl")
1841 (string-append "#!/usr/bin/perl -I " perl5lib)))
1842 (patch-shebang "mb2md" (list (string-append perl "/bin")))
1843 (chmod "mb2md" #o555))
1844 #t))))
c695fb76 1845 (native-inputs `(("gzip" ,gzip)))
24262239
CL
1846 (inputs `(("perl" ,perl)
1847 ("perl-timedate" ,perl-timedate)))
1848 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
1849 (synopsis "Mbox to maildir converter")
1850 (description
1851 "Mb2md is a Perl script that takes one or more mbox format files and
1852converts them to maildir format directories.")
1853 (license public-domain)))
e0d7b421
AI
1854
1855(define-public mpop
1856 (package
1857 (name "mpop")
3e84ce51 1858 (version "1.4.0")
e0d7b421
AI
1859 (source
1860 (origin
1861 (method url-fetch)
1497b95c
TGR
1862 (uri (string-append "https://marlam.de/mpop/releases/"
1863 name "-" version ".tar.xz"))
e0d7b421
AI
1864 (sha256
1865 (base32
3e84ce51 1866 "14xsvpm5bc1wycisq882gqrnamnyi1q4rlk6anlw8ihzvwgm4h2j"))))
e0d7b421
AI
1867 (build-system gnu-build-system)
1868 (inputs
1869 `(("gnutls" ,gnutls)
1870 ("libidn" ,libidn)))
1871 (native-inputs
1872 `(("pkg-config" ,pkg-config)))
1497b95c 1873 (home-page "https://marlam.de/mpop/")
e0d7b421
AI
1874 (synopsis "POP3 mail client")
1875 (description "mpop is a small and fast POP3 client suitable as a
1876fetchmail replacement.
1877
1878mpop supports multiple accounts, header based mail filtering, delivery
1879to mbox files, maildir folders or a Mail Delivery Agent (MDA),
1880TLS/SSL, several authentication methods, Internationalized Domain
1881Names (IDN) and SOCKS proxies.")
1882 (license gpl3+)))
74c0282c 1883
1884(define-public mhonarc
1885 (package
1886 (name "mhonarc")
1887 (version "2.6.19")
1888 (source
1889 (origin
1890 (method url-fetch)
1891 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
1892 version ".tar.gz"))
1893 (sha256
1894 (base32
1895 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
1896 (build-system perl-build-system)
1897 (home-page "https://www.mhonarc.org/")
1898 (synopsis "Create HTML archives of mail/news messages")
1899 (description
1900 "MHonArc is a Perl mail-to-HTML converter. MHonArc
1901provides HTML mail archiving with index, mail thread linking,
1902etc; plus other capabilities including support for MIME and
1903powerful user customization features.")
1904 (license gpl2+)))
5d87088c
JD
1905
1906
1907(define-public sendmail
1908 (package
1909 (name "sendmail")
1910 (version "8.15.2")
1911 (source
1912 (origin
1913 (method url-fetch)
1914 (uri (string-append
1915 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
1916 version ".tar.gz"))
1917 (sha256
1918 (base32
1919 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
1920 (build-system gnu-build-system)
1921 (arguments
1922 `(#:phases
1923 (modify-phases %standard-phases
1924 (add-before 'build 'replace-/bin/sh
1925 (lambda _
1926 (substitute*
1927 (append
1928 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
1929 "contrib/mmuegel" "devtools/bin/configure.sh")
1930 (find-files "." ".*\\.m4")
1931 (find-files "." ".*\\.cf"))
19527952 1932 (("/bin/sh") (which "sh")))
5d87088c
JD
1933
1934 (substitute* "devtools/bin/Build"
19527952 1935 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
5d87088c
JD
1936 #t))
1937 (replace 'configure
1938 (lambda _
1939
1940 ;; Render harmless any attempts to chown or chgrp
1941 (substitute* "devtools/bin/install.sh"
1942 (("owner=\\$2") "owner=''")
1943 (("group=\\$2") "group=''"))
1944
1945 (with-output-to-file "devtools/Site/site.config.m4"
1946 (lambda ()
1947 (format #t "
1948define(`confCC', `gcc')
1949define(`confOPTIMIZE', `-g -O2')
1950define(`confLIBS', `-lresolv')
1951define(`confINSTALL', `~a/devtools/bin/install.sh')
1952define(`confDEPEND_TYPE', `CC-M')
1953define(`confINST_DEP', `')
55492129
TGR
1954" (getcwd))))
1955 #t))
5d87088c
JD
1956 (replace 'build
1957 (lambda _
55492129
TGR
1958 (invoke "sh" "Build")
1959 (with-directory-excursion "cf/cf"
1960 (copy-file "generic-linux.mc" "sendmail.mc")
1961 (invoke "sh" "Build" "sendmail.cf"))
1962 #t))
5d87088c
JD
1963 (add-before 'install 'pre-install
1964 (lambda _
1965 (let ((out (assoc-ref %outputs "out")))
1966 (mkdir-p (string-append out "/usr/bin"))
1967 (mkdir-p (string-append out "/usr/sbin"))
1968 (mkdir-p (string-append out "/etc/mail"))
1969 (setenv "DESTDIR" out)
1970 (with-directory-excursion "cf/cf"
55492129
TGR
1971 (invoke "sh" "Build" "install-cf"))
1972 #t))))
5d87088c
JD
1973 ;; There is no make check. There are some post installation tests, but those
1974 ;; require root privileges
1975 #:tests? #f))
1976 (inputs
1977 `(("m4" ,m4)
1978 ("perl" ,perl)))
1979 (home-page "http://sendmail.org")
1980 (synopsis
1981 "Highly configurable Mail Transfer Agent (MTA)")
1982 (description
1983 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
1984Allman. It is highly configurable and supports many delivery methods and many
1985transfer protocols.")
1986 (license (non-copyleft "file://LICENSE"
1987 "See LICENSE in the distribution."))))
1988
8b53366c 1989(define-public opensmtpd
1990 (package
1991 (name "opensmtpd")
2f2ce920 1992 (version "6.0.3p1")
8b53366c 1993 (source (origin
1994 (method url-fetch)
1995 (uri (string-append "https://www.opensmtpd.org/archives/"
1996 name "-" version ".tar.gz"))
1997 (sha256
1998 (base32
d6dd64af
AZ
1999 "10bsfsnlg9d9i6l2izdnxp05s3ri8fvwzqxvx1jmarc852382619"))
2000 ;; Fixed upstream: <github.com/OpenSMTPD/OpenSMTPD/pull/835>.
2001 (patches (search-patches "opensmtpd-fix-crash.patch"))))
8b53366c 2002 (build-system gnu-build-system)
2003 (inputs
2004 `(("bdb" ,bdb)
2005 ("libressl" ,libressl)
2006 ("libevent" ,libevent)
2007 ("libasr" ,libasr)
2008 ("linux-pam" ,linux-pam)
2009 ("zlib" ,zlib)))
2010 (native-inputs
d7da7604
SB
2011 `(("bison" ,bison)
2012 ("groff" ,groff)))
8b53366c 2013 (arguments
ae1e2133 2014 `(#:configure-flags
a1b517f9 2015 (list "--with-table-db" "--with-auth-pam" "--localstatedir=/var"
ae1e2133
SB
2016 "--with-user-smtpd=smtpd" "--with-user-queue=smtpq"
2017 "--with-group-queue=smtpq"
2f2ce920 2018 "--with-path-socket=/var/run" ; not default (./configure lies)
ae1e2133 2019 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt")
8b53366c 2020 #:phases
2021 (modify-phases %standard-phases
19fed049
TGR
2022 ;; Fix some incorrectly hard-coded external tool file names.
2023 (add-after 'unpack 'patch-FHS-file-names
2024 (lambda* (#:key inputs #:allow-other-keys)
2025 (substitute* "smtpd/smtpctl.c"
2026 (("/bin/cat") (which "cat"))
2027 (("/bin/sh") (which "sh")))
2028 #t))
8b53366c 2029 ;; OpenSMTPD provides a single utility smtpctl to control the daemon and
2030 ;; the local submission subsystem. To accomodate systems that require
2031 ;; historical interfaces such as sendmail, newaliases or makemap, the
2032 ;; smtpctl utility can operate in compatibility mode if called with the
2033 ;; historical name.
a1eabab1
TGR
2034 (add-after 'install 'install-compability-links
2035 (lambda* (#:key outputs #:allow-other-keys)
2036 (let* ((out (assoc-ref outputs "out"))
8b53366c 2037 (sbin (string-append out "/sbin/")))
a1eabab1
TGR
2038 (for-each (lambda (command)
2039 (symlink "smtpctl" (string-append sbin command)))
8b53366c 2040 '("makemap" "sendmail" "send-mail"
2041 "newaliases" "mailq")))
2042 #t)))))
2043 (synopsis "Lightweight SMTP daemon")
2044 (description
2045 "OpenSMTPD is an implementation of the server-side SMTP protocol, with
2046some additional standard extensions. It allows ordinary machines to exchange
2047e-mails with other systems speaking the SMTP protocol.")
2048 (home-page "https://www.opensmtpd.org")
2049 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
19262a71 2050 public-domain isc license:openssl))))
152ffe7c 2051
2052(define-public opensmtpd-extras
2053 (package
2054 (name "opensmtpd-extras")
2055 (version "5.7.1")
2056 (source (origin
2057 (method url-fetch)
2058 (uri (string-append "https://www.opensmtpd.org/archives/"
2059 name "-" version ".tar.gz"))
2060 (sha256
2061 (base32
2062 "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm"))))
2063 (build-system gnu-build-system)
2064 (inputs
2065 `(("libressl" ,libressl)
2066 ("libevent" ,libevent)
2067 ("libasr" ,libasr)
2068 ("python-2" ,python-2)
2069 ("opensmtpd" ,opensmtpd)
2070 ("perl" ,perl)
2071 ("lua" ,lua)
2072 ("postgresql" ,postgresql)
2073 ("sqlite" ,sqlite)
2074 ("linux-pam" ,linux-pam)))
2075 (native-inputs
2076 `(("bison" ,bison)
2077 ("pkg-config" ,pkg-config)
2078 ("groff" ,groff)
2079 ("automake" ,automake)
2080 ("autoconf" ,autoconf)))
2081 (arguments
2082 `(;; We have to configure it like this because the default checks for for example
2083 ;; python in /usr/local/bin, /usr/bin and fails otherwise.
2084 #:configure-flags (list
2085 "--with-filter-clamav" "--with-filter-dkim-signer"
2086 "--with-filter-dnsbl" "--with-filter-lua"
2087 "--with-filter-monkey" "--with-filter-pause"
2088 "--with-filter-perl" "--with-filter-python"
2089 "--with-filter-regex" "--with-filter-spamassassin"
2090 "--with-filter-stub" "--with-filter-trace"
2091 "--with-filter-void"
2092
2093 "--with-queue-null" "--with-queue-python"
2094 "--with-queue-ram" "--with-queue-stub"
2095
2096 "--with-scheduler-python" "--with-scheduler-ram"
2097 "--with-scheduler-stub"
2098
2099 "--with-table-ldap" ; "--with-table-mysql"
2100 "--with-table-passwd" "--with-table-postgres"
2101 "--with-table-python" "--with-table-socketmap"
2102 "--with-table-sqlite" "--with-table-stub"
2103 ;;"--with-table-redis" ; TODO: package hiredis
2104
2105 "--with-user=smtpd" "--with-privsep-user=smtpd"
2106 "--localstatedir=/var" "--sysconfdir=/etc"
2107 "--with-lua-type=lua" ; can use lua or luajit
2108
2109 (string-append "--with-python="
2110 (assoc-ref %build-inputs "python-2"))
2111 (string-append "--with-lua="
2112 (assoc-ref %build-inputs "lua")))))
19262a71
LC
2113 (license (list bsd-2 bsd-3 bsd-4
2114 public-domain isc license:openssl))
152ffe7c 2115 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
2116 (description
2117 "This package provides extra tables, filters, and various other addons
2118for OpenSMTPD to extend its functionality.")
2119 (home-page "https://www.opensmtpd.org")))
6d3dda4f 2120
2121(define-public python-mailmanclient
2122 (package
2123 (name "python-mailmanclient")
c115a1c8 2124 (version "3.1.1")
6d3dda4f 2125 (source
2126 (origin
2127 (method url-fetch)
2128 (uri (pypi-uri "mailmanclient" version))
2129 (sha256
2130 (base32
c115a1c8 2131 "0fdfs5g3pf30v2i7w18pdkv9xnfxmfcv66mzv56dck0a1igq07m3"))))
6d3dda4f 2132 (build-system python-build-system)
2133 (arguments
2134 `(#:tests? #f)) ; Requires mailman running
f22efa01 2135 (propagated-inputs
6d3dda4f 2136 `(("python-six" ,python-six)
2137 ("python-httplib2" ,python-httplib2)))
2138 (home-page "https://launchpad.net/mailman.client")
2139 (synopsis "Python bindings for the Mailman 3 REST API")
2140 (description
2141 "The mailmanclient library provides official Python bindings for
2142the GNU Mailman 3 REST API.")
6d3dda4f 2143 (license lgpl3+)))
2144
2145(define-public python2-mailmanclient
5c31f4aa 2146 (package-with-python2 python-mailmanclient))
3163a289 2147
2148(define-public mlmmj
2149 (package
2150 (name "mlmmj")
28b48c87 2151 (version "1.3.0")
3163a289 2152 (source
2153 (origin
2154 (method url-fetch)
2155 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
2156 version ".tar.bz2"))
2157 (sha256
2158 (base32
28b48c87 2159 "0hpj10qad821ci11si8xc2qnmkzfn90y13s43fm4fca38f0qjp8w"))))
3163a289 2160 (build-system gnu-build-system)
2161 (inputs
2162 `(("perl" ,perl))) ; For "contrib/web/"
2163 (native-inputs
2164 `(("pkg-config" ,pkg-config)))
2165 (arguments
2166 `(#:configure-flags
2167 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
2168 ;; It opens the files control/mimedeny and control/mimestrip to get a list
2169 ;; of mimetypes for parts of multipart/mime messages that should be denied
2170 ;; or stripped. The parts then get stripped directly when the mail is
2171 ;; received. mlmmj-receive-strip also appends an extra header
2172 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
2173 ;; mime parts
2174 (list "--enable-receive-strip")
2175 #:phases
2176 (modify-phases %standard-phases
2177 (add-before 'install 'install-contrib
2178 (lambda* (#:key outputs #:allow-other-keys)
2179 (let* ((out (assoc-ref outputs "out"))
2180 (share (string-append out "/share/mlmmj"))
2181 (contrib (string-append share "/contrib/web"))
2182 (texts (string-append share "/listtexts")))
2183 (copy-recursively "contrib/web/" contrib)
2184 (copy-recursively "listtexts" texts)
2185 (rename-file texts (string-append share "/texts"))
2186 #t))))))
2187 (home-page "http://mlmmj.org")
2188 (synopsis "Mailing list managing made joyful")
2189 (description
2190 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
2191It works with many different Mail Transport Agents (MTAs) and is simple for a
d1e4ad1b 2192system administrator to install, configure and integrate with other software.
3163a289 2193As it uses very few resources, and requires no daemons, it is ideal for
2194installation on systems where resources are limited. Its features include:
2195@enumerate
2196@item Archive, Custom headers / footer,
2197@item Fully automated bounce handling (similar to ezmlm),
2198@item Complete requeueing functionality, Moderation functionality, Subject prefix,
2199@item Subscribers only posting, Regular expression access control,
2200@item Functionality to retrieve old posts, Web interface, Digests,
2201@item No-mail subscription, VERP support,
2202@item Delivery Status Notification (RFC1891) support,
2203@item Rich and customisable texts for automated operations.
2204@end enumerate\n")
2205 (license license:expat)))
3a263368 2206
ea3b9f7b 2207(define-public python2-django-mailman3
8a3741e6 2208 (package
ea3b9f7b 2209 (name "python2-django-mailman3")
bdf0c644 2210 (version "1.1.0")
8a3741e6 2211 (source
2212 (origin
2213 (method url-fetch)
2214 (uri (pypi-uri "django-mailman3" version))
2215 (sha256
2216 (base32
bdf0c644 2217 "1xjdkgfjwhgyrp5nxw65dcpcsr98ygj6856sp0bwkrmyxpd1xxk2"))))
8a3741e6 2218 (build-system python-build-system)
ea3b9f7b
CB
2219 (arguments
2220 `(#:phases
2221 (modify-phases %standard-phases
2222 (replace 'check
2223 (lambda _
dcfdaa15
TGR
2224 (invoke "django-admin"
2225 "test"
2226 "--settings=django_mailman3.tests.settings_test"
2227 "django_mailman3"))))
ea3b9f7b 2228 #:python ,python-2))
8a3741e6 2229 (inputs
ea3b9f7b 2230 `(("python2-django" ,python2-django)))
8a3741e6 2231 (propagated-inputs
ea3b9f7b
CB
2232 `(("python2-requests" ,python2-requests)
2233 ("python2-requests-oauthlib" ,python2-requests-oauthlib)
2234 ("python2-openid" ,python2-openid)
2235 ("python2-mailmanclient" ,python2-mailmanclient)
2236 ("python2-django-allauth" ,python2-django-allauth)
2237 ("python2-django-gravatar2" ,python2-django-gravatar2)
2238 ("python2-pytz" ,python2-pytz)))
8a3741e6 2239 (home-page "https://gitlab.com/mailman/django-mailman3")
2240 (synopsis "Django library for Mailman UIs")
2241 (description
2242 "Libraries and templates for Django-based interfaces
2243interacting with Mailman.")
2244 (license gpl3+)))
2245
d99a2add 2246(define-public postorius
2247 (package
2248 (name "postorius")
2249 (version "1.0.3")
2250 (source
2251 (origin
2252 (method url-fetch)
2253 (uri (pypi-uri "postorius" version "+post2.tar.gz"))
2254 (file-name (string-append name "-" version ".tar.gz"))
2255 (sha256
2256 (base32
2257 "1wymcpv2icjjy8h1ni52p6dr7wwxf71ivqgbqhzx4i82yqphcaq5"))))
2258 (build-system python-build-system)
2259 (arguments
2260 `(; One test dependency relies on Persona, which was shut down in
2261 ;; November 2016.
2262 #:tests? #f
2263 ;; The part of the frontend of Mailman is still python 2.7.
2264 #:python ,python-2))
2265 (inputs
2266 `(("python2-django" ,python2-django)
2267 ("python2-django-mailman3" ,python2-django-mailman3)
2268 ("python2-mailmanclient" ,python2-mailmanclient)))
2269 (home-page "https://gitlab.com/mailman/postorius")
2270 (synopsis "Web user interface for GNU Mailman")
2271 (description
2272 "Postorius is a Django app which provides a web user interface
2273to access GNU Mailman.")
2274 (license (list gpl3+ lgpl3+))))
2275
3a263368 2276(define-public blists
2277 (package
2278 (name "blists")
18b1589b 2279 (version "2.0")
3a263368 2280 (source
2281 (origin
2282 (method url-fetch)
2283 (uri (string-append "http://download.openwall.net/pub/projects/"
2284 "blists/blists-" version ".tar.gz"))
2285 (sha256
2286 (base32
18b1589b 2287 "1xll5wn7py3bbncbwrj172f56nz75c9gwfsa80rwd96ss9gfmp3c"))))
3a263368 2288 (build-system gnu-build-system)
2289 (arguments
2290 `(#:tests? #f ; No tests
2291 #:phases
2292 (modify-phases %standard-phases
2293 (delete 'configure)
2294 (replace 'install
2295 (lambda* (#:key outputs #:allow-other-keys)
2296 (let* ((out (assoc-ref outputs "out"))
2297 (bin (string-append out "/bin")))
2298 (install-file "bindex" bin)
2299 (install-file "bit" bin)
2300 #t))))))
2301 (home-page "http://www.openwall.com/blists/")
2302 (synopsis "Web interface to mailing list archives")
2303 (description
2304 "Blists is a web interface to mailing list archives that works off
2305indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
2306@code{bindex} generates or updates the index file (incremental updates
2307are supported). @code{bit} is a CGI/SSI program that generates web pages
2308on the fly. Both programs are written in C and are very fast.")
2309 (license license:expat)))
ed428a58
AI
2310
2311(define-public swaks
2312 (package
2313 (name "swaks")
2314 (version "20170101.0")
2315 (source
2316 (origin
2317 (method url-fetch)
2318 (uri (string-append
d72f59a4 2319 "https://jetmore.org/john/code/swaks/files/swaks-"
ed428a58
AI
2320 version ".tar.gz"))
2321 (sha256
2322 (base32
2323 "0pli4mlhasnqqxmmxalwyg3x7n2vhcbgsnp2xgddamjavv82vrl4"))))
2324 (build-system perl-build-system)
2325 (inputs
2326 `(("perl-net-dns" ,perl-net-dns)
2327 ("perl-net-ssleay" ,perl-net-ssleay)))
2328 (arguments
2329 `(#:tests? #f ; No tests
2330 #:phases
2331 (modify-phases %standard-phases
2332 (delete 'configure)
2333 (replace 'build
2334 (lambda _
d72f59a4 2335 (invoke "pod2man" "doc/ref.pod" "swaks.1")))
ed428a58
AI
2336 (replace 'install
2337 (lambda* (#:key outputs #:allow-other-keys)
2338 (let ((out (assoc-ref outputs "out")))
2339 (install-file "swaks" (string-append out "/bin"))
2340 (install-file "swaks.1" (string-append out "/share/man/man1")))
2341 #t))
2342 (add-after 'install 'wrap-program
2343 (lambda* (#:key outputs #:allow-other-keys)
2344 (wrap-program (string-append (assoc-ref outputs "out")
2345 "/bin/swaks")
2346 `("PERL5LIB" ":" = (,(getenv "PERL5LIB"))))
2347 #t)))))
d72f59a4 2348 (home-page "https://jetmore.org/john/code/swaks/")
ed428a58
AI
2349 (synopsis "Featureful SMTP test tool")
2350 (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
2351test tool. It handles SMTP features and extensions such as TLS,
2352authentication, and pipelining; multiple versions of the SMTP protocol
2353including SMTP, ESMTP, and LMTP; and multiple transport methods including
2354unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
2355Options can be specified in environment variables, configuration files, and
2356the command line allowing maximum configurability and ease of use for
2357operators and scripters.")
2358 (license gpl2+)))
b0eb2af2 2359
2360(define-public alpine
2361 (package
2362 (name "alpine")
05a40469 2363 (version "2.21.9999")
b0eb2af2 2364 (source
2365 (origin
2366 (method url-fetch)
2367 ;; There are two versions: the plain continuation of Alpine without extra
2368 ;; patches and the version which adds extra fixes. Every distro uses
2369 ;; the patched version, and so do we to not break expectations.
32f9cc33 2370 ;; http://alpine.freeiz.com/alpine/readme/README.patches
78ba71b0 2371 (uri (string-append "http://repo.or.cz/alpine.git/snapshot/"
05a40469 2372 "d3e6f3932f2af9deca8eed09e30a55e9bd524362.tar.gz"))
78ba71b0 2373 (file-name (string-append name "-" version ".tar.gz"))
b0eb2af2 2374 (sha256
2375 (base32
05a40469 2376 "0w4qyybfdxi29r2z3giq0by6aa6v6nrgibh1xgv4d1vwwq4hw35w"))))
b0eb2af2 2377 (build-system gnu-build-system)
2378 (arguments
2379 `(#:make-flags (list "CC=gcc")
2380 #:configure-flags (list (string-append "--with-ssl-include-dir="
2381 (assoc-ref %build-inputs "openssl")
2382 "/include/openssl")
2383 (string-append "--with-ssl-dir="
2384 (assoc-ref %build-inputs "openssl"))
2385 (string-append "--with-ssl-certs-dir="
2386 "/etc/ssl/certs/")
2387 (string-append "--with-ssl-lib-dir="
2388 (assoc-ref %build-inputs "openssl")
2389 "/lib")
2390 (string-append "--with-interactive-spellcheck="
2391 (assoc-ref %build-inputs "aspell")
2392 "/bin/aspell"))
2393 #:phases
2394 (modify-phases %standard-phases
2395 (add-after 'unpack 'make-reproducible
2396 (lambda _
2397 ;; This removes time-dependent code to make alpine reproducible.
2398 (substitute* "pico/blddate.c"
2399 (("%02d-%s-%d") "1970-01-01"))
2400 (substitute* (list "alpine/Makefile.in"
2401 "web/src/alpined.d/Makefile.in")
2402 (("`date`") "1970-01-01"))
2403 #t)))))
2404 (inputs
2405 `(("ncurses" ,ncurses)
2406 ("openssl" ,openssl)
2407 ("gnutls" ,gnutls)
2408 ("openldap" ,openldap)
2409 ("cyrus-sasl" ,cyrus-sasl)
2410 ("mit-krb5" ,mit-krb5)
2411 ("aspell" ,aspell)
2412 ("tcl" ,tcl)
2413 ("linux-pam" ,linux-pam)))
78ba71b0 2414 (home-page "http://repo.or.cz/alpine.git")
b0eb2af2 2415 (synopsis "Alternatively Licensed Program for Internet News and Email")
2416 (description
2417 "Alpine is a text-based mail and news client. Alpine includes several
2418tools and applications:
2419@enumerate
2420@item alpine, the Alpine mailer
2421@item pico, the standalone text editor, GNU nano's predecessor
2422@item pilot, the standalone file system navigator
2423@end enumerate\n")
2424 (license asl2.0)))
7c16151a
RS
2425
2426(define-public balsa
2427 (package
2428 (name "balsa")
e9201659 2429 (version "2.5.6")
7c16151a
RS
2430 (source
2431 (origin
2432 (method url-fetch)
e9201659
R
2433 (uri (string-append "https://pawsa.fedorapeople.org/balsa/"
2434 name "-" version ".tar.bz2"))
7c16151a
RS
2435 (sha256
2436 (base32
e9201659 2437 "17k6wcsl8gki7cskr3hhmfj6n54rha8ca3b6fzd8blsl5shsankx"))))
7c16151a
RS
2438 (build-system gnu-build-system)
2439 (arguments
2440 `(#:configure-flags
2441 '(;; Balsa tries to install additional MIME icons
2442 ;; under gtk+ directory.
2443 "--enable-extra-mimeicons=no"
2444 "--with-gtksourceview"
2445 "--with-canberra"
2446 "--with-spell-checker=gtkspell"
2447 "--with-gpgme"
2448 "--with-sqlite"
2449 "--with-compface"
2450 "--with-ldap")))
2451 (inputs
2452 `(("cyrus-sasl" ,cyrus-sasl)
2453 ("enchant" ,enchant)
2454 ("gdk-pixbuf" ,gdk-pixbuf)
8e020519 2455 ("gmime" ,gmime-2.6)
7c16151a
RS
2456 ("gnutls" ,gnutls)
2457 ("gpgme" ,gpgme)
2458 ("gtk+" ,gtk+)
2459 ("gtksourceview" ,gtksourceview)
2460 ("gtkspell3" ,gtkspell3)
2461 ("libcanberra" ,libcanberra)
2462 ("libesmtp" ,libesmtp)
2463 ("libnotify" ,libnotify)
2464 ("openldap" ,openldap)
2465 ("sqlite" ,sqlite)
2466 ("webkitgtk" ,webkitgtk)))
2467 (native-inputs
2468 `(("compface" ,compface)
2469 ("glib" ,glib "bin")
2470 ("intltool" ,intltool)
2471 ("pkg-config" ,pkg-config)
2472 ("yelp-tools" ,yelp-tools)))
2473 (home-page "https://pawsa.fedorapeople.org/balsa")
2474 (synopsis "E-mail client for GNOME")
2475 (description "Balsa is a highly configurable and robust mail client for
2476the GNOME desktop. It supports both POP3 and IMAP servers as well as the
2477mbox, maildir and mh local mailbox formats. Balsa also supports SMTP and/or
b95d5f62 2478the use of a local MTA such as Sendmail.")
7c16151a 2479 (license gpl3+)))
1e52fd83
AI
2480
2481(define-public afew
2482 (package
2483 (name "afew")
2484 (version "1.2.0")
2485 (source
2486 (origin
2487 (method url-fetch)
2488 (uri (pypi-uri "afew" version))
2489 (sha256
2490 (base32
2491 "121w7bd53xyibllxxbfykjj76n81kn1vgjqd22izyh67y8qyyk5r"))))
2492 (build-system python-build-system)
2493 (inputs
2494 `(("python-chardet" ,python-chardet)
2495 ("python-notmuch" ,python-notmuch)))
2496 (native-inputs
2497 `(("python-setuptools-scm" ,python-setuptools-scm)))
2498 (home-page "https://github.com/afewmail/afew")
2499 (synopsis "Initial tagging script for notmuch mail")
2500 (description "afew is an initial tagging script for notmuch mail. It
2501provides automatic tagging each time new mail is registered with notmuch. It
2502can add tags based on email headers or Maildir folders and can handle spam and
2503killed threads.")
2504 (license isc)))
1679923a
DM
2505
2506(define-public pan
2507 (package
2508 (name "pan")
0eeade9b 2509 (version "0.145")
1679923a
DM
2510 (source
2511 (origin
2512 (method url-fetch)
2513 (uri (string-append "http://pan.rebelbase.com/download/releases/"
2514 version "/source/" name "-" version ".tar.bz2"))
2515 (sha256
2516 (base32
0eeade9b 2517 "1b4wamv33hprghcjk903bpvnd233yxyrm18qnh13alc8h1553nk8"))))
1679923a
DM
2518 (arguments
2519 `(#:configure-flags '("--with-gtk3" "--with-gtkspell" "--with-gnutls"
2520 "--enable-libnotify" "--enable-manual"
2521 "--enable-gkr")
2522 #:phases
2523 (modify-phases %standard-phases
2524 (add-before 'configure 'patch-gpg2
2525 (lambda* (#:key inputs #:allow-other-keys)
2526 (substitute* "pan/usenet-utils/gpg.cc"
2527 (("\"gpg2\"") (string-append "\""
2528 (assoc-ref inputs "gnupg")
2529 "/bin/gpg\"")))
2530 #t)))))
2531 (inputs
8e020519 2532 `(("gmime" ,gmime-2.6)
1679923a
DM
2533 ("gnupg" ,gnupg)
2534 ("gnutls" ,gnutls)
2535 ("gtk+" ,gtk+)
2536 ("gtkspell3" ,gtkspell3)
2537 ("libnotify" ,libnotify)
2538 ("libsecret" ,libsecret)
2539 ("libxml2" ,libxml2)
2540 ("zlib" ,zlib)))
2541 (native-inputs
2542 `(("gettext-minimal" ,gettext-minimal)
2543 ("itstool" ,itstool)
2544 ("pkg-config" ,pkg-config)))
2545 (build-system gnu-build-system)
2546 (home-page "http://pan.rebelbase.com/")
2547 (synopsis "Pan newsreader")
2548 (description "@code{pan} is a Usenet newsreader that's good at both text
2549and binaries. It supports offline reading, scoring and killfiles, yEnc, NZB,
2550PGP handling, multiple servers, and secure connections.")
2551 ;; License of the docs: fdl-1.1; Others: gpl2.
2552 (license (list fdl1.1+ gpl2))))
ae7c1c37
JL
2553
2554(define-public imapfilter
2555 (package
2556 (name "imapfilter")
88abd73e 2557 (version "2.6.12")
ae7c1c37
JL
2558 (source
2559 (origin
b1d30f46
TGR
2560 (method git-fetch)
2561 (uri (git-reference
2562 (url "https://github.com/lefcha/imapfilter.git")
2563 (commit (string-append "v" version))))
2564 (file-name (git-file-name name version))
ae7c1c37 2565 (sha256
88abd73e 2566 (base32 "0vzpc54fjf5vb5vx5w0fl20xvx1k9cg6a3hbl86mm8kwsqf3wrab"))))
ae7c1c37
JL
2567 (build-system gnu-build-system)
2568 (arguments
2569 `(#:tests? #f
2570 #:make-flags
2571 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2572 "CC=gcc")
2573 #:phases
2574 (modify-phases %standard-phases
2575 (delete 'configure)
2576 (add-after 'unpack 'fix-include-path
2577 (lambda* (#:key inputs #:allow-other-keys)
2578 (let ((pcre (assoc-ref inputs "pcre")))
2579 (substitute* "src/Makefile"
2580 (("INCDIRS =")
2581 (string-append "INCDIRS ="
2582 "-I" pcre "/include")))
2583 #t))))))
2584 (native-inputs
2585 `(("lua" ,lua)
2586 ("pcre" ,pcre)
2587 ("openssl" ,openssl)))
2588 (home-page "https://github.com/lefcha/imapfilter")
2589 (synopsis "IMAP mail filtering utility")
2590 (description "IMAPFilter is a mail filtering utility. It connects
2591to remote mail servers using IMAP, sends searching queries to the server and
2592processes mailboxes based on the results. It can be used to delete, copy,
2593move, flag, etc. messages residing in mailboxes at the same or different mail
2594servers. The 4rev1 and 4 versions of IMAP are supported.")
2595 (license license:expat)))
dc8675af
EF
2596
2597(define-public urlscan
2598 (package
2599 (name "urlscan")
d7571ff5 2600 (version "0.9.1")
dc8675af
EF
2601 (source
2602 (origin
2603 (method url-fetch)
2604 (uri (pypi-uri "urlscan" version))
2605 (sha256
2606 (base32
d7571ff5 2607 "0vpdyrx51sg9a8kswa7ibbcgcpvc7r03aq8x4n4c7v2xg0v3c7wb"))))
dc8675af
EF
2608 (build-system python-build-system)
2609 (propagated-inputs
2610 `(("python-urwid" ,python-urwid)))
2611 (home-page "https://github.com/firecat53/urlscan")
2612 (synopsis "View/select the URLs in an email message or file")
2613 (description
2614 "Urlscan is a small program that is designed to integrate with the
2615@code{mutt} mailreader to allow you to easily launch a Web browser for URLs
2616contained in email messages. It parses an email message or file and scans it
2617for URLs and email addresses. It then displays the URLs and their context
2618within the message, and allows you to choose one or more URLs to send to your
2619Web browser. Alternatively, it send a list of all URLs to stdout. It is a
2620replacement for the @code{urlview} program.")
2621 (license gpl2)))
829785c1
EB
2622
2623(define-public tnef
2624 (package
2625 (name "tnef")
2626 (version "1.4.17")
2627 (source
2628 (origin
2629 (method git-fetch)
2630 (uri (git-reference
2631 (url "https://github.com/verdammelt/tnef.git")
2632 (commit version)))
2633 (sha256
2634 (base32
2635 "0cq2xh5wd74qn6k2nnw5rayxgqhjl3jbzf4zlc4babcwxrv32ldh"))
2636 (file-name (git-file-name name version))))
2637 (build-system gnu-build-system)
2638 (native-inputs
2639 `(("autoconf" ,autoconf)
2640 ("automake" ,automake)))
2641 (arguments `(#:parallel-tests? #f)) ;tests are side-effect'y
2642 (home-page "https://github.com/verdammelt/tnef")
2643 (synopsis "Unpack @code{application/ms-tnef} attachments")
2644 (description
2645 "TNEF is a tar-like program that unpacks MIME attachments of type
2646@code{application/ms-tnef}.")
2647 (license gpl2+)))
e3a47031
RW
2648
2649(define-public mumi
e874f34d
RW
2650 (let ((commit "bfd96ce76b4600ae232e6548b26c9365095fd174")
2651 (revision "2"))
e3a47031
RW
2652 (package
2653 (name "mumi")
2654 (version (git-version "0.0.0" revision commit))
2655 (source (origin
2656 (method git-fetch)
2657 (uri (git-reference
2658 (url "https://git.elephly.net/software/mumi.git")
2659 (commit commit)))
2660 (file-name (git-file-name name version))
2661 (sha256
2662 (base32
e874f34d 2663 "05miwfi1bh0v9x2gvn15bwkb3gn4xy53z506ysjzns2y497zkc5h"))))
e3a47031
RW
2664 (build-system gnu-build-system)
2665 (arguments
2666 `(#:phases
2667 (modify-phases %standard-phases
2668 (add-after 'install 'wrap-executable
2669 (lambda* (#:key outputs #:allow-other-keys)
2670 (let* ((out (assoc-ref outputs "out"))
2671 (bin (string-append out "/bin"))
2672 (scm (string-append out "/share/guile/site/2.2"))
2673 (go (string-append out "/lib/guile/2.2/site-ccache")))
2674 (wrap-program (string-append bin "/mumi")
2675 `("GUILE_LOAD_PATH" ":" prefix
2676 (,scm ,(getenv "GUILE_LOAD_PATH")))
2677 `("GUILE_LOAD_COMPILED_PATH" ":" prefix
2678 (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))
2679 #t))))))
2680 (inputs
2681 `(("guile-debbugs" ,guile-debbugs-next)
2682 ("guile-email" ,guile-email)
2683 ("guile-fibers" ,guile-fibers)
2684 ("guile-json" ,guile-json)
2685 ("guile-syntax-highlight" ,guile-syntax-highlight)
79ee97a1 2686 ("guile" ,guile-2.2)))
e3a47031
RW
2687 (native-inputs
2688 `(("autoconf" ,autoconf)
2689 ("automake" ,automake)
2690 ("pkg-config" ,pkg-config)))
2691 (home-page "https://git.elephly.net/software/mumi.git")
2692 (synopsis "Debbugs web interface")
2693 (description "Mumi is a Debbugs web interface.")
2694 (license agpl3+))))