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