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