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