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