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