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