mail.scm 180 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
  3. ;;; Copyright © 2014, 2015, 2017, 2020 Mark H Weaver <mhw@netris.org>
  4. ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
  5. ;;; Copyright © 2014 Sou Bunnbu <iyzsong@gmail.com>
  6. ;;; Copyright © 2014, 2019 Julien Lepiller <julien@lepiller.eu>
  7. ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
  8. ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
  9. ;;; Copyright © 2015, 2016, 2018 Eric Bavier <bavier@member.fsf.org>
  10. ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
  11. ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
  12. ;;; Copyright © 2016 Christine Lemmer-Webber <cwebber@dustycloud.org>
  13. ;;; Copyright © 2016 Al McElrath <hello@yrns.org>
  14. ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Leo Famulari <leo@famulari.name>
  15. ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
  16. ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
  17. ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
  18. ;;; Copyright © 2016, 2017, 2018 Nikita <nikita@n0.is>
  19. ;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
  20. ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Arun Isaac <arunisaac@systemreboot.net>
  21. ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
  22. ;;; Copyright © 2016, 2018 Marius Bakke <mbakke@fastmail.com>
  23. ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
  24. ;;; Copyright © 2017 Kyle Meyer <kyle@kyleam.com>
  25. ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
  26. ;;; Copyright © 2017, 2018, 2020 Rene Saavedra <pacoon@protonmail.com>
  27. ;;; Copyright © 2018, 2019, 2020, 2021 Pierre Langlois <pierre.langlois@gmx.com>
  28. ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
  29. ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
  30. ;;; Copyright © 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
  31. ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
  32. ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
  33. ;;; Copyright © 2020 Justus Winter <justus@sequoia-pgp.org>
  34. ;;; Copyright © 2020 Eric Brown <ecbrown@ericcbrown.com>
  35. ;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  36. ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
  37. ;;; Copyright © 2020, 2021 Alexey Abramov <levenson@mmer.org>
  38. ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
  39. ;;; Copyright © 2020, 2021 Alexandru-Sergiu Marton <brown121407@posteo.ro>
  40. ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
  41. ;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
  42. ;;; Copyright © 2020 divoplade <d@divoplade.fr>
  43. ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  44. ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
  45. ;;; Copyright © 2021 Benoit Joly <benoit@benoitj.ca>
  46. ;;;
  47. ;;; This file is part of GNU Guix.
  48. ;;;
  49. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  50. ;;; under the terms of the GNU General Public License as published by
  51. ;;; the Free Software Foundation; either version 3 of the License, or (at
  52. ;;; your option) any later version.
  53. ;;;
  54. ;;; GNU Guix is distributed in the hope that it will be useful, but
  55. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  56. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  57. ;;; GNU General Public License for more details.
  58. ;;;
  59. ;;; You should have received a copy of the GNU General Public License
  60. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  61. (define-module (gnu packages mail)
  62. #:use-module (guix utils)
  63. #:use-module (gnu packages)
  64. #:use-module (gnu packages admin)
  65. #:use-module (gnu packages aspell)
  66. #:use-module (gnu packages autotools)
  67. #:use-module (gnu packages backup)
  68. #:use-module (gnu packages base)
  69. #:use-module (gnu packages bash)
  70. #:use-module (gnu packages bison)
  71. #:use-module (gnu packages boost)
  72. #:use-module (gnu packages calendar)
  73. #:use-module (gnu packages check)
  74. #:use-module (gnu packages compression)
  75. #:use-module (gnu packages crypto)
  76. #:use-module (gnu packages curl)
  77. #:use-module (gnu packages cyrus-sasl)
  78. #:use-module (gnu packages databases)
  79. #:use-module (gnu packages dbm)
  80. #:use-module (gnu packages dejagnu)
  81. #:use-module (gnu packages django)
  82. #:use-module (gnu packages dns)
  83. #:use-module (gnu packages docbook)
  84. #:use-module (gnu packages documentation)
  85. #:use-module (gnu packages emacs)
  86. #:use-module (gnu packages enchant)
  87. #:use-module (gnu packages file)
  88. #:use-module (gnu packages fontutils)
  89. #:use-module (gnu packages freedesktop)
  90. #:use-module (gnu packages gdb)
  91. #:use-module (gnu packages gettext)
  92. #:use-module (gnu packages ghostscript)
  93. #:use-module (gnu packages glib)
  94. #:use-module (gnu packages golang)
  95. #:use-module (gnu packages gnome)
  96. #:use-module (gnu packages gnupg)
  97. #:use-module (gnu packages groff)
  98. #:use-module (gnu packages gsasl)
  99. #:use-module (gnu packages gtk)
  100. #:use-module (gnu packages guile)
  101. #:use-module (gnu packages guile-xyz)
  102. #:use-module (gnu packages flex)
  103. #:use-module (gnu packages haskell-xyz)
  104. #:use-module (gnu packages icu4c)
  105. #:use-module (gnu packages kerberos)
  106. #:use-module (gnu packages language)
  107. #:use-module (gnu packages libcanberra)
  108. #:use-module (gnu packages libevent)
  109. #:use-module (gnu packages libidn)
  110. #:use-module (gnu packages libunistring)
  111. #:use-module (gnu packages libunwind)
  112. #:use-module (gnu packages linux)
  113. #:use-module (gnu packages lsof)
  114. #:use-module (gnu packages lua)
  115. #:use-module (gnu packages m4)
  116. #:use-module (gnu packages man)
  117. #:use-module (gnu packages ncurses)
  118. #:use-module (gnu packages nettle)
  119. #:use-module (gnu packages networking)
  120. #:use-module (gnu packages ninja)
  121. #:use-module (gnu packages openldap)
  122. #:use-module (gnu packages onc-rpc)
  123. #:use-module (gnu packages pcre)
  124. #:use-module (gnu packages pdf)
  125. #:use-module (gnu packages perl)
  126. #:use-module (gnu packages perl-check)
  127. #:use-module (gnu packages perl-web)
  128. #:use-module (gnu packages pkg-config)
  129. #:use-module (gnu packages protobuf)
  130. #:use-module (gnu packages python)
  131. #:use-module (gnu packages python-check)
  132. #:use-module (gnu packages python-crypto)
  133. #:use-module (gnu packages python-web)
  134. #:use-module (gnu packages python-xyz)
  135. #:use-module (gnu packages ragel)
  136. #:use-module (gnu packages regex)
  137. #:use-module (gnu packages rdf)
  138. #:use-module (gnu packages readline)
  139. #:use-module (gnu packages ruby)
  140. #:use-module (gnu packages search)
  141. #:use-module (gnu packages serialization)
  142. #:use-module (gnu packages samba)
  143. #:use-module (gnu packages screen)
  144. #:use-module (gnu packages sphinx)
  145. #:use-module (gnu packages sqlite)
  146. #:use-module (gnu packages tcl)
  147. #:use-module (gnu packages texinfo)
  148. #:use-module (gnu packages time)
  149. #:use-module (gnu packages tls)
  150. #:use-module (gnu packages version-control)
  151. #:use-module (gnu packages w3m)
  152. #:use-module (gnu packages web)
  153. #:use-module (gnu packages webkit)
  154. #:use-module (gnu packages xdisorg)
  155. #:use-module (gnu packages xorg)
  156. #:use-module (gnu packages xml)
  157. #:use-module ((guix licenses) #:prefix license:)
  158. #:use-module (guix packages)
  159. #:use-module (guix deprecation)
  160. #:use-module (guix download)
  161. #:use-module (guix git-download)
  162. #:use-module (guix svn-download)
  163. #:use-module (guix utils)
  164. #:use-module (guix build-system cmake)
  165. #:use-module (guix build-system glib-or-gtk)
  166. #:use-module (guix build-system go)
  167. #:use-module (guix build-system gnu)
  168. #:use-module (guix build-system go)
  169. #:use-module (guix build-system guile)
  170. #:use-module (guix build-system emacs)
  171. #:use-module (guix build-system meson)
  172. #:use-module (guix build-system perl)
  173. #:use-module (guix build-system python)
  174. #:use-module (guix build-system trivial)
  175. #:use-module (srfi srfi-1)
  176. #:use-module (ice-9 match))
  177. (define-public abook
  178. (package
  179. (name "abook")
  180. (version "0.6.1")
  181. (source
  182. (origin
  183. (method url-fetch)
  184. (uri (string-append "https://abook.sourceforge.io/devel/abook-" version ".tar.gz"))
  185. (sha256
  186. (base32 "1yf0ifyjhq2r003pnpn92mn0924bn9yxjifxxj2ldcsgd7w0vagh"))))
  187. (build-system gnu-build-system)
  188. (arguments
  189. `(#:phases
  190. (modify-phases %standard-phases
  191. ;; Fix "undefined reference to `field_id'" errors.
  192. (add-after 'unpack 'fix-build-with-recent-gcc
  193. (lambda _
  194. (substitute* '("database.c" "database.h")
  195. (("^inline int" all) (string-append "extern " all)))))
  196. ;; Fix following error during bootstrap: "gettext infrastructure
  197. ;; mismatch: using a Makefile.in.in from gettext version 0.18 but the
  198. ;; autoconf macros are from gettext version 0.20".
  199. (add-before 'bootstrap 'fix-gettext-macro-version
  200. (lambda _
  201. (substitute* "po/Makefile.in.in"
  202. (("0.18") "0.20"))))
  203. (replace 'bootstrap
  204. (lambda _
  205. (invoke "aclocal")
  206. (invoke "automake" "--add-missing")
  207. (invoke "autoconf"))))))
  208. (native-inputs
  209. `(("autoconf" ,autoconf)
  210. ("automake" ,automake)
  211. ("gettext" ,gettext-minimal)))
  212. (inputs
  213. `(("ncurses" ,ncurses)
  214. ("readline" ,readline)))
  215. (home-page "https://abook.sourceforge.io/")
  216. (synopsis "Text-based address book")
  217. (description
  218. "Abook is a text-based address book program designed to use with the Mutt
  219. mail client.")
  220. (license license:gpl2)))
  221. (define-public anubis
  222. (package
  223. (name "anubis")
  224. ;; This 4.2.90 alpha release adds support for Guile 3 and has fixes for
  225. ;; other issues.
  226. (version "4.2.90")
  227. (source
  228. (origin
  229. (method url-fetch)
  230. (uri (string-append "https://alpha.gnu.org/gnu/anubis/anubis-"
  231. version ".tar.gz"))
  232. (sha256
  233. (base32
  234. "0dvm6acl32dv8bixx9z50gzwfp6kj4kxnn1j3dcwjlp7sasjp41s"))))
  235. (build-system gnu-build-system)
  236. (native-inputs
  237. `(("automake" ,automake)
  238. ("autoconf" ,autoconf)
  239. ("gettext" ,gettext-minimal)
  240. ("m4" ,m4))) ;for the test suite
  241. (inputs
  242. `(("gdbm" ,gdbm)
  243. ("gnutls" ,gnutls)
  244. ("gpgme" ,gpgme)
  245. ("gsasl" ,gsasl)
  246. ("guile" ,guile-3.0)
  247. ("libgcrypt" ,libgcrypt) ;gnutls support depends on libgcrypt
  248. ("libgpg-error" ,libgpg-error)))
  249. (outputs '("out" "debug"))
  250. (synopsis "SMTP message submission daemon")
  251. (description "Anubis is a daemon that sits between the Mail User
  252. Agent (MUA) and the Mail Transfer Agent (MTA). When a mail is sent by a user
  253. in the MUA, it is first passed to Anubis, which performs additional processing
  254. to the message before passing it on for delivery by the MTA. Anubis may, for
  255. example, modify the message headers or body, or encrypt or sign the message.")
  256. (home-page "https://www.gnu.org/software/anubis/manual/")
  257. (license license:gpl3+)))
  258. (define-public mailutils
  259. (package
  260. (name "mailutils")
  261. (version "3.13")
  262. (source (origin
  263. (method url-fetch)
  264. (uri (string-append "mirror://gnu/mailutils/mailutils-"
  265. version ".tar.xz"))
  266. (sha256
  267. (base32
  268. "1iwl82d6aa2acsdxbqh1s5xx44sg83b4yxqik408m1s9rcfrf86r"))
  269. (patches
  270. (search-patches "mailutils-variable-lookup.patch"))))
  271. (build-system gnu-build-system)
  272. (arguments
  273. `(#:phases
  274. (modify-phases %standard-phases
  275. (add-before 'check 'prepare-test-suite
  276. (lambda _
  277. ;; Use the right file name for `cat'.
  278. (substitute* "testsuite/lib/mailutils.exp"
  279. (("/bin/cat")
  280. (which "cat")))
  281. ;; Tests try to invoke 'mda' such that it looks up the
  282. ;; 'root' user, which does not exist in the build
  283. ;; environment.
  284. (substitute* '("mda/mda/tests/testsuite"
  285. "mda/lmtpd/tests/testsuite")
  286. (("root <") "nobody <")
  287. (("spool/root") "spool/nobody")
  288. (("root@localhost") "nobody@localhost"))
  289. ;; The 'pipeact.at' tests generate a shell script; make
  290. ;; sure it uses the right shell.
  291. (substitute* '("sieve/tests/testsuite"
  292. "mh/tests/testsuite"
  293. "libmailutils/tests/lock.at")
  294. (("#! ?/bin/sh")
  295. (string-append "#!" (which "sh"))))
  296. (substitute* "mh/tests/testsuite"
  297. (("moreproc: /bin/cat")
  298. (string-append "moreproc: " (which "cat"))))
  299. ;; XXX: The comsatd tests rely on being able to open
  300. ;; /dev/tty, but that gives ENODEV in the build
  301. ;; environment. Thus, ignore test failures here.
  302. (substitute* "comsat/tests/Makefile.in"
  303. (("\\$\\(SHELL\\) \\$\\(TESTSUITE\\)" all)
  304. (string-append "-" all)))
  305. ;; XXX: The ‘moderator: program discard’ test does not specify
  306. ;; an explicit From: but does expect an exact match. But why are
  307. ;; all other tests unaffected?
  308. (substitute* "sieve/tests/testsuite"
  309. (("gray@")
  310. "nixbld@"))
  311. ;; 'frm' tests expect write access to $HOME.
  312. (setenv "HOME" (getcwd))
  313. ;; Avoid the message "I'm going to create the standard MH path
  314. ;; for you", which would lead to one test failure (when diffing
  315. ;; stdout of 'fmtcheck'.)
  316. (call-with-output-file ".mh_profile"
  317. (lambda (port)
  318. (format port "Path: ~a/Mail-for-tests~%"
  319. (getcwd))))
  320. (substitute* "imap4d/tests/testclient.c"
  321. (("\"/bin/sh\"")
  322. (string-append "\"" (which "sh") "\""))))))
  323. #:configure-flags
  324. (list "--sysconfdir=/etc"
  325. ;; Add "/X.Y" to the installation directory.
  326. (string-append "--with-guile-site-dir="
  327. (assoc-ref %outputs "out")
  328. "/share/guile/site/"
  329. ,(match (assoc "guile"
  330. (package-inputs this-package))
  331. (("guile" guile)
  332. (version-major+minor
  333. (package-version guile))))))))
  334. (native-inputs
  335. ;; Regeneration of the build system is triggered by touching the
  336. ;; 'libmailutils/tests/lock.at' file.
  337. `(("autoconf" ,autoconf)
  338. ("automake" ,automake)
  339. ("gettext" ,gettext-minimal)
  340. ("libtool" ,libtool)
  341. ("m4" ,m4)
  342. ("perl" ,perl) ;for 'gylwrap'
  343. ("texinfo" ,texinfo)
  344. ("dejagnu" ,dejagnu)))
  345. (inputs
  346. `(("guile" ,guile-3.0)
  347. ("gsasl" ,gsasl)
  348. ("gnutls" ,gnutls)
  349. ("ncurses" ,ncurses)
  350. ("readline" ,readline)
  351. ("linux-pam" ,linux-pam)
  352. ("libltdl" ,libltdl)
  353. ("gdbm" ,gdbm)
  354. ;; Required for SEARCH CHARSET.
  355. ("libiconv" ,libiconv)
  356. ("libunistring" ,libunistring)))
  357. (home-page "https://mailutils.org")
  358. (synopsis "Utilities and library for reading and serving mail")
  359. (description
  360. "GNU Mailutils is a collection of programs for managing, viewing and
  361. processing electronic mail. It contains both utilities and server daemons
  362. and all operate in a protocol-agnostic way. The underlying libraries are
  363. also available, simplifying the addition of mail capabilities to new
  364. software. GNU Mailutils provides the following commands:
  365. @itemize @command
  366. @item dotlock
  367. @item decodemail
  368. @item frm
  369. @item from
  370. @item guimb
  371. @item mail
  372. @item mailutils
  373. @item mailutils-config
  374. @item messages
  375. @item mimeview
  376. @item movemail
  377. @item popauth
  378. @item putmail
  379. @item readmsg
  380. @item sieve
  381. @end itemize")
  382. (license
  383. ;; Libraries are under LGPLv3+, and programs under GPLv3+.
  384. (list license:gpl3+ license:lgpl3+))))
  385. (define-public go-gitlab.com-shackra-goimapnotify
  386. (let ((commit "832bc7112db9b28e28d69e90b91ea6c005244c9b")
  387. (revision "0"))
  388. (package
  389. (name "go-gitlab.com-shackra-goimapnotify")
  390. (version (git-version "0.0.0" revision commit))
  391. (source (origin
  392. (method git-fetch)
  393. (uri (git-reference
  394. (url "https://gitlab.com/shackra/goimapnotify")
  395. (commit commit)))
  396. (file-name (git-file-name name version))
  397. (sha256
  398. (base32
  399. "1h27kshx4vwl5k6vc2szsq3d701fzs4gczjypz907f8hj0lrnjmy"))))
  400. (build-system go-build-system)
  401. (arguments
  402. `(#:import-path "gitlab.com/shackra/goimapnotify"))
  403. (propagated-inputs
  404. `(("go-github-com-emersion-go-imap" ,go-github-com-emersion-go-imap)
  405. ("go-github-com-emersion-go-imap-idle" ,go-github-com-emersion-go-imap-idle)
  406. ("go-github-com-emersion-go-sasl" ,go-github-com-emersion-go-sasl)
  407. ("go-github-com-sirupsen-logrus" ,go-github-com-sirupsen-logrus)
  408. ("go-golang-org-x-text" ,go-golang-org-x-text)))
  409. (synopsis "Execute scripts on IMAP mailbox changes.")
  410. (description
  411. "Script to execute scripts on IMAP mailbox changes (new/deleted/updated
  412. messages) using IDLE. Implemented in Go.")
  413. (home-page "https://gitlab.com/shackra/goimapnotify")
  414. (license license:gpl3+))))
  415. (define-public guile2.2-mailutils
  416. (package
  417. (inherit mailutils)
  418. (name "guile2.2-mailutils")
  419. (inputs
  420. `(("guile" ,guile-2.2)
  421. ,@(alist-delete "guile" (package-inputs mailutils))))))
  422. (define-public guile3.0-mailutils
  423. (deprecated-package "guile3.0-mailutils" mailutils))
  424. (define-public nullmailer
  425. (package
  426. (name "nullmailer")
  427. (version "2.2")
  428. (source
  429. (origin
  430. (method url-fetch)
  431. (uri (list
  432. (string-append "https://untroubled.org/nullmailer/"
  433. "nullmailer-" version ".tar.gz")
  434. ;; Previous releases are moved to this subdirectory.
  435. (string-append "https://untroubled.org/nullmailer/archive/"
  436. "nullmailer-" version ".tar.gz")))
  437. (sha256
  438. (base32 "0md8cf90fl2yf3zh9njjy42a673v4j4ygyq95xg7fzkygdigm1lq"))))
  439. (build-system gnu-build-system)
  440. (arguments
  441. `(#:configure-flags
  442. (list "--enable-tls"
  443. "--localstatedir=/var"
  444. "--sysconfdir=/etc")
  445. #:phases
  446. (modify-phases %standard-phases
  447. (add-before 'check 'patch-test-FHS-file-names
  448. (lambda _
  449. (with-directory-excursion "test"
  450. (substitute* (list "functions.in"
  451. "tests/send")
  452. ;; Fix some shebangs later generated on the fly.
  453. (("/bin/sh") (which "bash"))))
  454. #t))
  455. (add-before 'check 'pass-PATH-to-tests
  456. ;; ‘runtest’ launches each test through ‘env -’, clearing $PATH. The
  457. ;; tests then source ‘functions’, which first demands a working $PATH
  458. ;; only to clobber it later. Pass our $PATH to the test environment
  459. ;; and don't touch it after that.
  460. (lambda _
  461. (with-directory-excursion "test"
  462. (substitute* "runtests"
  463. (("env - bash")
  464. (string-append "env - PATH=\"" (getenv "PATH") "\" bash")))
  465. (substitute* "functions.in"
  466. (("export PATH=.*") "")))
  467. #t))
  468. (add-before 'check 'delete-failing-tests
  469. (lambda _
  470. (with-directory-excursion "test/tests"
  471. (for-each delete-file
  472. (list
  473. ;; XXX ‘nullmailer-inject: nullmailer-queue failed: 15’
  474. "inject/queue"
  475. ;; XXX These require the not-yet-packaged tcpserver.
  476. "protocols" "smtp-auth")))
  477. #t))
  478. (add-before 'install 'skip-install-data-local
  479. ;; Don't attempt to install run-time files outside of the store.
  480. (lambda _
  481. (substitute* "Makefile"
  482. ((" install-data-local") ""))
  483. #t)))))
  484. (native-inputs
  485. ;; For tests.
  486. `(("daemontools" ,daemontools))) ; for svc
  487. (inputs
  488. `(("gnutls" ,gnutls)))
  489. (home-page "https://untroubled.org/nullmailer/")
  490. (synopsis "Simple relay-only mail transfer agent")
  491. (description
  492. "Nullmailer is a simple replacement @acronym{MTA, Mail Transfer Agent} for
  493. hosts that receive no local mail and only relay mail to a fixed set of smart
  494. relays. It's useful for systems such as Web servers that must be able to send
  495. email notifications, without having to run a full-blown MTA such as sendmail
  496. or qmail.
  497. Nullmailer is designed to be simple to configure, easy to extend, and secure.
  498. It requires little ongoing administration. The included @command{sendmail}
  499. emulator front-end should allow most (if not all) sendmail-compatible programs
  500. to run without any changes.")
  501. (license (list license:lgpl2.1+ ; lib/cli++/ (but some files lack headers)
  502. license:gpl2+)))) ; everything else
  503. (define-public fetchmail
  504. (package
  505. (name "fetchmail")
  506. (version "6.4.21")
  507. (source
  508. (origin
  509. (method url-fetch)
  510. (uri (string-append "mirror://sourceforge/fetchmail/branch_"
  511. (version-major+minor version) "/"
  512. "fetchmail-" version ".tar.xz"))
  513. (sha256
  514. (base32 "07cxr5137hvrk8jfgn4wd6sq9361c3d40w8krnjxm8fpmwf9qiba"))))
  515. (build-system gnu-build-system)
  516. (inputs
  517. `(("openssl" ,openssl)))
  518. (arguments
  519. `(#:configure-flags
  520. (list (string-append "--with-ssl="
  521. (assoc-ref %build-inputs "openssl")))))
  522. (home-page "https://www.fetchmail.info/")
  523. (synopsis "Remote-mail retrieval and forwarding utility")
  524. (description
  525. "Fetchmail is a full-featured, robust, well-documented remote-mail
  526. retrieval and forwarding utility intended to be used over on-demand
  527. TCP/IP links (such as SLIP or PPP connections). It supports every
  528. remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP,
  529. KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6
  530. and IPSEC.
  531. Fetchmail retrieves mail from remote mail servers and forwards it via SMTP,
  532. so it can then be read by normal mail user agents such as mutt, elm
  533. or BSD Mail. It allows all your system MTA's filtering, forwarding, and
  534. aliasing facilities to work just as they would on normal mail.")
  535. (license license:gpl2+))) ; most files are actually public domain or x11
  536. (define-public mutt
  537. (package
  538. (name "mutt")
  539. (version "2.1.1")
  540. (source (origin
  541. (method url-fetch)
  542. (uri (list
  543. (string-append "https://bitbucket.org/mutt/mutt/downloads/"
  544. "mutt-" version ".tar.gz")
  545. (string-append "http://ftp.mutt.org/pub/mutt/mutt-"
  546. version ".tar.gz")))
  547. (sha256
  548. (base32
  549. "0jjjvqkqmpj55v111p1a1i2ry7mpd1bpphn1bhvlr18rgw7xdrja"))
  550. (patches (search-patches "mutt-store-references.patch"))))
  551. (build-system gnu-build-system)
  552. (inputs
  553. `(("cyrus-sasl" ,cyrus-sasl)
  554. ("gdbm" ,gdbm)
  555. ("gpgme" ,gpgme)
  556. ("libidn2" ,libidn2)
  557. ("ncurses" ,ncurses)
  558. ("openssl" ,openssl)
  559. ("perl" ,perl)
  560. ("sqlite" ,sqlite)))
  561. (arguments
  562. `(#:configure-flags '("--enable-smtp"
  563. "--enable-imap"
  564. "--enable-pop"
  565. "--enable-gpgme"
  566. "--enable-hcache" ; for header caching
  567. "--enable-sidebar"
  568. "--enable-autocrypt"
  569. "--with-ssl"
  570. "--with-sasl"
  571. "--with-sqlite3" ; required for Autocrypt
  572. "--with-idn2" ; recommended for Autocrypt
  573. ;; So that mutt does not check whether the path
  574. ;; exists, which it does not in the chroot.
  575. "--with-mailpath=/var/mail")))
  576. (home-page "http://www.mutt.org/")
  577. (synopsis "Mail client")
  578. (description
  579. "Mutt is a small but very powerful text-based mail client for Unix
  580. operating systems.")
  581. (license license:gpl2+)))
  582. (define-public neomutt
  583. (package
  584. (name "neomutt")
  585. (version "20210205")
  586. (source
  587. (origin
  588. (method git-fetch)
  589. (uri (git-reference
  590. (url "https://github.com/neomutt/neomutt")
  591. (commit version)))
  592. (file-name (git-file-name name version))
  593. (sha256
  594. (base32 "15kr9nvb4j8lx5rl2yapv231rbp4sbn709vv82pfhx5717x3yf00"))))
  595. (build-system gnu-build-system)
  596. (inputs
  597. `(("cyrus-sasl" ,cyrus-sasl)
  598. ("gdbm" ,gdbm)
  599. ("gpgme" ,gpgme)
  600. ("ncurses" ,ncurses)
  601. ("gnutls" ,gnutls)
  602. ("openssl" ,openssl) ; for S/MIME
  603. ("perl" ,perl)
  604. ("kyotocabinet" ,kyotocabinet)
  605. ("libxslt" ,libxslt)
  606. ("libidn2" ,libidn2)
  607. ("libxml2" ,libxml2)
  608. ("lmdb" ,lmdb)
  609. ("notmuch" ,notmuch)))
  610. (native-inputs
  611. `(("automake" ,automake)
  612. ("gettext-minimal" ,gettext-minimal)
  613. ("pkg-config" ,pkg-config)
  614. ("docbook-xsl" ,docbook-xsl)
  615. ("docbook-xml" ,docbook-xml-4.2)
  616. ("w3m" ,w3m)
  617. ("tcl" ,tcl)
  618. ;; Test file data for the unit tests included in the neomutt source.
  619. ("neomutt-test-files"
  620. ,(let ((commit "8629adab700a75c54e8e28bf05ad092503a98f75"))
  621. (origin
  622. (method git-fetch)
  623. (uri (git-reference
  624. (url "https://github.com/neomutt/neomutt-test-files")
  625. (commit commit)))
  626. (file-name (git-file-name "neomutt-test-files" commit))
  627. (sha256
  628. (base32 "1ci04nqkab9mh60zzm66sd6mhsr6lya8wp92njpbvafc86vvwdlr")))))))
  629. (arguments
  630. `(#:test-target "test"
  631. #:configure-flags
  632. (list "--gpgme"
  633. ;; Database, implies header caching.
  634. "--disable-tokyocabinet"
  635. "--disable-qdbm"
  636. "--disable-bdb"
  637. "--lmdb"
  638. "--kyotocabinet"
  639. "--gdbm"
  640. "--gnutls"
  641. "--disable-ssl"
  642. "--sasl"
  643. (string-append "--with-sasl="
  644. (assoc-ref %build-inputs "cyrus-sasl"))
  645. "--smime"
  646. "--notmuch"
  647. "--disable-idn"
  648. "--idn2"
  649. ;; If we do not set this, neomutt wants to check
  650. ;; whether the path exists, which it does not
  651. ;; in the chroot.
  652. "--with-mailpath=/var/mail"
  653. "--with-ui=ncurses"
  654. (string-append "--with-ncurses="
  655. (assoc-ref %build-inputs "ncurses"))
  656. (string-append "--prefix="
  657. (assoc-ref %outputs "out"))
  658. "--debug")
  659. #:phases
  660. (modify-phases %standard-phases
  661. ;; TODO: autosetup is meant to be included in the source,
  662. ;; but we should package autosetup and use our own version of it.
  663. (replace 'configure
  664. (lambda* (#:key outputs inputs configure-flags #:allow-other-keys)
  665. (let* ((out (assoc-ref outputs "out"))
  666. (flags `(,@configure-flags))
  667. (bash (which "bash")))
  668. (setenv "SHELL" bash)
  669. (setenv "CONFIG_SHELL" bash)
  670. (apply invoke bash
  671. (string-append (getcwd) "/configure")
  672. flags))))
  673. (add-before 'check 'prepare-test-files
  674. (lambda* (#:key inputs #:allow-other-keys)
  675. (copy-recursively (assoc-ref inputs "neomutt-test-files") "tests")
  676. (with-directory-excursion "tests"
  677. (setenv "NEOMUTT_TEST_DIR" (getcwd)) ; must be absolute
  678. (invoke "bash" "setup.sh")
  679. #t))))))
  680. (home-page "https://neomutt.org/")
  681. (synopsis "Command-line mail reader based on Mutt")
  682. (description
  683. "NeoMutt is a command-line mail reader which is based on mutt.
  684. It adds a large amount of new and improved features to mutt.")
  685. (license license:gpl2+)))
  686. (define-public gmime
  687. (package
  688. (name "gmime")
  689. (version "3.2.7")
  690. (source (origin
  691. (method url-fetch)
  692. (uri (string-append "mirror://gnome/sources/gmime/"
  693. (version-major+minor version)
  694. "/gmime-" version ".tar.xz"))
  695. (sha256
  696. (base32
  697. "0i3xfc84qn1z99i70q68kbnp9rmgqrnprqb418ba52s6g9j9dsia"))))
  698. (build-system gnu-build-system)
  699. (native-inputs
  700. `(("pkg-config" ,pkg-config)
  701. ("gnupg" ,gnupg) ; for tests only
  702. ("gobject-introspection" ,gobject-introspection)))
  703. (inputs `(("glib" ,glib)
  704. ("gpgme" ,gpgme)
  705. ("zlib" ,zlib)))
  706. (arguments
  707. `(#:configure-flags
  708. (list "--enable-introspection=yes")
  709. #:phases
  710. (modify-phases %standard-phases
  711. (add-after
  712. 'unpack 'patch-paths-in-tests
  713. (lambda _
  714. ;; The test programs run several programs using 'system' with
  715. ;; hard-coded paths. Here we patch them all.
  716. ;; We use ISO-8859-1 here because test-iconv.c contains
  717. ;; raw byte sequences in several different encodings.
  718. (with-fluids ((%default-port-encoding #f))
  719. (substitute* (find-files "tests" "\\.c$")
  720. (("(system *\\(\")(/[^ ]*)" all pre prog-path)
  721. (let* ((base (basename prog-path))
  722. (prog (which base)))
  723. (string-append pre
  724. (or prog (error "not found: " base)))))))
  725. #t)))))
  726. (home-page "http://spruce.sourceforge.net/gmime/")
  727. (synopsis "MIME message parser and creator library")
  728. (description
  729. "GMime provides a core library and set of utilities which may be used for
  730. the creation and parsing of messages using the Multipurpose Internet Mail
  731. Extension (MIME).")
  732. (license (list license:lgpl2.1+ license:gpl2+ license:gpl3+))))
  733. ;; Some packages are not ready for GMime 3 yet.
  734. (define-public gmime-2.6
  735. (package
  736. (inherit gmime)
  737. (version "2.6.23")
  738. (source (origin
  739. (method url-fetch)
  740. (uri (string-append "mirror://gnome/sources/gmime/"
  741. (version-major+minor version)
  742. "/gmime-" version ".tar.xz"))
  743. (sha256
  744. (base32
  745. "0slzlzcr3h8jikpz5a5amqd0csqh2m40gdk910ws2hnaf5m6hjbi"))))))
  746. (define-public altermime
  747. (package
  748. (name "altermime")
  749. (version "0.3.11")
  750. (source (origin
  751. (method url-fetch)
  752. (uri (string-append "http://pldaniels.com/altermime/altermime-"
  753. version ".tar.gz"))
  754. (sha256
  755. (base32
  756. "15zxg6spcmd35r6xbidq2fgcg2nzyv1sbbqds08lzll70mqx4pj7"))))
  757. (build-system gnu-build-system)
  758. (arguments
  759. `(#:make-flags (list "CC=gcc"
  760. (string-append "PREFIX=" (assoc-ref %outputs "out")))
  761. #:tests? #f ; there are none
  762. #:phases
  763. (modify-phases %standard-phases
  764. (delete 'configure)
  765. (add-after 'unpack 'fix-bugs
  766. (lambda _
  767. (substitute* "MIME_headers.c"
  768. (("hinfo->filename, sizeof\\(hinfo->name\\)")
  769. "hinfo->filename, sizeof(hinfo->filename)")
  770. (("memset\\(hinfo->defects, 0, _MIMEH_DEFECT_ARRAY_SIZE\\);")
  771. "memset(hinfo->defects, 0, sizeof(hinfo->defects));"))
  772. (substitute* "pldstr.c"
  773. (("if \\(\\(st->start\\)&&\\(st->start != '\\\\0'\\)\\)")
  774. "if ((st->start)&&(*st->start != '\\0'))"))
  775. (substitute* "qpe.c"
  776. (("if \\(lineend != '\\\\0'\\)")
  777. "if (*lineend != '\\0')"))
  778. #t))
  779. (add-after 'unpack 'install-to-prefix
  780. (lambda _
  781. (substitute* "Makefile"
  782. (("/usr/local") "${PREFIX}")
  783. (("cp altermime.*") "install -D -t ${PREFIX}/bin altermime\n"))
  784. #t))
  785. (add-after 'unpack 'disable-Werror
  786. (lambda _
  787. (substitute* "Makefile"
  788. (("-Werror") ""))
  789. #t)))))
  790. (home-page "https://pldaniels.com/altermime/")
  791. (synopsis "Modify MIME-encoded messages")
  792. (description
  793. "alterMIME is a small program which is used to alter your mime-encoded
  794. mailpack. What can alterMIME do?
  795. @enumerate
  796. @item Insert disclaimers,
  797. @item insert arbitrary X-headers,
  798. @item modify existing headers,
  799. @item remove attachments based on filename or content-type,
  800. @item replace attachments based on filename.
  801. @end enumerate
  802. .")
  803. ;; MIME_headers.c is distributed under BSD-3; the rest of the code is
  804. ;; published under the alterMIME license.
  805. (license (list (license:non-copyleft "file://LICENSE")
  806. license:bsd-3))))
  807. (define-public astroid
  808. (package
  809. (name "astroid")
  810. (version "0.15")
  811. (source
  812. (origin
  813. (method git-fetch)
  814. (uri (git-reference
  815. (url "https://github.com/astroidmail/astroid")
  816. (commit (string-append "v" version))))
  817. (file-name (git-file-name name version))
  818. (sha256
  819. (base32 "11cxbva9ni98gii59xmbxh4c6idcg3mg0pgdsp1c3j0yg7ix0lj3"))
  820. (modules '((guix build utils)))
  821. (snippet
  822. '(begin
  823. ;; https://github.com/astroidmail/astroid/pull/685
  824. (substitute* "tests/test_composed_message.cc"
  825. (("\\\\n\\.\\.\\.") "\\n...\\n"))
  826. #t))))
  827. (build-system cmake-build-system)
  828. (arguments
  829. `(#:modules ((guix build cmake-build-system)
  830. ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
  831. (guix build utils)
  832. (ice-9 match))
  833. #:imported-modules ((guix build glib-or-gtk-build-system)
  834. ,@%cmake-build-system-modules)
  835. #:configure-flags (list "-GNinja")
  836. #:phases
  837. (modify-phases %standard-phases
  838. (add-after 'unpack 'skip-markdown-test
  839. ;; This test relies on the plugins and the test suite
  840. ;; cannot find the Astroid module.
  841. ;; gi.require_version ('Astroid', '0.2')
  842. ;; ValueError: Namespace Astroid not available
  843. (lambda _
  844. (substitute* "tests/CMakeLists.txt"
  845. ((".*markdown.*") ""))
  846. #t))
  847. (replace 'build
  848. (lambda _
  849. (invoke "ninja" "-j" (number->string (parallel-job-count)))))
  850. (add-before 'check 'start-xserver
  851. (lambda* (#:key inputs #:allow-other-keys)
  852. (let ((xorg-server (assoc-ref inputs "xorg-server")))
  853. (setenv "HOME" (getcwd))
  854. (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
  855. (setenv "DISPLAY" ":1")
  856. #t)))
  857. (replace 'check
  858. (lambda* (#:key tests? #:allow-other-keys)
  859. (when tests?
  860. (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
  861. (invoke "ctest" "."))
  862. #t))
  863. (replace 'install
  864. (lambda _
  865. (invoke "ninja" "install")))
  866. (add-after 'install 'wrap-with-GI_TYPELIB_PATH
  867. (lambda* (#:key inputs outputs #:allow-other-keys)
  868. (let ((out (assoc-ref outputs "out"))
  869. (paths (map (match-lambda
  870. ((outputs . directory)
  871. (let ((girepodir (string-append
  872. directory
  873. "/lib/girepository-1.0")))
  874. (if (file-exists? girepodir)
  875. girepodir
  876. #f))))
  877. inputs)))
  878. (wrap-program (string-append out "/bin/astroid")
  879. `("GI_TYPELIB_PATH" ":" prefix ,(filter identity paths))))
  880. #t))
  881. (add-after 'install 'glib-or-gtk-compile-schemas
  882. (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
  883. (add-after 'install 'glib-or-gtk-wrap
  884. (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
  885. (native-inputs
  886. `(("glib-networking" ,glib-networking)
  887. ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
  888. ("gnupg" ,gnupg)
  889. ("ninja" ,ninja)
  890. ("pkg-config" ,pkg-config)
  891. ("ronn" ,ronn)
  892. ("w3m" ,w3m)
  893. ("xorg-server" ,xorg-server)))
  894. (inputs
  895. `(("boost" ,boost)
  896. ("gmime" ,gmime)
  897. ("gobject-introspection" ,gobject-introspection) ; it is referenced
  898. ("gtkmm" ,gtkmm-3)
  899. ("libpeas" ,libpeas)
  900. ("libsass" ,libsass)
  901. ("notmuch" ,notmuch)
  902. ("protobuf" ,protobuf)
  903. ("python" ,python-wrapper)
  904. ("python-pygobject" ,python-pygobject)
  905. ("webkitgtk" ,webkitgtk)))
  906. (propagated-inputs
  907. `(("adwaita-icon-theme" ,adwaita-icon-theme))) ; Required for the thread view
  908. (home-page "https://astroidmail.github.io/")
  909. (synopsis "GTK frontend to the notmuch mail system")
  910. (description
  911. "Astroid is a lightweight and fast Mail User Agent that provides a
  912. graphical interface to searching, display and composing email, organized in
  913. thread and tags. Astroid uses the notmuch backend for searches through tons of
  914. email. Astroid searches, displays and compose emails — and relies on other
  915. programs for fetching, syncing and sending email.")
  916. (license (list license:gpl3+ ; 'this program'
  917. license:lgpl2.1+)))) ; code from geary, gmime
  918. (define-public ripmime
  919. ;; Upstream does not tag or otherwise provide any releases (only a version
  920. ;; number in the source)
  921. (let ((commit "a556ffe08d620602475c976732e8e1a82f3169e9")
  922. (revision "1"))
  923. (package
  924. (name "ripmime")
  925. (version (git-version "1.4.0.10" revision commit))
  926. (source (origin
  927. (method git-fetch)
  928. (uri (git-reference
  929. (url "https://github.com/inflex/ripMIME")
  930. (commit commit)))
  931. (file-name (git-file-name name version))
  932. (sha256
  933. (base32
  934. "1z8ar8flvkd9q3ax4x28sj5pyq8ykk5pq249y967lj2406lxparh"))))
  935. (build-system gnu-build-system)
  936. (arguments
  937. `(#:phases
  938. (modify-phases %standard-phases
  939. ;; Source has no configure script
  940. (delete 'configure)
  941. ;; Buildcodes make the build non-reproducible; remove them
  942. (add-after 'unpack 'strip-buildcodes
  943. (lambda _
  944. (substitute* "generate-buildcodes.sh"
  945. (("`date \\+%s`") "0")
  946. (("`date`") "0")
  947. (("`uname -a`") "Guix"))
  948. #t))
  949. ;; https://github.com/inflex/ripMIME/pull/16 makes 'mkdir-p-bin-man unnecessary
  950. (add-before 'install 'mkdir-p-bin-man
  951. (lambda _
  952. (mkdir-p (string-append (assoc-ref %outputs "out") "/bin"))
  953. (mkdir-p (string-append (assoc-ref %outputs "out") "/man"))
  954. #t)))
  955. ;; Makefile has no tests
  956. #:tests? #f
  957. #:make-flags (list (string-append "LOCATION=" (assoc-ref %outputs "out"))
  958. "CC=gcc")))
  959. (synopsis "Extract attachments from MIME-encoded email")
  960. (description
  961. "ripMIME is a small program to extract the attached files out of a
  962. MIME-encoded email package.")
  963. (home-page "https://github.com/inflex/ripMIME")
  964. (license license:bsd-3))))
  965. (define-public mailcap
  966. (let* ((version "2.1.53")
  967. (tag ;; mailcap tags their releases like this: rMajor-minor-patch
  968. (string-append "r" (string-join (string-split version #\.) "-"))))
  969. (package
  970. (name "mailcap")
  971. (version version)
  972. (source
  973. (origin
  974. (method git-fetch)
  975. (uri (git-reference
  976. (url "https://pagure.io/mailcap.git")
  977. (commit tag)))
  978. (file-name (git-file-name name version))
  979. (sha256
  980. (base32 "14939pq7h25rh9100z72vzzx810yqg98im9gz2fbhh47iaj1wrbb"))))
  981. (build-system gnu-build-system)
  982. (arguments
  983. '(#:phases
  984. (modify-phases %standard-phases
  985. (delete 'configure)
  986. (add-before 'install 'set-dest-dir
  987. (lambda* (#:key outputs #:allow-other-keys)
  988. (let ((out (assoc-ref outputs "out")))
  989. (setenv "DESTDIR" out)
  990. (substitute* "Makefile"
  991. (("/usr") "")) ; This allows the man page to install.
  992. #t))))))
  993. (native-inputs
  994. `(("python" ,python))) ; for tests
  995. (synopsis "MIME type associations for file types")
  996. (description
  997. "This package provides MIME type associations for file types.")
  998. (home-page "https://pagure.io/mailcap")
  999. (license (list license:expat ; mailcap.5
  1000. license:public-domain))))) ; mailcap and mime.types
  1001. (define-public bogofilter
  1002. (package
  1003. (name "bogofilter")
  1004. (version "1.2.5")
  1005. (source
  1006. (origin
  1007. (method url-fetch)
  1008. (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-stable/"
  1009. "bogofilter-" version ".tar.xz"))
  1010. (sha256
  1011. (base32 "1sl9xrnnlk2sn8gmibhn8li09vnansjbxb9l1182qmgz7cvs2j1j"))))
  1012. (build-system gnu-build-system)
  1013. (arguments
  1014. '(#:phases
  1015. (modify-phases %standard-phases
  1016. (add-before 'check 'pre-check
  1017. (lambda _
  1018. (substitute* "src/tests/t.frame"
  1019. (("GREP=/bin/grep")
  1020. (string-append "GREP=" (which "grep") "\n")))
  1021. #t)))))
  1022. (native-inputs `(("flex" ,flex)))
  1023. (inputs `(("bdb" ,bdb)))
  1024. (home-page "https://bogofilter.sourceforge.io/")
  1025. (synopsis "Mail classifier based on a Bayesian filter")
  1026. (description
  1027. "Bogofilter is a mail filter that classifies mail as spam or ham
  1028. (non-spam) by a statistical analysis of the message's header and
  1029. content (body). The program is able to learn from the user's classifications
  1030. and corrections. It is based on a Bayesian filter.")
  1031. (license license:gpl3+)))
  1032. (define-public offlineimap3
  1033. ;; The OfflineIMAP3 fork does not yet have a release, but it's likely to be
  1034. ;; 8.0.0 but the source still reports 7.3.0, see
  1035. ;; https://github.com/OfflineIMAP/offlineimap3/issues/10.
  1036. (let ((commit "4ca9c75c6f9a0cc8dc7b69dd6abf073e494cc0e5")
  1037. (revision "0"))
  1038. (package
  1039. (name "offlineimap3")
  1040. (version (git-version "7.3.0" revision commit))
  1041. (source (origin
  1042. (method git-fetch)
  1043. (uri (git-reference
  1044. (url "https://github.com/OfflineIMAP/offlineimap3")
  1045. (commit commit)))
  1046. (file-name (git-file-name name version))
  1047. (sha256
  1048. (base32
  1049. "0nzh5dcc559jfw4yy12gc98s17w82b15zxikspc6apd8filmk9xg"))))
  1050. (build-system python-build-system)
  1051. (native-inputs
  1052. `(("asciidoc" ,asciidoc)))
  1053. (inputs
  1054. `(("python-distro" ,python-distro)
  1055. ("python-imaplib2" ,python-imaplib2)
  1056. ("python-rfc6555" ,python-rfc6555)))
  1057. (arguments
  1058. `(;; Tests require a modifiable IMAP account.
  1059. #:tests? #f
  1060. #:phases
  1061. (modify-phases %standard-phases
  1062. (add-after 'build 'build-documentation
  1063. (lambda _
  1064. (substitute* "docs/Makefile"
  1065. ;; Prevent xmllint and xsltproc from downloading a DTD file.
  1066. (("a2x -v") "a2x --no-xmllint --xsltproc-opts=--nonet -v"))
  1067. (invoke "make" "-C" "docs" "man")))
  1068. (add-after 'install 'install-documentation
  1069. (lambda* (#:key outputs #:allow-other-keys)
  1070. (let* ((out (assoc-ref outputs "out"))
  1071. (man (string-append out "/share/man")))
  1072. (install-file "docs/offlineimap.1" (string-append man "/man1"))
  1073. (install-file "docs/offlineimapui.7" (string-append man "/man7"))))))))
  1074. (home-page "https://www.offlineimap.org")
  1075. (synopsis "Sync emails between two repositories")
  1076. (description
  1077. "OfflineImap synchronizes emails between two repositories, so that you
  1078. can read the same mailbox from multiple computers. It supports IMAP as REMOTE
  1079. repository and Maildir/IMAP as LOCAL repository.")
  1080. (license license:gpl2+))))
  1081. (define-public offlineimap
  1082. (deprecated-package "offlineimap" offlineimap3))
  1083. (define-public emacs-mew
  1084. (package
  1085. (name "emacs-mew")
  1086. (version "6.8")
  1087. (source (origin
  1088. (method url-fetch)
  1089. (uri (string-append "https://mew.org/Release/mew-"
  1090. version ".tar.gz"))
  1091. (sha256
  1092. (base32
  1093. "0ixzyq33l6j34410kqav3lwn2wx171zvqd3irvns2jvhrbww8i6g"))))
  1094. (native-inputs
  1095. `(("emacs" ,emacs)))
  1096. (propagated-inputs
  1097. `(("ruby-sqlite3" ,ruby-sqlite3) ; optional for the database of messages
  1098. ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
  1099. (build-system gnu-build-system)
  1100. (arguments
  1101. (let ((elisp-dir "/share/emacs/site-lisp")
  1102. (icon-dir "/share/mew"))
  1103. `(#:modules ((guix build gnu-build-system)
  1104. (guix build utils)
  1105. (guix build emacs-utils))
  1106. #:imported-modules (,@%gnu-build-system-modules
  1107. (guix build emacs-utils))
  1108. #:configure-flags
  1109. (list (string-append "--with-elispdir=" %output ,elisp-dir)
  1110. (string-append "--with-etcdir=" %output ,icon-dir))
  1111. #:phases
  1112. (modify-phases %standard-phases
  1113. (add-after 'configure 'patch-mew-icon-directory
  1114. (lambda* (#:key outputs #:allow-other-keys)
  1115. (emacs-substitute-sexps "mew-key.el"
  1116. ("(def.* mew-icon-directory"
  1117. `(progn
  1118. (add-to-list 'image-load-path 'mew-icon-directory)
  1119. ,(string-append (assoc-ref outputs "out") ,icon-dir))))
  1120. #t))
  1121. (add-after 'install 'generate-autoloads
  1122. (lambda* (#:key outputs #:allow-other-keys)
  1123. (emacs-generate-autoloads
  1124. "mew" (string-append (assoc-ref outputs "out") ,elisp-dir))
  1125. #t)))
  1126. #:tests? #f)))
  1127. (home-page "https://mew.org")
  1128. (synopsis "Emacs e-mail client")
  1129. (description "Mew (Messaging in the Emacs World) is a user interface
  1130. for text messages, multimedia messages (MIME), news articles and
  1131. security functionality including PGP, S/MIME, SSH, and SSL.")
  1132. (license license:bsd-3)))
  1133. (define-public mu
  1134. (package
  1135. (name "mu")
  1136. (version "1.6.5")
  1137. (source (origin
  1138. (method url-fetch)
  1139. (uri (string-append "https://github.com/djcb/mu/releases/"
  1140. "download/" version "/"
  1141. "mu-" version ".tar.xz"))
  1142. (sha256
  1143. (base32
  1144. "0irqr1z1ljmij2vbj8dr8w9mbfalzikxr4s6340jjwmkmhaslh2h"))))
  1145. (build-system gnu-build-system)
  1146. (native-inputs
  1147. `(("pkg-config" ,pkg-config)
  1148. ("glib" ,glib "bin") ; for gtester
  1149. ("emacs" ,emacs-minimal)
  1150. ("tzdata" ,tzdata-for-tests))) ; for mu/test/test-mu-query.c
  1151. (inputs
  1152. `(("xapian" ,xapian)
  1153. ("guile" ,guile-3.0)
  1154. ("glib" ,glib)
  1155. ("gmime" ,gmime)))
  1156. (arguments
  1157. `(#:modules ((guix build gnu-build-system)
  1158. (guix build utils)
  1159. (guix build emacs-utils))
  1160. #:imported-modules (,@%gnu-build-system-modules
  1161. (guix build emacs-utils))
  1162. #:phases
  1163. (modify-phases %standard-phases
  1164. (add-after 'unpack 'patch-configure
  1165. ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
  1166. ;; so our Emacs package can't find it. Setting "--with-lispdir"
  1167. ;; configure flag doesn't help because "mu4e" will be added to
  1168. ;; the lispdir anyway, so we have to modify "configure.ac".
  1169. (lambda _
  1170. (substitute* "configure"
  1171. (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") ""))))
  1172. (add-after 'unpack 'patch-bin-sh-in-tests
  1173. (lambda _
  1174. (substitute* '("guile/tests/test-mu-guile.cc"
  1175. "mu/test-mu-cmd.cc"
  1176. "mu/test-mu-cmd-cfind.cc"
  1177. "mu/test-mu-query.cc")
  1178. (("/bin/sh") (which "sh")))))
  1179. (add-before 'install 'fix-ffi
  1180. (lambda* (#:key outputs #:allow-other-keys)
  1181. (substitute* "guile/mu.scm"
  1182. (("\"libguile-mu\"")
  1183. (format #f "\"~a/lib/libguile-mu\""
  1184. (assoc-ref outputs "out"))))))
  1185. (add-before 'check 'check-tz-setup
  1186. (lambda* (#:key inputs #:allow-other-keys)
  1187. ;; For mu/test/test-mu-query.c
  1188. (setenv "TZDIR"
  1189. (search-input-directory inputs "share/zoneinfo"))))
  1190. (add-after 'install 'install-emacs-autoloads
  1191. (lambda* (#:key outputs #:allow-other-keys)
  1192. (emacs-generate-autoloads
  1193. "mu4e"
  1194. (string-append (assoc-ref outputs "out")
  1195. "/share/emacs/site-lisp")))))))
  1196. (home-page "https://www.djcbsoftware.nl/code/mu/")
  1197. (synopsis "Quickly find emails")
  1198. (description
  1199. "Mu is a tool for dealing with e-mail messages stored in the
  1200. Maildir-format. Mu's purpose in life is to help you to quickly find the
  1201. messages you need; in addition, it allows you to view messages, extract
  1202. attachments, create new maildirs, and so on.")
  1203. (license license:gpl3+)))
  1204. (define-public alot
  1205. (package
  1206. (name "alot")
  1207. (version "0.9.1")
  1208. (source (origin
  1209. (method git-fetch)
  1210. ;; package author intends on distributing via github rather
  1211. ;; than pypi:
  1212. ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
  1213. (uri (git-reference
  1214. (url "https://github.com/pazz/alot")
  1215. (commit version)))
  1216. (file-name (git-file-name name version))
  1217. (sha256
  1218. (base32
  1219. "0s94m17yph1gq9f2svipb3bbwbw1s4j3zf2xkg5h91006v8286r6"))))
  1220. (build-system python-build-system)
  1221. (arguments
  1222. `(#:phases
  1223. (modify-phases %standard-phases
  1224. (add-before 'check 'fix-tests
  1225. (lambda* (#:key inputs #:allow-other-keys)
  1226. (let ((gnupg (assoc-ref inputs "gnupg")))
  1227. (substitute* "tests/test_crypto.py"
  1228. (("gpg2") (string-append gnupg "/bin/gpg")))
  1229. #t)))
  1230. (add-before 'check 'disable-failing-tests
  1231. ;; FIXME: Investigate why these tests are failing.
  1232. (lambda _
  1233. (substitute* "tests/test_helper.py"
  1234. (("def test_env_set") "def _test_env_set"))
  1235. (substitute* "tests/commands/test_global.py"
  1236. (("def test_no_spawn_no_stdin_attached")
  1237. "def _test_no_spawn_no_stdin_attached"))
  1238. #t)))))
  1239. (native-inputs
  1240. `(("procps" ,procps)
  1241. ("python-mock" ,python-mock)))
  1242. (inputs
  1243. `(("gnupg" ,gnupg)
  1244. ("python-magic" ,python-magic)
  1245. ("python-configobj" ,python-configobj)
  1246. ("python-twisted" ,python-twisted)
  1247. ("python-service-identity" ,python-service-identity)
  1248. ("python-urwid" ,python-urwid)
  1249. ("python-urwidtrees" ,python-urwidtrees)
  1250. ("python-gpg" ,python-gpg)
  1251. ("python-notmuch" ,python-notmuch)))
  1252. (home-page "https://github.com/pazz/alot")
  1253. (synopsis "Command-line MUA using Notmuch")
  1254. (description
  1255. "Alot is a terminal-based mail user agent based on the Notmuch mail
  1256. indexer. It is written in Python using the @code{urwid} toolkit and features
  1257. a modular and command prompt driven interface to provide a full mail user
  1258. agent (@dfn{MUA}) experience as an alternative to the Emacs mode shipped with
  1259. Notmuch.")
  1260. (license license:gpl3+)))
  1261. (define-public notifymuch
  1262. (let
  1263. ((commit "9d4aaf54599282ce80643b38195ff501120807f0")
  1264. (revision "1"))
  1265. (package
  1266. (name "notifymuch")
  1267. (version (string-append "0.1-" revision "." (string-take commit 7)))
  1268. (source
  1269. (origin
  1270. (method git-fetch)
  1271. (uri (git-reference
  1272. (url "https://github.com/kspi/notifymuch")
  1273. (commit commit)))
  1274. (sha256
  1275. (base32
  1276. "1lssr7iv43mp5v6nzrfbqlfzx8jcc7m636wlfyhhnd8ydd39n6k4"))
  1277. (file-name (string-append name "-" version "-checkout"))))
  1278. (build-system python-build-system)
  1279. (inputs
  1280. `(("python-notmuch" ,python-notmuch)
  1281. ("python-pygobject" ,python-pygobject)
  1282. ("gobject-introspection" ,gobject-introspection)
  1283. ("libnotify" ,libnotify)
  1284. ("gtk+" ,gtk+)))
  1285. (arguments
  1286. `(#:phases
  1287. (modify-phases %standard-phases
  1288. (add-after 'install 'wrap-binary
  1289. (lambda* (#:key outputs #:allow-other-keys)
  1290. (let* ((out (assoc-ref outputs "out"))
  1291. (bin (string-append out "/bin/notifymuch")))
  1292. (wrap-program bin
  1293. `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
  1294. `("GI_TYPELIB_PATH" ":" prefix
  1295. (,(getenv "GI_TYPELIB_PATH")
  1296. ,(string-append out "/lib/girepository-1.0")))))
  1297. #t)))))
  1298. (home-page "https://github.com/kspi/notifymuch")
  1299. (synopsis "Displays notifications for changes in the notmuch email database")
  1300. (description "notifymuch displays desktop notifications for messages in
  1301. the notmuch database. The notifications are sent using libnotify to a
  1302. notification daemon. The query to find messages to send a notification about
  1303. is configurable, and a notification for the same message will not be send
  1304. within a configurable period (defaults to 48 hours). To use notifymuch, run
  1305. @command{notifymuch} after new mail is indexed, this can be automated by
  1306. invoking @command{notifymuch} from the post-new hook.")
  1307. (license license:gpl3))))
  1308. (define-public notmuch
  1309. (package
  1310. (name "notmuch")
  1311. (version "0.32.2")
  1312. (source (origin
  1313. (method url-fetch)
  1314. (uri (string-append "https://notmuchmail.org/releases/notmuch-"
  1315. version ".tar.xz"))
  1316. (sha256
  1317. (base32
  1318. "1myylb19hj5nb1vriqng252vfjwwkgbi3gxj93pi2q1fzyw7w2lf"))))
  1319. (build-system gnu-build-system)
  1320. (arguments
  1321. `(#:make-flags
  1322. (list "V=1" ; verbose test output
  1323. "NOTMUCH_TEST_TIMEOUT=1h") ; don't fail on slow machines
  1324. #:phases (modify-phases %standard-phases
  1325. (replace 'configure
  1326. (lambda* (#:key outputs #:allow-other-keys)
  1327. (setenv "CC" ,(cc-for-target))
  1328. (setenv "CONFIG_SHELL" (which "sh"))
  1329. (let* ((out (assoc-ref outputs "out")))
  1330. (invoke "./configure"
  1331. (string-append "--prefix=" out)
  1332. "--without-emacs"))))
  1333. (add-before 'check 'disable-failing-tests
  1334. ;; FIXME: Investigate why these tests are failing,
  1335. ;; and try removing this for notmuch versions > 0.31.
  1336. (lambda _
  1337. (substitute* "test/T356-protected-headers.sh"
  1338. (("\\$NOTMUCH_GMIME_X509_CERT_VALIDITY") "0"))))
  1339. (add-before 'check 'prepare-test-environment
  1340. (lambda _
  1341. (setenv "TEST_CC" ,(cc-for-target))
  1342. ;; Patch various inline shell invocations.
  1343. (substitute* (find-files "test" "\\.sh$")
  1344. (("/bin/sh") (which "sh"))))))))
  1345. (native-inputs
  1346. `(("bash-completion" ,bash-completion)
  1347. ("pkg-config" ,pkg-config)
  1348. ("python" ,python)
  1349. ("python-docutils" ,python-docutils)
  1350. ("sphinx" ,python-sphinx)
  1351. ("texinfo" ,texinfo)
  1352. ;; The following are required for tests only.
  1353. ("emacs" ,emacs-no-x) ; -minimal lacks libxml, needed for some tests
  1354. ("which" ,which)
  1355. ("dtach" ,dtach)
  1356. ("gnupg" ,gnupg)
  1357. ("man" ,man-db)
  1358. ("perl" ,perl)))
  1359. (inputs
  1360. `(("glib" ,glib)
  1361. ("gmime" ,gmime)
  1362. ("talloc" ,talloc)
  1363. ("xapian" ,xapian)
  1364. ("zlib" ,zlib)))
  1365. (home-page "https://notmuchmail.org/")
  1366. (synopsis "Thread-based email index, search, and tagging")
  1367. (description
  1368. "Notmuch is a command-line based program for indexing, searching, read-
  1369. ing, and tagging large collections of email messages.")
  1370. (license license:gpl3+)))
  1371. (define-public emacs-notmuch
  1372. (package
  1373. (inherit notmuch)
  1374. (name "emacs-notmuch")
  1375. (build-system emacs-build-system)
  1376. (native-inputs '())
  1377. (inputs
  1378. `(("notmuch" ,notmuch)))
  1379. (arguments
  1380. `(#:exclude (cons* "make-deps.el" "rstdoc.el" %default-exclude)
  1381. #:phases
  1382. (modify-phases %standard-phases
  1383. (add-after 'unpack 'chdir
  1384. (lambda _
  1385. (chdir "emacs")))
  1386. (add-after 'chdir 'patch-paths
  1387. (lambda* (#:key inputs #:allow-other-keys)
  1388. (let ((notmuch (assoc-ref inputs "notmuch")))
  1389. (substitute* "notmuch-lib.el"
  1390. (("\"notmuch\"")
  1391. (string-append "\"" notmuch "/bin/notmuch\"")))))))))
  1392. (synopsis "Run Notmuch within Emacs")
  1393. (description
  1394. "This package provides an Emacs-based interface to the Notmuch mail
  1395. system.")))
  1396. (define-public notmuch-addrlookup-c
  1397. (package
  1398. (name "notmuch-addrlookup-c")
  1399. (version (string-append "9"))
  1400. (source (origin
  1401. (method git-fetch)
  1402. (uri (git-reference
  1403. (url "https://github.com/aperezdc/notmuch-addrlookup-c")
  1404. (commit (string-append "v" version))))
  1405. (file-name (string-append name "-" version "-checkout"))
  1406. (sha256
  1407. (base32
  1408. "1j3zdx161i1x4w0nic14ix5i8hd501rb31daf8api0k8855sx4rc"))))
  1409. (build-system gnu-build-system)
  1410. (arguments
  1411. '(#:tests? #f ; no tests
  1412. #:make-flags (list "CC=gcc")
  1413. #:phases (modify-phases %standard-phases
  1414. (delete 'configure)
  1415. ;; Remove vim code completion config, it's not needed to
  1416. ;; build (or be patched).
  1417. (add-before 'patch-source-shebangs 'delete-ycm-file
  1418. (lambda _ (delete-file ".ycm_extra_conf.py")))
  1419. (replace 'install
  1420. (lambda* (#:key outputs #:allow-other-keys)
  1421. (let ((bin (string-append
  1422. (assoc-ref outputs "out") "/bin")))
  1423. (install-file "notmuch-addrlookup" bin)))))))
  1424. (native-inputs
  1425. `(("pkg-config" ,pkg-config)))
  1426. (inputs
  1427. `(("glib" ,glib)
  1428. ("notmuch" ,notmuch)))
  1429. (home-page "https://github.com/aperezdc/notmuch-addrlookup-c")
  1430. (synopsis "Address lookup tool for Notmuch")
  1431. (description "This is an address lookup tool using a Notmuch database,
  1432. useful for email address completion.")
  1433. (license license:expat)))
  1434. (define-public python-notmuch
  1435. (package
  1436. (name "python-notmuch")
  1437. (version (package-version notmuch))
  1438. ;; Notmuch python bindings are now unavailable on pypi. The
  1439. ;; bindings are distributed via the notmuch release tarball.
  1440. (source (package-source notmuch))
  1441. (build-system python-build-system)
  1442. (inputs `(("notmuch" ,notmuch)))
  1443. (arguments
  1444. `(#:tests? #f ; no "test" target
  1445. #:phases
  1446. (modify-phases %standard-phases
  1447. ;; This python package lives in a subdirectory of the notmuch source
  1448. ;; tree, so chdir into it before building.
  1449. (add-after 'unpack 'enter-python-dir
  1450. (lambda _ (chdir "bindings/python") #t))
  1451. ;; Make sure the correct notmuch shared library gets loaded.
  1452. (add-before 'build 'set-libnotmuch-file-name
  1453. (lambda* (#:key inputs #:allow-other-keys)
  1454. (let ((notmuch (assoc-ref inputs "notmuch")))
  1455. (substitute* "notmuch/globals.py"
  1456. (("libnotmuch\\.so\\.")
  1457. (string-append notmuch "/lib/libnotmuch.so.")))
  1458. #t))))))
  1459. (home-page (package-home-page notmuch))
  1460. (synopsis "Python bindings of the Notmuch mail indexing library")
  1461. (description
  1462. "This package provides Python bindings to use the Notmuch mail indexing
  1463. and search library.")
  1464. (license license:gpl3+)))
  1465. (define-public python2-notmuch
  1466. (package-with-python2 python-notmuch))
  1467. (define-public muchsync
  1468. (package
  1469. (name "muchsync")
  1470. (version "6")
  1471. (source
  1472. (origin
  1473. (method url-fetch)
  1474. (uri (string-append "http://www.muchsync.org/src/"
  1475. "muchsync-" version ".tar.gz"))
  1476. (sha256
  1477. (base32 "1s799kx16nm5ry1fcqcc0grgxrwnnp4cnzd0hzwbkvc5v2sf6g8b"))))
  1478. (build-system gnu-build-system)
  1479. (native-inputs
  1480. `(("pandoc" ,pandoc)
  1481. ("pkg-config" ,pkg-config)))
  1482. (inputs
  1483. `(("libcrypto" ,openssl)
  1484. ("notmuch" ,notmuch)
  1485. ("sqlite" ,sqlite)
  1486. ("xapian" ,xapian)))
  1487. (home-page "http://www.muchsync.org/")
  1488. (synopsis "Synchronize notmuch mail across machines")
  1489. (description
  1490. "Muchsync brings Notmuch to all of your computers by synchronizing your
  1491. mail messages and Notmuch tags across machines. The protocol is heavily
  1492. pipelined to work efficiently over high-latency networks such as mobile
  1493. broadband. Muchsync supports arbitrary pairwise synchronization among
  1494. replicas. A version-vector-based algorithm allows it to exchange only the
  1495. minimum information necessary to bring replicas up to date regardless of which
  1496. pairs have previously synchronized.")
  1497. (license license:gpl2+))) ; with OpenSSL libcrypto exception
  1498. (define-public getmail
  1499. (package
  1500. (name "getmail")
  1501. (version "5.15")
  1502. (source
  1503. (origin
  1504. (method url-fetch)
  1505. (uri (string-append "http://pyropus.ca/software/getmail/old-versions/"
  1506. "getmail-" version ".tar.gz"))
  1507. (sha256
  1508. (base32 "0ahn2jyj4ka996qzs99id59pwxv6sqxp61g7drcf53rzzigq0lyl"))))
  1509. (build-system python-build-system)
  1510. (arguments
  1511. `(#:tests? #f ; no tests
  1512. #:python ,python-2))
  1513. (home-page "http://pyropus.ca/software/getmail/")
  1514. (synopsis "Mail retriever")
  1515. (description
  1516. "A flexible, extensible mail retrieval system with support for
  1517. POP3, IMAP4, SSL variants of both, maildirs, mboxrd files, external MDAs,
  1518. arbitrary message filtering, single-user and domain-mailboxes, and many other
  1519. useful features.")
  1520. ;; License is specified in file '__init__.py'.
  1521. (license license:gpl2)))
  1522. (define-public libetpan
  1523. (package
  1524. (name "libetpan")
  1525. (version "1.9.4")
  1526. (source (origin
  1527. (method git-fetch)
  1528. (uri (git-reference
  1529. (url "https://github.com/dinhviethoa/libetpan")
  1530. (commit version)))
  1531. (file-name (git-file-name name version))
  1532. (sha256
  1533. (base32 "0g7an003simfdn7ihg9yjv7hl2czsmjsndjrp39i7cad8icixscn"))))
  1534. (build-system gnu-build-system)
  1535. (native-inputs `(("autoconf" ,autoconf)
  1536. ("automake" ,automake)
  1537. ("libtool" ,libtool)
  1538. ("pkg-config" ,pkg-config)))
  1539. (propagated-inputs
  1540. ;; 'libetpan-config --libs' returns '-lssl -lcrypto -lsasl2', so these
  1541. ;; libraries need to be propagated.
  1542. `(("cyrus-sasl" ,cyrus-sasl)
  1543. ("openssl" ,openssl)))
  1544. (inputs
  1545. `(("curl" ,curl)
  1546. ("expat" ,expat)
  1547. ("zlib" ,zlib)))
  1548. (arguments
  1549. '(#:configure-flags
  1550. '("--disable-static" "--disable-db")))
  1551. (home-page "https://www.etpan.org/libetpan.html")
  1552. (synopsis "Portable middleware for email access")
  1553. (description
  1554. "The purpose of this mail library is to provide a portable, efficient
  1555. framework for different kinds of mail access: IMAP, SMTP, POP and NNTP. It
  1556. provides an API for C language. It's the low-level API used by MailCore and
  1557. MailCore 2.")
  1558. (license license:bsd-3)))
  1559. (define-public compface
  1560. (package
  1561. (name "compface")
  1562. (version "1.5.2")
  1563. (source (origin
  1564. (method url-fetch)
  1565. (uri (string-append "https://ftp.heanet.ie/mirrors/"
  1566. "ftp.xemacs.org/aux/"
  1567. "compface-" version ".tar.gz"))
  1568. (sha256
  1569. (base32
  1570. "09b89wg63hg502hsz592cd2h87wdprb1dq1k1y07n89hym2q56d6"))))
  1571. (build-system gnu-build-system)
  1572. (arguments
  1573. `(#:tests? #f))
  1574. (synopsis "Portrait image compressor")
  1575. (description "This package takes your 48x48x1 portrait image and
  1576. compresses it.")
  1577. (home-page "https://legacy.cs.indiana.edu/ftp/faces/")
  1578. (license (license:x11-style "file://README"))))
  1579. (define-public claws-mail
  1580. (package
  1581. (name "claws-mail")
  1582. (version "4.0.0")
  1583. (source
  1584. (origin
  1585. (method url-fetch)
  1586. (uri
  1587. (string-append "https://www.claws-mail.org/releases/claws-mail-"
  1588. version ".tar.xz"))
  1589. (sha256
  1590. (base32 "0xg41rxxq2q5vhjzbh8p12s248kcljk6g7y0m6raq7nrllkbvwja"))))
  1591. (build-system glib-or-gtk-build-system)
  1592. (arguments
  1593. `(#:configure-flags
  1594. (list
  1595. "--disable-static"
  1596. "--enable-demo-plugin")
  1597. #:make-flags
  1598. ;; Disable updating icon cache since it's done by the profile hook.
  1599. ;; Conflict with other packages in the profile would be inevitable
  1600. ;; otherwise.
  1601. (list
  1602. "gtk_update_icon_cache=true")
  1603. #:phases
  1604. (modify-phases %standard-phases
  1605. (add-after 'unpack 'patch-source
  1606. (lambda* (#:key inputs #:allow-other-keys)
  1607. ;; Use absolute paths to referenced programs.
  1608. (let* ((mailutils (assoc-ref inputs "mailutils"))
  1609. (inc (string-append mailutils "/bin/mu-mh/inc"))
  1610. (send-mail (assoc-ref inputs "sendmail"))
  1611. (sendmail (string-append send-mail "/sbin/sendmail")))
  1612. (substitute* "src/common/defs.h"
  1613. (("/usr/bin/mh/inc") inc)
  1614. (("/usr/sbin/sendmail") sendmail)))))
  1615. (add-before 'build 'patch-mime
  1616. (lambda* (#:key inputs #:allow-other-keys)
  1617. (substitute* "src/procmime.c"
  1618. (("/usr/share/mime/globs")
  1619. (search-input-directory inputs
  1620. "/share/mime/globs"))))))))
  1621. (native-inputs
  1622. `(("bison" ,bison)
  1623. ;;("docbook-utils" ,docbook-utils)
  1624. ("flex" ,flex)
  1625. ("gettext-minimal" ,gettext-minimal)
  1626. ("gobject-introspection" ,gobject-introspection)
  1627. ("intltool" ,intltool)
  1628. ("pkg-config" ,pkg-config)))
  1629. (inputs
  1630. `(("bogofilter" ,bogofilter)
  1631. ("cairo" ,cairo)
  1632. ("compface" ,compface)
  1633. ("curl" ,curl)
  1634. ("dbus" ,dbus)
  1635. ("dbus-glib" ,dbus-glib)
  1636. ("enchant" ,enchant)
  1637. ("expat" ,expat)
  1638. ("fontconfig" ,fontconfig)
  1639. ("gdk-pixbuf+svg" ,gdk-pixbuf+svg)
  1640. ("ghostscript" ,ghostscript)
  1641. ("glib" ,glib)
  1642. ("gnupg" ,gnupg)
  1643. ("gnutls" ,gnutls)
  1644. ("gpgme" ,gpgme)
  1645. ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
  1646. ("gtk+" ,gtk+)
  1647. ("gumbo-parser" ,gumbo-parser)
  1648. ;;("j-pilot" ,j-pilot)
  1649. ("libarchive" ,libarchive)
  1650. ("libcanberra" ,libcanberra)
  1651. ("libetpan" ,libetpan)
  1652. ("libgdata" ,libgdata)
  1653. ("libical" ,libical)
  1654. ("libindicator" ,libindicator)
  1655. ("libnotify" ,libnotify)
  1656. ("librsvg" ,librsvg)
  1657. ("libsm" ,libsm)
  1658. ("libsoup" ,libsoup)
  1659. ("libxml2" ,libxml2)
  1660. ("mailutils" ,mailutils)
  1661. ("nettle" ,nettle)
  1662. ("network-manager" ,network-manager)
  1663. ("openldap" ,openldap)
  1664. ("perl" ,perl)
  1665. ("poppler" ,poppler)
  1666. ("python" ,python)
  1667. ("python-pygobject" ,python-pygobject)
  1668. ("sendmail" ,sendmail)
  1669. ("shared-mime-info" ,shared-mime-info)
  1670. ("startup-notification" ,startup-notification)
  1671. ;;("webkitgtk" ,webkitgtk)
  1672. ("ytnef" ,ytnef)))
  1673. (propagated-inputs
  1674. `(("dconf" ,dconf)))
  1675. (synopsis "GTK-based Email client")
  1676. (description "Claws-Mail is an email client (and news reader) based on GTK+.
  1677. The appearance and interface are designed to be familiar to new users coming
  1678. from other popular email clients, as well as experienced users. Almost all
  1679. commands are accessible with the keyboard. Plus, Claws-Mail is extensible via
  1680. addons which can add many functionalities to the base client.")
  1681. (home-page "https://www.claws-mail.org/")
  1682. (license license:gpl3+))) ; most files are actually public domain or x11
  1683. (define-public msmtp
  1684. (package
  1685. (name "msmtp")
  1686. (version "1.8.15")
  1687. (source
  1688. (origin
  1689. (method url-fetch)
  1690. (uri (string-append "https://marlam.de/msmtp/releases/"
  1691. "/msmtp-" version ".tar.xz"))
  1692. (sha256
  1693. (base32 "1klrj2a77671xb6xa0a0iyszhjb7swxhmzpzd4qdybmzkrixqr92"))))
  1694. (build-system gnu-build-system)
  1695. (inputs
  1696. `(("libsecret" ,libsecret)
  1697. ("gnutls" ,gnutls)
  1698. ("zlib" ,zlib)
  1699. ("gsasl" ,gsasl)))
  1700. (native-inputs
  1701. `(("pkg-config" ,pkg-config)))
  1702. (home-page "https://marlam.de/msmtp/")
  1703. (arguments
  1704. `(#:configure-flags (list "--with-libgsasl"
  1705. "--with-libidn"
  1706. "--with-tls=gnutls")
  1707. #:phases
  1708. (modify-phases %standard-phases
  1709. (add-after 'install 'install-additional-files
  1710. (lambda* (#:key outputs #:allow-other-keys)
  1711. (let* ((out (assoc-ref outputs "out"))
  1712. (bin (string-append out "/bin"))
  1713. (doc (string-append out "/share/doc/msmtp"))
  1714. (msmtpq "scripts/msmtpq")
  1715. (vimfiles (string-append out "/share/vim/vimfiles/plugin")))
  1716. (install-file (string-append msmtpq "/msmtpq") bin)
  1717. (install-file (string-append msmtpq "/msmtp-queue") bin)
  1718. (install-file (string-append msmtpq "/README.msmtpq") doc)
  1719. (install-file "scripts/vim/msmtp.vim" vimfiles)
  1720. ;; Don't rely on netcat being in the PATH to test for a
  1721. ;; connection, instead look up and ping debian.org.
  1722. (substitute* (string-append bin "/msmtpq")
  1723. (("EMAIL_CONN_TEST=n") "EMAIL_CONN_TEST=p"))
  1724. #t))))))
  1725. (synopsis
  1726. "Simple and easy to use SMTP client with decent sendmail compatibility")
  1727. (description
  1728. "msmtp is an SMTP client. In the default mode, it transmits a mail to
  1729. an SMTP server (for example at a free mail provider) which takes care of further
  1730. delivery.")
  1731. (license license:gpl3+)))
  1732. (define-public exim
  1733. (package
  1734. (name "exim")
  1735. (version "4.94.2")
  1736. (source
  1737. (origin
  1738. (method url-fetch)
  1739. (uri (let ((file-name (string-append "exim-" version ".tar.xz")))
  1740. (list (string-append "https://ftp.exim.org/pub/exim/exim4/"
  1741. file-name)
  1742. ;; ‘Fix’ releases (exim-x.y.z.f) are kept separately.
  1743. (string-append "https://ftp.exim.org/pub/exim/exim4/fixes/"
  1744. file-name)
  1745. ;; After a new non-fix release, the old one is moved here.
  1746. (string-append "https://ftp.exim.org/pub/exim/exim4/old/"
  1747. file-name))))
  1748. (sha256
  1749. (base32 "0x4j698gsawm8a3bz531pf1k6izyxfvry4hj5wb0aqphi7y62605"))))
  1750. (build-system gnu-build-system)
  1751. (inputs
  1752. `(("bdb" ,bdb-5.3) ; ‘#error Version 6 and later BDB API is not supported’
  1753. ("gnutls" ,gnutls/dane)
  1754. ("gzip" ,gzip)
  1755. ("bzip2" ,bzip2)
  1756. ("xz" ,xz)
  1757. ("perl" ,perl)
  1758. ("libnsl" ,libnsl)
  1759. ("libxt" ,libxt)
  1760. ("libxaw" ,libxaw)))
  1761. (native-inputs
  1762. `(("pcre" ,pcre "bin")
  1763. ("perl" ,perl)
  1764. ("pkg-config" ,pkg-config)))
  1765. (arguments
  1766. '(#:phases
  1767. (modify-phases %standard-phases
  1768. (replace 'configure
  1769. ;; We'd use #:make-flags but the top-level Makefile calls others
  1770. ;; recursively, so just set all variables this way.
  1771. (lambda* (#:key outputs inputs #:allow-other-keys)
  1772. (substitute* '("Makefile" "OS/Makefile-Default")
  1773. (("(RM_COMMAND=).*" all var)
  1774. (string-append var "rm\n")))
  1775. (copy-file "src/EDITME" "Local/Makefile")
  1776. (copy-file "exim_monitor/EDITME" "Local/eximon.conf")
  1777. (let ((out (assoc-ref outputs "out"))
  1778. (gzip (assoc-ref inputs "gzip"))
  1779. (bzip2 (assoc-ref inputs "bzip2"))
  1780. (xz (assoc-ref inputs "xz")))
  1781. (substitute* '("Local/Makefile")
  1782. (("(BIN_DIRECTORY=).*" all var)
  1783. (string-append var out "/bin\n"))
  1784. (("(CONFIGURE_FILE=).*" all var)
  1785. (string-append var out "/etc/exim.conf\n"))
  1786. (("(EXIM_USER=).*" all var)
  1787. (string-append var "nobody\n"))
  1788. (("(FIXED_NEVER_USERS=).*" all var)
  1789. (string-append var "\n")) ; XXX no root in build environment
  1790. (("(COMPRESS_COMMAND=).*" all var)
  1791. (string-append var gzip "/bin/gzip\n"))
  1792. (("(ZCAT_COMMAND=).*" all var)
  1793. (string-append var gzip "/bin/zcat\n"))
  1794. (("# (USE_GNUTLS(|_PC)=.*)" all line)
  1795. (string-append line "\n"))
  1796. (("# (AUTH_CRAM_MD5=yes)" all line) line)
  1797. (("# (AUTH_DOVECOT=yes)" all line) line)
  1798. (("# (AUTH_EXTERNAL=yes)" all line) line)
  1799. (("# (AUTH_PLAINTEXT=yes)" all line) line)
  1800. (("# (AUTH_SPA=yes)" all line) line)
  1801. (("# (AUTH_TLS=yes)" all line) line))
  1802. ;; This file has hard-coded relative file names for tools despite
  1803. ;; the zcat configuration above.
  1804. (substitute* '("src/exigrep.src")
  1805. (("'zcat'") (string-append "'" gzip "/bin/zcat'"))
  1806. (("'bzcat'") (string-append "'" bzip2 "/bin/bzcat'"))
  1807. (("'xzcat'") (string-append "'" xz "/bin/xzcat'"))
  1808. (("'lzma'") (string-append "'" xz "/bin/lzma'"))))
  1809. #t))
  1810. (add-before 'build 'fix-sh-paths
  1811. (lambda* (#:key inputs #:allow-other-keys)
  1812. (substitute* '("scripts/lookups-Makefile" "scripts/reversion")
  1813. (("SHELL=/bin/sh") "SHELL=sh"))
  1814. (substitute* '("scripts/Configure-config.h")
  1815. (("\\| /bin/sh") "| sh"))
  1816. (let ((bash (assoc-ref inputs "bash")))
  1817. (substitute* '("scripts/Configure-eximon")
  1818. (("#!/bin/sh") (string-append "#!" bash "/bin/sh"))))
  1819. #t))
  1820. (add-before 'build 'build-reproducibly
  1821. (lambda _
  1822. ;; The ‘compilation number’ is incremented for every build from the
  1823. ;; same source tree. It appears to vary over different (parallel?)
  1824. ;; builds. Make it a ‘constant number’ instead.
  1825. (substitute* "src/version.c"
  1826. (("#include \"cnumber.h\"") "1")))))
  1827. #:make-flags
  1828. (list "CC=gcc"
  1829. "INSTALL_ARG=-no_chown")
  1830. ;; No 'check' target. There is a test suite in test/, which assumes that
  1831. ;; certain build options were (not) used and that it can freely ‘sudo’.
  1832. #:tests? #f))
  1833. (home-page "https://www.exim.org/")
  1834. (synopsis
  1835. "Message Transfer Agent (MTA) developed at the University of Cambridge")
  1836. (description
  1837. "Exim is a message transfer agent (MTA) developed at the University of
  1838. Cambridge for use on Unix systems connected to the Internet. In style it is
  1839. similar to Smail 3, but its facilities are more general. There is a great
  1840. deal of flexibility in the way mail can be routed, and there are extensive
  1841. facilities for checking incoming mail.")
  1842. (license license:gpl2+)))
  1843. (define-public dovecot
  1844. (package
  1845. (name "dovecot")
  1846. ;; Also update dovecot-pigeonhole when updating to a new minor version.
  1847. (version "2.3.16")
  1848. (source
  1849. (origin
  1850. (method url-fetch)
  1851. (uri (string-append "https://www.dovecot.org/releases/"
  1852. (version-major+minor version) "/"
  1853. "dovecot-" version ".tar.gz"))
  1854. (sha256
  1855. (base32 "04ngqv5mml5z0i4p7fkchp4xw2awy7x7mq2mim9frnav0m9iv9q3"))))
  1856. (build-system gnu-build-system)
  1857. (native-inputs
  1858. `(("pkg-config" ,pkg-config)))
  1859. (inputs
  1860. `(("bzip2" ,bzip2)
  1861. ("clucene" ,clucene)
  1862. ("icu4c" ,icu4c)
  1863. ("libsodium" ,libsodium) ; extra password algorithms
  1864. ("libstemmer" ,libstemmer)
  1865. ("libunwind" ,libunwind)
  1866. ("linux-pam" ,linux-pam)
  1867. ("lz4" ,lz4)
  1868. ("openssl" ,openssl)
  1869. ("sqlite" ,sqlite)
  1870. ("zlib" ,zlib)
  1871. ("zstd" ,zstd "lib")))
  1872. (arguments
  1873. `(#:configure-flags '("--sysconfdir=/etc"
  1874. "--localstatedir=/var"
  1875. "--with-sqlite" ; not auto-detected
  1876. "--with-lucene") ; not auto-detected
  1877. #:phases
  1878. (modify-phases %standard-phases
  1879. (add-after 'unpack 'patch-file-names
  1880. (lambda _
  1881. (substitute* "src/lib-program-client/test-program-client-local.c"
  1882. (("(/bin/| )cat") (which "cat"))
  1883. (("/bin/echo") (which "echo"))
  1884. (("/bin/false") (which "false"))
  1885. (("/bin/sh") (which "bash"))
  1886. (("head") (which "head"))
  1887. (("sleep") (which "sleep")))
  1888. (substitute* (list "src/lib-smtp/test-bin/sendmail-exit-1.sh"
  1889. "src/lib-smtp/test-bin/sendmail-success.sh")
  1890. (("cat") (which "cat")))
  1891. #t))
  1892. (replace 'install
  1893. (lambda* (#:key make-flags #:allow-other-keys)
  1894. ;; Simple hack to avoid installing a trivial README in /etc.
  1895. (apply invoke "make" "install" "sysconfdir=/tmp/bogus"
  1896. make-flags))))))
  1897. (home-page "https://www.dovecot.org")
  1898. (synopsis "Secure POP3/IMAP server")
  1899. (description
  1900. "Dovecot is a mail server whose major goals are security and reliability.
  1901. It supports mbox/Maildir and its own dbox/mdbox formats.")
  1902. ;; Most source files are covered by either lgpl2.1 or expat. The SHA code
  1903. ;; is covered by a variant of BSD-3, and UnicodeData.txt is covered by the
  1904. ;; Unicode, Inc. License Agreement for Data Files and Software.
  1905. (license (list license:lgpl2.1 license:expat
  1906. (license:non-copyleft "file://COPYING")))))
  1907. (define-public dovecot-pigeonhole
  1908. (let ((dovecot-version (version-major+minor (package-version dovecot))))
  1909. (package
  1910. (name "dovecot-pigeonhole")
  1911. (version "0.5.16")
  1912. (source
  1913. (origin
  1914. (method url-fetch)
  1915. (uri (string-append
  1916. "https://pigeonhole.dovecot.org/releases/" dovecot-version "/"
  1917. "dovecot-" dovecot-version "-pigeonhole-" version ".tar.gz"))
  1918. (sha256
  1919. (base32 "0f79qsiqnhaxn7mrrfcrnsjyv6357kzb7wa0chhfd69vwa06g8sw"))
  1920. (modules '((guix build utils)))
  1921. (snippet
  1922. '(begin
  1923. ;; RFC licencing is ad-hoc and rarely free. Remove them all.
  1924. (delete-file-recursively "doc/rfc")
  1925. (substitute* "configure"
  1926. (("doc/rfc/Makefile") ""))
  1927. (substitute* "doc/Makefile.in"
  1928. (("rfc ") ""))
  1929. #t))))
  1930. (build-system gnu-build-system)
  1931. (arguments
  1932. `(#:configure-flags
  1933. (list "--disable-static"
  1934. "--with-dovecot-install-dirs=no"
  1935. (string-append "--with-dovecot="
  1936. (assoc-ref %build-inputs "dovecot")
  1937. "/lib/dovecot")
  1938. (string-append "--docdir="
  1939. (assoc-ref %outputs "out")
  1940. "/share/doc/" ,name "-" ,version)
  1941. (string-append "--with-moduledir="
  1942. (assoc-ref %outputs "out")
  1943. "/lib/dovecot"))
  1944. #:phases
  1945. (modify-phases %standard-phases
  1946. (add-after 'unpack 'patch-file-names
  1947. (lambda* (#:key outputs #:allow-other-keys)
  1948. (let* ((out (assoc-ref outputs "out"))
  1949. (libexec (string-append out "/libexec/dovecot")))
  1950. (substitute* "src/managesieve/managesieve-settings.c"
  1951. (("\\.executable = \"managesieve\"")
  1952. (string-append ".executable = \"" libexec
  1953. "/managesieve\"")))
  1954. (substitute* "src/managesieve-login/managesieve-login-settings.c"
  1955. (("\\.executable = \"managesieve-login\"")
  1956. (string-append ".executable = \"" libexec
  1957. "/managesieve-login\"")))
  1958. #t))))))
  1959. (native-inputs
  1960. `(("pkg-config" ,pkg-config)))
  1961. (inputs
  1962. `(("dovecot" ,dovecot)))
  1963. (home-page "https://pigeonhole.dovecot.org")
  1964. (synopsis "Dovecot Sieve mail filtering plug-in and ManageSieve service")
  1965. (description
  1966. "Pigeonhole adds support for the Sieve language (RFC 5228) and the
  1967. ManageSieve protocol (RFC 5804) to the Dovecot e-mail server.
  1968. @dfn{Sieve} is a language for filtering incoming mail. Messages can be
  1969. forwarded or sorted into separate folders. Unwanted messages can be rejected
  1970. or discarded, and, when the user is not available, the Sieve interpreter can
  1971. send an automated reply.
  1972. Sieve is meant to be simple, extensible, and system-independent. The
  1973. intention is to make it impossible to write anything more complex (and
  1974. dangerous) than simple mail filters. Unlike most other mail filtering script
  1975. languages, Sieve does not allow users to execute arbitrary programmes.
  1976. Through the @dfn{ManageSieve} protocol, users can remotely manage their Sieve
  1977. scripts without needing file system access. The server accepts only valid
  1978. scripts to prevent embarrassing errors later on.")
  1979. (license license:lgpl2.1))))
  1980. (define-public dovecot-trees
  1981. (package
  1982. (name "dovecot-trees")
  1983. (version "2.1.0")
  1984. (source
  1985. (origin
  1986. (method url-fetch)
  1987. (uri (string-append "https://0xacab.org/riseuplabs/trees/repository/"
  1988. "archive.tar.gz?ref=v" version))
  1989. (file-name (string-append name "-" version ".tar.gz"))
  1990. (sha256
  1991. (base32
  1992. "0rkk10b1bsjz979sc864vpgcdchy7yxwmyv4ik50lar1h6awdnrf"))
  1993. (patches
  1994. (search-patches "dovecot-trees-support-dovecot-2.3.patch"))))
  1995. (build-system gnu-build-system)
  1996. (native-inputs
  1997. `(("automake" ,automake)
  1998. ("autoconf" ,autoconf)
  1999. ("libtool" ,libtool)
  2000. ("dovecot" ,dovecot)
  2001. ("pkg-config" ,pkg-config)))
  2002. (inputs
  2003. `(("libsodium" ,libsodium)))
  2004. (arguments
  2005. `(#:tests? #f ;No tests exist.
  2006. #:configure-flags (list (string-append "--with-dovecot="
  2007. (assoc-ref %build-inputs "dovecot")
  2008. "/lib/dovecot"))))
  2009. (home-page "https://0xacab.org/riseuplabs/trees")
  2010. (synopsis "NaCL-based Dovecot email storage encryption plugin")
  2011. (description
  2012. "Technology for Resting Email Encrypted Storage (TREES) is a NaCL-based
  2013. Dovecot encryption plugin. This plugin adds individually encrypted mail
  2014. storage to the Dovecot IMAP server. It is inspired by Posteo's scrambler
  2015. which uses OpenSSL and RSA key pairs. TREES works in a similar way, but uses
  2016. the Sodium crypto library (based on NaCL).
  2017. How it works:
  2018. @enumerate
  2019. @item On IMAP log in, the user's cleartext password is passed to the plugin.
  2020. @item The plugin creates an argon2 digest from the password.
  2021. @item This password digest is used as a symmetric secret to decrypt a libsodium secretbox.
  2022. @item Inside the secretbox is stored a Curve25519 private key.
  2023. @item The Curve25519 private key is used to decrypt each individual message,
  2024. using libsodium sealed boxes.
  2025. @item New mail is encrypted as it arrives using the Curve25519 public key.
  2026. @end enumerate\n")
  2027. (license license:agpl3)))
  2028. (define-public dovecot-libsodium-plugin
  2029. (let ((commit "044de73c01c35385df0105f6b387bec5d5317ce7")
  2030. (revision "1"))
  2031. (package
  2032. (name "dovecot-libsodium-plugin")
  2033. (version (string-append "0.0.0-" revision "." (string-take commit 7)))
  2034. (source
  2035. (origin
  2036. (method git-fetch)
  2037. (uri (git-reference
  2038. (url "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
  2039. (commit commit)))
  2040. (file-name (string-append name "-" version "-checkout"))
  2041. (sha256
  2042. (base32
  2043. "13h07l7xy713zchnj2p9fhvq7fdl4zy1ai94li3ygkqjjj8hrgas"))))
  2044. (build-system gnu-build-system)
  2045. (native-inputs
  2046. `(("automake" ,automake)
  2047. ("autoconf" ,autoconf)
  2048. ("libtool" ,libtool)
  2049. ("dovecot" ,dovecot)
  2050. ("pkg-config" ,pkg-config)))
  2051. (inputs
  2052. `(("libsodium" ,libsodium)))
  2053. (arguments
  2054. `(#:tests? #f ;No tests exist.
  2055. #:configure-flags (list (string-append "--with-dovecot="
  2056. (assoc-ref %build-inputs "dovecot")
  2057. "/lib/dovecot"))))
  2058. (home-page "https://github.com/LuckyFellow/dovecot-libsodium-plugin")
  2059. (synopsis "Libsodium password hashing schemes plugin for Dovecot")
  2060. (description
  2061. "@code{dovecot-libsodium-plugin} provides a libsodium password
  2062. hashing scheme (such as scrypt) plug-in for @code{Dovecot}.")
  2063. (license license:gpl3+))))
  2064. (define-public isync
  2065. (package
  2066. (name "isync")
  2067. (version "1.4.3")
  2068. (source
  2069. (origin
  2070. (method url-fetch)
  2071. (uri (string-append "mirror://sourceforge/isync/isync/"
  2072. version "/isync-" version ".tar.gz"))
  2073. (sha256 (base32
  2074. "024p3glj4p7fhrssw5sr55arls9zna1igxxrspxlfd6sbds21ixl"))))
  2075. (build-system gnu-build-system)
  2076. (native-inputs
  2077. `(("perl" ,perl)))
  2078. (inputs
  2079. `(("bdb" ,bdb)
  2080. ("cyrus-sasl" ,cyrus-sasl)
  2081. ("openssl" ,openssl)
  2082. ("zlib" ,zlib)))
  2083. (home-page "https://isync.sourceforge.io/")
  2084. (synopsis "Mailbox synchronization program")
  2085. (description
  2086. "isync/mbsync is a command-line tool for two-way synchronization of
  2087. mailboxes. Currently Maildir and IMAP are supported types.")
  2088. (license license:gpl2+)))
  2089. (define-public perl-email-abstract
  2090. (package
  2091. (name "perl-email-abstract")
  2092. (version "3.009")
  2093. (source
  2094. (origin
  2095. (method url-fetch)
  2096. (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
  2097. "Email-Abstract-" version ".tar.gz"))
  2098. (sha256
  2099. (base32 "1z01wbflg49nbgzl81x260cp8x6qr7xdpz3dkrg82m1fwa9742q4"))))
  2100. (build-system perl-build-system)
  2101. (propagated-inputs
  2102. `(("perl-email-simple" ,perl-email-simple)
  2103. ("perl-module-pluggable" ,perl-module-pluggable)
  2104. ("perl-mro-compat" ,perl-mro-compat)))
  2105. (home-page "https://metacpan.org/release/Email-Abstract")
  2106. (synopsis "Interface to mail representations")
  2107. (description "Email::Abstract provides module writers with the ability to
  2108. write simple, representation-independent mail handling code.")
  2109. (license license:perl-license)))
  2110. (define-public perl-email-address
  2111. (package
  2112. (name "perl-email-address")
  2113. (version "1.912")
  2114. (source
  2115. (origin
  2116. (method url-fetch)
  2117. (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
  2118. "Email-Address-" version ".tar.gz"))
  2119. (sha256
  2120. (base32 "1vzr0vx4zsw4zbc9xdffc31wnkc1raqmyfiyws06fbyck197i8qg"))))
  2121. (build-system perl-build-system)
  2122. (home-page "https://metacpan.org/release/Email-Address")
  2123. (synopsis "Email address parsing and creation")
  2124. (description "Email::Address implements a regex-based RFC 2822 parser that
  2125. locates email addresses in strings and returns a list of Email::Address
  2126. objects found. Alternatively you may construct objects manually.")
  2127. (license license:perl-license)))
  2128. (define-public perl-email-address-xs
  2129. (package
  2130. (name "perl-email-address-xs")
  2131. (version "1.04")
  2132. (source
  2133. (origin
  2134. (method url-fetch)
  2135. (uri (string-append "mirror://cpan/authors/id/P/PA/PALI/"
  2136. "Email-Address-XS-" version ".tar.gz"))
  2137. (sha256
  2138. (base32
  2139. "0gjrrl81z3sfwavgx5kwjd87gj44mlnbbqsm3dgdv1xllw26spwr"))))
  2140. (build-system perl-build-system)
  2141. (home-page "https://metacpan.org/release/Email-Address-XS")
  2142. (synopsis "Parse and format RFC 5322 email addresses and groups")
  2143. (description
  2144. "Email::Address::XS implements RFC 5322 parser and formatter of email
  2145. addresses and groups. Unlike Email::Address, this module does not use regular
  2146. expressions for parsing but instead is implemented in XS and uses shared code
  2147. from Dovecot IMAP server.")
  2148. (license license:perl-license)))
  2149. (define-public perl-email-date-format
  2150. (package
  2151. (name "perl-email-date-format")
  2152. (version "1.005")
  2153. (source
  2154. (origin
  2155. (method url-fetch)
  2156. (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
  2157. "Email-Date-Format-" version ".tar.gz"))
  2158. (sha256
  2159. (base32
  2160. "012ivfwpnbl3wr50f9c6f4azhdlxnm31pdn72528g79v61z6372p"))))
  2161. (build-system perl-build-system)
  2162. (home-page "https://metacpan.org/release/Email-Date-Format")
  2163. (synopsis "Produce RFC 2822 date strings")
  2164. (description "Email::Date::Format provides a means for generating an RFC
  2165. 2822 compliant datetime string.")
  2166. (license license:perl-license)))
  2167. (define-public perl-email-messageid
  2168. (package
  2169. (name "perl-email-messageid")
  2170. (version "1.406")
  2171. (source
  2172. (origin
  2173. (method url-fetch)
  2174. (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
  2175. "Email-MessageID-" version ".tar.gz"))
  2176. (sha256
  2177. (base32
  2178. "1f22sdnfq169qw1l0lg7y74pmiam7j9v95bggjnf3q4mygdmshpc"))))
  2179. (build-system perl-build-system)
  2180. (home-page "https://metacpan.org/release/Email-MessageID")
  2181. (synopsis "Generate world unique message-ids")
  2182. (description "Email::MessageID generates recommended message-ids to
  2183. identify a message uniquely.")
  2184. (license license:perl-license)))
  2185. (define-public perl-email-mime
  2186. (package
  2187. (name "perl-email-mime")
  2188. (version "1.946")
  2189. (source
  2190. (origin
  2191. (method url-fetch)
  2192. (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
  2193. "Email-MIME-" version ".tar.gz"))
  2194. (sha256
  2195. (base32
  2196. "0z1k3i0lzp2k421gc8f3wq0jbqflkbw2xqd2k7n7pmv56417kvk8"))))
  2197. (build-system perl-build-system)
  2198. (propagated-inputs
  2199. `(("perl-email-address" ,perl-email-address)
  2200. ("perl-email-messageid" ,perl-email-messageid)
  2201. ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
  2202. ("perl-email-mime-encodings" ,perl-email-mime-encodings)
  2203. ("perl-email-simple" ,perl-email-simple)
  2204. ("perl-mime-types" ,perl-mime-types)
  2205. ("perl-module-runtime" ,perl-module-runtime)))
  2206. (home-page "https://metacpan.org/release/Email-MIME")
  2207. (synopsis "MIME message handling")
  2208. (description "Email::MIME is an extension of the Email::Simple module, to
  2209. handle MIME encoded messages. It takes a message as a string, splits it up
  2210. into its constituent parts, and allows you access to various parts of the
  2211. message. Headers are decoded from MIME encoding.")
  2212. (license license:perl-license)))
  2213. (define-public perl-email-mime-contenttype
  2214. (package
  2215. (name "perl-email-mime-contenttype")
  2216. (version "1.022")
  2217. (source
  2218. (origin
  2219. (method url-fetch)
  2220. (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
  2221. "Email-MIME-ContentType-" version ".tar.gz"))
  2222. (sha256
  2223. (base32
  2224. "042kxhs3bp1ab9z0mbr1wy21ld4lxd6v2a2mmrashqnsn2075fws"))))
  2225. (build-system perl-build-system)
  2226. (native-inputs
  2227. `(("perl-capture-tiny" ,perl-capture-tiny)))
  2228. (home-page "https://metacpan.org/release/Email-MIME-ContentType")
  2229. (synopsis "Parse MIME Content-Type headers")
  2230. (description "Email::MIME::ContentType parses a MIME Content-Type
  2231. header.")
  2232. (license license:perl-license)))
  2233. (define-public perl-email-mime-encodings
  2234. (package
  2235. (name "perl-email-mime-encodings")
  2236. (version "1.315")
  2237. (source
  2238. (origin
  2239. (method url-fetch)
  2240. (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
  2241. "Email-MIME-Encodings-" version ".tar.gz"))
  2242. (sha256
  2243. (base32
  2244. "0p5b8g9gh35m8fqrpx60g4bp98rvwd02n5b0vm9wh7mk0xah8wac"))))
  2245. (build-system perl-build-system)
  2246. (native-inputs
  2247. `(("perl-capture-tiny" ,perl-capture-tiny)))
  2248. (home-page "https://metacpan.org/release/Email-MIME-Encodings")
  2249. (synopsis "Unified interface to MIME encoding and decoding")
  2250. (description "This module wraps MIME::Base64 and MIME::QuotedPrint.")
  2251. (license license:perl-license)))
  2252. (define-public perl-email-sender
  2253. (package
  2254. (name "perl-email-sender")
  2255. (version "1.300035")
  2256. (source
  2257. (origin
  2258. (method url-fetch)
  2259. (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
  2260. "Email-Sender-" version ".tar.gz"))
  2261. (sha256
  2262. (base32 "0yfssp3rqdx1dmgvnygarzgkpkhqm28r5sd0gh87ksk8yxndhjql"))))
  2263. (build-system perl-build-system)
  2264. (native-inputs
  2265. `(("perl-capture-tiny" ,perl-capture-tiny)))
  2266. (propagated-inputs
  2267. `(("perl-email-abstract" ,perl-email-abstract)
  2268. ("perl-email-address" ,perl-email-address)
  2269. ("perl-email-simple" ,perl-email-simple)
  2270. ("perl-list-moreutils" ,perl-list-moreutils)
  2271. ("perl-module-runtime" ,perl-module-runtime)
  2272. ("perl-moo" ,perl-moo)
  2273. ("perl-moox-types-mooselike" ,perl-moox-types-mooselike)
  2274. ("perl-sub-exporter" ,perl-sub-exporter)
  2275. ("perl-throwable" ,perl-throwable)
  2276. ("perl-try-tiny" ,perl-try-tiny)))
  2277. (home-page "https://metacpan.org/release/Email-Sender")
  2278. (synopsis "Perl library for sending email")
  2279. (description "Email::Sender replaces the old and sometimes problematic
  2280. Email::Send library.")
  2281. (license license:perl-license)))
  2282. (define-public perl-email-simple
  2283. (package
  2284. (name "perl-email-simple")
  2285. (version "2.216")
  2286. (source
  2287. (origin
  2288. (method url-fetch)
  2289. (uri (string-append "mirror://cpan/authors/id/R/RJ/RJBS/"
  2290. "Email-Simple-" version ".tar.gz"))
  2291. (sha256
  2292. (base32
  2293. "1m4brbjvalyp5kjqslqv4155dzwg977shxin208i7lc8236n6pyq"))))
  2294. (build-system perl-build-system)
  2295. (propagated-inputs
  2296. `(("perl-email-date-format" ,perl-email-date-format)))
  2297. (home-page "https://metacpan.org/release/Email-Simple")
  2298. (synopsis "Parsing of RFC 2822 messages")
  2299. (description "Email::Simple provides simple parsing of RFC 2822 message
  2300. format and headers.")
  2301. (license license:perl-license)))
  2302. (define-public libesmtp
  2303. (package
  2304. (name "libesmtp")
  2305. (version "1.1.0")
  2306. (source
  2307. (origin
  2308. (method git-fetch)
  2309. (uri (git-reference
  2310. (url "https://github.com/libesmtp/libESMTP")
  2311. (commit (string-append "v" version))))
  2312. (file-name (git-file-name name version))
  2313. (sha256
  2314. (base32 "1bhh8hlsl9597x0bnfl563k2c09b61qnkb9mfyqcmzlq63m1zw5y"))))
  2315. (build-system meson-build-system)
  2316. (propagated-inputs
  2317. `(("openssl" ,openssl)))
  2318. (home-page "http://www.stafford.uklinux.net/libesmtp/")
  2319. (synopsis "Library for sending mail via remote hosts using SMTP")
  2320. (description
  2321. "libESMTP is an @acronym{SMTP, Simple Mail Transfer Protocol} client that
  2322. manages posting (or submission of) electronic mail via a preconfigured
  2323. @acronym{MTA, Mail Transport Agent}.
  2324. It may be used as part of a @acronym{MUA, Mail User Agent}, or other program
  2325. that must be able to post electronic mail where mail functionality may not be
  2326. that program's primary purpose.
  2327. libESMTP's high-level API shields developers from the complexity of SMTP. It
  2328. transparently handles many SMTP extensions including authentication,
  2329. @acronym{TLS, Transport-Level Security}, and PIPELINING for performance. Even
  2330. without a pipelining server, libESMTP offers much better performance than would
  2331. be expected from a simple client.")
  2332. (license (list license:lgpl2.1+ license:gpl2+))))
  2333. (define-public esmtp
  2334. (package
  2335. (name "esmtp")
  2336. (version "1.2")
  2337. (source
  2338. (origin
  2339. (method git-fetch)
  2340. (uri (git-reference
  2341. (url "https://github.com/andywingo/esmtp")
  2342. (commit "01bf9fc")))
  2343. (sha256
  2344. (base32
  2345. "1ay282rrl92h0m0m8z5zzjnwiiagi7c78aq2qvhia5mw7prwfyw2"))
  2346. (file-name (string-append name "-" version "-checkout"))
  2347. (patches (search-patches "esmtp-add-lesmtp.patch"))))
  2348. (arguments
  2349. `(#:phases (modify-phases %standard-phases
  2350. (replace 'bootstrap
  2351. (lambda _ (invoke "autoreconf" "-vfi"))))))
  2352. (build-system gnu-build-system)
  2353. (native-inputs
  2354. `(("bison" ,bison)
  2355. ("flex" ,flex)
  2356. ("autoconf" ,autoconf)
  2357. ("automake" ,automake)
  2358. ("libtool" ,libtool)))
  2359. (inputs
  2360. `(("libesmtp" ,libesmtp)))
  2361. (home-page "https://sourceforge.net/projects/esmtp/")
  2362. (synopsis "Relay-only mail transfer agent (MTA)")
  2363. (description "Esmtp is a simple relay-only mail transfer agent built using
  2364. libESMTP. It sends e-mail via a remote SMTP server using credentials from the
  2365. user's @file{$HOME/.esmtprc} configuration file; see the @command{esmtprc} man
  2366. page for more on configuration. This package also provides minimal
  2367. compatibility shims for the @command{sendmail}, @command{mailq}, and
  2368. @command{newaliases} commands.")
  2369. (license license:gpl2+)))
  2370. (define-public fdm
  2371. (package
  2372. (name "fdm")
  2373. (version "2.0")
  2374. (source (origin
  2375. (method url-fetch)
  2376. (uri (string-append "https://github.com/nicm/fdm/releases/download/"
  2377. version "/fdm-" version ".tar.gz"))
  2378. (sha256
  2379. (base32 "196fs1z8y7p12wmqn1bylzz94szl58yv2aby3p30nmwjnyv8rch6"))))
  2380. (build-system gnu-build-system)
  2381. (inputs
  2382. `(("tdb" ,tdb)
  2383. ("openssl" ,openssl)
  2384. ("zlib" ,zlib)))
  2385. (home-page "https://github.com/nicm/fdm")
  2386. (synopsis "Mail Retrieval Agent (MRA) and Mail Delivery Agent (MDA)")
  2387. (description "fdm is a program designed to fetch mail from POP3
  2388. or IMAP servers, or receive local mail from stdin, and
  2389. deliver it in various ways.")
  2390. (license
  2391. ;; Why point to a source file? Well, all the individual files have a
  2392. ;; copy of this license in their headers, but there's no seprate file
  2393. ;; with that information.
  2394. (license:non-copyleft
  2395. "https://github.com/nicm/fdm/blob/master/command.c"))))
  2396. (define-public procmail
  2397. (package
  2398. (name "procmail")
  2399. (version "3.22")
  2400. (source
  2401. (origin
  2402. (method url-fetch)
  2403. (uri (string-append
  2404. "ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/procmail-"
  2405. version
  2406. ".tar.gz"))
  2407. (sha256
  2408. (base32
  2409. "05z1c803n5cppkcq99vkyd5myff904lf9sdgynfqngfk9nrpaz08"))
  2410. ;; The following patch fixes an ambiguous definition of
  2411. ;; getline() in formail.c. The patch is provided by Debian as
  2412. ;; patch 24.
  2413. (patches (search-patches "procmail-ambiguous-getline-debian.patch"
  2414. "procmail-CVE-2014-3618.patch"
  2415. "procmail-CVE-2017-16844.patch"))))
  2416. (arguments
  2417. `(#:phases (modify-phases %standard-phases
  2418. (replace 'configure
  2419. (lambda _
  2420. (substitute* "Makefile"
  2421. (("/bin/sh")
  2422. (which "sh"))
  2423. (("/usr")
  2424. (assoc-ref %outputs "out"))
  2425. (("/bin/rm")
  2426. (which "rm")))
  2427. #t)))
  2428. #:tests? #f)) ;; There are no tests indicating a successful
  2429. ;; build. Some tests of basic locking mechanisms provided by the
  2430. ;; file system are performed during 'make install'. However, these
  2431. ;; are performed before the actual build process.
  2432. (build-system gnu-build-system)
  2433. (inputs `(("exim" ,exim)))
  2434. (home-page "http://www.procmail.org/")
  2435. (synopsis "Versatile mail delivery agent (MDA)")
  2436. (description "Procmail is a mail delivery agent (MDA) featuring support
  2437. for a variety of mailbox formats such as mbox, mh and maildir. Incoming mail
  2438. can be sorted into separate files/directories and arbitrary commands can be
  2439. executed on mail arrival. Procmail is considered stable, but is no longer
  2440. maintained.")
  2441. (license license:gpl2+))) ;; procmail allows to choose the
  2442. ;; nonfree Artistic License 1.0
  2443. ;; as alternative to the GPL2+.
  2444. ;; This option is not listed here.
  2445. (define-public khard
  2446. (package
  2447. (name "khard")
  2448. (version "0.17.0")
  2449. (source (origin
  2450. (method url-fetch)
  2451. (uri (pypi-uri name version))
  2452. (sha256
  2453. (base32
  2454. "062nv4xkfsjc11k9m52dh6xjn9z68a4a6x1s8z05wwv4jbp1lkhn"))))
  2455. (build-system python-build-system)
  2456. (arguments
  2457. `(#:phases
  2458. (modify-phases %standard-phases
  2459. (add-after 'install 'install-completions
  2460. (lambda* (#:key outputs #:allow-other-keys)
  2461. (let* ((out (assoc-ref outputs "out"))
  2462. (zsh (string-append out "/share/zsh/site-functions")))
  2463. (copy-recursively "misc/zsh" zsh)
  2464. #t))))))
  2465. (native-inputs
  2466. `(("python-setuptools-scm" ,python-setuptools-scm)))
  2467. (inputs
  2468. `(("python-atomicwrites" ,python-atomicwrites)
  2469. ("python-configobj" ,python-configobj)
  2470. ("python-ruamel.yaml" ,python-ruamel.yaml)
  2471. ("python-unidecode" ,python-unidecode)
  2472. ("python-vobject" ,python-vobject)))
  2473. (synopsis "Console address book using CardDAV")
  2474. (description "Khard is an address book for the console. It creates, reads,
  2475. modifies and removes CardDAV address book entries at your local machine. For
  2476. synchronizing with a remote address book, @command{vdirsyncer} is recommended.
  2477. Khard can also be used from within the email client @command{mutt}.")
  2478. (home-page "https://github.com/scheibler/khard")
  2479. (license license:gpl3+)))
  2480. (define-public perl-mail-spf
  2481. (package
  2482. (name "perl-mail-spf")
  2483. (version "2.9.0")
  2484. (source
  2485. (origin
  2486. (method url-fetch)
  2487. (uri (string-append
  2488. "mirror://cpan/authors/id/J/JM/JMEHNLE/mail-spf/Mail-SPF-v"
  2489. version
  2490. ".tar.gz"))
  2491. (sha256
  2492. (base32 "0qk1rfgfm5drj4iyniiabrasrpqv570vzhgz66lwgb67y4amkjv1"))))
  2493. (build-system perl-build-system)
  2494. (native-inputs
  2495. `(("perl-module-build" ,perl-module-build)
  2496. ("perl-net-dns-resolver-programmable"
  2497. ,perl-net-dns-resolver-programmable)))
  2498. (arguments
  2499. `(#:phases
  2500. (modify-phases %standard-phases
  2501. (add-before 'configure 'modify-Build.PL
  2502. (lambda* (#:key outputs #:allow-other-keys)
  2503. (substitute* "Build.PL"
  2504. (("'/usr/sbin'") (string-append "'"
  2505. (assoc-ref outputs "out")
  2506. "/sbin'")))
  2507. #t)))))
  2508. (inputs
  2509. `(("perl-error" ,perl-error)
  2510. ("perl-net-dns" ,perl-net-dns)
  2511. ("perl-netaddr-ip" ,perl-netaddr-ip)
  2512. ("perl-uri" ,perl-uri)))
  2513. (home-page "https://metacpan.org/release/Mail-SPF")
  2514. (synopsis "Perl implementation of Sender Policy Framework")
  2515. (description "Mail::SPF is the Sender Policy Framework implemented
  2516. in Perl.")
  2517. (license license:bsd-3)))
  2518. (define-public perl-mail-authenticationresults
  2519. (package
  2520. (name "perl-mail-authenticationresults")
  2521. (version "1.20180923")
  2522. (source (origin
  2523. (method url-fetch)
  2524. (uri (string-append
  2525. "mirror://cpan/authors/id/M/MB/MBRADSHAW/"
  2526. "Mail-AuthenticationResults-" version ".tar.gz"))
  2527. (sha256
  2528. (base32
  2529. "1g1wym9vcbhldwvi4w5pl0fhd4jh2icj975awf4wr5xmkli9mxbz"))))
  2530. (build-system perl-build-system)
  2531. (native-inputs
  2532. `(("perl-test-exception" ,perl-test-exception)))
  2533. (home-page "https://metacpan.org/release/Mail-AuthenticationResults")
  2534. (synopsis "Object Oriented Authentication-Results Headers")
  2535. (description "Mail::AuthenticationResults parses the message header field
  2536. that indicates the message authentication status as per RFC7601. This module
  2537. is not fully compliant with the RFC but it tries to implement most styles of
  2538. Authentication-Results header seen in the wild.")
  2539. (license license:perl-license)))
  2540. (define-public perl-mail-dkim
  2541. (package
  2542. (name "perl-mail-dkim")
  2543. (version "1.20200907")
  2544. (source (origin
  2545. (method url-fetch)
  2546. (uri (string-append
  2547. "mirror://cpan/authors/id/M/MB/MBRADSHAW/Mail-DKIM-"
  2548. version
  2549. ".tar.gz"))
  2550. (sha256
  2551. (base32
  2552. "1x8v4pa0447c1xqri1jn96i8vlyjpl6jmz63nb1vifbp16yi3zxb"))))
  2553. (build-system perl-build-system)
  2554. (propagated-inputs
  2555. `(("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
  2556. ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
  2557. ("perl-mailtools" ,perl-mailtools)
  2558. ("perl-net-dns" ,perl-net-dns)))
  2559. (native-inputs
  2560. `(("perl-net-dns-resolver-mock" ,perl-net-dns-resolver-mock)
  2561. ("perl-test-requiresinternet" ,perl-test-requiresinternet)
  2562. ("perl-yaml-libyaml" ,perl-yaml-libyaml)))
  2563. (home-page "https://metacpan.org/release/Mail-DKIM")
  2564. (synopsis "Signs/verifies Internet mail with DKIM/DomainKey signatures")
  2565. (description "Mail::DKIM is a Perl module that implements the new Domain
  2566. Keys Identified Mail (DKIM) standard, and the older Yahoo! DomainKeys standard,
  2567. both of which sign and verify emails using digital signatures and DNS records.
  2568. Mail-DKIM can be used by any Perl program that wants to provide support for
  2569. DKIM and/or DomainKeys.")
  2570. (license license:gpl3+)))
  2571. (define-public dkimproxy
  2572. (package
  2573. (name "dkimproxy")
  2574. (version "1.4.1")
  2575. (source (origin
  2576. (method url-fetch)
  2577. (uri (string-append
  2578. "mirror://sourceforge/dkimproxy/dkimproxy/"
  2579. version "/dkimproxy-" version ".tar.gz"))
  2580. (sha256
  2581. (base32
  2582. "1gc5c7lg2qrlck7b0lvjfqr824ch6jkrzkpsn0gjvlzg7hfmld75"))
  2583. (patches
  2584. (search-patches "dkimproxy-add-ipv6-support.patch"))))
  2585. (build-system gnu-build-system)
  2586. (arguments
  2587. `(#:phases
  2588. (modify-phases %standard-phases
  2589. (add-after 'install 'make-wrapper
  2590. (lambda* (#:key inputs outputs #:allow-other-keys)
  2591. (let* ((out (assoc-ref outputs "out"))
  2592. (wrap.pl (lambda (scripts keys)
  2593. (for-each
  2594. (lambda (script)
  2595. (wrap-program (string-append out script)
  2596. `("PERL5LIB" ":" prefix
  2597. ,(map (λ (input)
  2598. (string-append
  2599. (assoc-ref inputs input)
  2600. "/lib/perl5/site_perl"))
  2601. keys))))
  2602. scripts))))
  2603. (wrap.pl (list "/bin/dkimproxy.in"
  2604. "/bin/dkimproxy.out")
  2605. (list "perl-crypt-openssl-rsa"
  2606. "perl-io-socket-inet6"
  2607. "perl-mailtools"
  2608. "perl-mail-authenticationresults"
  2609. "perl-mail-dkim"
  2610. "perl-net-dns"
  2611. "perl-net-server"
  2612. "perl-socket6"))
  2613. (wrap.pl (list "/bin/dkim_responder.pl")
  2614. (list "perl-crypt-openssl-rsa"
  2615. "perl-mail-dkim"
  2616. "perl-mailtools"
  2617. "perl-mime-tools"
  2618. "perl-net-dns"
  2619. "perl-timedate"))
  2620. #t))))))
  2621. (inputs
  2622. `(("perl" ,perl)
  2623. ("perl-crypt-openssl-rsa" ,perl-crypt-openssl-rsa)
  2624. ("perl-io-socket-inet6" ,perl-io-socket-inet6)
  2625. ("perl-mailtools" ,perl-mailtools)
  2626. ("perl-mail-authenticationresults" ,perl-mail-authenticationresults)
  2627. ("perl-mail-dkim" ,perl-mail-dkim)
  2628. ("perl-mime-tools" ,perl-mime-tools)
  2629. ("perl-net-dns" ,perl-net-dns)
  2630. ("perl-net-server" ,perl-net-server)
  2631. ("perl-socket6" ,perl-socket6)
  2632. ("perl-timedate" ,perl-timedate)))
  2633. (home-page "http://dkimproxy.sourceforge.net/")
  2634. (synopsis "SMTP proxy to sign and verify Internet mail with DKIM headers")
  2635. (description
  2636. "DKIMproxy is an SMTP proxy that signs and verifies Internet mail using the
  2637. @code{Mail::DKIM} Perl module. It comprises two separate proxies: an outbound
  2638. proxy for signing outgoing email, and an inbound proxy for verifying signatures
  2639. of incoming messages.
  2640. It was designed for Postfix, but can be used to add DKIM support to nearly any
  2641. existing mail server. With Postfix, the proxies can operate as either
  2642. @code{Before-Queue} or @code{After-Queue} content filters.")
  2643. (license license:gpl2+)))
  2644. (define-public mb2md
  2645. (package
  2646. (name "mb2md")
  2647. (version "3.20")
  2648. (source (origin
  2649. (method url-fetch)
  2650. (uri (string-append
  2651. "http://batleth.sapienti-sat.org/projects/mb2md/mb2md-"
  2652. version ".pl.gz"))
  2653. (sha256
  2654. (base32
  2655. "0bvkky3c90738h3skd2f1b2yy5xzhl25cbh9w2dy97rs86ssjidg"))))
  2656. (build-system trivial-build-system)
  2657. (arguments
  2658. '(#:modules ((guix build utils))
  2659. #:builder
  2660. (begin
  2661. (use-modules (guix build utils))
  2662. (let* ((source (assoc-ref %build-inputs "source"))
  2663. (out (assoc-ref %outputs "out"))
  2664. (bin (string-append out "/bin"))
  2665. (perl (assoc-ref %build-inputs "perl"))
  2666. (gzip (assoc-ref %build-inputs "gzip"))
  2667. (perl-timedate (assoc-ref %build-inputs "perl-timedate"))
  2668. (perl5lib (string-append perl-timedate "/lib/perl5/site_perl")))
  2669. (mkdir-p bin)
  2670. (with-directory-excursion bin
  2671. (copy-file source "mb2md.gz")
  2672. (invoke (string-append gzip "/bin/gzip") "-d" "mb2md.gz")
  2673. (substitute* "mb2md"
  2674. (("#!/usr/bin/perl")
  2675. (string-append "#!/usr/bin/perl -I " perl5lib)))
  2676. (patch-shebang "mb2md" (list (string-append perl "/bin")))
  2677. (chmod "mb2md" #o555))
  2678. #t))))
  2679. (native-inputs `(("gzip" ,gzip)))
  2680. (inputs `(("perl" ,perl)
  2681. ("perl-timedate" ,perl-timedate)))
  2682. (home-page "http://batleth.sapienti-sat.org/projects/mb2md/")
  2683. (synopsis "Mbox to maildir converter")
  2684. (description
  2685. "Mb2md is a Perl script that takes one or more mbox format files and
  2686. converts them to maildir format directories.")
  2687. (license license:public-domain)))
  2688. (define-public mblaze
  2689. (package
  2690. (name "mblaze")
  2691. (version "1.1")
  2692. (source
  2693. (origin
  2694. (method git-fetch)
  2695. (uri (git-reference
  2696. (url "https://github.com/leahneukirchen/mblaze")
  2697. (commit (string-append "v" version))))
  2698. (file-name (git-file-name name version))
  2699. (sha256
  2700. (base32 "1bir977vnqs76g8jgv1yivqw0wk2kn56l3l5r4w2ipix3fir138y"))))
  2701. (build-system gnu-build-system)
  2702. (native-inputs
  2703. `(("perl" ,perl)))
  2704. (arguments
  2705. `(#:tests? #f ; XXX: Upstream tests appear to be broken
  2706. #:make-flags (list (string-append "CC=" ,(cc-for-target))
  2707. "PREFIX="
  2708. (string-append "DESTDIR=" %output))
  2709. #:phases
  2710. (modify-phases %standard-phases
  2711. (delete 'configure))))
  2712. (home-page "https://github.com/leahneukirchen/mblaze")
  2713. (synopsis "Unix utilities to deal with Maildir")
  2714. (description
  2715. "The mblaze message system is a set of Unix utilities for processing and
  2716. interacting with mail messages which are stored in maildir folders.
  2717. Its design is roughly inspired by MH, the RAND Message Handling System, but it
  2718. is a complete implementation from scratch.
  2719. mblaze is a classic command line MUA and has no features for receiving or
  2720. transferring messages; you can operate on messages in a local maildir spool,
  2721. or fetch your messages using fdm(1), getmail(1), offlineimap(1), or similar
  2722. utilities, and send it using dma(8), msmtp(1), sendmail(8), as provided by
  2723. OpenSMTPD, Postfix, or similar.
  2724. mblaze operates directly on maildir folders and doesn't use its own caches or
  2725. databases. There is no setup needed for many uses. All utilities have been
  2726. written with performance in mind. Enumeration of all messages in a maildir is
  2727. avoided unless necessary, and then optimized to limit syscalls. Parsing
  2728. message metadata is optimized to limit I/O requests. Initial operations on a
  2729. large maildir may feel slow, but as soon as they are in the file system cache,
  2730. everything is blazingly fast. The utilities are written to be memory
  2731. efficient (i.e. not wasteful), but whole messages are assumed to fit into RAM
  2732. easily (one at a time).")
  2733. (license (list license:public-domain
  2734. license:expat)))) ; mystrverscmp.c and mymemmem
  2735. (define-public mpop
  2736. (package
  2737. (name "mpop")
  2738. (version "1.4.13")
  2739. (source
  2740. (origin
  2741. (method url-fetch)
  2742. (uri (string-append "https://marlam.de/mpop/releases/"
  2743. "mpop-" version ".tar.xz"))
  2744. (sha256
  2745. (base32 "1hbx69d6ivbvjajrcp54fdb3g1ms4ydj0ybf3bfhlravqrk88jdk"))))
  2746. (build-system gnu-build-system)
  2747. (inputs
  2748. `(("gnutls" ,gnutls)))
  2749. (native-inputs
  2750. `(("pkg-config" ,pkg-config)))
  2751. (home-page "https://marlam.de/mpop/")
  2752. (synopsis "POP3 mail client")
  2753. (description "mpop is a small and fast POP3 client suitable as a
  2754. fetchmail replacement.
  2755. mpop supports multiple accounts, header based mail filtering, delivery
  2756. to mbox files, maildir folders or an @acronym{MDA, Mail Delivery Agent},
  2757. TLS/SSL, several authentication methods, @acronym{IDN, Internationalized Domain
  2758. Names} and SOCKS proxies.")
  2759. (license license:gpl3+)))
  2760. (define-public mhonarc
  2761. (package
  2762. (name "mhonarc")
  2763. (version "2.6.19")
  2764. (source
  2765. (origin
  2766. (method url-fetch)
  2767. (uri (string-append "mirror://cpan/authors/id/E/EH/EHOOD/MHonArc-"
  2768. version ".tar.gz"))
  2769. (sha256
  2770. (base32
  2771. "0ll3v93yji334zqp6xfzfxc0127pmjcznmai1l5q6dzawrs2igzq"))))
  2772. (build-system perl-build-system)
  2773. (home-page "https://www.mhonarc.org/")
  2774. (synopsis "Create HTML archives of mail/news messages")
  2775. (description
  2776. "MHonArc is a Perl mail-to-HTML converter. MHonArc
  2777. provides HTML mail archiving with index, mail thread linking,
  2778. etc; plus other capabilities including support for MIME and
  2779. powerful user customization features.")
  2780. (license license:gpl2+)))
  2781. (define-public sendmail
  2782. (package
  2783. (name "sendmail")
  2784. (version "8.15.2")
  2785. (source
  2786. (origin
  2787. (method url-fetch)
  2788. (uri (string-append
  2789. "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
  2790. version ".tar.gz"))
  2791. (sha256
  2792. (base32
  2793. "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
  2794. (build-system gnu-build-system)
  2795. (arguments
  2796. `(#:phases
  2797. (modify-phases %standard-phases
  2798. (add-before 'build 'replace-/bin/sh
  2799. (lambda _
  2800. (substitute*
  2801. (append
  2802. (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
  2803. "contrib/mmuegel" "devtools/bin/configure.sh")
  2804. (find-files "." ".*\\.m4")
  2805. (find-files "." ".*\\.cf"))
  2806. (("/bin/sh") (which "sh")))
  2807. (substitute* "devtools/bin/Build"
  2808. (("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
  2809. #t))
  2810. (add-before 'build 'replace-/usr
  2811. (lambda _
  2812. (substitute*
  2813. '("devtools/OS/Linux"
  2814. "cf/ostype/mklinux.m4"
  2815. "cf/ostype/linux.m4")
  2816. (("/usr/sbin") "/sbin"))))
  2817. (replace 'configure
  2818. (lambda _
  2819. ;; Render harmless any attempts to chown or chgrp
  2820. (substitute* "devtools/bin/install.sh"
  2821. (("owner=\\$2") "owner=''")
  2822. (("group=\\$2") "group=''"))
  2823. (with-output-to-file "devtools/Site/site.config.m4"
  2824. (lambda ()
  2825. (format #t "
  2826. define(`confEBINDIR', `/sbin')
  2827. define(`confSBINDIR', `/sbin')
  2828. define(`confMBINDIR', `/sbin')
  2829. define(`confUBINDIR', `/bin')
  2830. define(`confLINKS', `')
  2831. define(`confCC', `gcc')
  2832. define(`confOPTIMIZE', `-g -O2')
  2833. define(`confLIBS', `-lresolv')
  2834. define(`confINSTALL', `~a/devtools/bin/install.sh')
  2835. define(`confDEPEND_TYPE', `CC-M')
  2836. define(`confINST_DEP', `')
  2837. " (getcwd))))
  2838. #t))
  2839. (replace 'build
  2840. (lambda _
  2841. (invoke "sh" "Build")
  2842. (with-directory-excursion "cf/cf"
  2843. (copy-file "generic-linux.mc" "sendmail.mc")
  2844. (invoke "sh" "Build" "sendmail.cf"))
  2845. #t))
  2846. (add-before 'install 'pre-install
  2847. (lambda _
  2848. (let ((out (assoc-ref %outputs "out")))
  2849. (mkdir-p (string-append out "/bin"))
  2850. (mkdir-p (string-append out "/sbin"))
  2851. (mkdir-p (string-append out "/etc/mail"))
  2852. (setenv "DESTDIR" out)
  2853. (with-directory-excursion "cf/cf"
  2854. (invoke "sh" "Build" "install-cf"))
  2855. #t)))
  2856. (add-after 'install 'post-install
  2857. (lambda _
  2858. ;; Make symbolic links manually, because build script uses
  2859. ;; absolute paths for them and ignores DESTDIR.
  2860. (for-each
  2861. (lambda (name)
  2862. (symlink "../sbin/sendmail" (string-append %output "/bin/" name)))
  2863. '("hoststat" "newaliases" "mailq" "purgestat")))))
  2864. ;; There is no make check. There are some post installation tests, but those
  2865. ;; require root privileges
  2866. #:tests? #f))
  2867. (inputs
  2868. `(("m4" ,m4)
  2869. ("perl" ,perl)))
  2870. (home-page "http://sendmail.org")
  2871. (synopsis
  2872. "Highly configurable Mail Transfer Agent (MTA)")
  2873. (description
  2874. "Sendmail is a mail transfer agent (MTA) originally developed by Eric
  2875. Allman. It is highly configurable and supports many delivery methods and many
  2876. transfer protocols.")
  2877. (license (license:non-copyleft "file://LICENSE"
  2878. "See LICENSE in the distribution."))))
  2879. (define-public sieve-connect
  2880. (package
  2881. (name "sieve-connect")
  2882. (version "0.90")
  2883. (source
  2884. (origin
  2885. (method url-fetch)
  2886. (uri (string-append "https://people.spodhuis.org/phil.pennock/software/"
  2887. "sieve-connect-" version ".tar.bz2"))
  2888. (sha256
  2889. (base32 "00vnyzr67yr2ilnprbd388gfnwmrmbdx1jsig9d0n5q902jqn62a"))))
  2890. (build-system gnu-build-system)
  2891. (arguments
  2892. `(#:make-flags
  2893. (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
  2894. #:tests? #f ; no test suite
  2895. #:phases
  2896. (modify-phases %standard-phases
  2897. (delete 'configure) ; no configure script
  2898. (add-before 'install 'create-output-directories
  2899. (lambda* (#:key outputs #:allow-other-keys)
  2900. (let ((out (assoc-ref outputs "out")))
  2901. (for-each (lambda (subdirectory)
  2902. (mkdir-p (string-append out "/" subdirectory)))
  2903. (list "bin"
  2904. "man/man1"))
  2905. #t)))
  2906. (add-after 'install 'wrap-program
  2907. (lambda* (#:key inputs outputs #:allow-other-keys)
  2908. (let ((out (assoc-ref outputs "out"))
  2909. (path (getenv "PERL5LIB")))
  2910. (wrap-script (string-append out "/bin/sieve-connect")
  2911. #:guile (search-input-file inputs "bin/guile")
  2912. `("PERL5LIB" ":" = (,path)))
  2913. #t))))))
  2914. (inputs
  2915. `(("guile" ,guile-3.0) ; for wrap-script
  2916. ("perl" ,perl)
  2917. ("perl-authen-sasl" ,perl-authen-sasl)
  2918. ("perl-io-socket-inet6" ,perl-io-socket-inet6)
  2919. ("perl-io-socket-ssl" ,perl-io-socket-ssl)
  2920. ("perl-net-dns" ,perl-net-dns)
  2921. ("perl-socket6" ,perl-socket6)
  2922. ("perl-term-readkey" ,perl-term-readkey)
  2923. ("perl-term-readline" ,perl-term-readline-gnu)))
  2924. (home-page
  2925. "https://people.spodhuis.org/phil.pennock/software/#sieve-connect")
  2926. (synopsis "ManageSieve client for managing Sieve e-mail filters")
  2927. (description
  2928. "Sieve-connect lets you view, upload, edit, delete, and otherwise manage
  2929. Sieve scripts on any mail server that speaks the @dfn{ManageSieve} protocol,
  2930. as specified in RFC 5804.
  2931. @dfn{Sieve} (RFC 5228) is a specialised language for e-mail filtering. Sieve
  2932. scripts are stored on the server and run whenever mail arrives. They can
  2933. automatically sort new messages into folders, silently reject them, send an
  2934. automated response, and more.
  2935. @command{sieve-connect} is designed to be both a tool which can be invoked
  2936. from scripts as well as a decent interactive client. It supports TLS for
  2937. connection privacy, as well as authentication with SASL or GSSAPI client
  2938. certificates. It should be a drop-in replacement for @command{sieveshell}
  2939. from the Cyrus IMAP project.")
  2940. (license license:bsd-3)))
  2941. (define-public opensmtpd
  2942. (package
  2943. (name "opensmtpd")
  2944. (version "6.8.0p2")
  2945. (source
  2946. (origin
  2947. (method url-fetch)
  2948. (uri (string-append "https://www.opensmtpd.org/archives/"
  2949. "opensmtpd-" version ".tar.gz"))
  2950. (sha256
  2951. (base32 "05sd7bmq29ibnqbl2z53hiyprfxzf0qydfdaixs68rz55wqhbgsi"))))
  2952. (build-system gnu-build-system)
  2953. (inputs
  2954. `(("bdb" ,bdb)
  2955. ("libasr" ,libasr)
  2956. ("libevent" ,libevent)
  2957. ("libressl" ,libressl) ; recommended, and supports e.g. ECDSA
  2958. ("linux-pam" ,linux-pam)
  2959. ("zlib" ,zlib)))
  2960. (native-inputs
  2961. `(("bison" ,bison)
  2962. ("groff" ,groff))) ; for man pages
  2963. (arguments
  2964. `(#:configure-flags
  2965. (list "--localstatedir=/var"
  2966. ;; This is the default only if it exists at build time—it doesn't.
  2967. "--with-path-socket=/var/run"
  2968. "--with-path-CAfile=/etc/ssl/certs/ca-certificates.crt"
  2969. "--with-user-smtpd=smtpd"
  2970. "--with-user-queue=smtpq" "--with-group-queue=smtpq"
  2971. "--with-auth-pam"
  2972. "--with-table-db")
  2973. #:phases
  2974. (modify-phases %standard-phases
  2975. ;; See: https://github.com/OpenSMTPD/OpenSMTPD/issues/1069.
  2976. (add-after 'unpack 'fix-smtpctl-encrypt-bug
  2977. (lambda _
  2978. (substitute* "usr.sbin/smtpd/smtpctl.c"
  2979. (("\"encrypt\", \"--\",")
  2980. "\"encrypt\","))
  2981. #t))
  2982. ;; Fix some incorrectly hard-coded external tool file names.
  2983. (add-after 'unpack 'patch-FHS-file-names
  2984. (lambda _
  2985. (substitute* "usr.sbin/smtpd/smtpctl.c"
  2986. ;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't.
  2987. (("/bin/cat") (which "cat")))
  2988. (substitute* "usr.sbin/smtpd/mda_unpriv.c"
  2989. (("/bin/sh") (which "sh")))
  2990. #t))
  2991. ;; OpenSMTPD provides a single smtpctl utility to control both the
  2992. ;; daemon and the local submission subsystem. To accomodate systems
  2993. ;; that require historical interfaces such as sendmail, newaliases or
  2994. ;; makemap, smtpctl operates in compatibility mode if called with the
  2995. ;; historical name.
  2996. (add-after 'install 'install-compability-links
  2997. (lambda* (#:key outputs #:allow-other-keys)
  2998. (let* ((out (assoc-ref outputs "out"))
  2999. (sbin (string-append out "/sbin/")))
  3000. (for-each (lambda (command)
  3001. (symlink "smtpctl" (string-append sbin command)))
  3002. (list "mailq" "makemap" "newaliases"
  3003. "send-mail" "sendmail")))
  3004. #t)))))
  3005. (synopsis "Lightweight SMTP daemon")
  3006. (description
  3007. "OpenSMTPD is an implementation of server-side @acronym{SMTP, Simple Mail
  3008. Transfer Protocol}, with some additional standard extensions. It allows
  3009. ordinary machines to exchange e-mails with other systems speaking the SMTP
  3010. protocol, or to deliver them to local users.
  3011. In order to simplify the use of SMTP, OpenSMTPD implements a smaller set of
  3012. functionality than those available in other SMTP daemons. The objective is to
  3013. provide enough features to satisfy typical usage at the risk of unsuitability
  3014. to esoteric or niche requirements.")
  3015. (home-page "https://www.opensmtpd.org")
  3016. (license (list license:bsd-2 license:bsd-3 license:bsd-4
  3017. (license:non-copyleft "file://COPYING")
  3018. license:public-domain license:isc license:openssl))))
  3019. (define-public opensmtpd-extras
  3020. (package
  3021. (name "opensmtpd-extras")
  3022. (version "6.7.1")
  3023. (source (origin
  3024. (method url-fetch)
  3025. (uri (string-append "https://www.opensmtpd.org/archives/"
  3026. "opensmtpd-extras-" version ".tar.gz"))
  3027. (sha256
  3028. (base32
  3029. "1b1mx71bvmv92lbm08wr2p60g3qhikvv3n15zsr6dcwbk9aqahzq"))))
  3030. (build-system gnu-build-system)
  3031. (native-inputs
  3032. `(("pkg-config" ,pkg-config)))
  3033. (inputs
  3034. `(("libressl" ,libressl)
  3035. ("libevent" ,libevent)
  3036. ("mysql" ,mysql)
  3037. ("opensmtpd" ,opensmtpd)
  3038. ("postgresql" ,postgresql)
  3039. ("python" ,python-2)
  3040. ("sqlite" ,sqlite)))
  3041. (arguments
  3042. `(#:configure-flags
  3043. (list "--sysconfdir=/etc"
  3044. "--localstatedir=/var"
  3045. "--with-queue-null"
  3046. "--with-queue-python"
  3047. "--with-queue-ram"
  3048. "--with-queue-stub"
  3049. "--with-table-ldap"
  3050. "--with-table-mysql"
  3051. "--with-table-postgres"
  3052. ;; "--with-table-redis" ; TODO: package hiredis
  3053. "--with-table-socketmap"
  3054. "--with-table-passwd"
  3055. "--with-table-python"
  3056. "--with-table-sqlite"
  3057. "--with-table-stub"
  3058. "--with-scheduler-ram"
  3059. "--with-scheduler-stub"
  3060. "--with-scheduler-python"
  3061. "--with-user-smtpd=smtpd"
  3062. ;; We have to configure it like this because the default checks for
  3063. ;; for example Python in /usr/{,local/}bin and fails otherwise.
  3064. (string-append "--with-python="
  3065. (assoc-ref %build-inputs "python")))))
  3066. (home-page "https://www.opensmtpd.org")
  3067. (synopsis "Extra tables, filters, and various other addons for OpenSMTPD")
  3068. (description
  3069. "This package provides extra tables, filters, and various other addons
  3070. for OpenSMTPD to extend its functionality.")
  3071. (license (list license:bsd-2 license:bsd-3 ; openbsd-compat
  3072. license:isc)))) ; everything else
  3073. (define-public libopensmtpd
  3074. ;; Private source dependency of opensmtpd-filter-dkimsign (by the same
  3075. ;; author), until any project actually uses it in its compiled form.
  3076. (package
  3077. (name "libopensmtpd")
  3078. (version "0.7")
  3079. (source
  3080. (origin
  3081. (method url-fetch)
  3082. (uri (list (string-append "https://imperialat.at/releases/"
  3083. "libopensmtpd-" version ".tar.gz")
  3084. (string-append "https://distfiles.sigtrap.nl/"
  3085. "libopensmtpd-" version ".tar.gz")))
  3086. (sha256
  3087. (base32 "04x610mvwba7m0n9h0wbnsw58rb4khq44fm4blkgjqvh3bhxbmnd"))))
  3088. (build-system gnu-build-system)
  3089. (arguments
  3090. `(#:make-flags
  3091. (list "-f" "Makefile.gnu"
  3092. (string-append "CC=" ,(cc-for-target))
  3093. (string-append "LOCALBASE=" (assoc-ref %outputs "out")))
  3094. #:tests? #f ; no test suite
  3095. #:phases
  3096. (modify-phases %standard-phases
  3097. (add-after 'unpack 'inherit-ownership
  3098. (lambda _
  3099. (substitute* "Makefile.gnu"
  3100. (("-o \\$\\{...OWN\\} -g \\$\\{...GRP\\}") ""))))
  3101. (delete 'configure)))) ; no configure script
  3102. (native-inputs
  3103. `(("mandoc" ,mandoc))) ; silently installs empty man page without
  3104. (inputs
  3105. `(("libevent" ,libevent)))
  3106. (home-page "https://imperialat.at/dev/libopensmtpd/")
  3107. (synopsis "OpenSMTPd filter C API")
  3108. (description
  3109. "The @code{osmtpd} API is an event-based C programming interface for
  3110. writing OpenSMTPd filters.")
  3111. (license license:expat)))
  3112. (define-public opensmtpd-filter-dkimsign
  3113. (package
  3114. (name "opensmtpd-filter-dkimsign")
  3115. (version "0.5")
  3116. (source
  3117. (origin
  3118. (method url-fetch)
  3119. (uri (list (string-append "https://imperialat.at/releases/"
  3120. "filter-dkimsign-" version ".tar.gz")
  3121. (string-append "https://distfiles.sigtrap.nl/"
  3122. "filter-dkimsign-" version ".tar.gz")))
  3123. (sha256
  3124. (base32 "0jwp47ixibnz8rghn193bk2hxh1j1zfrnidml18j7d7cylxfrd55"))))
  3125. (build-system gnu-build-system)
  3126. (arguments
  3127. `(#:make-flags
  3128. (list "-f" "Makefile.gnu"
  3129. (string-append "CC=" ,(cc-for-target))
  3130. "HAVE_ED25519=yep-but-is-openssl-only"
  3131. (string-append "LOCALBASE=" (assoc-ref %outputs "out")))
  3132. #:tests? #f ; no test suite
  3133. #:phases
  3134. (modify-phases %standard-phases
  3135. (add-after 'unpack 'patch-Makefile.gnu
  3136. (lambda _
  3137. (substitute* "Makefile.gnu"
  3138. (("pkg-config") ,(pkg-config-for-target))
  3139. (("-o \\$\\{...OWN\\} -g \\$\\{...GRP\\}") ""))))
  3140. (delete 'configure)))) ; no configure script
  3141. (native-inputs
  3142. `(("mandoc" ,mandoc))) ; silently installs empty man page without
  3143. (inputs
  3144. `(("libevent" ,libevent)
  3145. ("libopensmtpd" ,libopensmtpd)
  3146. ;; XXX Our OpenSMTPd package uses libressl, but this package currently
  3147. ;; supports HAVE_ED25519 only with openssl. Switch back when possible.
  3148. ("openssl" ,openssl)))
  3149. (home-page "http://imperialat.at/dev/filter-dkimsign/")
  3150. (synopsis "OpenSMTPd filter for signing mail with DKIM")
  3151. (description
  3152. "The @command{filter-dkimsign} OpenSMTPd filter signs outgoing e-mail
  3153. messages with @acronym{DKIM, DomainKeys Identified Mail} (RFC 4871).")
  3154. (license license:expat)))
  3155. (define-public opensmtpd-filter-rspamd
  3156. (package
  3157. (name "opensmtpd-filter-rspamd")
  3158. (version "0.1.7")
  3159. (source (origin
  3160. (method git-fetch)
  3161. (uri (git-reference
  3162. (url "https://github.com/poolpOrg/filter-rspamd")
  3163. (commit (string-append "v" version))))
  3164. (sha256
  3165. (base32 "1qhrw20q9y44ffgx5k14nvqc9dh47ihywgzza84g0zv9xgif7hd5"))
  3166. (file-name (git-file-name name version))))
  3167. (build-system go-build-system)
  3168. (arguments
  3169. `(#:import-path "github.com/poolpOrg/filter-rspamd"
  3170. #:phases
  3171. (modify-phases %standard-phases
  3172. (add-before 'build 'set-bootstrap-variables
  3173. (lambda* (#:key outputs inputs #:allow-other-keys)
  3174. ;; Tell the build system where to install binaries
  3175. (let* ((out (assoc-ref outputs "out"))
  3176. (libexec (string-append out "/libexec/opensmtpd")))
  3177. (setenv "GOBIN" libexec)))))))
  3178. (native-inputs
  3179. `(("opensmtpd" ,opensmtpd)))
  3180. (home-page "https://github.com/poolpOrg/filter-rspamd")
  3181. (synopsis "OpenSMTPd filter to request an Rspamd analysis")
  3182. (description
  3183. "The @command{filter-rspamd} OpenSMTPd filter implements the
  3184. Rspamd protocol and allows OpenSMTPd to request an Rspamd analysis of
  3185. an SMTP transaction before a message is committed to queue.")
  3186. (license license:isc)))
  3187. (define-public mailman
  3188. (package
  3189. (name "mailman")
  3190. (version "3.3.2")
  3191. (source
  3192. (origin
  3193. (method url-fetch)
  3194. (uri (pypi-uri "mailman" version))
  3195. (sha256
  3196. (base32 "0a5ckbf8hc3y28b7p5psp0d4bxk601jlr5pd3hhh545xd8d9f0dg"))))
  3197. (build-system python-build-system)
  3198. (propagated-inputs
  3199. `(("gunicorn" ,gunicorn)
  3200. ("python-aiosmtpd" ,python-aiosmtpd)
  3201. ("python-alembic" ,python-alembic)
  3202. ("python-atpublic" ,python-atpublic)
  3203. ("python-authheaders" ,python-authheaders)
  3204. ("python-authres" ,python-authres)
  3205. ("python-click" ,python-click)
  3206. ("python-dateutil" ,python-dateutil)
  3207. ("python-dnspython" ,python-dnspython)
  3208. ("python-falcon" ,python-falcon)
  3209. ("python-flufl-bounce" ,python-flufl-bounce)
  3210. ("python-flufl-i18n" ,python-flufl-i18n)
  3211. ("python-flufl-lock" ,python-flufl-lock)
  3212. ("python-importlib-resources" ,python-importlib-resources)
  3213. ("python-lazr-config" ,python-lazr-config)
  3214. ("python-passlib" ,python-passlib)
  3215. ("python-requests" ,python-requests)
  3216. ("python-sqlalchemy" ,python-sqlalchemy)
  3217. ("python-zope-component" ,python-zope-component)
  3218. ("python-zope-configuration" ,python-zope-configuration)
  3219. ("python-zope-event" ,python-zope-event)
  3220. ("python-zope-interface" ,python-zope-interface)))
  3221. (native-inputs
  3222. `(("python-nose" ,python-nose)))
  3223. (home-page "https://www.list.org")
  3224. (synopsis "Mailing list manager")
  3225. (description
  3226. "GNU Mailman is software for managing email discussion and mailing
  3227. lists. Both users and administrators generally perform their actions in a
  3228. web interface, although email and command-line interfaces are also provided.
  3229. The system features built-in archiving, automatic bounce processing, content
  3230. filtering, digest delivery, and more.")
  3231. (license license:gpl3+)))
  3232. (define-public python-mailmanclient
  3233. (package
  3234. (name "python-mailmanclient")
  3235. (version "3.3.1")
  3236. (source
  3237. (origin
  3238. (method url-fetch)
  3239. (uri (pypi-uri "mailmanclient" version))
  3240. (sha256
  3241. (base32
  3242. "0pjgzpvhdb6ql8asb20xr8d01m646zpghmcp9fmscks0n1k4di4g"))))
  3243. (build-system python-build-system)
  3244. (arguments
  3245. `(#:tests? #f)) ; Requires mailman running
  3246. (propagated-inputs
  3247. `(("python-requests" ,python-requests)))
  3248. ;(native-inputs
  3249. ; `(("mailman" ,mailman)
  3250. ; ("python-falcon" ,python-falcon)
  3251. ; ("python-pytest" ,python-pytest)
  3252. ; ("python-pytest-services" ,python-pytest-services)))
  3253. (home-page "https://www.list.org/")
  3254. (synopsis "Python bindings for the Mailman 3 REST API")
  3255. (description
  3256. "The mailmanclient library provides official Python bindings for
  3257. the GNU Mailman 3 REST API.")
  3258. (properties `((python2-variant . ,(delay python2-mailmanclient))))
  3259. (license license:lgpl3+)))
  3260. ;; This is the last version which supports Python-2.
  3261. (define-public python2-mailmanclient
  3262. (let ((base (package-with-python2
  3263. (strip-python2-variant python-mailmanclient))))
  3264. (package
  3265. (inherit base)
  3266. (version "3.1.1")
  3267. (source
  3268. (origin
  3269. (method url-fetch)
  3270. (uri (pypi-uri "mailmanclient" version))
  3271. (sha256
  3272. (base32
  3273. "0fdfs5g3pf30v2i7w18pdkv9xnfxmfcv66mzv56dck0a1igq07m3"))))
  3274. (propagated-inputs
  3275. `(("python2-six" ,python2-six)
  3276. ("python2-httplib2" ,python2-httplib2))))))
  3277. (define-public mlmmj
  3278. (package
  3279. (name "mlmmj")
  3280. (version "1.3.0")
  3281. (source
  3282. (origin
  3283. (method url-fetch)
  3284. (uri (string-append "http://mlmmj.org/releases/mlmmj-"
  3285. version ".tar.bz2"))
  3286. (sha256
  3287. (base32
  3288. "0hpj10qad821ci11si8xc2qnmkzfn90y13s43fm4fca38f0qjp8w"))))
  3289. (build-system gnu-build-system)
  3290. (inputs
  3291. `(("perl" ,perl))) ; For "contrib/web/"
  3292. (native-inputs
  3293. `(("pkg-config" ,pkg-config)))
  3294. (arguments
  3295. `(#:configure-flags
  3296. ;; mlmmj-receive-strip is a replacement for mlmmj-receive
  3297. ;; It opens the files control/mimedeny and control/mimestrip to get a list
  3298. ;; of mimetypes for parts of multipart/mime messages that should be denied
  3299. ;; or stripped. The parts then get stripped directly when the mail is
  3300. ;; received. mlmmj-receive-strip also appends an extra header
  3301. ;; X-ThisMailContainsUnwantedMimeParts: Y when the mail contains unwanted
  3302. ;; mime parts
  3303. (list "--enable-receive-strip")
  3304. #:phases
  3305. (modify-phases %standard-phases
  3306. (add-before 'install 'install-contrib
  3307. (lambda* (#:key outputs #:allow-other-keys)
  3308. (let* ((out (assoc-ref outputs "out"))
  3309. (share (string-append out "/share/mlmmj"))
  3310. (contrib (string-append share "/contrib/web"))
  3311. (texts (string-append share "/listtexts")))
  3312. (copy-recursively "contrib/web/" contrib)
  3313. (copy-recursively "listtexts" texts)
  3314. (rename-file texts (string-append share "/texts"))
  3315. #t))))))
  3316. (home-page "http://mlmmj.org")
  3317. (synopsis "Mailing list managing made joyful")
  3318. (description
  3319. "Mlmmj is a simple and slim mailing list manager (MLM) inspired by ezmlm.
  3320. It works with many different Mail Transport Agents (MTAs) and is simple for a
  3321. system administrator to install, configure and integrate with other software.
  3322. As it uses very few resources, and requires no daemons, it is ideal for
  3323. installation on systems where resources are limited. Its features include:
  3324. @enumerate
  3325. @item Archive, Custom headers / footer,
  3326. @item Fully automated bounce handling (similar to ezmlm),
  3327. @item Complete requeueing functionality, Moderation functionality, Subject prefix,
  3328. @item Subscribers only posting, Regular expression access control,
  3329. @item Functionality to retrieve old posts, Web interface, Digests,
  3330. @item No-mail subscription, VERP support,
  3331. @item Delivery Status Notification (RFC1891) support,
  3332. @item Rich and customisable texts for automated operations.
  3333. @end enumerate\n")
  3334. (license license:expat)))
  3335. (define-public python-django-mailman3
  3336. (package
  3337. (name "python-django-mailman3")
  3338. (version "1.3.4")
  3339. (source
  3340. (origin
  3341. (method url-fetch)
  3342. (uri (pypi-uri "django-mailman3" version))
  3343. (sha256
  3344. (base32
  3345. "1yrm7wpjy34xai72vn2vkhc9131cdrbqy08rrabf36kynj5vcdvy"))))
  3346. (build-system python-build-system)
  3347. (arguments
  3348. '(#:phases
  3349. (modify-phases %standard-phases
  3350. (replace 'check
  3351. (lambda _
  3352. (setenv "DJANGO_SETTINGS_MODULE"
  3353. "django_mailman3.tests.settings_test")
  3354. (invoke "django-admin" "test"
  3355. "--pythonpath=."))))))
  3356. (propagated-inputs
  3357. `(("python-django" ,python-django)
  3358. ("python-django-allauth" ,python-django-allauth)
  3359. ("python-django-gravatar2" ,python-django-gravatar2)
  3360. ("python-mailmanclient" ,python-mailmanclient)
  3361. ("python-pytz" ,python-pytz)))
  3362. (native-inputs
  3363. `(("python-mock" ,python-mock)))
  3364. (home-page "https://gitlab.com/mailman/django-mailman3")
  3365. (synopsis "Django library to help interaction with Mailman")
  3366. (description
  3367. "This package contains libraries and templates for Django-based interfaces
  3368. interacting with Mailman.")
  3369. (license license:gpl3+)))
  3370. (define-public python-mailman-hyperkitty
  3371. (package
  3372. (name "python-mailman-hyperkitty")
  3373. (version "1.1.0")
  3374. (source
  3375. (origin
  3376. (method url-fetch)
  3377. (uri (pypi-uri "mailman-hyperkitty" version))
  3378. (sha256
  3379. (base32
  3380. "1lfqa9admhvdv71f528jmz2wl0i5cv77v6l64px2pm4zqr9ckkjx"))
  3381. (patches
  3382. (list
  3383. (origin
  3384. ;; see: https://gitlab.com/mailman/mailman-hyperkitty/issues/17
  3385. ;; fixes test_archive_message_unserializable
  3386. (method url-fetch)
  3387. (uri "https://salsa.debian.org/mailman-team/mailman-hyperkitty/raw/debian/1.1.0-9/debian/patches/0002-Skip-the-test_archive_message_unserializable.patch")
  3388. (sha256
  3389. (base32
  3390. "0p1fwm46c4bl81lvsg3kjhn2r1lwgkpgxamb3xyqn7h9qdrw10hw")))))))
  3391. (build-system python-build-system)
  3392. (propagated-inputs
  3393. `(("python-requests" ,python-requests)
  3394. ("python-zope-interface" ,python-zope-interface)))
  3395. (inputs
  3396. `(("mailman" ,mailman)))
  3397. (native-inputs
  3398. `(("python-mock" ,python-mock)
  3399. ("python-nose" ,python-nose)
  3400. ("python-nose2" ,python-nose2)))
  3401. (home-page "https://gitlab.com/mailman/mailman-hyperkitty/")
  3402. (synopsis "Mailman archiver plugin for HyperKitty")
  3403. (description
  3404. "Mailman3 allows emails sent to its mailing lists to be archived by any
  3405. software provided that there is a plugin (loadable by Mailman3) designed to
  3406. communicate with it properly. This module contains a Mailman3 archiver plugin
  3407. which sends emails to HyperKitty, the official Mailman3 web archiver.")
  3408. (license license:gpl3+)))
  3409. (define-public python-hyperkitty
  3410. (package
  3411. (name "python-hyperkitty")
  3412. (version "1.3.3")
  3413. (source
  3414. (origin
  3415. (method url-fetch)
  3416. (uri (pypi-uri "HyperKitty" version))
  3417. (sha256
  3418. (base32
  3419. "0p85r9q6mn5as5b39xp9hkkipnk0156acx540n2ygk3qb3jd4a5n"))))
  3420. (build-system python-build-system)
  3421. (arguments
  3422. '(#:phases
  3423. (modify-phases %standard-phases
  3424. (replace 'check
  3425. (lambda _
  3426. (invoke "example_project/manage.py" "test"
  3427. "--settings=hyperkitty.tests.settings_test"))))))
  3428. (propagated-inputs
  3429. `(("python-dateutil" ,python-dateutil)
  3430. ("python-django" ,python-django-2.2)
  3431. ("python-django-compressor" ,python-django-compressor)
  3432. ("python-django-extensions" ,python-django-extensions)
  3433. ("python-django-gravatar2" ,python-django-gravatar2)
  3434. ("python-django-haystack" ,python-django-haystack)
  3435. ("python-django-mailman3" ,python-django-mailman3)
  3436. ("python-django-q" ,python-django-q)
  3437. ("python-djangorestframework" ,python-djangorestframework)
  3438. ("python-flufl-lock" ,python-flufl-lock)
  3439. ("python-mailmanclient" ,python-mailmanclient)
  3440. ("python-networkx" ,python-networkx)
  3441. ("python-pytz" ,python-pytz)
  3442. ("python-robot-detection" ,python-robot-detection)))
  3443. (native-inputs
  3444. `(("python-beautifulsoup4" ,python-beautifulsoup4)
  3445. ("python-elasticsearch" ,python-elasticsearch)
  3446. ("python-isort" ,python-isort)
  3447. ("python-mock" ,python-mock)
  3448. ("python-whoosh" ,python-whoosh)))
  3449. (home-page "https://gitlab.com/mailman/hyperkitty")
  3450. (synopsis "Web interface to access GNU Mailman v3 archives")
  3451. (description
  3452. "The hyperkitty Django app provides a web user interface to access GNU
  3453. Mailman3 archives, and manage it. This interface uses django, and requires
  3454. some configuration.")
  3455. (license license:gpl3))) ; Some files are gpl2+
  3456. (define-public postorius
  3457. (package
  3458. (name "postorius")
  3459. (version "1.3.3")
  3460. (source
  3461. (origin
  3462. (method url-fetch)
  3463. (uri (pypi-uri "postorius" version))
  3464. (sha256
  3465. (base32
  3466. "08jn23gblbkfl09qlykbpsmp39mmach3sl69h1j5cd5kkx839rwa"))))
  3467. (build-system python-build-system)
  3468. (arguments
  3469. '(#:phases
  3470. (modify-phases %standard-phases
  3471. (replace 'check
  3472. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  3473. (add-installed-pythonpath inputs outputs)
  3474. (if tests?
  3475. (invoke "python" "example_project/manage.py" "test"
  3476. "--settings=test_settings" "postorius")
  3477. #t))))
  3478. #:tests? #f)) ; Tests try to run a mailman instance to test against.
  3479. (inputs
  3480. `(("python-django" ,python-django)
  3481. ("python-django-mailman3" ,python-django-mailman3)
  3482. ("python-mailmanclient" ,python-mailmanclient)
  3483. ("python-readme-renderer" ,python-readme-renderer)))
  3484. (native-inputs
  3485. `(("python-beautifulsoup4" ,python-beautifulsoup4)
  3486. ("python-isort" ,python-isort)
  3487. ("python-mock" ,python-mock)
  3488. ("python-vcrpy" ,python-vcrpy)))
  3489. (home-page "https://gitlab.com/mailman/postorius")
  3490. (synopsis "Web user interface for GNU Mailman")
  3491. (description
  3492. "Postorius is a Django app which provides a web user interface
  3493. to access GNU Mailman.")
  3494. (license (list license:gpl3+ license:lgpl3+))))
  3495. (define-public blists
  3496. (package
  3497. (name "blists")
  3498. (version "2.0")
  3499. (source
  3500. (origin
  3501. (method url-fetch)
  3502. (uri (string-append "http://download.openwall.net/pub/projects/"
  3503. "blists/blists-" version ".tar.gz"))
  3504. (sha256
  3505. (base32
  3506. "1xll5wn7py3bbncbwrj172f56nz75c9gwfsa80rwd96ss9gfmp3c"))))
  3507. (build-system gnu-build-system)
  3508. (arguments
  3509. `(#:tests? #f ; No tests
  3510. #:phases
  3511. (modify-phases %standard-phases
  3512. (delete 'configure)
  3513. (replace 'install
  3514. (lambda* (#:key outputs #:allow-other-keys)
  3515. (let* ((out (assoc-ref outputs "out"))
  3516. (bin (string-append out "/bin")))
  3517. (install-file "bindex" bin)
  3518. (install-file "bit" bin)
  3519. #t))))))
  3520. (home-page "http://www.openwall.com/blists/")
  3521. (synopsis "Web interface to mailing list archives")
  3522. (description
  3523. "Blists is a web interface to mailing list archives that works off
  3524. indexed mbox files. There are two programs: @code{bindex} and @code{bit}.
  3525. @code{bindex} generates or updates the index file (incremental updates
  3526. are supported). @code{bit} is a CGI/SSI program that generates web pages
  3527. on the fly. Both programs are written in C and are very fast.")
  3528. (license license:expat)))
  3529. (define-public swaks
  3530. (package
  3531. (name "swaks")
  3532. (version "20201014.0")
  3533. (source
  3534. (origin
  3535. (method git-fetch)
  3536. (uri (git-reference
  3537. (url "https://github.com/jetmore/swaks")
  3538. (commit (string-append "v" version))))
  3539. (file-name (git-file-name name version))
  3540. (sha256
  3541. (base32 "131i2b1yxhnbqkfk4kky40pfanqw2c5lcgbnjhfqp5cvpawpk2ai"))))
  3542. (build-system perl-build-system)
  3543. (inputs
  3544. `(("perl-io-socket-inet6" ,perl-io-socket-inet6)
  3545. ("perl-net-dns" ,perl-net-dns)
  3546. ("perl-net-ssleay" ,perl-net-ssleay)
  3547. ("perl-socket6" ,perl-socket6))) ; used by perl-io-socket-inet6
  3548. (arguments
  3549. `(#:tests? #f ; no tests
  3550. #:phases
  3551. (modify-phases %standard-phases
  3552. (add-after 'unpack 'set-build_version
  3553. (lambda _
  3554. (substitute* "swaks"
  3555. (("\"DEVRELEASE\"") (format #f "\"~a\"" ,version)))
  3556. #true))
  3557. (delete 'configure)
  3558. (replace 'build
  3559. (lambda _
  3560. (invoke "pod2man" "doc/base.pod" "swaks.1")))
  3561. (replace 'install
  3562. (lambda* (#:key outputs #:allow-other-keys)
  3563. (let ((out (assoc-ref outputs "out")))
  3564. (install-file "swaks" (string-append out "/bin"))
  3565. (install-file "swaks.1" (string-append out "/share/man/man1")))
  3566. #t))
  3567. (add-after 'install 'wrap-program
  3568. (lambda* (#:key outputs #:allow-other-keys)
  3569. (wrap-program (string-append (assoc-ref outputs "out")
  3570. "/bin/swaks")
  3571. `("PERL5LIB" ":" = (,(getenv "PERL5LIB"))))
  3572. #t)))))
  3573. (home-page "https://jetmore.org/john/code/swaks/")
  3574. (synopsis "Featureful SMTP test tool")
  3575. (description "Swaks is a flexible, scriptable, transaction-oriented SMTP
  3576. test tool. It handles SMTP features and extensions such as TLS,
  3577. authentication, and pipelining; multiple versions of the SMTP protocol
  3578. including SMTP, ESMTP, and LMTP; and multiple transport methods including
  3579. unix-domain sockets, internet-domain sockets, and pipes to spawned processes.
  3580. Options can be specified in environment variables, configuration files, and
  3581. the command line allowing maximum configurability and ease of use for
  3582. operators and scripters.")
  3583. (license license:gpl2+)))
  3584. (define-public alpine
  3585. (package
  3586. (name "alpine")
  3587. (version "2.24.2")
  3588. (source
  3589. (origin
  3590. (method git-fetch)
  3591. ;; There are two versions: the plain continuation of Alpine without extra
  3592. ;; patches and the version which adds extra fixes. Every distro uses
  3593. ;; the patched version, and so do we to not break expectations.
  3594. ;; http://alpine.freeiz.com/alpine/readme/README.patches
  3595. (uri (git-reference
  3596. (url "http://repo.or.cz/alpine.git")
  3597. (commit (string-append "v" version))))
  3598. (file-name (git-file-name name version))
  3599. (sha256
  3600. (base32 "0ibwss04j4qbhpd3jcw3d4xjf8jnmb9fi3sz58a99xw3awkfjabd"))
  3601. (modules '((guix build utils)))
  3602. (snippet
  3603. '(begin
  3604. ;; Remove pre-built binaries scattered across the source repository.
  3605. (for-each delete-file (find-files "." "\\.(dll|exe)"))
  3606. #t))))
  3607. (build-system gnu-build-system)
  3608. (arguments
  3609. `(#:make-flags
  3610. (list (string-append "CC=" ,(cc-for-target)))
  3611. #:configure-flags (list (string-append "--with-ssl-include-dir="
  3612. (assoc-ref %build-inputs "openssl")
  3613. "/include/openssl")
  3614. (string-append "--with-ssl-dir="
  3615. (assoc-ref %build-inputs "openssl"))
  3616. (string-append "--with-ssl-certs-dir="
  3617. "/etc/ssl/certs/")
  3618. (string-append "--with-ssl-lib-dir="
  3619. (assoc-ref %build-inputs "openssl")
  3620. "/lib")
  3621. (string-append "--with-interactive-spellcheck="
  3622. (assoc-ref %build-inputs "aspell")
  3623. "/bin/aspell")
  3624. "--with-date-stamp=Thu 1 Jan 01:00:01 CET 1970")
  3625. #:phases
  3626. (modify-phases %standard-phases
  3627. (add-after 'unpack 'assume-shadow-passwords
  3628. ;; Alpine's configure script confuses ‘shadow password support’ with
  3629. ;; ‘/etc/shadow exists in the build environment’. It does not.
  3630. (lambda _
  3631. (substitute* "configure"
  3632. (("test -f /etc/shadow") "true"))
  3633. #t))
  3634. (add-after 'unpack 'make-reproducible
  3635. (lambda _
  3636. ;; This removes time-dependent code to make alpine reproducible.
  3637. (substitute* "pico/blddate.c"
  3638. (("%02d-%s-%d") "1970-01-01"))
  3639. #t)))))
  3640. (inputs
  3641. `(("ncurses" ,ncurses)
  3642. ("openssl" ,openssl)
  3643. ("gnutls" ,gnutls)
  3644. ("openldap" ,openldap)
  3645. ("cyrus-sasl" ,cyrus-sasl)
  3646. ("mit-krb5" ,mit-krb5)
  3647. ("aspell" ,aspell)
  3648. ("tcl" ,tcl)
  3649. ("linux-pam" ,linux-pam)))
  3650. (home-page "https://repo.or.cz/alpine.git")
  3651. (synopsis "Alternatively Licensed Program for Internet News and Email")
  3652. (description
  3653. "Alpine is a text-based mail and news client. Alpine includes several
  3654. tools and applications:
  3655. @enumerate
  3656. @item alpine, the Alpine mailer
  3657. @item pico, the standalone text editor, GNU nano's predecessor
  3658. @item pilot, the standalone file system navigator
  3659. @end enumerate\n")
  3660. (license license:asl2.0)))
  3661. (define-public balsa
  3662. (package
  3663. (name "balsa")
  3664. (version "2.6.3")
  3665. (source
  3666. (origin
  3667. (method url-fetch)
  3668. (uri (string-append "https://pawsa.fedorapeople.org/balsa/"
  3669. "balsa-" version ".tar.xz"))
  3670. (sha256
  3671. (base32 "1m0x3rk7cp7slr47rmg4y91rbxgs652v706lyxj600m5r5v4bl6l"))))
  3672. (build-system gnu-build-system)
  3673. (arguments
  3674. `(#:configure-flags
  3675. '(;; Balsa tries to install additional MIME icons
  3676. ;; under gtk+ directory.
  3677. "--enable-extra-mimeicons=no"
  3678. "--with-gtksourceview"
  3679. "--with-canberra"
  3680. "--with-spell-checker=gtkspell"
  3681. "--with-gpgme"
  3682. "--with-sqlite"
  3683. "--with-compface"
  3684. "--with-ldap")))
  3685. (inputs
  3686. `(("cyrus-sasl" ,cyrus-sasl)
  3687. ("enchant" ,enchant)
  3688. ("gdk-pixbuf" ,gdk-pixbuf)
  3689. ("gmime" ,gmime)
  3690. ("gnutls" ,gnutls)
  3691. ("gpgme" ,gpgme)
  3692. ("gtk+" ,gtk+)
  3693. ("gtksourceview" ,gtksourceview)
  3694. ("gtkspell3" ,gtkspell3)
  3695. ("libassuan" ,libassuan) ; in gpgme.pc Requires
  3696. ("libcanberra" ,libcanberra)
  3697. ("libesmtp" ,libesmtp)
  3698. ("libical" ,libical)
  3699. ("libnotify" ,libnotify)
  3700. ("libsecret" ,libsecret)
  3701. ("openldap" ,openldap)
  3702. ("sqlite" ,sqlite)
  3703. ("webkitgtk" ,webkitgtk)))
  3704. (native-inputs
  3705. `(("compface" ,compface)
  3706. ("glib" ,glib "bin")
  3707. ("intltool" ,intltool)
  3708. ("pkg-config" ,pkg-config)
  3709. ("yelp-tools" ,yelp-tools)))
  3710. (home-page "https://pawsa.fedorapeople.org/balsa")
  3711. (synopsis "E-mail client for GNOME")
  3712. (description "Balsa is a highly configurable and robust mail client for
  3713. the GNOME desktop. It supports both POP3 and IMAP servers as well as the
  3714. mbox, maildir and mh local mailbox formats. Balsa also supports SMTP and/or
  3715. the use of a local MTA such as Sendmail.")
  3716. (license license:gpl3+)))
  3717. (define-public afew
  3718. (package
  3719. (name "afew")
  3720. (version "3.0.1")
  3721. (source
  3722. (origin
  3723. (method url-fetch)
  3724. (uri (pypi-uri "afew" version))
  3725. (sha256
  3726. (base32
  3727. "0wpfqbqjlfb9z0hafvdhkm7qw56cr9kfy6n8vb0q42dwlghpz1ff"))))
  3728. (build-system python-build-system)
  3729. (inputs
  3730. `(("notmuch" ,notmuch)
  3731. ("python-chardet" ,python-chardet)
  3732. ("python-dkimpy" ,python-dkimpy)
  3733. ("python-notmuch" ,python-notmuch)))
  3734. (native-inputs
  3735. `(("python-freezegun" ,python-freezegun)
  3736. ("python-setuptools-scm" ,python-setuptools-scm)))
  3737. (home-page "https://github.com/afewmail/afew")
  3738. (synopsis "Initial tagging script for notmuch mail")
  3739. (description "afew is an initial tagging script for notmuch mail. It
  3740. provides automatic tagging each time new mail is registered with notmuch. It
  3741. can add tags based on email headers or Maildir folders and can handle spam and
  3742. killed threads.")
  3743. (license license:isc)))
  3744. (define-public pan
  3745. (package
  3746. (name "pan")
  3747. (version "0.146")
  3748. (source
  3749. (origin
  3750. (method url-fetch)
  3751. (uri (string-append "http://pan.rebelbase.com/download/releases/"
  3752. version "/source/" name "-" version ".tar.bz2"))
  3753. (sha256
  3754. (base32 "17agd27sn4a7nahvkpg0w39kv74njgdrrygs74bbvpaj8rk2hb55"))))
  3755. (arguments
  3756. `(#:configure-flags '("--with-gtk3" "--with-gtkspell" "--with-gnutls"
  3757. "--enable-libnotify" "--enable-manual"
  3758. "--enable-gkr")
  3759. #:phases
  3760. (modify-phases %standard-phases
  3761. (add-before 'configure 'patch-gpg2
  3762. (lambda* (#:key inputs #:allow-other-keys)
  3763. (substitute* "pan/usenet-utils/gpg.cc"
  3764. (("\"gpg2\"") (string-append "\""
  3765. (assoc-ref inputs "gnupg")
  3766. "/bin/gpg\"")))
  3767. #t)))))
  3768. (inputs
  3769. `(("gmime" ,gmime-2.6)
  3770. ("gnupg" ,gnupg)
  3771. ("gnutls" ,gnutls)
  3772. ("gtk+" ,gtk+)
  3773. ("gtkspell3" ,gtkspell3)
  3774. ("libnotify" ,libnotify)
  3775. ("libsecret" ,libsecret)
  3776. ("libxml2" ,libxml2)
  3777. ("zlib" ,zlib)))
  3778. (native-inputs
  3779. `(("gettext-minimal" ,gettext-minimal)
  3780. ("itstool" ,itstool)
  3781. ("pkg-config" ,pkg-config)))
  3782. (build-system gnu-build-system)
  3783. (home-page "http://pan.rebelbase.com/")
  3784. (synopsis "Pan newsreader")
  3785. (description "@code{pan} is a Usenet newsreader that's good at both text
  3786. and binaries. It supports offline reading, scoring and killfiles, yEnc, NZB,
  3787. PGP handling, multiple servers, and secure connections.")
  3788. ;; License of the docs: fdl-1.1; Others: gpl2.
  3789. (license (list license:fdl1.1+ license:gpl2))))
  3790. (define-public imapfilter
  3791. (package
  3792. (name "imapfilter")
  3793. (version "2.7.5")
  3794. (source
  3795. (origin
  3796. (method git-fetch)
  3797. (uri (git-reference
  3798. (url "https://github.com/lefcha/imapfilter")
  3799. (commit (string-append "v" version))))
  3800. (file-name (git-file-name name version))
  3801. (sha256
  3802. (base32 "0a7f85r3axwclzw1s79zl2l8222nj2gklvvq33w9qv0dz5n71dcx"))))
  3803. (build-system gnu-build-system)
  3804. (arguments
  3805. `(#:tests? #f
  3806. #:make-flags
  3807. (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
  3808. (string-append "CC=" ,(cc-for-target)))
  3809. #:phases
  3810. (modify-phases %standard-phases
  3811. (delete 'configure)))) ; no configure script
  3812. (inputs
  3813. `(("lua" ,lua)
  3814. ("pcre2" ,pcre2)
  3815. ("openssl" ,openssl)))
  3816. (home-page "https://github.com/lefcha/imapfilter")
  3817. (synopsis "IMAP mail filtering utility")
  3818. (description "IMAPFilter is a mail filtering utility. It connects
  3819. to remote mail servers using IMAP, sends searching queries to the server and
  3820. processes mailboxes based on the results. It can be used to delete, copy,
  3821. move, flag, etc. messages residing in mailboxes at the same or different mail
  3822. servers. The 4rev1 and 4 versions of IMAP are supported.")
  3823. (license license:expat)))
  3824. (define-public urlscan
  3825. (package
  3826. (name "urlscan")
  3827. (version "0.9.6")
  3828. (source
  3829. (origin
  3830. (method url-fetch)
  3831. (uri (pypi-uri "urlscan" version))
  3832. (sha256
  3833. (base32 "09lxi7dhn49fpb3ij4cgrhj3qqqqs9rcxbjb7p9smw5wblrqpzga"))))
  3834. (build-system python-build-system)
  3835. (propagated-inputs
  3836. `(("python-urwid" ,python-urwid)))
  3837. (home-page "https://github.com/firecat53/urlscan")
  3838. (synopsis "View/select the URLs in an email message or file")
  3839. (description
  3840. "Urlscan is a small program that is designed to integrate with the
  3841. Mutt mail reader to allow you to easily launch a Web browser for URLs
  3842. contained in email messages. It parses an email message or file and scans it
  3843. for URLs and email addresses. It then displays the URLs and their context
  3844. within the message, and allows you to choose one or more URLs to send to your
  3845. Web browser. Alternatively, it send a list of all URLs to standard output.
  3846. It is a replacement for the @command{urlview} program.")
  3847. (license license:gpl2)))
  3848. (define-public tnef
  3849. (package
  3850. (name "tnef")
  3851. (version "1.4.18")
  3852. (source
  3853. (origin
  3854. (method git-fetch)
  3855. (uri (git-reference
  3856. (url "https://github.com/verdammelt/tnef")
  3857. (commit version)))
  3858. (sha256
  3859. (base32 "104g48mcm00bgiyzas2vf86331w7bnw7h3bc11ib4lp7rz6zqfck"))
  3860. (file-name (git-file-name name version))))
  3861. (build-system gnu-build-system)
  3862. (native-inputs
  3863. `(("autoconf" ,autoconf)
  3864. ("automake" ,automake)))
  3865. (arguments `(#:parallel-tests? #f)) ;tests are side-effect'y
  3866. (home-page "https://github.com/verdammelt/tnef")
  3867. (synopsis "Unpack @code{application/ms-tnef} attachments")
  3868. (description
  3869. "TNEF is a tar-like program that unpacks MIME attachments of type
  3870. @code{application/ms-tnef}.")
  3871. (license license:gpl2+)))
  3872. (define-public mumi
  3873. (let ((commit "9f070bd90adc67064cd8aff4e40f303d5957ef4a")
  3874. (revision "5"))
  3875. (package
  3876. (name "mumi")
  3877. (version (git-version "0.0.1" revision commit))
  3878. (source (origin
  3879. (method git-fetch)
  3880. (uri (git-reference
  3881. (url "https://git.elephly.net/software/mumi.git")
  3882. (commit commit)))
  3883. (file-name (git-file-name name version))
  3884. (sha256
  3885. (base32
  3886. "1ym1j3nzy8qhd1ydadccbgm0nckkmnq3vnz9qh9x8rasx7zg1ldp"))))
  3887. (build-system gnu-build-system)
  3888. (arguments
  3889. `(#:modules ((guix build gnu-build-system)
  3890. ((guix build guile-build-system)
  3891. #:select (target-guile-effective-version))
  3892. (guix build utils))
  3893. #:imported-modules ((guix build guile-build-system)
  3894. ,@%gnu-build-system-modules)
  3895. #:configure-flags '("--localstatedir=/var")
  3896. #:phases
  3897. (modify-phases %standard-phases
  3898. (add-after 'install 'wrap-executable
  3899. (lambda* (#:key outputs #:allow-other-keys)
  3900. (let* ((out (assoc-ref outputs "out"))
  3901. (bin (string-append out "/bin"))
  3902. (version (target-guile-effective-version))
  3903. (scm (string-append out "/share/guile/site/" version))
  3904. (go (string-append out "/lib/guile/" version
  3905. "/site-ccache")))
  3906. (wrap-program (string-append bin "/mumi")
  3907. `("GUILE_LOAD_PATH" ":" prefix
  3908. (,scm ,(getenv "GUILE_LOAD_PATH")))
  3909. `("GUILE_LOAD_COMPILED_PATH" ":" prefix
  3910. (,go ,(getenv "GUILE_LOAD_COMPILED_PATH"))))
  3911. #t))))))
  3912. (inputs
  3913. `(("guile-email" ,guile-email-latest)
  3914. ("guile-fibers" ,guile-fibers)
  3915. ("guile-gcrypt" ,guile-gcrypt)
  3916. ("guile-json" ,guile-json-3)
  3917. ("guile-redis" ,guile-redis)
  3918. ("guile-syntax-highlight" ,guile-syntax-highlight)
  3919. ("guile-webutils" ,guile-webutils)
  3920. ("guile-xapian" ,guile-xapian)
  3921. ("guile" ,guile-3.0)
  3922. ("mailutils" ,mailutils)))
  3923. (native-inputs
  3924. `(("autoconf" ,autoconf)
  3925. ("automake" ,automake)
  3926. ("pkg-config" ,pkg-config)))
  3927. (home-page "https://git.elephly.net/software/mumi.git")
  3928. (synopsis "Debbugs web interface")
  3929. (description "Mumi is a Debbugs web interface.")
  3930. (license license:agpl3+))))
  3931. (define-public ytnef
  3932. (package
  3933. (name "ytnef")
  3934. (version "1.9.3")
  3935. (source (origin
  3936. (method git-fetch)
  3937. (uri (git-reference
  3938. (url "https://github.com/Yeraze/ytnef")
  3939. (commit (string-append "v" version))))
  3940. (file-name (git-file-name name version))
  3941. (sha256
  3942. (base32
  3943. "07h48s5qf08503pp9kafqbwipdqghiif22ghki7z8j67gyp04l6l"))
  3944. (patches (search-patches "ytnef-CVE-2021-3403.patch"
  3945. "ytnef-CVE-2021-3404.patch"))))
  3946. (build-system gnu-build-system)
  3947. (native-inputs
  3948. `(("autoconf" ,autoconf)
  3949. ("automake" ,automake)
  3950. ("libtool" ,libtool)))
  3951. (home-page "https://github.com/Yeraze/ytnef/")
  3952. (synopsis "TNEF stream reader for winmail.dat files")
  3953. (description "This package provides a TNEF stream reader library and
  3954. related tools to process winmail.dat files.")
  3955. (license license:gpl2+)))
  3956. (define-public l2md
  3957. ;; No official release.
  3958. (let ((commit "f7286b49bb5fce25c898c143712fe34ad4d7864e")
  3959. (revision "1"))
  3960. (package
  3961. (name "l2md")
  3962. (version (git-version "0.1.0" revision commit))
  3963. (source
  3964. (origin
  3965. (method git-fetch)
  3966. (uri (git-reference
  3967. (url "https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/l2md.git")
  3968. (commit commit)))
  3969. (file-name (git-file-name name version))
  3970. (sha256
  3971. (base32 "0hxz8i70v1xgv30zjclfvmjqszn073c7i8nwmswi2lr6vd7cklvp"))))
  3972. (build-system gnu-build-system)
  3973. (inputs
  3974. `(("libgit2" ,libgit2)))
  3975. (arguments
  3976. `(#:phases
  3977. (modify-phases %standard-phases
  3978. (delete 'configure) ;no configure scripts
  3979. (delete 'check) ;no tests
  3980. (add-before 'install 'mkdir
  3981. (lambda* (#:key outputs #:allow-other-keys)
  3982. (let ((l2md (string-append (assoc-ref outputs "out") "/bin")))
  3983. (mkdir-p l2md)))))
  3984. #:make-flags
  3985. (list ,(string-append "CC=" (cc-for-target))
  3986. (string-append "PREFIX=" %output "/bin"))))
  3987. (home-page
  3988. "https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/l2md.git")
  3989. (synopsis "Import public-inbox archives via Git")
  3990. (description
  3991. "The @command{l2md} command line tool imports public-inbox archives via
  3992. Git and exports them in maildir format or to an MDA through a pipe.")
  3993. (license license:gpl2))))
  3994. (define-public public-inbox
  3995. (package
  3996. (name "public-inbox")
  3997. (version "1.6.1")
  3998. (source
  3999. (origin (method git-fetch)
  4000. (uri (git-reference
  4001. (url "https://public-inbox.org")
  4002. (commit (string-append "v" version))))
  4003. (sha256
  4004. (base32
  4005. "0mlwnp5knr7rk9kv8grlh342wsq2193m22zs83cjn9p7x9r2x5f9"))
  4006. (file-name (git-file-name name version))))
  4007. (build-system perl-build-system)
  4008. (arguments
  4009. '(#:phases
  4010. (modify-phases %standard-phases
  4011. (add-before 'configure 'qualify-paths
  4012. (lambda _
  4013. ;; Use absolute paths for 'xapian-compact'.
  4014. (let ((xapian-compact (which "xapian-compact")))
  4015. (substitute* "script/public-inbox-compact"
  4016. (("xapian-compact") xapian-compact)))
  4017. #t))
  4018. (add-before 'check 'pre-check
  4019. (lambda _
  4020. (substitute* "t/spawn.t"
  4021. (("\\['env'\\]") (string-append "['" (which "env") "']")))
  4022. (substitute* "t/ds-leak.t"
  4023. (("/bin/sh") (which "sh")))
  4024. (invoke "./certs/create-certs.perl")
  4025. ;; XXX: This test fails due to zombie process is not reaped by
  4026. ;; the builder.
  4027. (substitute* "t/httpd-unix.t"
  4028. (("^SKIP: \\{") "SKIP: { skip('Guix');"))
  4029. #t))
  4030. (add-after 'install 'wrap-programs
  4031. (lambda* (#:key inputs outputs #:allow-other-keys)
  4032. (let ((out (assoc-ref outputs "out")))
  4033. (for-each
  4034. (lambda (prog)
  4035. (wrap-program prog
  4036. ;; Let those scripts find their perl modules.
  4037. `("PERL5LIB" ":" prefix
  4038. (,(string-append out "/lib/perl5/site_perl")
  4039. ,(getenv "PERL5LIB")))
  4040. ;; 'git' is invoked in various files of the PublicInbox
  4041. ;; perl module.
  4042. `("PATH" ":" prefix
  4043. (,(dirname (search-input-file inputs "/bin/git"))))))
  4044. (find-files (string-append out "/bin"))))
  4045. #t)))))
  4046. (native-inputs
  4047. `(("xapian" ,xapian)
  4048. ;; For testing.
  4049. ("lsof" ,lsof)
  4050. ("openssl" ,openssl)))
  4051. (inputs
  4052. `(("git" ,git)
  4053. ("perl-dbd-sqlite" ,perl-dbd-sqlite)
  4054. ("perl-dbi" ,perl-dbi)
  4055. ("perl-email-address-xs" ,perl-email-address-xs)
  4056. ("perl-email-mime-contenttype" ,perl-email-mime-contenttype)
  4057. ("perl-email-mime" ,perl-email-mime)
  4058. ("perl-email-simple" ,perl-email-simple)
  4059. ("perl-net-server" ,perl-net-server)
  4060. ("perl-plack-middleware-deflater" ,perl-plack-middleware-deflater)
  4061. ("perl-plack-middleware-reverseproxy" ,perl-plack-middleware-reverseproxy)
  4062. ("perl-plack" ,perl-plack)
  4063. ("perl-search-xapian" ,perl-search-xapian)
  4064. ("perl-timedate" ,perl-timedate)
  4065. ("perl-uri-escape" ,perl-uri-escape)
  4066. ("perl-inline-c" ,perl-inline-c)
  4067. ("perl-parse-recdescent" ,perl-parse-recdescent)
  4068. ("perl-linux-inotify2" ,perl-linux-inotify2)
  4069. ;; FIXME: Perl modules are unable to find the config file for highlight
  4070. ;; https://issues.guix.gnu.org/48033#4
  4071. ;; ("highlight" ,highlight)
  4072. ;; For testing.
  4073. ("perl-ipc-run" ,perl-ipc-run)
  4074. ("perl-xml-feed" ,perl-xml-feed)))
  4075. (home-page "https://public-inbox.org/README.html")
  4076. (synopsis "Archive mailing lists in Git repositories")
  4077. (description
  4078. "public-inbox implements the sharing of an email inbox via Git to
  4079. complement or replace traditional mailing lists. Readers may read via NNTP,
  4080. IMAP, Atom feeds or HTML archives.")
  4081. (license license:agpl3+)))
  4082. (define-public sylpheed
  4083. (package
  4084. (name "sylpheed")
  4085. (version "3.7.0")
  4086. (source (origin
  4087. (method url-fetch)
  4088. (uri (string-append "https://sylpheed.sraoss.jp/sylpheed/v3.7/"
  4089. name "-" version ".tar.xz"))
  4090. (sha256
  4091. (base32
  4092. "0j9y5vdzch251s264diw9clrn88dn20bqqkwfmis9l7m8vmwasqd"))))
  4093. (build-system gnu-build-system)
  4094. (native-inputs
  4095. `(("pkg-config" ,pkg-config)))
  4096. (inputs
  4097. `(("bogofilter" ,bogofilter)
  4098. ("compface" ,compface)
  4099. ("gnupg" ,gnupg-1)
  4100. ("gpgme" ,gpgme)
  4101. ("gtk+-2.0" ,gtk+-2)
  4102. ("gtkspell" ,gtkspell3)
  4103. ("libnsl" ,libnsl)
  4104. ("openldap" ,openldap)
  4105. ("openssl" ,openssl)))
  4106. (home-page "https://sylpheed.sraoss.jp/en/")
  4107. (synopsis "Lightweight GTK+ email client")
  4108. (description
  4109. "Sylpheed is a simple, lightweight but featureful, and easy-to-use e-mail
  4110. client. Sylpheed provides intuitive user-interface. Sylpheed is also
  4111. designed for keyboard-oriented operation.")
  4112. (license license:gpl2+)))
  4113. (define-public python-authres
  4114. (package
  4115. (name "python-authres")
  4116. (version "1.2.0")
  4117. (source
  4118. (origin
  4119. (method url-fetch)
  4120. (uri (pypi-uri "authres" version))
  4121. (sha256
  4122. (base32
  4123. "1dr5zpqnb54h4f5ax8334l1dcp8j9083d7v4vdi1xqkwmnavklck"))))
  4124. (build-system python-build-system)
  4125. (arguments
  4126. '(#:phases
  4127. (modify-phases %standard-phases
  4128. (replace 'check
  4129. ;; Run doctests as described in the README.
  4130. (lambda _
  4131. (invoke "python" "-m" "authres" "-v"))))))
  4132. (home-page "https://launchpad.net/authentication-results-python")
  4133. (synopsis "Authentication-Results email header creator and parser")
  4134. (description
  4135. "This Python module can be used to generate and parse RFC 5451/7001/7601
  4136. @code{Authentication-Results} email headers. It supports extensions such as:
  4137. @itemize
  4138. @item RFC 5617 DKIM/ADSP
  4139. @item RFC 6008 DKIM signature identification (@code{header.b})
  4140. @item RFC 6212 @acronym{VBR, Vouch By Reference}
  4141. @item RFC 6577 @acronym{SPF, Sender Policy Framework}
  4142. @item RFC 7281 @code{Authentication-Results} registration for S/MIME
  4143. @item RFC 7293 The @code{Require-Recipient-Valid-Since} header field
  4144. @item RFC 7489 @acronym{DMARC, Domain-based Message Authentication Reporting
  4145. and Conformance}
  4146. @item @acronym{ARC, Authenticated Received Chain}
  4147. (draft-ietf-dmarc-arc-protocol-08)
  4148. @end itemize\n")
  4149. (license license:asl2.0)))
  4150. (define-public python-dkimpy
  4151. (package
  4152. (name "python-dkimpy")
  4153. (version "1.0.5")
  4154. (source
  4155. (origin
  4156. (method url-fetch)
  4157. (uri (pypi-uri "dkimpy" version))
  4158. (sha256
  4159. (base32 "088iz5cqjqh4c7141d94pvn13bh25aizqlrifwv6fs5g16zj094s"))))
  4160. (build-system python-build-system)
  4161. (arguments
  4162. '(#:phases
  4163. (modify-phases %standard-phases
  4164. (add-after 'patch-source-shebangs 'patch-more-source
  4165. (lambda* (#:key inputs #:allow-other-keys)
  4166. (let ((openssl (assoc-ref inputs "openssl")))
  4167. (substitute* "dkim/dknewkey.py"
  4168. (("/usr/bin/openssl") (string-append openssl "/bin/openssl"))))
  4169. #t))
  4170. (replace 'check
  4171. (lambda _
  4172. (invoke "python" "test.py"))))))
  4173. (propagated-inputs
  4174. `(("python-dnspython" ,python-dnspython)))
  4175. (native-inputs
  4176. `(("python-authres" ,python-authres)
  4177. ("python-pynacl" ,python-pynacl)))
  4178. (inputs
  4179. `(("openssl" ,openssl)))
  4180. (home-page "https://launchpad.net/dkimpy")
  4181. (synopsis "DKIM (DomainKeys Identified Mail)")
  4182. (description "Python module that implements @dfn{DKIM} (DomainKeys
  4183. Identified Mail) email signing and verification (RFC6376). It also provides
  4184. helper scripts for command line signing and verification. It supports DKIM
  4185. signing/verifying of ed25519-sha256 signatures (RFC 8463). It also supports
  4186. the RFC 8617 Authenticated Received Chain (ARC) protocol.")
  4187. (license license:bsd-3)))
  4188. (define-public python-authheaders
  4189. (package
  4190. (name "python-authheaders")
  4191. (version "0.13.0")
  4192. (source
  4193. (origin
  4194. (method url-fetch)
  4195. (uri (pypi-uri "authheaders" version))
  4196. (sha256
  4197. (base32
  4198. "14k6i72k5f8dyvps8vc0aq0cczc8lvqpgjfjzsy6qqychjvjcmwk"))))
  4199. (build-system python-build-system)
  4200. (propagated-inputs
  4201. `(("python-authres" ,python-authres)
  4202. ("python-dkimpy" ,python-dkimpy)
  4203. ("python-dnspython" ,python-dnspython)
  4204. ("python-publicsuffix2" ,python-publicsuffix2)))
  4205. (home-page "https://github.com/ValiMail/authentication-headers")
  4206. (synopsis "Library wrapping email authentication header verification and generation")
  4207. (description
  4208. "This is a Python library for the generation of email authentication
  4209. headers. The library can perform DKIM, SPF, and DMARC validation, and the
  4210. results are packaged into the Authentication-Results header. The library can
  4211. DKIM and ARC sign messages and output the corresponding signature headers.")
  4212. ;; The package's metadata claims it were MIT licensed, but the source file
  4213. ;; headers disagree. MPL-2 for the public suffix list.
  4214. (license (list license:zpl2.1 license:zlib license:mpl2.0))))
  4215. (define-public python-aiosmtpd
  4216. (package
  4217. (name "python-aiosmtpd")
  4218. (version "1.2.2")
  4219. (source
  4220. (origin
  4221. (method git-fetch)
  4222. (uri (git-reference
  4223. (url "https://github.com/aio-libs/aiosmtpd")
  4224. (commit version)))
  4225. (sha256
  4226. (base32 "0083d6nf75xv8nq1il6jabz36v6c452svy4p402csxwwih5pw6sk"))
  4227. (file-name (git-file-name name version))))
  4228. (build-system python-build-system)
  4229. (arguments
  4230. '(#:phases
  4231. (modify-phases %standard-phases
  4232. (add-after 'unpack 'delete-failing-tests
  4233. (lambda _
  4234. ;; This test uses an expired certificate.
  4235. (delete-file "aiosmtpd/tests/test_smtps.py")
  4236. #t))
  4237. (replace 'check
  4238. (lambda _
  4239. (invoke "python" "-m" "nose2" "-v"))))))
  4240. (native-inputs
  4241. `(("python-flufl-testing" ,python-flufl-testing)
  4242. ("python-nose2" ,python-nose2)))
  4243. (propagated-inputs
  4244. `(("python-atpublic" ,python-atpublic)))
  4245. (home-page "https://aiosmtpd.readthedocs.io/")
  4246. (synopsis "Asyncio based SMTP server")
  4247. (description
  4248. "This project is a reimplementation of the Python stdlib @code{smtpd.py}
  4249. based on asyncio.")
  4250. (license (list license:asl2.0
  4251. license:lgpl3)))) ; only for setup_helpers.py
  4252. (define-public python-imaplib2
  4253. (package
  4254. (name "python-imaplib2")
  4255. (version "3.6")
  4256. (source
  4257. (origin
  4258. (method url-fetch)
  4259. (uri (pypi-uri "imaplib2" version))
  4260. (sha256
  4261. (base32
  4262. "0nqyb274hq30agg1c0zkb5ijmcirgg35sp4dp4n292l665dlijwn"))))
  4263. (build-system python-build-system)
  4264. (home-page "https://github.com/jazzband/imaplib2/")
  4265. (synopsis "Threaded Python IMAP4 client")
  4266. (description "This package provides a threaded Python IMAP4 client, based
  4267. on RFC 3501 and original @code{imaplib} module.")
  4268. (license license:expat)))
  4269. (define-public rspamd
  4270. (package
  4271. (name "rspamd")
  4272. (version "2.7")
  4273. (source
  4274. (origin
  4275. (method git-fetch)
  4276. (uri (git-reference
  4277. (url "https://github.com/rspamd/rspamd")
  4278. (commit version)))
  4279. (sha256
  4280. (base32 "0fw6nbfc3xqapzq5nydakwgpw6cz6vb3qby2aqlr06lzf87d3hic"))
  4281. (file-name (git-file-name name version))))
  4282. (build-system cmake-build-system)
  4283. (arguments
  4284. '(#:configure-flags '("-DENABLE_LUAJIT=ON")))
  4285. (inputs
  4286. `(("openssl" ,openssl)
  4287. ("glib" ,glib)
  4288. ("ragel" ,ragel)
  4289. ("luajit" ,luajit)
  4290. ("sqlite" ,sqlite)
  4291. ("file" ,file)
  4292. ("icu4c" ,icu4c)
  4293. ("pcre" ,pcre)
  4294. ("zlib" ,zlib)
  4295. ("perl" ,perl)
  4296. ("libsodium" ,libsodium)))
  4297. (native-inputs
  4298. `(("pkg-config" ,pkg-config)))
  4299. (synopsis "Spam filtering system")
  4300. (description "Rspamd is an advanced spam filtering system that
  4301. allows evaluation of messages by a number of rules including regular
  4302. expressions, statistical analysis and custom services such as URL
  4303. black lists. Each message is analysed by Rspamd and given a spam
  4304. score.")
  4305. (home-page "https://www.rspamd.com/")
  4306. (license license:asl2.0)))
  4307. (define-public undbx
  4308. (package
  4309. (name "undbx")
  4310. (version "0.21")
  4311. (source (origin
  4312. (method url-fetch)
  4313. (uri (string-append "mirror://sourceforge/undbx/undbx-"
  4314. version ".tar.gz"))
  4315. (sha256
  4316. (base32
  4317. "0ncs1dzhrn9nlaxpyap2ipf61fc7k9bkkqacp3w6bngfj2c0p6yj"))))
  4318. (build-system gnu-build-system)
  4319. (home-page "https://undbx.sourceforge.io/")
  4320. (synopsis "Extract email messages from Outlook Express .dbx files")
  4321. (description "This package provides a tool to extract, recover and
  4322. undelete email messages from Outlook Express .dbx files.")
  4323. (license license:gpl3+)))
  4324. (define-public libpst
  4325. (package
  4326. (name "libpst")
  4327. (version "0.6.76")
  4328. (source
  4329. (origin
  4330. (method url-fetch)
  4331. (uri (string-append "https://www.five-ten-sg.com/libpst/packages/"
  4332. "libpst-" version ".tar.gz"))
  4333. (sha256
  4334. (base32
  4335. "0hhbbb8ddsgjhv9y1xd8s9ixlhdnjmhw12v06jwx4j6vpgp1na9x"))))
  4336. (build-system gnu-build-system)
  4337. (inputs
  4338. `(("boost" ,boost)
  4339. ("libgsf" ,libgsf)
  4340. ("python" ,python)
  4341. ("zlib" ,zlib)))
  4342. (native-inputs
  4343. `(("pkg-config" ,pkg-config)))
  4344. (home-page "https://www.five-ten-sg.com/libpst/")
  4345. (synopsis "")
  4346. (description "The Libpst utilities include @code{readpst} which can
  4347. convert email messages to both mbox and MH mailbox formats, @code{pst2ldif}
  4348. which can convert the contacts to @code{.ldif} format for import into LDAP
  4349. databases, and other tools to process Outlook email archives.")
  4350. (license license:gpl2+)))
  4351. (define-public crm114
  4352. (package
  4353. (name "crm114")
  4354. (version "20100106")
  4355. (source
  4356. (origin
  4357. (method url-fetch)
  4358. (uri (string-append "http://crm114.sourceforge.net/tarballs/crm114-"
  4359. version "-BlameMichelson.src.tar.gz"))
  4360. (sha256
  4361. (base32
  4362. "0awcjc5j2mclkkpbjyijj9mv8xjz3haljvaj0fyc4fm4xir68qpv"))))
  4363. (build-system gnu-build-system)
  4364. (arguments
  4365. `(#:modules ((guix build gnu-build-system)
  4366. ((guix build emacs-build-system) #:prefix emacs:)
  4367. (guix build utils)
  4368. (ice-9 string-fun))
  4369. #:imported-modules (,@%gnu-build-system-modules
  4370. (guix build emacs-build-system)
  4371. (guix build emacs-utils))
  4372. #:make-flags (list (string-append "prefix=" %output)
  4373. "LDFLAGS=") ; disable static linking
  4374. ;; Test suite is not fully automated. It requires a human to read the
  4375. ;; results and determine if the tests have passed.
  4376. #:tests? #f
  4377. #:phases
  4378. (modify-phases %standard-phases
  4379. (delete 'configure)
  4380. (add-before 'build 'fix-build
  4381. (lambda _
  4382. ;; Inline functions can only be used from the same compilation
  4383. ;; unit. This causes the build to fail.
  4384. (substitute* "crm_svm_matrix.c"
  4385. (("^inline ") ""))))
  4386. (add-before 'install 'pre-install
  4387. (lambda* (#:key outputs #:allow-other-keys)
  4388. (let ((out (assoc-ref outputs "out")))
  4389. ;; Install maillib.crm library.
  4390. (install-file "maillib.crm" (string-append out "/share/crm"))
  4391. ;; Set absolute store paths.
  4392. (substitute* "mailreaver.crm"
  4393. (("insert maillib.crm")
  4394. (string-append "insert " out "/share/crm/maillib.crm"))
  4395. (("\\\\/bin\\\\/ls")
  4396. (string-replace-substring (which "ls") "/" "\\/"))
  4397. ((":\\*:trainer_invoke_command:")
  4398. (string-append out "/bin/mailtrainer.crm")))
  4399. ;; Install mail related crm scripts.
  4400. (for-each (lambda (file)
  4401. (install-file file (string-append out "/bin")))
  4402. (list "mailfilter.crm" "mailreaver.crm" "mailtrainer.crm")))))
  4403. (add-after 'install 'install-emacs-mode
  4404. (assoc-ref emacs:%standard-phases 'install))
  4405. ;; Run phases from the emacs build system.
  4406. (add-after 'install-emacs-mode 'make-autoloads
  4407. (assoc-ref emacs:%standard-phases 'make-autoloads))
  4408. (add-after 'make-autoloads 'enable-autoloads-compilation
  4409. (assoc-ref emacs:%standard-phases 'enable-autoloads-compilation))
  4410. (add-after 'enable-autoloads-compilation 'emacs-build
  4411. (assoc-ref emacs:%standard-phases 'build))
  4412. (add-after 'emacs-build 'validate-compiled-autoloads
  4413. (assoc-ref emacs:%standard-phases 'validate-compiled-autoloads)))))
  4414. (inputs
  4415. `(("tre" ,tre)))
  4416. (native-inputs
  4417. `(("emacs" ,emacs-minimal)))
  4418. (home-page "http://crm114.sourceforge.net/")
  4419. (synopsis "Controllable regex mutilator")
  4420. (description "CRM114 is a system to examine incoming e-mail, system log
  4421. streams, data files or other data streams, and to sort, filter, or alter the
  4422. incoming files or data streams according to the user's wildest desires.
  4423. Criteria for categorization of data can be via a host of methods, including
  4424. regexes, approximate regexes, a Hidden Markov Model, Orthogonal Sparse
  4425. Bigrams, WINNOW, Correllation, KNN/Hyperspace, or Bit Entropy (or by other
  4426. means--it's all programmable).")
  4427. (license license:gpl3)))