gnu: python2-tqdm: Work around missing flake8 propagation.
[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>
28b48c87 18;;; Copyright © 2016, 2017, 2018 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")
cd60284d 243 (version "1.9.3")
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
cd60284d 250 "1qbngck1pq1jkpnbpcwcb2q2zqrkgp0nd68wwp57bprxjgb8a6j3"))
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"))
238f3a39 1147 (patches (search-patches "dovecot-CVE-2017-15132.patch"))
4d6ce834 1148 (sha256 (base32
28c03b45 1149 "10c5myzgys866c3x6jdr1s9x9pqnjd5vpyz8z384sph21m3wnq6y"))))
7d2b784b
MW
1150 (build-system gnu-build-system)
1151 (native-inputs
1152 `(("pkg-config" ,pkg-config)))
1153 (inputs
1154 `(("openssl" ,openssl)
1155 ("zlib" ,zlib)
1156 ("bzip2" ,bzip2)
fd5c70f8
AW
1157 ("sqlite" ,sqlite)
1158 ("linux-pam" ,linux-pam)))
7d2b784b
MW
1159 (arguments
1160 `(#:configure-flags '("--sysconfdir=/etc"
1161 "--localstatedir=/var")
1162 #:phases (modify-phases %standard-phases
1163 (add-before
1164 'configure 'pre-configure
1165 (lambda _
1166 ;; Simple hack to avoid installing in /etc
1167 (substitute* '("doc/Makefile.in"
1168 "doc/example-config/Makefile.in")
1169 (("pkgsysconfdir = .*")
1170 "pkgsysconfdir = /tmp/etc"))
072f1e22
EF
1171 #t))
1172 (add-after
1173 'unpack 'patch-other-shebangs
1174 (lambda _
1175 (substitute*
1176 "src/lib-program-client/test-program-client-local.c"
1177 (("/bin/echo") (which "echo"))
1178 (("/bin/cat") (which "cat"))
1179 (("/bin/false") (which "false")))
7d2b784b 1180 #t)))))
c8608faf 1181 (home-page "https://www.dovecot.org")
7d2b784b
MW
1182 (synopsis "Secure POP3/IMAP server")
1183 (description
1184 "Dovecot is a mail server whose major goals are security and reliability.
1185It supports mbox/Maildir and its own dbox/mdbox formats.")
1186 ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
1187 ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
1188 ;; Unicode, Inc. License Agreement for Data Files and Software.
1189 (license (list lgpl2.1 license:expat (non-copyleft "file://COPYING")))))
1190
944a5cdd 1191(define-public dovecot-trees
cf47a8a5 1192 (package
1193 (name "dovecot-trees")
1194 (version "2.1.0")
1195 (source
1196 (origin
1197 (method url-fetch)
1198 (uri (string-append "https://0xacab.org/riseuplabs/trees/repository/"
1199 "archive.tar.gz?ref=v" version))
1200 (file-name (string-append name "-" version ".tar.gz"))
1201 (sha256
1202 (base32
1203 "0rkk10b1bsjz979sc864vpgcdchy7yxwmyv4ik50lar1h6awdnrf"))))
1204 (build-system gnu-build-system)
1205 (native-inputs
1206 `(("automake" ,automake)
1207 ("autoconf" ,autoconf)
1208 ("libtool" ,libtool)
1209 ("dovecot" ,dovecot)
1210 ("pkg-config" ,pkg-config)))
1211 (inputs
1212 `(("libsodium" ,libsodium)))
1213 (arguments
1214 `(#:tests? #f ;No tests exist.
1215 #:configure-flags (list (string-append "--with-dovecot="
1216 (assoc-ref %build-inputs "dovecot")
1217 "/lib/dovecot"))
1218 #:phases
1219 (modify-phases %standard-phases
d10092b8 1220 (add-after 'unpack 'autogen
cf47a8a5 1221 (lambda _
d10092b8 1222 (zero? (system* "sh" "autogen.sh")))))))
cf47a8a5 1223 (home-page "https://0xacab.org/riseuplabs/trees")
1224 (synopsis "NaCL-based Dovecot email storage encryption plugin")
1225 (description
1226 "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
944a5cdd 1227Dovecot encryption plugin. This plugin adds individually encrypted mail
1228storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
1229which uses OpenSSL and RSA keypairs. TREES works in a similar way, but uses
1230the Sodium crypto library (based on NaCL).
1231
1232How it works:
1233@enumerate
1234@item On IMAP log in, the user's cleartext password is passed to the plugin.
1235@item The plugin creates an argon2 digest from the password.
1236@item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
1237@item Inside the secretbox is stored a Curve25519 private key.
1238@item The Curve25519 private key is used to decrypt each individual message,
1239using lidsodium sealed boxes.
1240@item New mail is encrypted as it arrives using the Curve25519 public key.
1241@end enumerate\n")
cf47a8a5 1242 (license agpl3)))
944a5cdd 1243
a4651f64 1244(define-public dovecot-libsodium-plugin
1245 (let ((commit "044de73c01c35385df0105f6b387bec5d5317ce7")
1246 (revision "1"))
1247 (package
1248 (name "dovecot-libsodium-plugin")
1249 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
1250 (source
1251 (origin
1252 (method git-fetch)
1253 (uri (git-reference
1254 (url "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1255 (commit commit)))
1256 (file-name (string-append name "-" version "-checkout"))
1257 (sha256
1258 (base32
1259 "13h07l7xy713zchnj2p9fhvq7fdl4zy1ai94li3ygkqjjj8hrgas"))))
1260 (build-system gnu-build-system)
1261 (native-inputs
1262 `(("automake" ,automake)
1263 ("autoconf" ,autoconf)
1264 ("libtool" ,libtool)
1265 ("dovecot" ,dovecot)
1266 ("pkg-config" ,pkg-config)))
1267 (inputs
1268 `(("libsodium" ,libsodium)))
1269 (arguments
1270 `(#:tests? #f ;No tests exist.
1271 #:configure-flags (list (string-append "--with-dovecot="
1272 (assoc-ref %build-inputs "dovecot")
1273 "/lib/dovecot"))
1274 #:phases
1275 (modify-phases %standard-phases
d10092b8 1276 (add-after 'unpack 'autogen
a4651f64 1277 (lambda _
d10092b8 1278 (zero? (system* "sh" "autogen.sh")))))))
a4651f64 1279 (home-page "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
1280 (synopsis "Libsodium password hashing schemes plugin for Dovecot")
1281 (description
1282 "@code{dovecot-libsodium-plugin} provides libsodium password
1283hashing schemes plugin for @code{Dovecot}.")
1284 (license gpl3+))))
1285
81ce19f4
1286(define-public isync
1287 (package
1288 (name "isync")
49490231 1289 (version "1.3.0")
81ce19f4
1290 (source
1291 (origin
1292 (method url-fetch)
1293 (uri (string-append "mirror://sourceforge/isync/isync/"
1294 version "/isync-" version ".tar.gz"))
1295 (sha256 (base32
49490231 1296 "173wd7x8y5sp94slzwlnb7zhgs32r57zl9xspl2rf4g3fqwmhpwd"))))
81ce19f4 1297 (build-system gnu-build-system)
49490231
LF
1298 (native-inputs
1299 `(("perl" ,perl)))
81ce19f4
1300 (inputs
1301 `(("bdb" ,bdb)
1302 ("openssl" ,openssl)))
1303 (home-page "http://isync.sourceforge.net/")
1304 (synopsis "Mailbox synchronization program")
1305 (description
1306 "isync/mbsync is command line tool for two-way synchronization of
1307mailboxes. Currently Maildir and IMAP are supported types.")
1308 (license gpl2+)))
1309
26b8de19
EB
1310(define-public perl-email-abstract
1311 (package
1312 (name "perl-email-abstract")
1313 (version "3.008")
1314 (source
1315 (origin
1316 (method url-fetch)
1317 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1318 "Email-Abstract-" version ".tar.gz"))
1319 (sha256
1320 (base32
1321 "0h42rhvp769wb421cpbbg6v6xjp8iv86mvz70pqgfgf4nsn6jwgw"))))
1322 (build-system perl-build-system)
1323 (propagated-inputs
1324 `(("perl-email-simple" ,perl-email-simple)
a2190ccc 1325 ("perl-module-pluggable" ,perl-module-pluggable)
26b8de19
EB
1326 ("perl-mro-compat" ,perl-mro-compat)))
1327 (home-page "http://search.cpan.org/dist/Email-Abstract")
1328 (synopsis "Interface to mail representations")
1329 (description "Email::Abstract provides module writers with the ability to
1330write simple, representation-independent mail handling code.")
2f3108ad 1331 (license perl-license)))
26b8de19 1332
ebda902f
EB
1333(define-public perl-email-address
1334 (package
1335 (name "perl-email-address")
151bba2b 1336 (version "1.908")
ebda902f
EB
1337 (source
1338 (origin
1339 (method url-fetch)
1340 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1341 "Email-Address-" version ".tar.gz"))
1342 (sha256
1343 (base32
151bba2b 1344 "0i6ljdvpy279hpbqf6lgv4figr376rb2sh4yphj86xkdzsyn1y75"))))
ebda902f
EB
1345 (build-system perl-build-system)
1346 (home-page "http://search.cpan.org/dist/Email-Address")
1347 (synopsis "Email address parsing and creation")
1348 (description "Email::Address implements a regex-based RFC 2822 parser that
1349locates email addresses in strings and returns a list of Email::Address
1350objects found. Alternatively you may construct objects manually.")
2f3108ad 1351 (license perl-license)))
ebda902f 1352
aa86a3be
EB
1353(define-public perl-email-date-format
1354 (package
1355 (name "perl-email-date-format")
1356 (version "1.005")
1357 (source
1358 (origin
1359 (method url-fetch)
1360 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1361 "Email-Date-Format-" version ".tar.gz"))
1362 (sha256
1363 (base32
1364 "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
1365 (build-system perl-build-system)
1366 (home-page "http://search.cpan.org/dist/Email-Date-Format")
1367 (synopsis "Produce RFC 2822 date strings")
1368 (description "Email::Date::Format provides a means for generating an RFC
13692822 compliant datetime string.")
2f3108ad 1370 (license perl-license)))
aa86a3be 1371
08bf7095
EB
1372(define-public perl-email-messageid
1373 (package
1374 (name "perl-email-messageid")
1fb37ef0 1375 (version "1.406")
08bf7095
EB
1376 (source
1377 (origin
1378 (method url-fetch)
1379 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1380 "Email-MessageID-" version ".tar.gz"))
1381 (sha256
1382 (base32
1fb37ef0 1383 "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
08bf7095
EB
1384 (build-system perl-build-system)
1385 (home-page "http://search.cpan.org/dist/Email-MessageID")
1386 (synopsis "Generate world unique message-ids")
1387 (description "Email::MessageID generates recommended message-ids to
1388identify a message uniquely.")
2f3108ad 1389 (license perl-license)))
08bf7095 1390
0a4c49f6
EB
1391(define-public perl-email-mime
1392 (package
1393 (name "perl-email-mime")
4f50fd75 1394 (version "1.946")
0a4c49f6
EB
1395 (source
1396 (origin
1397 (method url-fetch)
1398 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1399 "Email-MIME-" version ".tar.gz"))
1400 (sha256
1401 (base32
4f50fd75 1402 "0z1k3i0lzp2k421gc8f3wq0jbqflkbw2xqd2k7n7pmv56417kvk8"))))
0a4c49f6
EB
1403 (build-system perl-build-system)
1404 (propagated-inputs
1405 `(("perl-email-address" ,perl-email-address)
1406 ("perl-email-messageid" ,perl-email-messageid)
1407 ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
1408 ("perl-email-mime-encodings" ,perl-email-mime-encodings)
1409 ("perl-email-simple" ,perl-email-simple)
4f50fd75
TGR
1410 ("perl-mime-types" ,perl-mime-types)
1411 ("perl-module-runtime" ,perl-module-runtime)))
0a4c49f6
EB
1412 (home-page "http://search.cpan.org/dist/Email-MIME")
1413 (synopsis "MIME message handling")
1414 (description "Email::MIME is an extension of the Email::Simple module, to
1415handle MIME encoded messages. It takes a message as a string, splits it up
1416into its constituent parts, and allows you access to various parts of the
1417message. Headers are decoded from MIME encoding.")
2f3108ad 1418 (license perl-license)))
0a4c49f6 1419
55025bb5
EB
1420(define-public perl-email-mime-contenttype
1421 (package
1422 (name "perl-email-mime-contenttype")
9b5fc20c 1423 (version "1.022")
55025bb5
EB
1424 (source
1425 (origin
1426 (method url-fetch)
1427 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1428 "Email-MIME-ContentType-" version ".tar.gz"))
1429 (sha256
1430 (base32
9b5fc20c 1431 "042kxhs3bp1ab9z0mbr1wy21ld4lxd6v2a2mmrashqnsn2075fws"))))
55025bb5
EB
1432 (build-system perl-build-system)
1433 (native-inputs
1434 `(("perl-capture-tiny" ,perl-capture-tiny)))
1435 (home-page "http://search.cpan.org/dist/Email-MIME-ContentType")
1436 (synopsis "Parse MIME Content-Type headers")
1437 (description "Email::MIME::ContentType parses a MIME Content-Type
1438header.")
2f3108ad 1439 (license perl-license)))
55025bb5 1440
02e29936
EB
1441(define-public perl-email-mime-encodings
1442 (package
1443 (name "perl-email-mime-encodings")
1444 (version "1.315")
1445 (source
1446 (origin
1447 (method url-fetch)
1448 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1449 "Email-MIME-Encodings-" version ".tar.gz"))
1450 (sha256
1451 (base32
1452 "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
1453 (build-system perl-build-system)
1454 (native-inputs
1455 `(("perl-capture-tiny" ,perl-capture-tiny)))
1456 (home-page "http://search.cpan.org/dist/Email-MIME-Encodings")
1457 (synopsis "Unified interface to MIME encoding and decoding")
1458 (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
2f3108ad 1459 (license perl-license)))
02e29936 1460
a24c5420
EB
1461(define-public perl-email-sender
1462 (package
1463 (name "perl-email-sender")
801eb746 1464 (version "1.300031")
a24c5420
EB
1465 (source
1466 (origin
1467 (method url-fetch)
1468 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1469 "Email-Sender-" version ".tar.gz"))
1470 (sha256
1471 (base32
801eb746 1472 "052g0slw3h2lzn93j71fi47nfawww2aph4jhr3c860ji70lkf4n4"))))
a24c5420
EB
1473 (build-system perl-build-system)
1474 (native-inputs
1475 `(("perl-capture-tiny" ,perl-capture-tiny)))
1476 (propagated-inputs
1477 `(("perl-email-abstract" ,perl-email-abstract)
1478 ("perl-email-address" ,perl-email-address)
1479 ("perl-email-simple" ,perl-email-simple)
1480 ("perl-list-moreutils" ,perl-list-moreutils)
1481 ("perl-module-runtime" ,perl-module-runtime)
1482 ("perl-moo" ,perl-moo)
1483 ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
1484 ("perl-sub-exporter" ,perl-sub-exporter)
1485 ("perl-throwable" ,perl-throwable)
1486 ("perl-try-tiny" ,perl-try-tiny)))
1487 (home-page "http://search.cpan.org/dist/Email-Sender")
1488 (synopsis "Perl library for sending email")
1489 (description "Email::Sender replaces the old and sometimes problematic
1490Email::Send library.")
2f3108ad 1491 (license perl-license)))
a24c5420 1492
151ef3ed
EB
1493(define-public perl-email-simple
1494 (package
1495 (name "perl-email-simple")
25adc006 1496 (version "2.214")
151ef3ed
EB
1497 (source
1498 (origin
1499 (method url-fetch)
1500 (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
1501 "Email-Simple-" version ".tar.gz"))
1502 (sha256
1503 (base32
25adc006 1504 "14kb86hi0m0bqc7kxpm4x5kvfsyj2x86gggbvpxhx9hy8hvjpw5j"))))
151ef3ed
EB
1505 (build-system perl-build-system)
1506 (propagated-inputs
1507 `(("perl-email-date-format" ,perl-email-date-format)))
1508 (home-page "http://search.cpan.org/dist/Email-Simple")
1509 (synopsis "Parsing of RFC 2822 messages")
1510 (description "Email::Simple provides simple parsing of RFC 2822 message
1511format and headers.")
2f3108ad 1512 (license perl-license)))
151ef3ed 1513
f5dceecb
AW
1514(define-public libesmtp
1515 (package
1516 (name "libesmtp")
1517 (version "1.0.6")
1518 (source
1519 (origin
1520 (method url-fetch)
049e02ea
LF
1521 (uri (list (string-append "https://pkgs.fedoraproject.org/repo/pkgs/"
1522 "libesmtp/libesmtp-" version ".tar.bz2/"
1523 "bf3915e627fd8f35524a8fdfeed979c8/libesmtp-"
1524 version ".tar.bz2")
1525 ;; XXX This site is offline, so we fetch Fedora's cached copy
1526 ;; of the source tarball.
1527 (string-append "http://www.stafford.uklinux.net/libesmtp/libesmtp-"
1528 version ".tar.bz2")))
f5dceecb
AW
1529 (sha256
1530 (base32
1531 "02zbniyz7qys1jmx3ghx21kxmns1wc3hmv80gp7ag7yra9f1m9nh"))))
1532 (build-system gnu-build-system)
1533 (propagated-inputs
1534 `(("openssl" ,openssl)))
1535 (home-page "http://www.stafford.uklinux.net/libesmtp/")
1536 (synopsis "Library for sending mail via remote hosts using SMTP")
1537 (description "libESMTP is an SMTP client which manages posting (or
1538submission of) electronic mail via a preconfigured Mail Transport Agent (MTA).
1539It may be used as part of a Mail User Agent (MUA) or other program that must
1540be able to post electronic mail where mail functionality may not be that
1541program's primary purpose.")
1542 (license (list lgpl2.1+ gpl2+))))
1543
f8ae32a2
AW
1544(define-public esmtp
1545 (package
1546 (name "esmtp")
1547 (version "1.2")
1548 (source
1549 (origin
1550 (method git-fetch)
1551 (uri (git-reference
1552 (url "https://github.com/andywingo/esmtp.git")
1553 (commit "01bf9fc")))
1554 (sha256
1555 (base32
1556 "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
1557 (file-name (string-append name "-" version "-checkout"))))
1558 (arguments
1559 `(#:phases (modify-phases %standard-phases
1560 (add-before
1561 'configure 'autoconf
1562 (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
1563 (build-system gnu-build-system)
1564 (native-inputs
1565 `(("bison" ,bison)
1566 ("flex" ,flex)
1567 ("autoconf" ,autoconf)
1568 ("automake" ,automake)
1569 ("libtool" ,libtool)))
1570 (inputs
718c5dd6 1571 `(("libesmtp" ,libesmtp)))
3b3b60d0 1572 (home-page "https://sourceforge.net/projects/esmtp/")
f8ae32a2
AW
1573 (synopsis "Relay-only mail transfer agent (MTA)")
1574 (description "Esmtp is a simple relay-only mail transfer agent built using
1575libESMTP. It sends e-mail via a remote SMTP server using credentials from the
1576user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
1577page for more on configuration. This package also provides minimal
1578compatibility shims for the @command{sendmail}, @command{mailq}, and
1579@command{newaliases} commands.")
1580 (license gpl2+)))
1581
34dd26af
CAW
1582(define-public fdm
1583 (package
1584 (name "fdm")
1585 (version "1.9")
1586 (source (origin
1587 (method url-fetch)
1588 (uri (string-append "https://github.com/nicm/fdm/releases/download/"
1589 version "/fdm-"
1590 version ".tar.gz"))
1591 (file-name (string-append name "-" version ".tar.gz"))
1592 (sha256
1593 (base32 "054rscijahiza5f9qha79rg3siji3bk5mk10f8c2vqx7m4w6qh8n"))))
1594 (build-system gnu-build-system)
1595 (inputs
1596 `(("tdb" ,tdb)
1597 ("openssl" ,openssl)
1598 ("zlib" ,zlib)))
1599 (home-page "https://github.com/nicm/fdm")
1600 (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
1601 (description "fdm is a program designed to fetch mail from POP3
1602or IMAP servers, or receive local mail from stdin, and
1603deliver it in various ways.")
1604 (license
1605 ;; Why point to a source file? Well, all the individual files have a
1606 ;; copy of this license in their headers, but there's no seprate file
1607 ;; with that information.
16966d5b 1608 (non-copyleft "https://github.com/nicm/fdm/blob/master/command.c"))))
34dd26af 1609
e90819c4
LG
1610
1611(define-public procmail
1612 (package
1613 (name "procmail")
1614 (version "3.22")
1615 (source
1616 (origin
1617 (method url-fetch)
1618 (uri (string-append
1619 "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
1620 version
1621 ".tar.gz"))
1622 (sha256
1623 (base32
1624 "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
1625 ;; The following patch fixes an ambiguous definition of
1626 ;; getline() in formail.c. The patch is provided by Debian as
1627 ;; patch 24.
1d982d78 1628 (patches (search-patches "procmail-ambiguous-getline-debian.patch"
c297e965
LF
1629 "procmail-CVE-2014-3618.patch"
1630 "procmail-CVE-2017-16844.patch"))))
e90819c4
LG
1631 (arguments
1632 `(#:phases (modify-phases %standard-phases
1633 (replace 'configure
1634 (lambda _
1635 (substitute* "Makefile"
1636 (("/bin/sh")
1637 (which "sh"))
1638 (("/usr")
1639 (assoc-ref %outputs "out"))
1640 (("/bin/rm")
1641 (which "rm")))
1642 #t)))
1643 #:tests? #f)) ;; There are no tests indicating a successful
1644 ;; build. Some tests of basic locking mechanisms provided by the
8f65585b 1645 ;; file system are performed during 'make install'. However, these
e90819c4
LG
1646 ;; are performed before the actual build process.
1647 (build-system gnu-build-system)
05aa576b 1648 (inputs `(("exim" ,exim)))
e90819c4
LG
1649 (home-page "http://www.procmail.org/")
1650 (synopsis "Versatile mail delivery agent (MDA)")
1651 (description "Procmail is a mail delivery agent (MDA) featuring support
1652for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
1653can be sorted into separate files/directories and arbitrary commands can be
1654executed on mail arrival. Procmail is considered stable, but is no longer
1655maintained.")
1656 (license gpl2+))) ;; procmail allows to choose the
1657 ;; nonfree Artistic License 1.0
1658 ;; as alternative to the GPL2+.
1659 ;; This option is not listed here.
e90819c4 1660
61c30e9d
LF
1661(define-public khard
1662 (package
1663 (name "khard")
4a3495d5 1664 (version "0.11.4")
61c30e9d
LF
1665 (source (origin
1666 (method url-fetch)
1667 (uri (pypi-uri name version))
1668 (sha256
1669 (base32
4a3495d5 1670 "1shhlq6ljbd8095hd82v4mw56rjcfxf1ymmgknbgh8gix02nsxw1"))))
61c30e9d
LF
1671 (build-system python-build-system)
1672 (arguments
a57495e2 1673 `(#:phases
61c30e9d 1674 (modify-phases %standard-phases
61c30e9d
LF
1675 (add-after 'install 'install-doc
1676 (lambda* (#:key outputs #:allow-other-keys)
1677 (let* ((out (assoc-ref outputs "out"))
1678 (doc (string-append out "/share/doc/khard")))
e9eafae2
MB
1679 (copy-recursively "misc/khard" doc)
1680 #t))))
1681 ;; FIXME: check phase fails with
1682 ;; "Config file /tmp/.config/khard/khard.conf not available"
1683 #:tests? #f))
61c30e9d 1684 (propagated-inputs
a57495e2
LF
1685 `(("python-vobject" ,python-vobject)
1686 ("python-pyyaml" ,python-pyyaml)
1687 ("python-atomicwrites" ,python-atomicwrites)
1688 ("python-configobj" ,python-configobj)))
61c30e9d
LF
1689 (synopsis "Console address book using CardDAV")
1690 (description "Khard is an address book for the console. It creates, reads,
1691modifies and removes CardDAV address book entries at your local machine. For
1692synchronizing with a remote address book, @command{vdirsyncer} is recommended.
1693Khard can also be used from within the email client @command{mutt}.")
1694 (home-page "https://github.com/scheibler/khard")
1695 (license gpl3+)))
be0c5733
DM
1696
1697(define-public perl-mail-spf
1698 (package
1699 (name "perl-mail-spf")
1700 (version "v2.9.0")
1701 (source
1702 (origin
1703 (method url-fetch)
1704 (uri (string-append
1705 "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-"
1706 version
1707 ".tar.gz"))
1708 (sha256
1709 (base32
1710 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
1711 (build-system perl-build-system)
1712 (native-inputs
1713 `(("perl-module-build" ,perl-module-build)
1714 ("perl-net-dns-resolver-programmable"
1715 ,perl-net-dns-resolver-programmable)))
1716 (arguments
1717 `(#:phases (modify-phases %standard-phases
1718 (add-before 'configure 'modify-Build.PL
1719 (lambda* (#:key outputs #:allow-other-keys)
1720 (substitute* "Build.PL"
1721 (("'/usr/sbin'") (string-append "'"
1722 (assoc-ref outputs "out")
1723 "/sbin'")))
1724 #t)))))
1725 (inputs
1726 `(("perl-error" ,perl-error)
1727 ("perl-net-dns" ,perl-net-dns)
1728 ("perl-netaddr-ip" ,perl-netaddr-ip)
1729 ("perl-uri" ,perl-uri)))
1730 (home-page
1731 "http://search.cpan.org/dist/Mail-SPF")
1732 (synopsis
1733 "Perl implementation of Sender Policy Framework")
1734 (description "Mail::SPF is the Sender Policy Framework implemented
1735in Perl.")
1736 (license bsd-3)))
24262239
CL
1737
1738(define-public mb2md
1739 (package
1740 (name "mb2md")
1741 (version "3.20")
1742 (source (origin
1743 (method url-fetch)
1744 (uri (string-append
1745 "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
1746 version ".pl.gz"))
1747 (sha256
1748 (base32
1749 "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
1750 (build-system trivial-build-system)
1751 (arguments
1752 '(#:modules ((guix build utils))
1753 #:builder
1754 (begin
1755 (use-modules (guix build utils))
1756 (let* ((source (assoc-ref %build-inputs "source"))
1757 (out (assoc-ref %outputs "out"))
1758 (bin (string-append out "/bin"))
1759 (perl (assoc-ref %build-inputs "perl"))
1760 (gzip (assoc-ref %build-inputs "gzip"))
1761 (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
1762 (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
1763 (mkdir-p bin)
1764 (with-directory-excursion bin
1765 (copy-file source "mb2md.gz")
1766 (system* (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
1767 (substitute* "mb2md"
1768 (("#!/usr/bin/perl")
1769 (string-append "#!/usr/bin/perl -I " perl5lib)))
1770 (patch-shebang "mb2md" (list (string-append perl "/bin")))
1771 (chmod "mb2md" #o555))
1772 #t))))
1773 (native-inputs `(("gzip", gzip)))
1774 (inputs `(("perl" ,perl)
1775 ("perl-timedate" ,perl-timedate)))
1776 (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
1777 (synopsis "Mbox to maildir converter")
1778 (description
1779 "Mb2md is a Perl script that takes one or more mbox format files and
1780converts them to maildir format directories.")
1781 (license public-domain)))
e0d7b421
AI
1782
1783(define-public mpop
1784 (package
1785 (name "mpop")
5837e699 1786 (version "1.2.6")
e0d7b421
AI
1787 (source
1788 (origin
1789 (method url-fetch)
175c9103
LF
1790 (uri (string-append "mirror://sourceforge/mpop/mpop/" version
1791 "/mpop-" version ".tar.xz"))
e0d7b421
AI
1792 (sha256
1793 (base32
5837e699 1794 "0p1ix63jh64dibrlccch8q7gxl9nn18wd2qpyr5z1h4gs2fpmv4z"))))
e0d7b421
AI
1795 (build-system gnu-build-system)
1796 (inputs
1797 `(("gnutls" ,gnutls)
1798 ("libidn" ,libidn)))
1799 (native-inputs
1800 `(("pkg-config" ,pkg-config)))
1801 (arguments
1802 `(#:configure-flags (list "--with-tls=gnutls")))
1803 (home-page "http://mpop.sourceforge.net/")
1804 (synopsis "POP3 mail client")
1805 (description "mpop is a small and fast POP3 client suitable as a
1806fetchmail replacement.
1807
1808mpop supports multiple accounts, header based mail filtering, delivery
1809to mbox files, maildir folders or a Mail Delivery Agent (MDA),
1810TLS/SSL, several authentication methods, Internationalized Domain
1811Names (IDN) and SOCKS proxies.")
1812 (license gpl3+)))
74c0282c 1813
1814(define-public mhonarc
1815 (package
1816 (name "mhonarc")
1817 (version "2.6.19")
1818 (source
1819 (origin
1820 (method url-fetch)
1821 (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
1822 version ".tar.gz"))
1823 (sha256
1824 (base32
1825 "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
1826 (build-system perl-build-system)
1827 (home-page "https://www.mhonarc.org/")
1828 (synopsis "Create HTML archives of mail/news messages")
1829 (description
1830 "MHonArc is a Perl mail-to-HTML converter. MHonArc
1831provides HTML mail archiving with index, mail thread linking,
1832etc; plus other capabilities including support for MIME and
1833powerful user customization features.")
1834 (license gpl2+)))
5d87088c
JD
1835
1836
1837(define-public sendmail
1838 (package
1839 (name "sendmail")
1840 (version "8.15.2")
1841 (source
1842 (origin
1843 (method url-fetch)
1844 (uri (string-append
1845 "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
1846 version ".tar.gz"))
1847 (sha256
1848 (base32
1849 "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
1850 (build-system gnu-build-system)
1851 (arguments
1852 `(#:phases
1853 (modify-phases %standard-phases
1854 (add-before 'build 'replace-/bin/sh
1855 (lambda _
1856 (substitute*
1857 (append
1858 (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
1859 "contrib/mmuegel" "devtools/bin/configure.sh")
1860 (find-files "." ".*\\.m4")
1861 (find-files "." ".*\\.cf"))
19527952 1862 (("/bin/sh") (which "sh")))
5d87088c
JD
1863
1864 (substitute* "devtools/bin/Build"
19527952 1865 (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
5d87088c
JD
1866 #t))
1867 (replace 'configure
1868 (lambda _
1869
1870 ;; Render harmless any attempts to chown or chgrp
1871 (substitute* "devtools/bin/install.sh"
1872 (("owner=\\$2") "owner=''")
1873 (("group=\\$2") "group=''"))
1874
1875 (with-output-to-file "devtools/Site/site.config.m4"
1876 (lambda ()
1877 (format #t "
1878define(`confCC', `gcc')
1879define(`confOPTIMIZE', `-g -O2')
1880define(`confLIBS', `-lresolv')
1881define(`confINSTALL', `~a/devtools/bin/install.sh')
1882define(`confDEPEND_TYPE', `CC-M')
1883define(`confINST_DEP', `')
1884" (getcwd))))))
1885 (replace 'build
1886 (lambda _
1887 (and (zero? (system* "sh" "Build"))
1888 (with-directory-excursion "cf/cf"
1889 (begin
1890 (copy-file "generic-linux.mc" "sendmail.mc")
1891 (zero? (system* "sh" "Build" "sendmail.cf")))))))
1892 (add-before 'install 'pre-install
1893 (lambda _
1894 (let ((out (assoc-ref %outputs "out")))
1895 (mkdir-p (string-append out "/usr/bin"))
1896 (mkdir-p (string-append out "/usr/sbin"))
1897 (mkdir-p (string-append out "/etc/mail"))
1898 (setenv "DESTDIR" out)
1899 (with-directory-excursion "cf/cf"
1900 (zero? (system* "sh" "Build" "install-cf")))))))
1901 ;; There is no make check. There are some post installation tests, but those
1902 ;; require root privileges
1903 #:tests? #f))
1904 (inputs
1905 `(("m4" ,m4)
1906 ("perl" ,perl)))
1907 (home-page "http://sendmail.org")
1908 (synopsis
1909 "Highly configurable Mail Transfer Agent (MTA)")
1910 (description
1911 "Sendmail is a mail transfer agent (MTA) originally developed by Eric
1912Allman. It is highly configurable and supports many delivery methods and many
1913transfer protocols.")
1914 (license (non-copyleft "file://LICENSE"
1915 "See LICENSE in the distribution."))))
1916
8b53366c 1917(define-public opensmtpd
1918 (package
1919 (name "opensmtpd")
2f2ce920 1920 (version "6.0.3p1")
8b53366c 1921 (source (origin
1922 (method url-fetch)
1923 (uri (string-append "https://www.opensmtpd.org/archives/"
1924 name "-" version ".tar.gz"))
1925 (sha256
1926 (base32
2f2ce920 1927 "10bsfsnlg9d9i6l2izdnxp05s3ri8fvwzqxvx1jmarc852382619"))))
8b53366c 1928 (build-system gnu-build-system)
1929 (inputs
1930 `(("bdb" ,bdb)
1931 ("libressl" ,libressl)
1932 ("libevent" ,libevent)
1933 ("libasr" ,libasr)
1934 ("linux-pam" ,linux-pam)
1935 ("zlib" ,zlib)))
1936 (native-inputs
d7da7604
SB
1937 `(("bison" ,bison)
1938 ("groff" ,groff)))
8b53366c 1939 (arguments
ae1e2133 1940 `(#:configure-flags
a1b517f9 1941 (list "--with-table-db" "--with-auth-pam" "--localstatedir=/var"
ae1e2133
SB
1942 "--with-user-smtpd=smtpd" "--with-user-queue=smtpq"
1943 "--with-group-queue=smtpq"
2f2ce920 1944 "--with-path-socket=/var/run" ; not default (./configure lies)
ae1e2133 1945 "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt")
8b53366c 1946 #:phases
1947 (modify-phases %standard-phases
1948 ;; OpenSMTPD provides a single utility smtpctl to control the daemon and
1949 ;; the local submission subsystem. To accomodate systems that require
1950 ;; historical interfaces such as sendmail, newaliases or makemap, the
1951 ;; smtpctl utility can operate in compatibility mode if called with the
1952 ;; historical name.
1953 (add-after 'install 'install-compabilitymode
1954 (lambda _
1955 (let* ((out (assoc-ref %outputs "out"))
1956 (sbin (string-append out "/sbin/")))
1957 (for-each (lambda (cmd)
1958 (symlink "smtpctl" (string-append sbin cmd)))
1959 '("makemap" "sendmail" "send-mail"
1960 "newaliases" "mailq")))
1961 #t)))))
1962 (synopsis "Lightweight SMTP daemon")
1963 (description
1964 "OpenSMTPD is an implementation of the server-side SMTP protocol, with
1965some additional standard extensions. It allows ordinary machines to exchange
1966e-mails with other systems speaking the SMTP protocol.")
1967 (home-page "https://www.opensmtpd.org")
1968 (license (list bsd-2 bsd-3 bsd-4 (non-copyleft "file://COPYING")
19262a71 1969 public-domain isc license:openssl))))
152ffe7c 1970
1971(define-public opensmtpd-extras
1972 (package
1973 (name "opensmtpd-extras")
1974 (version "5.7.1")
1975 (source (origin
1976 (method url-fetch)
1977 (uri (string-append "https://www.opensmtpd.org/archives/"
1978 name "-" version ".tar.gz"))
1979 (sha256
1980 (base32
1981 "1kld4hxgz792s0cb2gl7m2n618ikzqkj88w5dhaxdrxg4x2c4vdm"))))
1982 (build-system gnu-build-system)
1983 (inputs
1984 `(("libressl" ,libressl)
1985 ("libevent" ,libevent)
1986 ("libasr" ,libasr)
1987 ("python-2" ,python-2)
1988 ("opensmtpd" ,opensmtpd)
1989 ("perl" ,perl)
1990 ("lua" ,lua)
1991 ("postgresql" ,postgresql)
1992 ("sqlite" ,sqlite)
1993 ("linux-pam" ,linux-pam)))
1994 (native-inputs
1995 `(("bison" ,bison)
1996 ("pkg-config" ,pkg-config)
1997 ("groff" ,groff)
1998 ("automake" ,automake)
1999 ("autoconf" ,autoconf)))
2000 (arguments
2001 `(;; We have to configure it like this because the default checks for for example
2002 ;; python in /usr/local/bin, /usr/bin and fails otherwise.
2003 #:configure-flags (list
2004 "--with-filter-clamav" "--with-filter-dkim-signer"
2005 "--with-filter-dnsbl" "--with-filter-lua"
2006 "--with-filter-monkey" "--with-filter-pause"
2007 "--with-filter-perl" "--with-filter-python"
2008 "--with-filter-regex" "--with-filter-spamassassin"
2009 "--with-filter-stub" "--with-filter-trace"
2010 "--with-filter-void"
2011
2012 "--with-queue-null" "--with-queue-python"
2013 "--with-queue-ram" "--with-queue-stub"
2014
2015 "--with-scheduler-python" "--with-scheduler-ram"
2016 "--with-scheduler-stub"
2017
2018 "--with-table-ldap" ; "--with-table-mysql"
2019 "--with-table-passwd" "--with-table-postgres"
2020 "--with-table-python" "--with-table-socketmap"
2021 "--with-table-sqlite" "--with-table-stub"
2022 ;;"--with-table-redis" ; TODO: package hiredis
2023
2024 "--with-user=smtpd" "--with-privsep-user=smtpd"
2025 "--localstatedir=/var" "--sysconfdir=/etc"
2026 "--with-lua-type=lua" ; can use lua or luajit
2027
2028 (string-append "--with-python="
2029 (assoc-ref %build-inputs "python-2"))
2030 (string-append "--with-lua="
2031 (assoc-ref %build-inputs "lua")))))
19262a71
LC
2032 (license (list bsd-2 bsd-3 bsd-4
2033 public-domain isc license:openssl))
152ffe7c 2034 (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
2035 (description
2036 "This package provides extra tables, filters, and various other addons
2037for OpenSMTPD to extend its functionality.")
2038 (home-page "https://www.opensmtpd.org")))
6d3dda4f 2039
2040(define-public python-mailmanclient
2041 (package
2042 (name "python-mailmanclient")
2043 (version "1.0.1")
2044 (source
2045 (origin
2046 (method url-fetch)
2047 (uri (pypi-uri "mailmanclient" version))
2048 (sha256
2049 (base32
2050 "1cfjh45fgbsax5hjj2inq9nk33dhdvh63xhysc8dhnqidgqgm8c5"))))
2051 (build-system python-build-system)
2052 (arguments
2053 `(#:tests? #f)) ; Requires mailman running
f22efa01 2054 (propagated-inputs
6d3dda4f 2055 `(("python-six" ,python-six)
2056 ("python-httplib2" ,python-httplib2)))
2057 (home-page "https://launchpad.net/mailman.client")
2058 (synopsis "Python bindings for the Mailman 3 REST API")
2059 (description
2060 "The mailmanclient library provides official Python bindings for
2061the GNU Mailman 3 REST API.")
6d3dda4f 2062 (license lgpl3+)))
2063
2064(define-public python2-mailmanclient
5c31f4aa 2065 (package-with-python2 python-mailmanclient))
3163a289 2066
2067(define-public mlmmj
2068 (package
2069 (name "mlmmj")
28b48c87 2070 (version "1.3.0")
3163a289 2071 (source
2072 (origin
2073 (method url-fetch)
2074 (uri (string-append "http://mlmmj.org/releases/mlmmj-"
2075 version ".tar.bz2"))
2076 (sha256
2077 (base32
28b48c87 2078 "0hpj10qad821ci11si8xc2qnmkzfn90y13s43fm4fca38f0qjp8w"))))
3163a289 2079 (build-system gnu-build-system)
2080 (inputs
2081 `(("perl" ,perl))) ; For "contrib/web/"
2082 (native-inputs
2083 `(("pkg-config" ,pkg-config)))
2084 (arguments
2085 `(#:configure-flags
2086 ;; mlmmj-receive-strip is a replacement for mlmmj-receive
2087 ;; It opens the files control/mimedeny and control/mimestrip to get a list
2088 ;; of mimetypes for parts of multipart/mime messages that should be denied
2089 ;; or stripped. The parts then get stripped directly when the mail is
2090 ;; received. mlmmj-receive-strip also appends an extra header
2091 ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
2092 ;; mime parts
2093 (list "--enable-receive-strip")
2094 #:phases
2095 (modify-phases %standard-phases
2096 (add-before 'install 'install-contrib
2097 (lambda* (#:key outputs #:allow-other-keys)
2098 (let* ((out (assoc-ref outputs "out"))
2099 (share (string-append out "/share/mlmmj"))
2100 (contrib (string-append share "/contrib/web"))
2101 (texts (string-append share "/listtexts")))
2102 (copy-recursively "contrib/web/" contrib)
2103 (copy-recursively "listtexts" texts)
2104 (rename-file texts (string-append share "/texts"))
2105 #t))))))
2106 (home-page "http://mlmmj.org")
2107 (synopsis "Mailing list managing made joyful")
2108 (description
2109 "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
2110It works with many different Mail Transport Agents (MTAs) and is simple for a
d1e4ad1b 2111system administrator to install, configure and integrate with other software.
3163a289 2112As it uses very few resources, and requires no daemons, it is ideal for
2113installation on systems where resources are limited. Its features include:
2114@enumerate
2115@item Archive, Custom headers / footer,
2116@item Fully automated bounce handling (similar to ezmlm),
2117@item Complete requeueing functionality, Moderation functionality, Subject prefix,
2118@item Subscribers only posting, Regular expression access control,
2119@item Functionality to retrieve old posts, Web interface, Digests,
2120@item No-mail subscription, VERP support,
2121@item Delivery Status Notification (RFC1891) support,
2122@item Rich and customisable texts for automated operations.
2123@end enumerate\n")
2124 (license license:expat)))
3a263368 2125
ea3b9f7b 2126(define-public python2-django-mailman3
8a3741e6 2127 (package
ea3b9f7b 2128 (name "python2-django-mailman3")
8a3741e6 2129 (version "1.0.1")
2130 (source
2131 (origin
2132 (method url-fetch)
2133 (uri (pypi-uri "django-mailman3" version))
2134 (sha256
2135 (base32
2136 "1adxyh8knw9knjlh73xq0jpn5adml0ck4alsv0swakm95wfyx46z"))))
2137 (build-system python-build-system)
ea3b9f7b
CB
2138 (arguments
2139 `(#:phases
2140 (modify-phases %standard-phases
2141 (replace 'check
2142 (lambda _
2143 (zero?
2144 (system*
2145 "django-admin"
2146 "test"
2147 "--settings=django_mailman3.tests.settings_test"
2148 "django_mailman3")))))
2149 #:python ,python-2))
8a3741e6 2150 (inputs
ea3b9f7b 2151 `(("python2-django" ,python2-django)))
8a3741e6 2152 (propagated-inputs
ea3b9f7b
CB
2153 `(("python2-requests" ,python2-requests)
2154 ("python2-requests-oauthlib" ,python2-requests-oauthlib)
2155 ("python2-openid" ,python2-openid)
2156 ("python2-mailmanclient" ,python2-mailmanclient)
2157 ("python2-django-allauth" ,python2-django-allauth)
2158 ("python2-django-gravatar2" ,python2-django-gravatar2)
2159 ("python2-pytz" ,python2-pytz)))
8a3741e6 2160 (home-page "https://gitlab.com/mailman/django-mailman3")
2161 (synopsis "Django library for Mailman UIs")
2162 (description
2163 "Libraries and templates for Django-based interfaces
2164interacting with Mailman.")
2165 (license gpl3+)))
2166
d99a2add 2167(define-public postorius
2168 (package
2169 (name "postorius")
2170 (version "1.0.3")
2171 (source
2172 (origin
2173 (method url-fetch)
2174 (uri (pypi-uri "postorius" version "+post2.tar.gz"))
2175 (file-name (string-append name "-" version ".tar.gz"))
2176 (sha256
2177 (base32
2178 "1wymcpv2icjjy8h1ni52p6dr7wwxf71ivqgbqhzx4i82yqphcaq5"))))
2179 (build-system python-build-system)
2180 (arguments
2181 `(; One test dependency relies on Persona, which was shut down in
2182 ;; November 2016.
2183 #:tests? #f
2184 ;; The part of the frontend of Mailman is still python 2.7.
2185 #:python ,python-2))
2186 (inputs
2187 `(("python2-django" ,python2-django)
2188 ("python2-django-mailman3" ,python2-django-mailman3)
2189 ("python2-mailmanclient" ,python2-mailmanclient)))
2190 (home-page "https://gitlab.com/mailman/postorius")
2191 (synopsis "Web user interface for GNU Mailman")
2192 (description
2193 "Postorius is a Django app which provides a web user interface
2194to access GNU Mailman.")
2195 (license (list gpl3+ lgpl3+))))
2196
3a263368 2197(define-public blists
2198 (package
2199 (name "blists")
18b1589b 2200 (version "2.0")
3a263368 2201 (source
2202 (origin
2203 (method url-fetch)
2204 (uri (string-append "http://download.openwall.net/pub/projects/"
2205 "blists/blists-" version ".tar.gz"))
2206 (sha256
2207 (base32
18b1589b 2208 "1xll5wn7py3bbncbwrj172f56nz75c9gwfsa80rwd96ss9gfmp3c"))))
3a263368 2209 (build-system gnu-build-system)
2210 (arguments
2211 `(#:tests? #f ; No tests
2212 #:phases
2213 (modify-phases %standard-phases
2214 (delete 'configure)
2215 (replace 'install
2216 (lambda* (#:key outputs #:allow-other-keys)
2217 (let* ((out (assoc-ref outputs "out"))
2218 (bin (string-append out "/bin")))
2219 (install-file "bindex" bin)
2220 (install-file "bit" bin)
2221 #t))))))
2222 (home-page "http://www.openwall.com/blists/")
2223 (synopsis "Web interface to mailing list archives")
2224 (description
2225 "Blists is a web interface to mailing list archives that works off
2226indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
2227@code{bindex} generates or updates the index file (incremental updates
2228are supported). @code{bit} is a CGI/SSI program that generates web pages
2229on the fly. Both programs are written in C and are very fast.")
2230 (license license:expat)))
ed428a58
AI
2231
2232(define-public swaks
2233 (package
2234 (name "swaks")
2235 (version "20170101.0")
2236 (source
2237 (origin
2238 (method url-fetch)
2239 (uri (string-append
2240 "http://jetmore.org/john/code/swaks/files/swaks-"
2241 version ".tar.gz"))
2242 (sha256
2243 (base32
2244 "0pli4mlhasnqqxmmxalwyg3x7n2vhcbgsnp2xgddamjavv82vrl4"))))
2245 (build-system perl-build-system)
2246 (inputs
2247 `(("perl-net-dns" ,perl-net-dns)
2248 ("perl-net-ssleay" ,perl-net-ssleay)))
2249 (arguments
2250 `(#:tests? #f ; No tests
2251 #:phases
2252 (modify-phases %standard-phases
2253 (delete 'configure)
2254 (replace 'build
2255 (lambda _
2256 (zero? (system* "pod2man" "doc/ref.pod" "swaks.1"))))
2257 (replace 'install
2258 (lambda* (#:key outputs #:allow-other-keys)
2259 (let ((out (assoc-ref outputs "out")))
2260 (install-file "swaks" (string-append out "/bin"))
2261 (install-file "swaks.1" (string-append out "/share/man/man1")))
2262 #t))
2263 (add-after 'install 'wrap-program
2264 (lambda* (#:key outputs #:allow-other-keys)
2265 (wrap-program (string-append (assoc-ref outputs "out")
2266 "/bin/swaks")
2267 `("PERL5LIB" ":" = (,(getenv "PERL5LIB"))))
2268 #t)))))
2269 (home-page "http://jetmore.org/john/code/swaks/")
2270 (synopsis "Featureful SMTP test tool")
2271 (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
2272test tool. It handles SMTP features and extensions such as TLS,
2273authentication, and pipelining; multiple versions of the SMTP protocol
2274including SMTP, ESMTP, and LMTP; and multiple transport methods including
2275unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
2276Options can be specified in environment variables, configuration files, and
2277the command line allowing maximum configurability and ease of use for
2278operators and scripters.")
2279 (license gpl2+)))
b0eb2af2 2280
2281(define-public alpine
2282 (package
2283 (name "alpine")
2284 (version "2.21")
2285 (source
2286 (origin
2287 (method url-fetch)
2288 ;; There are two versions: the plain continuation of Alpine without extra
2289 ;; patches and the version which adds extra fixes. Every distro uses
2290 ;; the patched version, and so do we to not break expectations.
32f9cc33 2291 ;; http://alpine.freeiz.com/alpine/readme/README.patches
2292 (uri (string-append "http://alpine.freeiz.com/alpine/patches/alpine-"
b0eb2af2 2293 version "/alpine-" version ".tar.xz"))
2294 (sha256
2295 (base32
2296 "1k9hcfjywfk3mpsl71hjza3nk6icgf1b6xxzgx10kdzg5yci5x5m"))))
2297 (build-system gnu-build-system)
2298 (arguments
2299 `(#:make-flags (list "CC=gcc")
2300 #:configure-flags (list (string-append "--with-ssl-include-dir="
2301 (assoc-ref %build-inputs "openssl")
2302 "/include/openssl")
2303 (string-append "--with-ssl-dir="
2304 (assoc-ref %build-inputs "openssl"))
2305 (string-append "--with-ssl-certs-dir="
2306 "/etc/ssl/certs/")
2307 (string-append "--with-ssl-lib-dir="
2308 (assoc-ref %build-inputs "openssl")
2309 "/lib")
2310 (string-append "--with-interactive-spellcheck="
2311 (assoc-ref %build-inputs "aspell")
2312 "/bin/aspell"))
2313 #:phases
2314 (modify-phases %standard-phases
2315 (add-after 'unpack 'make-reproducible
2316 (lambda _
2317 ;; This removes time-dependent code to make alpine reproducible.
2318 (substitute* "pico/blddate.c"
2319 (("%02d-%s-%d") "1970-01-01"))
2320 (substitute* (list "alpine/Makefile.in"
2321 "web/src/alpined.d/Makefile.in")
2322 (("`date`") "1970-01-01"))
2323 #t)))))
2324 (inputs
2325 `(("ncurses" ,ncurses)
2326 ("openssl" ,openssl)
2327 ("gnutls" ,gnutls)
2328 ("openldap" ,openldap)
2329 ("cyrus-sasl" ,cyrus-sasl)
2330 ("mit-krb5" ,mit-krb5)
2331 ("aspell" ,aspell)
2332 ("tcl" ,tcl)
2333 ("linux-pam" ,linux-pam)))
32f9cc33 2334 (home-page "http://alpine.freeiz.com/alpine/")
b0eb2af2 2335 (synopsis "Alternatively Licensed Program for Internet News and Email")
2336 (description
2337 "Alpine is a text-based mail and news client. Alpine includes several
2338tools and applications:
2339@enumerate
2340@item alpine, the Alpine mailer
2341@item pico, the standalone text editor, GNU nano's predecessor
2342@item pilot, the standalone file system navigator
2343@end enumerate\n")
2344 (license asl2.0)))
7c16151a
RS
2345
2346(define-public balsa
2347 (package
2348 (name "balsa")
2349 (version "2.5.3")
2350 (source
2351 (origin
2352 (method url-fetch)
2353 (uri (string-append "https://pawsa.fedorapeople.org/balsa/balsa-"
2354 version ".tar.bz2"))
2355 (sha256
2356 (base32
2357 "15jkwp3ylbwd8iha4dr37z1xb6mkk31ym90vv3h2a5xk2rmym5mq"))))
2358 (build-system gnu-build-system)
2359 (arguments
2360 `(#:configure-flags
2361 '(;; Balsa tries to install additional MIME icons
2362 ;; under gtk+ directory.
2363 "--enable-extra-mimeicons=no"
2364 "--with-gtksourceview"
2365 "--with-canberra"
2366 "--with-spell-checker=gtkspell"
2367 "--with-gpgme"
2368 "--with-sqlite"
2369 "--with-compface"
2370 "--with-ldap")))
2371 (inputs
2372 `(("cyrus-sasl" ,cyrus-sasl)
2373 ("enchant" ,enchant)
2374 ("gdk-pixbuf" ,gdk-pixbuf)
2375 ("gmime" ,gmime)
2376 ("gnutls" ,gnutls)
2377 ("gpgme" ,gpgme)
2378 ("gtk+" ,gtk+)
2379 ("gtksourceview" ,gtksourceview)
2380 ("gtkspell3" ,gtkspell3)
2381 ("libcanberra" ,libcanberra)
2382 ("libesmtp" ,libesmtp)
2383 ("libnotify" ,libnotify)
2384 ("openldap" ,openldap)
2385 ("sqlite" ,sqlite)
2386 ("webkitgtk" ,webkitgtk)))
2387 (native-inputs
2388 `(("compface" ,compface)
2389 ("glib" ,glib "bin")
2390 ("intltool" ,intltool)
2391 ("pkg-config" ,pkg-config)
2392 ("yelp-tools" ,yelp-tools)))
2393 (home-page "https://pawsa.fedorapeople.org/balsa")
2394 (synopsis "E-mail client for GNOME")
2395 (description "Balsa is a highly configurable and robust mail client for
2396the GNOME desktop. It supports both POP3 and IMAP servers as well as the
2397mbox, maildir and mh local mailbox formats. Balsa also supports SMTP and/or
b95d5f62 2398the use of a local MTA such as Sendmail.")
7c16151a 2399 (license gpl3+)))
1e52fd83
AI
2400
2401(define-public afew
2402 (package
2403 (name "afew")
2404 (version "1.2.0")
2405 (source
2406 (origin
2407 (method url-fetch)
2408 (uri (pypi-uri "afew" version))
2409 (sha256
2410 (base32
2411 "121w7bd53xyibllxxbfykjj76n81kn1vgjqd22izyh67y8qyyk5r"))))
2412 (build-system python-build-system)
2413 (inputs
2414 `(("python-chardet" ,python-chardet)
2415 ("python-notmuch" ,python-notmuch)))
2416 (native-inputs
2417 `(("python-setuptools-scm" ,python-setuptools-scm)))
2418 (home-page "https://github.com/afewmail/afew")
2419 (synopsis "Initial tagging script for notmuch mail")
2420 (description "afew is an initial tagging script for notmuch mail. It
2421provides automatic tagging each time new mail is registered with notmuch. It
2422can add tags based on email headers or Maildir folders and can handle spam and
2423killed threads.")
2424 (license isc)))