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