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