openapi.yaml 197 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089
  1. openapi: 3.1.0
  2. info:
  3. description: >-
  4. mailcow is complete e-mailing solution with advanced antispam, antivirus,
  5. nice UI and API.
  6. In order to use this API you have to create a API key and add your IP
  7. address to the whitelist of allowed IPs this can be done by logging into the
  8. Mailcow UI using your admin account, then go to Configuration > Access >
  9. Edit administrator details > API. There you will find a collapsed API menu.
  10. There are two types of API keys
  11. - The read only key can only be used for all get endpoints
  12. - The read write key can be used for all endpoints
  13. title: mailcow API
  14. version: "1.0.0"
  15. servers:
  16. - url: /
  17. components:
  18. securitySchemes:
  19. ApiKeyAuth:
  20. type: apiKey
  21. in: header
  22. name: X-API-Key
  23. responses:
  24. Unauthorized:
  25. description: Unauthorized
  26. content:
  27. application/json:
  28. schema:
  29. type: object
  30. properties:
  31. type:
  32. type: string
  33. example: error
  34. msg:
  35. type: string
  36. example: authentication failed
  37. required:
  38. - type
  39. - msg
  40. security:
  41. - ApiKeyAuth: []
  42. paths:
  43. /api/v1/add/alias:
  44. post:
  45. responses:
  46. "401":
  47. $ref: "#/components/responses/Unauthorized"
  48. "200":
  49. content:
  50. application/json:
  51. examples:
  52. response:
  53. value:
  54. - log:
  55. - mailbox
  56. - add
  57. - alias
  58. - active: "1"
  59. address: alias@domain.tld
  60. goto: destination@domain.tld
  61. - null
  62. msg:
  63. - alias_added
  64. - alias@domain.tld
  65. type: success
  66. schema:
  67. properties:
  68. log:
  69. description: contains request object
  70. items: {}
  71. type: array
  72. msg:
  73. items: {}
  74. type: array
  75. type:
  76. enum:
  77. - success
  78. - danger
  79. - error
  80. type: string
  81. type: object
  82. description: OK
  83. headers: {}
  84. tags:
  85. - Aliases
  86. description: >-
  87. You may create your own mailbox alias using this action. It takes a JSON
  88. object containing a domain informations.
  89. Only one `goto*` option can be used, for ex. if you want learn as spam,
  90. then send just `goto_spam = 1` in request body.
  91. operationId: Create alias
  92. requestBody:
  93. content:
  94. application/json:
  95. schema:
  96. example:
  97. active: "1"
  98. address: alias@domain.tld
  99. goto: destination@domain.tld
  100. properties:
  101. active:
  102. description: is alias active or not
  103. type: boolean
  104. address:
  105. description: 'alias address, for catchall use "@domain.tld"'
  106. type: string
  107. goto:
  108. description: "destination address, comma separated"
  109. type: string
  110. goto_ham:
  111. description: learn as ham
  112. type: boolean
  113. goto_null:
  114. description: silently ignore
  115. type: boolean
  116. goto_spam:
  117. description: learn as spam
  118. type: boolean
  119. sogo_visible:
  120. description: toggle visibility as selectable sender in SOGo
  121. type: boolean
  122. type: object
  123. summary: Create alias
  124. /api/v1/add/time_limited_alias:
  125. post:
  126. responses:
  127. "401":
  128. $ref: "#/components/responses/Unauthorized"
  129. "200":
  130. content:
  131. application/json:
  132. examples:
  133. response:
  134. value:
  135. - log:
  136. - mailbox
  137. - add
  138. - time_limited_alias
  139. - address: info@domain.tld
  140. domain: domain.tld
  141. - null
  142. msg:
  143. - mailbox_modified
  144. - info@domain.tld
  145. type: success
  146. schema:
  147. properties:
  148. log:
  149. description: contains request object
  150. items: {}
  151. type: array
  152. msg:
  153. items: {}
  154. type: array
  155. type:
  156. enum:
  157. - success
  158. - danger
  159. - error
  160. type: string
  161. type: object
  162. description: OK
  163. headers: {}
  164. tags:
  165. - Aliases
  166. description: >-
  167. You may create a time limited alias using this action. It takes a JSON
  168. object containing a domain and mailbox informations.
  169. Mailcow will generate a random alias.
  170. operationId: Create time limited alias
  171. requestBody:
  172. content:
  173. application/json:
  174. schema:
  175. example:
  176. username: info@domain.tld
  177. domain: domain.tld
  178. properties:
  179. username:
  180. description: 'the mailbox an alias should be created for'
  181. type: string
  182. domain:
  183. description: "the domain"
  184. type: string
  185. type: object
  186. summary: Create time limited alias
  187. /api/v1/add/app-passwd:
  188. post:
  189. responses:
  190. "401":
  191. $ref: "#/components/responses/Unauthorized"
  192. "200":
  193. content:
  194. application/json:
  195. examples:
  196. response:
  197. value:
  198. - log:
  199. - app_passwd
  200. - add
  201. - active: "1"
  202. username: info@domain.tld
  203. app_name: wordpress
  204. app_passwd: keyleudecticidechothistishownsan31
  205. app_passwd2: keyleudecticidechothistishownsan31
  206. protocols:
  207. - imap_access
  208. - dav_access
  209. - smtp_access
  210. - eas_access
  211. - pop3_access
  212. - sieve_access
  213. msg: app_passwd_added
  214. type: success
  215. schema:
  216. properties:
  217. log:
  218. description: contains request object
  219. items: {}
  220. type: array
  221. msg:
  222. items: {}
  223. type: array
  224. type:
  225. enum:
  226. - success
  227. - danger
  228. - error
  229. type: string
  230. type: object
  231. description: OK
  232. headers: {}
  233. tags:
  234. - App Passwords
  235. description: >-
  236. Using this endpoint you can create a new app password for a specific
  237. mailbox.
  238. operationId: Create App Password
  239. requestBody:
  240. content:
  241. application/json:
  242. schema:
  243. example:
  244. active: "1"
  245. username: info@domain.tld
  246. app_name: wordpress
  247. app_passwd: keyleudecticidechothistishownsan31
  248. app_passwd2: keyleudecticidechothistishownsan31
  249. protocols:
  250. - imap_access
  251. - dav_access
  252. - smtp_access
  253. - eas_access
  254. - pop3_access
  255. - sieve_access
  256. properties:
  257. active:
  258. description: is alias active or not
  259. type: boolean
  260. username:
  261. description: mailbox for which the app password should be created
  262. type: string
  263. app_name:
  264. description: name of your app password
  265. type: string
  266. app_passwd:
  267. description: your app password
  268. type: string
  269. app_passwd2:
  270. description: your app password
  271. type: string
  272. type: object
  273. summary: Create App Password
  274. /api/v1/add/bcc:
  275. post:
  276. responses:
  277. "401":
  278. $ref: "#/components/responses/Unauthorized"
  279. "200":
  280. content:
  281. application/json:
  282. examples:
  283. response:
  284. value:
  285. - log:
  286. - bcc
  287. - add
  288. - active: "1"
  289. bcc_dest: bcc@awesomecow.tld
  290. local_dest: mailcow.tld
  291. type: sender
  292. - null
  293. msg: bcc_saved
  294. type: success
  295. schema:
  296. properties:
  297. log:
  298. description: contains request object
  299. items: {}
  300. type: array
  301. msg:
  302. items: {}
  303. type: array
  304. type:
  305. enum:
  306. - success
  307. - danger
  308. - error
  309. type: string
  310. type: object
  311. description: OK
  312. headers: {}
  313. tags:
  314. - Address Rewriting
  315. description: >-
  316. Using this endpoint you can create a BCC map to forward all mails via a
  317. bcc for a given domain.
  318. operationId: Create BCC Map
  319. requestBody:
  320. content:
  321. application/json:
  322. schema:
  323. example:
  324. active: "1"
  325. bcc_dest: bcc@awesomecow.tld
  326. local_dest: mailcow.tld
  327. type: sender
  328. properties:
  329. active:
  330. description: 1 for a active user account 0 for a disabled user account
  331. type: number
  332. bcc_dest:
  333. description: the email address where all mails should be send to
  334. type: string
  335. local_dest:
  336. description: the domain which emails should be forwarded
  337. type: string
  338. type:
  339. description: the type of bcc map can be `sender` or `recipient`
  340. type: string
  341. type: object
  342. summary: Create BCC Map
  343. /api/v1/add/dkim:
  344. post:
  345. responses:
  346. "401":
  347. $ref: "#/components/responses/Unauthorized"
  348. "200":
  349. content:
  350. application/json:
  351. examples:
  352. response:
  353. value:
  354. - log:
  355. - dkim
  356. - add
  357. - dkim_selector: dkim
  358. domains: hanspeterlol.de
  359. key_size: "2048"
  360. msg:
  361. - dkim_added
  362. - hanspeterlol.de
  363. type: success
  364. schema:
  365. properties:
  366. log:
  367. description: contains request object
  368. items: {}
  369. type: array
  370. msg:
  371. items: {}
  372. type: array
  373. type:
  374. enum:
  375. - success
  376. - danger
  377. - error
  378. type: string
  379. type: object
  380. description: OK
  381. headers: {}
  382. tags:
  383. - DKIM
  384. description: Using this endpoint you can generate new DKIM keys.
  385. operationId: Generate DKIM Key
  386. requestBody:
  387. content:
  388. application/json:
  389. schema:
  390. example:
  391. dkim_selector: dkim
  392. domains: mailcow.tld
  393. key_size: "2048"
  394. properties:
  395. dkim_selector:
  396. description: the DKIM selector default dkim
  397. type: string
  398. domains:
  399. description: a list of domains for which a dkim key should be generated
  400. type: string
  401. key_size:
  402. description: the key size (1024, 2048, 3072 or 4096)
  403. type: number
  404. type: object
  405. summary: Generate DKIM Key
  406. /api/v1/add/dkim_duplicate:
  407. post:
  408. responses:
  409. "401":
  410. $ref: "#/components/responses/Unauthorized"
  411. "200":
  412. content:
  413. application/json:
  414. examples:
  415. response:
  416. value:
  417. - log:
  418. - dkim
  419. - duplicate
  420. - from_domain: mailcow.tld
  421. to_domain: awesomecow.tld
  422. msg:
  423. - dkim_duplicated
  424. - mailcow.tld
  425. - awesomecow.tld
  426. type: success
  427. schema:
  428. properties:
  429. log:
  430. description: contains request object
  431. items: {}
  432. type: array
  433. msg:
  434. items: {}
  435. type: array
  436. type:
  437. enum:
  438. - success
  439. - danger
  440. - error
  441. type: string
  442. type: object
  443. description: OK
  444. headers: {}
  445. tags:
  446. - DKIM
  447. description: Using this endpoint you can duplicate the DKIM Key of one domain.
  448. operationId: Duplicate DKIM Key
  449. requestBody:
  450. content:
  451. application/json:
  452. schema:
  453. example:
  454. from_domain: mailcow.tld
  455. to_domain: awesomecow.tld
  456. properties:
  457. fron_domain:
  458. description: the domain where the dkim key should be copied from
  459. type: string
  460. to_domain:
  461. description: the domain where the dkim key should be copied to
  462. type: string
  463. type: object
  464. summary: Duplicate DKIM Key
  465. /api/v1/add/domain:
  466. post:
  467. responses:
  468. "401":
  469. $ref: "#/components/responses/Unauthorized"
  470. "200":
  471. content:
  472. application/json:
  473. examples:
  474. response:
  475. value:
  476. - log:
  477. - ratelimit
  478. - edit
  479. - domain
  480. - object: domain.tld
  481. rl_frame: s
  482. rl_value: "10"
  483. msg:
  484. - rl_saved
  485. - domain.tld
  486. type: success
  487. - log:
  488. - mailbox
  489. - add
  490. - domain
  491. - active: "1"
  492. aliases: "400"
  493. restart_sogo: "1"
  494. backupmx: "0"
  495. defquota: "3072"
  496. description: some decsription
  497. domain: domain.tld
  498. mailboxes: "10"
  499. maxquota: "10240"
  500. quota: "10240"
  501. relay_all_recipients: "0"
  502. rl_frame: s
  503. rl_value: "10"
  504. tags: ["tag1", "tag2"]
  505. - null
  506. msg:
  507. - domain_added
  508. - domain.tld
  509. type: success
  510. schema:
  511. type: array
  512. items:
  513. type: object
  514. properties:
  515. log:
  516. description: contains request object
  517. items: {}
  518. type: array
  519. msg:
  520. items: {}
  521. type: array
  522. type:
  523. enum:
  524. - success
  525. - danger
  526. - error
  527. type: string
  528. description: OK
  529. headers: {}
  530. tags:
  531. - Domains
  532. description: >-
  533. You may create your own domain using this action. It takes a JSON object
  534. containing a domain informations.
  535. operationId: Create domain
  536. requestBody:
  537. content:
  538. application/json:
  539. schema:
  540. example:
  541. active: "1"
  542. aliases: "400"
  543. backupmx: "0"
  544. defquota: "3072"
  545. description: some decsription
  546. domain: domain.tld
  547. mailboxes: "10"
  548. maxquota: "10240"
  549. quota: "10240"
  550. relay_all_recipients: "0"
  551. rl_frame: s
  552. rl_value: "10"
  553. restart_sogo: "10"
  554. tags: ["tag1", "tag2"]
  555. properties:
  556. active:
  557. description: is domain active or not
  558. type: boolean
  559. aliases:
  560. description: limit count of aliases associated with this domain
  561. type: number
  562. backupmx:
  563. description: relay domain or not
  564. type: boolean
  565. defquota:
  566. description: predefined mailbox quota in `add mailbox` form
  567. type: number
  568. description:
  569. description: Description of domain
  570. type: string
  571. domain:
  572. description: Fully qualified domain name
  573. type: string
  574. gal:
  575. description: >-
  576. is domain global address list active or not, it enables
  577. shared contacts accross domain in SOGo webmail
  578. type: boolean
  579. mailboxes:
  580. description: limit count of mailboxes associated with this domain
  581. type: number
  582. maxquota:
  583. description: maximum quota per mailbox
  584. type: number
  585. quota:
  586. description: maximum quota for this domain (for all mailboxes in sum)
  587. type: number
  588. restart_sogo:
  589. description: restart SOGo to activate the domain in SOGo
  590. type: number
  591. relay_all_recipients:
  592. description: >-
  593. if not, them you have to create "dummy" mailbox for each
  594. address to relay
  595. type: boolean
  596. relay_unknown_only:
  597. description: Relay non-existing mailboxes only. Existing mailboxes will be delivered locally.
  598. type: boolean
  599. rl_frame:
  600. enum:
  601. - s
  602. - m
  603. - h
  604. - d
  605. type: string
  606. rl_value:
  607. description: rate limit value
  608. type: number
  609. tags:
  610. description: tags for this Domain
  611. type: array
  612. items:
  613. type: string
  614. type: object
  615. summary: Create domain
  616. /api/v1/add/domain-admin:
  617. post:
  618. responses:
  619. "401":
  620. $ref: "#/components/responses/Unauthorized"
  621. "200":
  622. content:
  623. application/json:
  624. examples:
  625. response:
  626. value:
  627. - log:
  628. - domain_admin
  629. - add
  630. - active: "1"
  631. domains: mailcow.tld
  632. password: "*"
  633. password2: "*"
  634. username: testadmin
  635. msg:
  636. - domain_admin_added
  637. - testadmin
  638. type: success
  639. schema:
  640. properties:
  641. log:
  642. description: contains request object
  643. items: {}
  644. type: array
  645. msg:
  646. items: {}
  647. type: array
  648. type:
  649. enum:
  650. - success
  651. - danger
  652. - error
  653. type: string
  654. type: object
  655. description: OK
  656. headers: {}
  657. tags:
  658. - Domain admin
  659. description: >-
  660. Using this endpoint you can create a new Domain Admin user. This user
  661. has full control over a domain, and can create new mailboxes and
  662. aliases.
  663. operationId: Create Domain Admin user
  664. requestBody:
  665. content:
  666. application/json:
  667. schema:
  668. example:
  669. active: "1"
  670. domains: mailcow.tld
  671. password: supersecurepw
  672. password2: supersecurepw
  673. username: testadmin
  674. properties:
  675. active:
  676. description: 1 for a active user account 0 for a disabled user account
  677. type: number
  678. domains:
  679. description: the domains the user should be a admin of
  680. type: string
  681. password:
  682. description: domain admin user password
  683. type: string
  684. password2:
  685. description: domain admin user password
  686. type: string
  687. username:
  688. description: the username for the admin user
  689. type: string
  690. type: object
  691. summary: Create Domain Admin user
  692. /api/v1/add/sso/domain-admin:
  693. post:
  694. responses:
  695. "401":
  696. $ref: "#/components/responses/Unauthorized"
  697. "200":
  698. content:
  699. application/json:
  700. examples:
  701. response:
  702. value:
  703. token: "591F6D-5C3DD2-7455CD-DAF1C1-AA4FCC"
  704. description: OK
  705. headers: { }
  706. tags:
  707. - Single Sign-On
  708. description: >-
  709. Using this endpoint you can issue a token for Domain Admin user. This token can be used for
  710. autologin Domain Admin user by using query_string var sso_token={token}. Token expiration time is 30s
  711. operationId: Issue Domain Admin SSO token
  712. requestBody:
  713. content:
  714. application/json:
  715. schema:
  716. example:
  717. username: testadmin
  718. properties:
  719. username:
  720. description: the username for the admin user
  721. type: object
  722. type: object
  723. summary: Issue Domain Admin SSO token
  724. /api/v1/edit/da-acl:
  725. post:
  726. responses:
  727. "401":
  728. $ref: "#/components/responses/Unauthorized"
  729. "200":
  730. content:
  731. application/json:
  732. examples:
  733. response:
  734. value:
  735. - type: success
  736. log:
  737. - acl
  738. - edit
  739. - testadmin
  740. - username:
  741. - testadmin
  742. da_acl:
  743. - syncjobs
  744. - quarantine
  745. - login_as
  746. - sogo_access
  747. - app_passwds
  748. - bcc_maps
  749. - pushover
  750. - filters
  751. - ratelimit
  752. - spam_policy
  753. - extend_sender_acl
  754. - unlimited_quota
  755. - protocol_access
  756. - smtp_ip_access
  757. - alias_domains
  758. - domain_desc
  759. msg:
  760. - acl_saved
  761. - testadmin
  762. schema:
  763. properties:
  764. log:
  765. description: contains request object
  766. items: {}
  767. type: array
  768. msg:
  769. items: {}
  770. type: array
  771. type:
  772. enum:
  773. - success
  774. - danger
  775. - error
  776. type: string
  777. type: object
  778. description: OK
  779. headers: {}
  780. tags:
  781. - Domain admin
  782. description: >-
  783. Using this endpoint you can edit the ACLs of a Domain Admin user. This user
  784. has full control over a domain, and can create new mailboxes and
  785. aliases.
  786. operationId: Edit Domain Admin ACL
  787. requestBody:
  788. content:
  789. application/json:
  790. schema:
  791. example:
  792. items:
  793. - testadmin
  794. attr:
  795. da_acl:
  796. - syncjobs
  797. - quarantine
  798. - login_as
  799. - sogo_access
  800. - app_passwds
  801. - bcc_maps
  802. - pushover
  803. - filters
  804. - ratelimit
  805. - spam_policy
  806. - extend_sender_acl
  807. - unlimited_quota
  808. - protocol_access
  809. - smtp_ip_access
  810. - alias_domains
  811. - domain_desc
  812. properties:
  813. items:
  814. description: contains the domain admin username you want to edit
  815. type: object
  816. attr:
  817. properties:
  818. da_acl:
  819. description: contains the list of acl names that are active for this user
  820. type: object
  821. type: object
  822. summary: Edit Domain Admin ACL
  823. /api/v1/edit/domain-admin:
  824. post:
  825. responses:
  826. "401":
  827. $ref: "#/components/responses/Unauthorized"
  828. "200":
  829. content:
  830. application/json:
  831. examples:
  832. response:
  833. value:
  834. - type: success
  835. log:
  836. - domain_admin
  837. - edit
  838. - username: testadmin
  839. active: ["0","1"]
  840. username_new: testadmin
  841. domains: ["domain.tld"]
  842. password: "*"
  843. password2: "*"
  844. msg:
  845. - domain_admin_modified
  846. - testadmin
  847. schema:
  848. properties:
  849. type:
  850. enum:
  851. - success
  852. - danger
  853. - error
  854. type: string
  855. log:
  856. description: contains request object
  857. items: {}
  858. type: array
  859. msg:
  860. items: {}
  861. type: array
  862. type: object
  863. description: OK
  864. headers: {}
  865. tags:
  866. - Domain admin
  867. description: >-
  868. Using this endpoint you can edit a existing Domain Admin user. This user
  869. has full control over a domain, and can create new mailboxes and
  870. aliases.
  871. operationId: Edit Domain Admin user
  872. requestBody:
  873. content:
  874. application/json:
  875. schema:
  876. example:
  877. items:
  878. - testadmin
  879. attr:
  880. active:
  881. - '0'
  882. - '1'
  883. username_new: testadmin
  884. domains: ["domain.tld"]
  885. password: supersecurepassword
  886. password2: supersecurepassword
  887. properties:
  888. attr:
  889. properties:
  890. active:
  891. description: is the domain admin active or not
  892. type: boolean
  893. username_new:
  894. description: the username of the domain admin, change this to change the username
  895. type: string
  896. domains:
  897. description: a list of all domains managed by this domain admin
  898. type: array
  899. items:
  900. type: string
  901. password:
  902. description: the new domain admin user password
  903. type: string
  904. password2:
  905. description: the new domain admin user password for confirmation
  906. type: string
  907. type: object
  908. items:
  909. description: contains the domain admin username you want to edit
  910. type: object
  911. summary: Edit Domain Admin user
  912. /api/v1/add/domain-policy:
  913. post:
  914. responses:
  915. "401":
  916. $ref: "#/components/responses/Unauthorized"
  917. "200":
  918. content:
  919. application/json:
  920. examples:
  921. response:
  922. value:
  923. - log:
  924. - policy
  925. - add
  926. - domain
  927. - domain: domain.tld
  928. object_from: "*@baddomain.tld"
  929. object_list: bl
  930. msg:
  931. - domain_modified
  932. - domain.tld
  933. type: success
  934. schema:
  935. properties:
  936. log:
  937. description: contains request object
  938. items: {}
  939. type: array
  940. msg:
  941. items: {}
  942. type: array
  943. type:
  944. enum:
  945. - success
  946. - danger
  947. - error
  948. type: string
  949. type: object
  950. description: OK
  951. headers: {}
  952. tags:
  953. - Domain antispam policies
  954. description: >-
  955. You may create your own domain policy using this action. It takes a JSON
  956. object containing a domain informations.
  957. operationId: Create domain policy
  958. requestBody:
  959. content:
  960. application/json:
  961. schema:
  962. example:
  963. domain: domain.tld
  964. object_from: "*@baddomain.tld"
  965. object_list: bl
  966. properties:
  967. domain:
  968. description: domain name to which policy is associated to
  969. type: string
  970. object_from:
  971. description: exact address or use wildcard to match whole domain
  972. type: string
  973. object_list:
  974. enum:
  975. - wl
  976. - bl
  977. type: string
  978. type: object
  979. summary: Create domain policy
  980. /api/v1/add/fwdhost:
  981. post:
  982. responses:
  983. "401":
  984. $ref: "#/components/responses/Unauthorized"
  985. "200":
  986. content:
  987. application/json:
  988. examples:
  989. response:
  990. value:
  991. - log:
  992. - fwdhost
  993. - add
  994. - filter_spam: "0"
  995. hostname: hosted.mailcow.de
  996. msg:
  997. - forwarding_host_added
  998. - "5.1.76.202, 2a00:f820:417::202"
  999. type: success
  1000. schema:
  1001. properties:
  1002. log:
  1003. description: contains request object
  1004. items: {}
  1005. type: array
  1006. msg:
  1007. items: {}
  1008. type: array
  1009. type:
  1010. enum:
  1011. - success
  1012. - danger
  1013. - error
  1014. type: string
  1015. type: object
  1016. description: OK
  1017. headers: {}
  1018. tags:
  1019. - Fordwarding Hosts
  1020. description: >-
  1021. Add a new Forwarding host to mailcow. You can chose to enable or disable
  1022. spam filtering of incoming emails by specifing `filter_spam` 0 =
  1023. inactive, 1 = active.
  1024. operationId: Add Forward Host
  1025. requestBody:
  1026. content:
  1027. application/json:
  1028. schema:
  1029. example:
  1030. filter_spam: "0"
  1031. hostname: hosted.mailcow.de
  1032. properties:
  1033. filter_spam:
  1034. description: "1 to enable spam filter, 0 to disable spam filter"
  1035. type: number
  1036. hostname:
  1037. description: contains the hostname you want to add
  1038. type: string
  1039. type: object
  1040. summary: Add Forward Host
  1041. /api/v1/add/mailbox:
  1042. post:
  1043. responses:
  1044. "401":
  1045. $ref: "#/components/responses/Unauthorized"
  1046. "200":
  1047. content:
  1048. application/json:
  1049. examples:
  1050. response:
  1051. value:
  1052. - log:
  1053. - mailbox
  1054. - add
  1055. - mailbox
  1056. - active: "1"
  1057. domain: domain.tld
  1058. local_part: info
  1059. name: Full name
  1060. password: "*"
  1061. password2: "*"
  1062. quota: "3072"
  1063. force_pw_update: "1"
  1064. tls_enforce_in: "1"
  1065. tls_enforce_out: "1"
  1066. tags: ["tag1", "tag2"]
  1067. - null
  1068. msg:
  1069. - mailbox_added
  1070. - info@domain.tld
  1071. type: success
  1072. schema:
  1073. properties:
  1074. log:
  1075. description: contains request object
  1076. items: {}
  1077. type: array
  1078. msg:
  1079. items: {}
  1080. type: array
  1081. type:
  1082. enum:
  1083. - success
  1084. - danger
  1085. - error
  1086. type: string
  1087. type: object
  1088. description: OK
  1089. headers: {}
  1090. tags:
  1091. - Mailboxes
  1092. description: >-
  1093. You may create your own mailbox using this action. It takes a JSON
  1094. object containing a domain informations.
  1095. operationId: Create mailbox
  1096. requestBody:
  1097. content:
  1098. application/json:
  1099. schema:
  1100. example:
  1101. active: "1"
  1102. domain: domain.tld
  1103. local_part: info
  1104. name: Full name
  1105. authsource: mailcow
  1106. password: atedismonsin
  1107. password2: atedismonsin
  1108. quota: "3072"
  1109. force_pw_update: "1"
  1110. tls_enforce_in: "1"
  1111. tls_enforce_out: "1"
  1112. tags: ["tag1", "tag2"]
  1113. properties:
  1114. active:
  1115. description: is mailbox active or not
  1116. type: boolean
  1117. domain:
  1118. description: domain name
  1119. type: string
  1120. local_part:
  1121. description: left part of email address
  1122. type: string
  1123. name:
  1124. description: Full name of the mailbox user
  1125. type: string
  1126. authsource:
  1127. description: Specifies the authentication source for the mailbox.
  1128. type: string
  1129. enum: [mailcow, ldap, keycloak, generic-oidc]
  1130. default: mailcow
  1131. password2:
  1132. description: mailbox password for confirmation
  1133. type: string
  1134. password:
  1135. description: mailbox password when using `mailcow` as the authentication source.
  1136. type: string
  1137. quota:
  1138. description: mailbox quota
  1139. type: number
  1140. force_pw_update:
  1141. description: forces the user to update its password on first login
  1142. type: boolean
  1143. tls_enforce_in:
  1144. description: force inbound email tls encryption
  1145. type: boolean
  1146. tls_enforce_out:
  1147. description: force oubound tmail tls encryption
  1148. type: boolean
  1149. type: object
  1150. summary: Create mailbox
  1151. /api/v1/add/oauth2-client:
  1152. post:
  1153. responses:
  1154. "401":
  1155. $ref: "#/components/responses/Unauthorized"
  1156. "200":
  1157. content:
  1158. application/json:
  1159. examples:
  1160. response:
  1161. value:
  1162. - log:
  1163. - oauth2
  1164. - add
  1165. - client
  1166. - redirect_uri: "https://mailcow.tld"
  1167. msg: Added client access
  1168. type: success
  1169. schema:
  1170. properties:
  1171. log:
  1172. description: contains request object
  1173. items: {}
  1174. type: array
  1175. msg:
  1176. items: {}
  1177. type: array
  1178. type:
  1179. enum:
  1180. - success
  1181. - danger
  1182. - error
  1183. type: string
  1184. type: object
  1185. description: OK
  1186. headers: {}
  1187. tags:
  1188. - oAuth Clients
  1189. description: Using this endpoint you can create a oAuth clients.
  1190. operationId: Create oAuth Client
  1191. requestBody:
  1192. content:
  1193. application/json:
  1194. schema:
  1195. example:
  1196. redirect_uri: "https://mailcow.tld"
  1197. properties:
  1198. redirect_uri:
  1199. description: the uri where you should be redirected after oAuth
  1200. type: string
  1201. type: object
  1202. summary: Create oAuth Client
  1203. /api/v1/add/recipient_map:
  1204. post:
  1205. responses:
  1206. "401":
  1207. $ref: "#/components/responses/Unauthorized"
  1208. "200":
  1209. content:
  1210. application/json:
  1211. examples:
  1212. response:
  1213. value:
  1214. - log:
  1215. - recipient_map
  1216. - add
  1217. - active: "1"
  1218. recipient_map_new: target@mailcow.tld
  1219. recipient_map_old: recipient@mailcow.tld
  1220. - null
  1221. msg:
  1222. - recipient_map_entry_saved
  1223. - recipient@mailcow.tld
  1224. type: success
  1225. schema:
  1226. properties:
  1227. log:
  1228. description: contains request object
  1229. items: {}
  1230. type: array
  1231. msg:
  1232. items: {}
  1233. type: array
  1234. type:
  1235. enum:
  1236. - success
  1237. - danger
  1238. - error
  1239. type: string
  1240. type: object
  1241. description: OK
  1242. headers: {}
  1243. tags:
  1244. - Address Rewriting
  1245. description: >-
  1246. Using this endpoint you can create a recipient map to forward all mails
  1247. from one email address to another.
  1248. operationId: Create Recipient Map
  1249. requestBody:
  1250. content:
  1251. application/json:
  1252. schema:
  1253. example:
  1254. active: "1"
  1255. recipient_map_new: target@mailcow.tld
  1256. recipient_map_old: recipient@mailcow.tld
  1257. properties:
  1258. active:
  1259. description: 1 for a active user account 0 for a disabled user account
  1260. type: number
  1261. recipient_map_new:
  1262. description: the email address that should receive the forwarded emails
  1263. type: string
  1264. recipient_map_old:
  1265. description: the email address which emails should be forwarded
  1266. type: string
  1267. type: object
  1268. summary: Create Recipient Map
  1269. /api/v1/add/relayhost:
  1270. post:
  1271. responses:
  1272. "401":
  1273. $ref: "#/components/responses/Unauthorized"
  1274. "200":
  1275. content:
  1276. application/json:
  1277. examples:
  1278. response:
  1279. value:
  1280. - log:
  1281. - relayhost
  1282. - add
  1283. - hostname: "mailcow.tld:25"
  1284. password: supersecurepassword
  1285. username: testuser
  1286. msg:
  1287. - relayhost_added
  1288. - ""
  1289. type: success
  1290. schema:
  1291. properties:
  1292. log:
  1293. description: contains request object
  1294. items: {}
  1295. type: array
  1296. msg:
  1297. items: {}
  1298. type: array
  1299. type:
  1300. enum:
  1301. - success
  1302. - danger
  1303. - error
  1304. type: string
  1305. type: object
  1306. description: OK
  1307. headers: {}
  1308. tags:
  1309. - Routing
  1310. description: Using this endpoint you can create Sender-Dependent Transports.
  1311. operationId: Create Sender-Dependent Transports
  1312. requestBody:
  1313. content:
  1314. application/json:
  1315. schema:
  1316. example:
  1317. hostname: "mailcow.tld:25"
  1318. password: supersecurepassword
  1319. username: testuser
  1320. properties:
  1321. hostname:
  1322. description: the hostname of the smtp server with port
  1323. type: string
  1324. password:
  1325. description: the password for the smtp user
  1326. type: string
  1327. username:
  1328. description: the username used to authenticate
  1329. type: string
  1330. type: object
  1331. summary: Create Sender-Dependent Transports
  1332. /api/v1/add/resource:
  1333. post:
  1334. responses:
  1335. "401":
  1336. $ref: "#/components/responses/Unauthorized"
  1337. "200":
  1338. content:
  1339. application/json:
  1340. examples:
  1341. response:
  1342. value:
  1343. - log:
  1344. - mailbox
  1345. - add
  1346. - resource
  1347. - active: "1"
  1348. description: test
  1349. domain: mailcow.tld
  1350. kind: location
  1351. multiple_bookings: "0"
  1352. multiple_bookings_custom: ""
  1353. multiple_bookings_select: "0"
  1354. - null
  1355. msg:
  1356. - resource_added
  1357. - mailcow.tld
  1358. type: success
  1359. schema:
  1360. properties:
  1361. log:
  1362. description: contains request object
  1363. items: {}
  1364. type: array
  1365. msg:
  1366. items: {}
  1367. type: array
  1368. type:
  1369. enum:
  1370. - success
  1371. - danger
  1372. - error
  1373. type: string
  1374. type: object
  1375. description: OK
  1376. headers: {}
  1377. tags:
  1378. - Resources
  1379. description: Using this endpoint you can create Resources.
  1380. operationId: Create Resources
  1381. requestBody:
  1382. content:
  1383. application/json:
  1384. schema:
  1385. example:
  1386. active: "1"
  1387. description: test
  1388. domain: mailcow.tld
  1389. kind: location
  1390. multiple_bookings: "0"
  1391. multiple_bookings_custom: ""
  1392. multiple_bookings_select: "0"
  1393. properties:
  1394. active:
  1395. description: 1 for a active transport map 0 for a disabled transport map
  1396. type: number
  1397. description:
  1398. description: a description of the resource
  1399. type: string
  1400. domain:
  1401. description: the domain for which the resource should be
  1402. type: string
  1403. kind:
  1404. description: the kind of recouse
  1405. enum:
  1406. - location
  1407. - group
  1408. - thing
  1409. type: string
  1410. multiple_bookings:
  1411. enum:
  1412. - "-1"
  1413. - "1"
  1414. - custom
  1415. type: string
  1416. multiple_bookings_custom:
  1417. description: always empty
  1418. type: number
  1419. multiple_bookings_select:
  1420. enum:
  1421. - "-1"
  1422. - "1"
  1423. - custom
  1424. type: string
  1425. type: object
  1426. summary: Create Resources
  1427. /api/v1/add/syncjob:
  1428. post:
  1429. responses:
  1430. "401":
  1431. $ref: "#/components/responses/Unauthorized"
  1432. "200":
  1433. content:
  1434. application/json:
  1435. examples:
  1436. response:
  1437. value:
  1438. - log:
  1439. - mailbox
  1440. - add
  1441. - syncjob
  1442. - active: "1"
  1443. automap: "1"
  1444. custom_params: ""
  1445. delete1: "0"
  1446. delete2: "0"
  1447. delete2duplicates: "1"
  1448. enc1: SSL
  1449. exclude: (?i)spam|(?i)junk
  1450. host1: imap.server.tld
  1451. maxage: "0"
  1452. maxbytespersecond: "0"
  1453. mins_interval: "20"
  1454. password1: supersecret
  1455. port1: 993
  1456. skipcrossduplicates: "0"
  1457. subfolder2: External
  1458. subscribeall: "1"
  1459. timeout1: "600"
  1460. timeout2: "600"
  1461. user1: username
  1462. username: mailbox@domain.tld
  1463. - null
  1464. msg:
  1465. - mailbox_modified
  1466. - mailbox@domain.tld
  1467. type: success
  1468. schema:
  1469. properties:
  1470. log:
  1471. description: contains request object
  1472. items: {}
  1473. type: array
  1474. msg:
  1475. items: {}
  1476. type: array
  1477. type:
  1478. enum:
  1479. - success
  1480. - danger
  1481. - error
  1482. type: string
  1483. type: object
  1484. description: OK
  1485. headers: {}
  1486. tags:
  1487. - Sync jobs
  1488. description: >-
  1489. You can create new sync job using this action. It takes a JSON object
  1490. containing a domain informations.
  1491. operationId: Create sync job
  1492. summary: Create sync job
  1493. requestBody:
  1494. content:
  1495. application/json:
  1496. schema:
  1497. example:
  1498. username: lisa@mailcow.tld
  1499. host1: mail.mailcow.tld
  1500. port1: "143"
  1501. user1: demo@mailcow.tld
  1502. password1: supersecretpw
  1503. enc1: TLS
  1504. mins_interval: "20"
  1505. subfolder2: "/SyncIntoSubfolder"
  1506. maxage: "0"
  1507. maxbytespersecond: "0"
  1508. timeout1: "600"
  1509. timeout2: "600"
  1510. exclude: "(?i)spam|(?i)junk"
  1511. custom_params: "--dry"
  1512. delete2duplicates: "1"
  1513. delete1: "1"
  1514. delete2: "0"
  1515. automap: "1"
  1516. skipcrossduplicates: "0"
  1517. subscribeall: "0"
  1518. active: "1"
  1519. properties:
  1520. parameters:
  1521. description: your local mailcow mailbox
  1522. type: string
  1523. host1:
  1524. description: the smtp server where mails should be synced from
  1525. type: string
  1526. port1:
  1527. description: the smtp port of the target mail server
  1528. type: string
  1529. user1:
  1530. description: the username of the mailbox
  1531. type: string
  1532. password:
  1533. description: the password of the mailbox
  1534. type: string
  1535. enc1:
  1536. description: the encryption method used to connect to the mailserver
  1537. type: string
  1538. mins_internal:
  1539. description: the interval in which messages should be syned
  1540. type: number
  1541. subfolder2:
  1542. description: sync into subfolder on destination (empty = do not use subfolder)
  1543. type: string
  1544. maxage:
  1545. description: only sync messages up to this age in days
  1546. type: number
  1547. maxbytespersecond:
  1548. description: max speed transfer limit for the sync
  1549. type: number
  1550. timeout1:
  1551. description: timeout for connection to remote host
  1552. type: number
  1553. timeout2:
  1554. description: timeout for connection to local host
  1555. type: number
  1556. exclude:
  1557. description: exclude objects (regex)
  1558. type: string
  1559. custom_params:
  1560. description: custom parameters
  1561. type: string
  1562. delete2duplicates:
  1563. description: delete duplicates on destination (--delete2duplicates)
  1564. type: boolean
  1565. delete1:
  1566. description: delete from source when completed (--delete1)
  1567. type: boolean
  1568. delete2:
  1569. description: delete messages on destination that are not on source (--delete2)
  1570. type: boolean
  1571. automap:
  1572. description: try to automap folders ("Sent items", "Sent" => "Sent" etc.) (--automap)
  1573. type: boolean
  1574. skipcrossduplicates:
  1575. description: skip duplicate messages across folders (first come, first serve) (--skipcrossduplicates)
  1576. type: boolean
  1577. subscribeall:
  1578. description: subscribe all folders (--subscribeall)
  1579. type: boolean
  1580. active:
  1581. description: enables or disables the sync job
  1582. type: boolean
  1583. type: object
  1584. /api/v1/add/tls-policy-map:
  1585. post:
  1586. responses:
  1587. "401":
  1588. $ref: "#/components/responses/Unauthorized"
  1589. "200":
  1590. content:
  1591. application/json:
  1592. examples:
  1593. response:
  1594. value:
  1595. - log:
  1596. - tls_policy_maps
  1597. - add
  1598. - parameters: ""
  1599. active: "1"
  1600. dest: mailcow.tld
  1601. policy: encrypt
  1602. - null
  1603. msg:
  1604. - tls_policy_map_entry_saved
  1605. - mailcow.tld
  1606. type: success
  1607. schema:
  1608. properties:
  1609. log:
  1610. description: contains request object
  1611. items: {}
  1612. type: array
  1613. msg:
  1614. items: {}
  1615. type: array
  1616. type:
  1617. enum:
  1618. - success
  1619. - danger
  1620. - error
  1621. type: string
  1622. type: object
  1623. description: OK
  1624. headers: {}
  1625. tags:
  1626. - Outgoing TLS Policy Map Overrides
  1627. description: Using this endpoint you can create a TLS policy map override.
  1628. operationId: Create TLS Policy Map
  1629. requestBody:
  1630. content:
  1631. application/json:
  1632. schema:
  1633. example:
  1634. parameters: ""
  1635. active: "1"
  1636. dest: mailcow.tld
  1637. policy: encrypt
  1638. properties:
  1639. parameters:
  1640. description: >-
  1641. custom parameters you find out more about them
  1642. [here](http://www.postfix.org/postconf.5.html#smtp_tls_policy_maps)
  1643. type: string
  1644. active:
  1645. description: 1 for a active user account 0 for a disabled user account
  1646. type: number
  1647. dest:
  1648. description: the target domain or email address
  1649. type: string
  1650. policy:
  1651. description: the policy
  1652. enum:
  1653. - none
  1654. - may
  1655. - encrypt
  1656. - dane
  1657. - "'dane"
  1658. - fingerprint
  1659. - verify
  1660. - secure
  1661. type: string
  1662. type: object
  1663. summary: Create TLS Policy Map
  1664. /api/v1/add/transport:
  1665. post:
  1666. responses:
  1667. "401":
  1668. $ref: "#/components/responses/Unauthorized"
  1669. "200":
  1670. content:
  1671. application/json:
  1672. examples:
  1673. response:
  1674. value:
  1675. - log:
  1676. - transport
  1677. - add
  1678. - active: "1"
  1679. destination: example2.org
  1680. nexthop: "host:25"
  1681. password: supersecurepw
  1682. username: testuser
  1683. msg:
  1684. - relayhost_added
  1685. - ""
  1686. type: success
  1687. schema:
  1688. properties:
  1689. log:
  1690. description: contains request object
  1691. items: {}
  1692. type: array
  1693. msg:
  1694. items: {}
  1695. type: array
  1696. type:
  1697. enum:
  1698. - success
  1699. - danger
  1700. - error
  1701. type: string
  1702. type: object
  1703. description: OK
  1704. headers: {}
  1705. tags:
  1706. - Routing
  1707. description: Using this endpoint you can create Sender-Dependent Transports.
  1708. operationId: Create Transport Maps
  1709. requestBody:
  1710. content:
  1711. application/json:
  1712. schema:
  1713. example:
  1714. active: "1"
  1715. destination: example.org
  1716. nexthop: "host:25"
  1717. password: supersecurepw
  1718. username: testuser
  1719. properties:
  1720. active:
  1721. description: 1 for a active transport map 0 for a disabled transport map
  1722. type: number
  1723. destination:
  1724. type: string
  1725. nexthop:
  1726. type: string
  1727. password:
  1728. description: the password for the smtp user
  1729. type: string
  1730. username:
  1731. description: the username used to authenticate
  1732. type: string
  1733. type: object
  1734. summary: Create Transport Maps
  1735. /api/v1/delete/alias:
  1736. post:
  1737. responses:
  1738. "401":
  1739. $ref: "#/components/responses/Unauthorized"
  1740. "200":
  1741. content:
  1742. application/json:
  1743. examples:
  1744. response:
  1745. value:
  1746. - log:
  1747. - mailbox
  1748. - delete
  1749. - alias
  1750. - id:
  1751. - "6"
  1752. - "9"
  1753. - null
  1754. msg:
  1755. - alias_removed
  1756. - alias@domain.tld
  1757. type: success
  1758. - log:
  1759. - mailbox
  1760. - delete
  1761. - alias
  1762. - id:
  1763. - "6"
  1764. - "9"
  1765. - null
  1766. msg:
  1767. - alias_removed
  1768. - alias2@domain.tld
  1769. type: success
  1770. schema:
  1771. properties:
  1772. log:
  1773. description: contains request object
  1774. items: {}
  1775. type: array
  1776. msg:
  1777. items: {}
  1778. type: array
  1779. type:
  1780. enum:
  1781. - success
  1782. - danger
  1783. - error
  1784. type: string
  1785. type: object
  1786. description: OK
  1787. headers: {}
  1788. tags:
  1789. - Aliases
  1790. description: You can delete one or more aliases.
  1791. operationId: Delete alias
  1792. requestBody:
  1793. content:
  1794. application/json:
  1795. schema:
  1796. items:
  1797. example: "6"
  1798. type: string
  1799. type: array
  1800. summary: Delete alias
  1801. /api/v1/delete/app-passwd:
  1802. post:
  1803. responses:
  1804. "401":
  1805. $ref: "#/components/responses/Unauthorized"
  1806. "200":
  1807. content:
  1808. application/json:
  1809. examples:
  1810. response:
  1811. value:
  1812. - log:
  1813. - app_passwd
  1814. - delete
  1815. - id:
  1816. - "2"
  1817. msg:
  1818. - app_passwd_removed
  1819. - "2"
  1820. type: success
  1821. schema:
  1822. properties:
  1823. log:
  1824. description: contains request object
  1825. items: {}
  1826. type: array
  1827. msg:
  1828. items: {}
  1829. type: array
  1830. type:
  1831. enum:
  1832. - success
  1833. - danger
  1834. - error
  1835. type: string
  1836. type: object
  1837. description: OK
  1838. headers: {}
  1839. tags:
  1840. - App Passwords
  1841. description: Using this endpoint you can delete a single app password.
  1842. operationId: Delete App Password
  1843. requestBody:
  1844. content:
  1845. application/json:
  1846. schema:
  1847. example:
  1848. - "1"
  1849. properties:
  1850. items:
  1851. description: contains list of app passwords you want to delete
  1852. type: object
  1853. type: object
  1854. summary: Delete App Password
  1855. /api/v1/delete/bcc:
  1856. post:
  1857. responses:
  1858. "401":
  1859. $ref: "#/components/responses/Unauthorized"
  1860. "200":
  1861. content:
  1862. application/json:
  1863. examples:
  1864. response:
  1865. value:
  1866. - log:
  1867. - bcc
  1868. - delete
  1869. - id:
  1870. - "4"
  1871. - null
  1872. msg:
  1873. - bcc_deleted
  1874. - "4"
  1875. type: success
  1876. schema:
  1877. properties:
  1878. log:
  1879. description: contains request object
  1880. items: {}
  1881. type: array
  1882. msg:
  1883. items: {}
  1884. type: array
  1885. type:
  1886. enum:
  1887. - success
  1888. - danger
  1889. - error
  1890. type: string
  1891. type: object
  1892. description: OK
  1893. headers: {}
  1894. tags:
  1895. - Address Rewriting
  1896. description: >-
  1897. Using this endpoint you can delete a BCC map, for this you have to know
  1898. its ID. You can get the ID using the GET method.
  1899. operationId: Delete BCC Map
  1900. requestBody:
  1901. content:
  1902. application/json:
  1903. schema:
  1904. example:
  1905. - "3"
  1906. properties:
  1907. items:
  1908. description: contains list of bcc maps you want to delete
  1909. type: object
  1910. type: object
  1911. summary: Delete BCC Map
  1912. /api/v1/delete/dkim:
  1913. post:
  1914. responses:
  1915. "401":
  1916. $ref: "#/components/responses/Unauthorized"
  1917. "200":
  1918. content:
  1919. application/json:
  1920. examples:
  1921. response:
  1922. value:
  1923. - log:
  1924. - dkim
  1925. - delete
  1926. - domains:
  1927. - mailcow.tld
  1928. msg:
  1929. - dkim_removed
  1930. - mailcow.tld
  1931. type: success
  1932. schema:
  1933. properties:
  1934. log:
  1935. description: contains request object
  1936. items: {}
  1937. type: array
  1938. msg:
  1939. items: {}
  1940. type: array
  1941. type:
  1942. enum:
  1943. - success
  1944. - danger
  1945. - error
  1946. type: string
  1947. type: object
  1948. description: OK
  1949. headers: {}
  1950. tags:
  1951. - DKIM
  1952. description: Using this endpoint a existing DKIM Key can be deleted
  1953. operationId: Delete DKIM Key
  1954. requestBody:
  1955. content:
  1956. application/json:
  1957. schema:
  1958. items:
  1959. example:
  1960. - mailcow.tld
  1961. type: string
  1962. type: array
  1963. summary: Delete DKIM Key
  1964. /api/v1/delete/domain:
  1965. post:
  1966. responses:
  1967. "401":
  1968. $ref: "#/components/responses/Unauthorized"
  1969. "200":
  1970. content:
  1971. application/json:
  1972. examples:
  1973. response:
  1974. value:
  1975. - log:
  1976. - mailbox
  1977. - delete
  1978. - domain
  1979. - domain:
  1980. - domain.tld
  1981. - domain2.tld
  1982. - null
  1983. msg:
  1984. - domain_removed
  1985. - domain.tld
  1986. type: success
  1987. - log:
  1988. - mailbox
  1989. - delete
  1990. - domain
  1991. - domain:
  1992. - domain.tld
  1993. - domain2.tld
  1994. - null
  1995. msg:
  1996. - domain_removed
  1997. - domain2.tld
  1998. type: success
  1999. schema:
  2000. type: array
  2001. items:
  2002. type: object
  2003. properties:
  2004. log:
  2005. description: contains request object
  2006. items: {}
  2007. type: array
  2008. msg:
  2009. items: {}
  2010. type: array
  2011. type:
  2012. enum:
  2013. - success
  2014. - danger
  2015. - error
  2016. type: string
  2017. description: OK
  2018. headers: {}
  2019. tags:
  2020. - Domains
  2021. description: You can delete one or more domains.
  2022. operationId: Delete domain
  2023. requestBody:
  2024. content:
  2025. application/json:
  2026. schema:
  2027. type: object
  2028. example:
  2029. - domain.tld
  2030. - domain2.tld
  2031. properties:
  2032. items:
  2033. type: array
  2034. items:
  2035. type: string
  2036. summary: Delete domain
  2037. /api/v1/delete/domain-admin:
  2038. post:
  2039. responses:
  2040. "401":
  2041. $ref: "#/components/responses/Unauthorized"
  2042. "200":
  2043. content:
  2044. application/json:
  2045. examples:
  2046. response:
  2047. value:
  2048. - log:
  2049. - domain_admin
  2050. - delete
  2051. - username:
  2052. - testadmin
  2053. msg:
  2054. - domain_admin_removed
  2055. - testadmin
  2056. type: success
  2057. schema:
  2058. properties:
  2059. log:
  2060. description: contains request object
  2061. items: {}
  2062. type: array
  2063. msg:
  2064. items: {}
  2065. type: array
  2066. type:
  2067. enum:
  2068. - success
  2069. - danger
  2070. - error
  2071. type: string
  2072. type: object
  2073. description: OK
  2074. headers: {}
  2075. tags:
  2076. - Domain admin
  2077. description: Using this endpoint a existing Domain Admin user can be deleted.
  2078. operationId: Delete Domain Admin
  2079. requestBody:
  2080. content:
  2081. application/json:
  2082. schema:
  2083. example:
  2084. - testadmin
  2085. properties:
  2086. items:
  2087. description: contains list of usernames of the users you want to delete
  2088. type: object
  2089. type: object
  2090. summary: Delete Domain Admin
  2091. /api/v1/delete/domain-policy:
  2092. post:
  2093. responses:
  2094. "401":
  2095. $ref: "#/components/responses/Unauthorized"
  2096. "200":
  2097. content:
  2098. application/json:
  2099. examples:
  2100. response:
  2101. value:
  2102. - log:
  2103. - policy
  2104. - delete
  2105. - domain
  2106. - prefid:
  2107. - "1"
  2108. - "2"
  2109. msg:
  2110. - item_deleted
  2111. - "1"
  2112. type: success
  2113. - log:
  2114. - policy
  2115. - delete
  2116. - domain
  2117. - prefid:
  2118. - "1"
  2119. - "2"
  2120. msg:
  2121. - item_deleted
  2122. - "2"
  2123. type: success
  2124. schema:
  2125. properties:
  2126. log:
  2127. description: contains request object
  2128. items: {}
  2129. type: array
  2130. msg:
  2131. items: {}
  2132. type: array
  2133. type:
  2134. enum:
  2135. - success
  2136. - danger
  2137. - error
  2138. type: string
  2139. type: object
  2140. description: OK
  2141. headers: {}
  2142. tags:
  2143. - Domain antispam policies
  2144. description: You can delete one o more domain policies.
  2145. operationId: Delete domain policy
  2146. requestBody:
  2147. content:
  2148. application/json:
  2149. schema:
  2150. example:
  2151. - "1"
  2152. - "2"
  2153. properties:
  2154. items:
  2155. description: contains list of domain policys you want to delete
  2156. type: object
  2157. type: object
  2158. summary: Delete domain policy
  2159. /api/v1/delete/fwdhost:
  2160. post:
  2161. responses:
  2162. "401":
  2163. $ref: "#/components/responses/Unauthorized"
  2164. "200":
  2165. content:
  2166. application/json:
  2167. examples:
  2168. response:
  2169. value:
  2170. - log:
  2171. - fwdhost
  2172. - delete
  2173. - forwardinghost:
  2174. - 5.1.76.202
  2175. - "2a00:f820:417::202"
  2176. msg:
  2177. - forwarding_host_removed
  2178. - 5.1.76.202
  2179. type: success
  2180. - log:
  2181. - fwdhost
  2182. - delete
  2183. - forwardinghost:
  2184. - 5.1.76.202
  2185. - "2a00:f820:417::202"
  2186. msg:
  2187. - forwarding_host_removed
  2188. - "2a00:f820:417::202"
  2189. type: success
  2190. schema:
  2191. properties:
  2192. log:
  2193. description: contains request object
  2194. items: {}
  2195. type: array
  2196. msg:
  2197. items: {}
  2198. type: array
  2199. type:
  2200. enum:
  2201. - success
  2202. - danger
  2203. - error
  2204. type: string
  2205. type: object
  2206. description: OK
  2207. headers: {}
  2208. tags:
  2209. - Fordwarding Hosts
  2210. description: >-
  2211. Using this endpoint you can delete a forwarding host, in order to do so
  2212. you need to know the IP of the host.
  2213. operationId: Delete Forward Host
  2214. requestBody:
  2215. content:
  2216. application/json:
  2217. schema:
  2218. example:
  2219. - 5.1.76.202
  2220. - "2a00:f820:417::202"
  2221. properties:
  2222. ip:
  2223. description: contains the ip of the fowarding host you want to delete
  2224. type: string
  2225. type: object
  2226. summary: Delete Forward Host
  2227. /api/v1/delete/mailbox:
  2228. post:
  2229. responses:
  2230. "401":
  2231. $ref: "#/components/responses/Unauthorized"
  2232. "200":
  2233. content:
  2234. application/json:
  2235. examples:
  2236. response:
  2237. value:
  2238. - log:
  2239. - mailbox
  2240. - delete
  2241. - mailbox
  2242. - username:
  2243. - info@domain.tld
  2244. - sales@domain.tld
  2245. - null
  2246. msg:
  2247. - mailbox_removed
  2248. - info@domain.tld
  2249. type: success
  2250. - log:
  2251. - mailbox
  2252. - delete
  2253. - mailbox
  2254. - username:
  2255. - info@domain.tld
  2256. - sales@domain.tld
  2257. - null
  2258. msg:
  2259. - mailbox_removed
  2260. - sales@domain.tld
  2261. type: success
  2262. schema:
  2263. properties:
  2264. log:
  2265. description: contains request object
  2266. items: {}
  2267. type: array
  2268. msg:
  2269. items: {}
  2270. type: array
  2271. type:
  2272. enum:
  2273. - success
  2274. - danger
  2275. - error
  2276. type: string
  2277. type: object
  2278. description: OK
  2279. headers: {}
  2280. tags:
  2281. - Mailboxes
  2282. description: You can delete one or more mailboxes.
  2283. operationId: Delete mailbox
  2284. requestBody:
  2285. content:
  2286. application/json:
  2287. schema:
  2288. example:
  2289. - info@domain.tld
  2290. - sales@domain.tld
  2291. properties:
  2292. items:
  2293. description: contains list of mailboxes you want to delete
  2294. type: object
  2295. type: object
  2296. summary: Delete mailbox
  2297. /api/v1/delete/mailq:
  2298. post:
  2299. responses:
  2300. "401":
  2301. $ref: "#/components/responses/Unauthorized"
  2302. "200":
  2303. content:
  2304. application/json:
  2305. examples:
  2306. response:
  2307. value:
  2308. msg: Task completed
  2309. type: success
  2310. description: OK
  2311. headers: {}
  2312. tags:
  2313. - Queue Manager
  2314. description: >-
  2315. Using this API you can delete the current mail queue. This will delete
  2316. all mails in it.
  2317. This API uses the command: `postsuper -d`
  2318. operationId: Delete Queue
  2319. requestBody:
  2320. content:
  2321. application/json:
  2322. schema:
  2323. example:
  2324. action: super_delete
  2325. properties:
  2326. action:
  2327. description: use super_delete to delete the mail queue
  2328. type: string
  2329. type: object
  2330. summary: Delete Queue
  2331. /api/v1/delete/oauth2-client:
  2332. post:
  2333. responses:
  2334. "401":
  2335. $ref: "#/components/responses/Unauthorized"
  2336. "200":
  2337. content:
  2338. application/json:
  2339. examples:
  2340. response:
  2341. value:
  2342. - log:
  2343. - oauth2
  2344. - delete
  2345. - client
  2346. - id:
  2347. - "1"
  2348. msg:
  2349. - items_deleted
  2350. - "1"
  2351. type: success
  2352. schema:
  2353. properties:
  2354. log:
  2355. description: contains request object
  2356. items: {}
  2357. type: array
  2358. msg:
  2359. items: {}
  2360. type: array
  2361. type:
  2362. enum:
  2363. - success
  2364. - danger
  2365. - error
  2366. type: string
  2367. type: object
  2368. description: OK
  2369. headers: {}
  2370. tags:
  2371. - oAuth Clients
  2372. description: >-
  2373. Using this endpoint you can delete a oAuth client, for this you have to
  2374. know its ID. You can get the ID using the GET method.
  2375. operationId: Delete oAuth Client
  2376. requestBody:
  2377. content:
  2378. application/json:
  2379. schema:
  2380. example:
  2381. - "3"
  2382. properties:
  2383. items:
  2384. description: contains list of oAuth clients you want to delete
  2385. type: object
  2386. type: object
  2387. summary: Delete oAuth Client
  2388. /api/v1/delete/qitem:
  2389. post:
  2390. responses:
  2391. "401":
  2392. $ref: "#/components/responses/Unauthorized"
  2393. "200":
  2394. content:
  2395. application/json:
  2396. examples:
  2397. response:
  2398. value:
  2399. - log:
  2400. - quarantine
  2401. - delete
  2402. - id:
  2403. - "33"
  2404. msg:
  2405. - item_deleted
  2406. - "33"
  2407. type: success
  2408. schema:
  2409. properties:
  2410. log:
  2411. description: contains request object
  2412. items: {}
  2413. type: array
  2414. msg:
  2415. items: {}
  2416. type: array
  2417. type:
  2418. enum:
  2419. - success
  2420. - danger
  2421. - error
  2422. type: string
  2423. type: object
  2424. description: OK
  2425. headers: {}
  2426. tags:
  2427. - Quarantine
  2428. description: >-
  2429. Using this endpoint you can delete a email from quarantine, for this you
  2430. have to know its ID. You can get the ID using the GET method.
  2431. operationId: Delete mails in Quarantine
  2432. requestBody:
  2433. content:
  2434. application/json:
  2435. schema:
  2436. example:
  2437. - "33"
  2438. properties:
  2439. items:
  2440. description: contains list of emails you want to delete
  2441. type: object
  2442. type: object
  2443. summary: Delete mails in Quarantine
  2444. /api/v1/delete/recipient_map:
  2445. post:
  2446. responses:
  2447. "401":
  2448. $ref: "#/components/responses/Unauthorized"
  2449. "200":
  2450. content:
  2451. application/json:
  2452. examples:
  2453. response:
  2454. value:
  2455. - log:
  2456. - recipient_map
  2457. - delete
  2458. - id:
  2459. - "1"
  2460. - null
  2461. msg:
  2462. - recipient_map_entry_deleted
  2463. - "1"
  2464. type: success
  2465. schema:
  2466. properties:
  2467. log:
  2468. description: contains request object
  2469. items: {}
  2470. type: array
  2471. msg:
  2472. items: {}
  2473. type: array
  2474. type:
  2475. enum:
  2476. - success
  2477. - danger
  2478. - error
  2479. type: string
  2480. type: object
  2481. description: OK
  2482. headers: {}
  2483. tags:
  2484. - Address Rewriting
  2485. description: >-
  2486. Using this endpoint you can delete a recipient map, for this you have to
  2487. know its ID. You can get the ID using the GET method.
  2488. operationId: Delete Recipient Map
  2489. requestBody:
  2490. content:
  2491. application/json:
  2492. schema:
  2493. example:
  2494. - "1"
  2495. properties:
  2496. items:
  2497. description: contains list of recipient maps you want to delete
  2498. type: object
  2499. type: object
  2500. summary: Delete Recipient Map
  2501. /api/v1/delete/relayhost:
  2502. post:
  2503. responses:
  2504. "401":
  2505. $ref: "#/components/responses/Unauthorized"
  2506. "200":
  2507. content:
  2508. application/json:
  2509. examples:
  2510. response:
  2511. value:
  2512. - log:
  2513. - relayhost
  2514. - delete
  2515. - id:
  2516. - "1"
  2517. msg:
  2518. - relayhost_removed
  2519. - "1"
  2520. type: success
  2521. schema:
  2522. properties:
  2523. log:
  2524. description: contains request object
  2525. items: {}
  2526. type: array
  2527. msg:
  2528. items: {}
  2529. type: array
  2530. type:
  2531. enum:
  2532. - success
  2533. - danger
  2534. - error
  2535. type: string
  2536. type: object
  2537. description: OK
  2538. headers: {}
  2539. tags:
  2540. - Routing
  2541. description: >-
  2542. Using this endpoint you can delete a Sender-Dependent Transport, for
  2543. this you have to know its ID. You can get the ID using the GET method.
  2544. operationId: Delete Sender-Dependent Transports
  2545. requestBody:
  2546. content:
  2547. application/json:
  2548. schema:
  2549. example:
  2550. - "1"
  2551. properties:
  2552. items:
  2553. description: >-
  2554. contains list of Sender-Dependent Transport you want to
  2555. delete
  2556. type: object
  2557. type: object
  2558. summary: Delete Sender-Dependent Transports
  2559. /api/v1/delete/resource:
  2560. post:
  2561. responses:
  2562. "401":
  2563. $ref: "#/components/responses/Unauthorized"
  2564. "200":
  2565. content:
  2566. application/json:
  2567. examples:
  2568. response:
  2569. value:
  2570. - log:
  2571. - mailbox
  2572. - delete
  2573. - resource
  2574. - name:
  2575. - test@mailcow.tld
  2576. - null
  2577. msg:
  2578. - resource_removed
  2579. - test@mailcow.tld
  2580. type: success
  2581. schema:
  2582. properties:
  2583. log:
  2584. description: contains request object
  2585. items: {}
  2586. type: array
  2587. msg:
  2588. items: {}
  2589. type: array
  2590. type:
  2591. enum:
  2592. - success
  2593. - danger
  2594. - error
  2595. type: string
  2596. type: object
  2597. description: OK
  2598. headers: {}
  2599. tags:
  2600. - Resources
  2601. description: >-
  2602. Using this endpoint you can delete a Resources, for this you have to
  2603. know its ID. You can get the ID using the GET method.
  2604. operationId: Delete Resources
  2605. requestBody:
  2606. content:
  2607. application/json:
  2608. schema:
  2609. example:
  2610. - test@mailcow.tld
  2611. properties:
  2612. items:
  2613. description: contains list of Resources you want to delete
  2614. type: object
  2615. type: object
  2616. summary: Delete Resources
  2617. /api/v1/delete/syncjob:
  2618. post:
  2619. responses:
  2620. "401":
  2621. $ref: "#/components/responses/Unauthorized"
  2622. "200":
  2623. content:
  2624. application/json:
  2625. examples:
  2626. response:
  2627. value:
  2628. log:
  2629. - entity
  2630. - action
  2631. - object
  2632. msg:
  2633. - message
  2634. - entity name
  2635. type: success
  2636. schema:
  2637. properties:
  2638. log:
  2639. description: contains request object
  2640. items: {}
  2641. type: array
  2642. msg:
  2643. items: {}
  2644. type: array
  2645. type:
  2646. enum:
  2647. - success
  2648. - danger
  2649. - error
  2650. type: string
  2651. type: object
  2652. description: OK
  2653. headers: {}
  2654. tags:
  2655. - Sync jobs
  2656. description: You can delete one or more sync jobs.
  2657. operationId: Delete sync job
  2658. requestBody:
  2659. content:
  2660. application/json:
  2661. schema:
  2662. example:
  2663. - "6"
  2664. - "9"
  2665. properties:
  2666. items:
  2667. description: contains list of aliases you want to delete
  2668. type: object
  2669. type: object
  2670. summary: Delete sync job
  2671. /api/v1/delete/tls-policy-map:
  2672. post:
  2673. responses:
  2674. "401":
  2675. $ref: "#/components/responses/Unauthorized"
  2676. "200":
  2677. content:
  2678. application/json:
  2679. examples:
  2680. response:
  2681. value:
  2682. - log:
  2683. - tls_policy_maps
  2684. - delete
  2685. - id:
  2686. - "1"
  2687. - null
  2688. msg:
  2689. - tls_policy_map_entry_deleted
  2690. - "1"
  2691. type: success
  2692. schema:
  2693. properties:
  2694. log:
  2695. description: contains request object
  2696. items: {}
  2697. type: array
  2698. msg:
  2699. items: {}
  2700. type: array
  2701. type:
  2702. enum:
  2703. - success
  2704. - danger
  2705. - error
  2706. type: string
  2707. type: object
  2708. description: OK
  2709. headers: {}
  2710. tags:
  2711. - Outgoing TLS Policy Map Overrides
  2712. description: >-
  2713. Using this endpoint you can delete a TLS Policy Map, for this you have
  2714. to know its ID. You can get the ID using the GET method.
  2715. operationId: Delete TLS Policy Map
  2716. requestBody:
  2717. content:
  2718. application/json:
  2719. schema:
  2720. example:
  2721. - "3"
  2722. properties:
  2723. items:
  2724. description: contains list of tls policy maps you want to delete
  2725. type: object
  2726. type: object
  2727. summary: Delete TLS Policy Map
  2728. /api/v1/delete/transport:
  2729. post:
  2730. responses:
  2731. "401":
  2732. $ref: "#/components/responses/Unauthorized"
  2733. "200":
  2734. content:
  2735. application/json:
  2736. examples:
  2737. response:
  2738. value:
  2739. - log:
  2740. - transport
  2741. - delete
  2742. - id:
  2743. - "1"
  2744. msg:
  2745. - relayhost_removed
  2746. - "1"
  2747. type: success
  2748. schema:
  2749. properties:
  2750. log:
  2751. description: contains request object
  2752. items: {}
  2753. type: array
  2754. msg:
  2755. items: {}
  2756. type: array
  2757. type:
  2758. enum:
  2759. - success
  2760. - danger
  2761. - error
  2762. type: string
  2763. type: object
  2764. description: OK
  2765. headers: {}
  2766. tags:
  2767. - Routing
  2768. description: >-
  2769. Using this endpoint you can delete a Transport Maps, for this you have
  2770. to know its ID. You can get the ID using the GET method.
  2771. operationId: Delete Transport Maps
  2772. requestBody:
  2773. content:
  2774. application/json:
  2775. schema:
  2776. example:
  2777. - "1"
  2778. properties:
  2779. items:
  2780. description: contains list of transport maps you want to delete
  2781. type: object
  2782. type: object
  2783. summary: Delete Transport Maps
  2784. "/api/v1/delete/mailbox/tag/{mailbox}":
  2785. post:
  2786. parameters:
  2787. - description: name of mailbox
  2788. in: path
  2789. name: mailbox
  2790. example: info@domain.tld
  2791. required: true
  2792. schema:
  2793. type: string
  2794. responses:
  2795. "401":
  2796. $ref: "#/components/responses/Unauthorized"
  2797. "200":
  2798. content:
  2799. application/json:
  2800. examples:
  2801. response:
  2802. value:
  2803. - log:
  2804. - mailbox
  2805. - delete
  2806. - tags_mailbox
  2807. - tags:
  2808. - tag1
  2809. - tag2
  2810. mailbox: info@domain.tld
  2811. - null
  2812. msg:
  2813. - mailbox_modified
  2814. - info@domain.tld
  2815. type: success
  2816. schema:
  2817. properties:
  2818. log:
  2819. description: contains request object
  2820. items: {}
  2821. type: array
  2822. msg:
  2823. items: {}
  2824. type: array
  2825. type:
  2826. enum:
  2827. - success
  2828. - danger
  2829. - error
  2830. type: string
  2831. type: object
  2832. description: OK
  2833. headers: {}
  2834. tags:
  2835. - Mailboxes
  2836. description: You can delete one or more mailbox tags.
  2837. operationId: Delete mailbox tags
  2838. requestBody:
  2839. content:
  2840. application/json:
  2841. schema:
  2842. example:
  2843. - tag1
  2844. - tag2
  2845. properties:
  2846. items:
  2847. description: contains list of mailboxes you want to delete
  2848. type: object
  2849. type: object
  2850. summary: Delete mailbox tags
  2851. "/api/v1/delete/domain/tag/{domain}":
  2852. post:
  2853. parameters:
  2854. - description: name of domain
  2855. in: path
  2856. name: domain
  2857. example: domain.tld
  2858. required: true
  2859. schema:
  2860. type: string
  2861. responses:
  2862. "401":
  2863. $ref: "#/components/responses/Unauthorized"
  2864. "200":
  2865. content:
  2866. application/json:
  2867. examples:
  2868. response:
  2869. value:
  2870. - log:
  2871. - mailbox
  2872. - delete
  2873. - tags_domain
  2874. - tags:
  2875. - tag1
  2876. - tag2
  2877. domain: domain.tld
  2878. - null
  2879. msg:
  2880. - domain_modified
  2881. - domain.tld
  2882. type: success
  2883. schema:
  2884. properties:
  2885. log:
  2886. description: contains request object
  2887. items: {}
  2888. type: array
  2889. msg:
  2890. items: {}
  2891. type: array
  2892. type:
  2893. enum:
  2894. - success
  2895. - danger
  2896. - error
  2897. type: string
  2898. type: object
  2899. description: OK
  2900. headers: {}
  2901. tags:
  2902. - Domains
  2903. description: You can delete one or more domain tags.
  2904. operationId: Delete domain tags
  2905. requestBody:
  2906. content:
  2907. application/json:
  2908. schema:
  2909. example:
  2910. - tag1
  2911. - tag2
  2912. properties:
  2913. items:
  2914. description: contains list of domains you want to delete
  2915. type: object
  2916. type: object
  2917. summary: Delete domain tags
  2918. /api/v1/edit/alias:
  2919. post:
  2920. responses:
  2921. "401":
  2922. $ref: "#/components/responses/Unauthorized"
  2923. "200":
  2924. content:
  2925. application/json:
  2926. examples:
  2927. response:
  2928. value:
  2929. - log:
  2930. - mailbox
  2931. - edit
  2932. - alias
  2933. - active: "1"
  2934. address: alias@domain.tld
  2935. goto: destination@domain.tld
  2936. id:
  2937. - "6"
  2938. private_comment: private comment
  2939. public_comment: public comment
  2940. - null
  2941. msg:
  2942. - alias_modified
  2943. - alias@domain.tld
  2944. type: success
  2945. schema:
  2946. properties:
  2947. log:
  2948. description: contains request object
  2949. items: {}
  2950. type: array
  2951. msg:
  2952. items: {}
  2953. type: array
  2954. type:
  2955. enum:
  2956. - success
  2957. - danger
  2958. - error
  2959. type: string
  2960. type: object
  2961. description: OK
  2962. headers: {}
  2963. tags:
  2964. - Aliases
  2965. description: >-
  2966. You can update one or more aliases per request. You can also send just
  2967. attributes you want to change
  2968. operationId: Update alias
  2969. requestBody:
  2970. content:
  2971. application/json:
  2972. schema:
  2973. example:
  2974. attr:
  2975. active: "1"
  2976. address: alias@domain.tld
  2977. goto: destination@domain.tld
  2978. private_comment: private comment
  2979. public_comment: public comment
  2980. items: ["6"]
  2981. properties:
  2982. attr:
  2983. properties:
  2984. active:
  2985. description: is alias active or not
  2986. type: boolean
  2987. address:
  2988. description: 'alias address, for catchall use "@domain.tld"'
  2989. type: string
  2990. goto:
  2991. description: "destination address, comma separated"
  2992. type: string
  2993. goto_ham:
  2994. description: learn as ham
  2995. type: boolean
  2996. goto_null:
  2997. description: silently ignore
  2998. type: boolean
  2999. goto_spam:
  3000. description: learn as spam
  3001. type: boolean
  3002. private_comment:
  3003. type: string
  3004. public_comment:
  3005. type: string
  3006. sogo_visible:
  3007. description: toggle visibility as selectable sender in SOGo
  3008. type: boolean
  3009. type: object
  3010. items:
  3011. description: contains list of aliases you want update
  3012. type: object
  3013. type: object
  3014. summary: Update alias
  3015. /api/v1/edit/domain:
  3016. post:
  3017. responses:
  3018. "401":
  3019. $ref: "#/components/responses/Unauthorized"
  3020. "200":
  3021. content:
  3022. application/json:
  3023. schema:
  3024. type: array
  3025. items:
  3026. type: object
  3027. properties:
  3028. log:
  3029. type: array
  3030. description: contains request object
  3031. items: {}
  3032. msg:
  3033. type: array
  3034. items: {}
  3035. type:
  3036. enum:
  3037. - success
  3038. - danger
  3039. - error
  3040. type: string
  3041. description: OK
  3042. headers: {}
  3043. tags:
  3044. - Domains
  3045. description: >-
  3046. You can update one or more domains per request. You can also send just
  3047. attributes you want to change.
  3048. Example: You can add domain names to items list and in attr object just
  3049. include `"active": "0"` to deactivate domains.
  3050. operationId: Update domain
  3051. requestBody:
  3052. content:
  3053. application/json:
  3054. schema:
  3055. example:
  3056. attr:
  3057. active: "1"
  3058. aliases: "400"
  3059. backupmx: "1"
  3060. defquota: "3072"
  3061. description: domain description
  3062. gal: "1"
  3063. mailboxes: "10"
  3064. maxquota: "10240"
  3065. quota: "10240"
  3066. relay_all_recipients: "0"
  3067. relayhost: "2"
  3068. tags: ["tag3", "tag4"]
  3069. items: domain.tld
  3070. properties:
  3071. attr:
  3072. properties:
  3073. active:
  3074. description: is domain active or not
  3075. type: boolean
  3076. aliases:
  3077. description: limit count of aliases associated with this domain
  3078. type: number
  3079. backupmx:
  3080. description: relay domain or not
  3081. type: boolean
  3082. defquota:
  3083. description: predefined mailbox quota in `add mailbox` form
  3084. type: number
  3085. description:
  3086. description: Description of domain
  3087. type: string
  3088. gal:
  3089. description: >-
  3090. is domain global address list active or not, it enables
  3091. shared contacts accross domain in SOGo webmail
  3092. type: boolean
  3093. mailboxes:
  3094. description: limit count of mailboxes associated with this domain
  3095. type: number
  3096. maxquota:
  3097. description: maximum quota per mailbox
  3098. type: number
  3099. quota:
  3100. description: maximum quota for this domain (for all mailboxes in sum)
  3101. type: number
  3102. relay_all_recipients:
  3103. description: >-
  3104. if not, them you have to create "dummy" mailbox for each
  3105. address to relay
  3106. type: boolean
  3107. relay_unknown_only:
  3108. description: Relay non-existing mailboxes only. Existing mailboxes will be delivered locally.
  3109. type: boolean
  3110. relayhost:
  3111. description: id of relayhost
  3112. type: number
  3113. rl_frame:
  3114. enum:
  3115. - s
  3116. - m
  3117. - h
  3118. - d
  3119. type: string
  3120. rl_value:
  3121. description: rate limit value
  3122. type: number
  3123. tags:
  3124. description: tags for this Domain
  3125. type: array
  3126. items:
  3127. type: string
  3128. type: object
  3129. items:
  3130. description: contains list of domain names you want update
  3131. type: array
  3132. items:
  3133. type: string
  3134. type: object
  3135. summary: Update domain
  3136. /api/v1/edit/domain/footer:
  3137. post:
  3138. responses:
  3139. "401":
  3140. $ref: "#/components/responses/Unauthorized"
  3141. "200":
  3142. content:
  3143. application/json:
  3144. examples:
  3145. response:
  3146. value:
  3147. - log:
  3148. - mailbox
  3149. - edit
  3150. - domain_wide_footer
  3151. - domains:
  3152. - mailcow.tld
  3153. html: "<br>foo {= foo =}"
  3154. plain: "<foo {= foo =}"
  3155. mbox_exclude:
  3156. - moo@mailcow.tld
  3157. - null
  3158. msg:
  3159. - domain_footer_modified
  3160. - mailcow.tld
  3161. type: success
  3162. schema:
  3163. properties:
  3164. log:
  3165. description: contains request object
  3166. items: {}
  3167. type: array
  3168. msg:
  3169. items: {}
  3170. type: array
  3171. type:
  3172. enum:
  3173. - success
  3174. - danger
  3175. - error
  3176. type: string
  3177. type: object
  3178. description: OK
  3179. headers: {}
  3180. tags:
  3181. - Domains
  3182. description: >-
  3183. You can update the footer of one or more domains per request.
  3184. operationId: Update domain wide footer
  3185. requestBody:
  3186. content:
  3187. application/json:
  3188. schema:
  3189. example:
  3190. attr:
  3191. html: "<br>foo {= foo =}"
  3192. plain: "foo {= foo =}"
  3193. mbox_exclude:
  3194. - moo@mailcow.tld
  3195. items: mailcow.tld
  3196. properties:
  3197. attr:
  3198. properties:
  3199. html:
  3200. description: Footer text in HTML format
  3201. type: string
  3202. plain:
  3203. description: Footer text in PLAIN text format
  3204. type: string
  3205. mbox_exclude:
  3206. description: Array of mailboxes to exclude from domain wide footer
  3207. type: object
  3208. type: object
  3209. items:
  3210. description: contains a list of domain names where you want to update the footer
  3211. type: array
  3212. items:
  3213. type: string
  3214. type: object
  3215. summary: Update domain wide footer
  3216. /api/v1/edit/fail2ban:
  3217. post:
  3218. responses:
  3219. "401":
  3220. $ref: "#/components/responses/Unauthorized"
  3221. "200":
  3222. content:
  3223. "*/*":
  3224. schema:
  3225. properties:
  3226. log:
  3227. description: contains request object
  3228. items: {}
  3229. type: array
  3230. msg:
  3231. items: {}
  3232. type: array
  3233. type:
  3234. enum:
  3235. - success
  3236. - danger
  3237. - error
  3238. type: string
  3239. type: object
  3240. description: OK
  3241. headers: {}
  3242. tags:
  3243. - Fail2Ban
  3244. description: >-
  3245. Using this endpoint you can edit the Fail2Ban config and black or
  3246. whitelist new ips.
  3247. operationId: Edit Fail2Ban
  3248. requestBody:
  3249. content:
  3250. application/json:
  3251. schema:
  3252. example:
  3253. attr:
  3254. ban_time: "86400"
  3255. ban_time_increment: "1"
  3256. blacklist: "10.100.6.5/32,10.100.8.4/32"
  3257. max_attempts: "5"
  3258. max_ban_time: "86400"
  3259. netban_ipv4: "24"
  3260. netban_ipv6: "64"
  3261. retry_window: "600"
  3262. whitelist: mailcow.tld
  3263. items: none
  3264. properties:
  3265. attr:
  3266. description: array containing the fail2ban settings
  3267. properties:
  3268. backlist:
  3269. description: the backlisted ips or hostnames separated by comma
  3270. type: string
  3271. ban_time:
  3272. description: the time an ip should be banned
  3273. type: number
  3274. ban_time_increment:
  3275. description: if the time of the ban should increase each time
  3276. type: boolean
  3277. max_attempts:
  3278. description: the maximum numbe of wrong logins before a ip is banned
  3279. type: number
  3280. max_ban_time:
  3281. description: the maximum time an ip should be banned
  3282. type: number
  3283. netban_ipv4:
  3284. description: the networks mask to ban for ipv4
  3285. type: number
  3286. netban_ipv6:
  3287. description: the networks mask to ban for ipv6
  3288. type: number
  3289. retry_window:
  3290. description: >-
  3291. the maximum time in which a ip as to login with false
  3292. credentials to be banned
  3293. type: number
  3294. whitelist:
  3295. description: whitelisted ips or hostnames sepereated by comma
  3296. type: string
  3297. type: object
  3298. items:
  3299. description: has to be none
  3300. type: object
  3301. summary: Edit Fail2Ban
  3302. /api/v1/edit/mailbox:
  3303. post:
  3304. responses:
  3305. "401":
  3306. $ref: "#/components/responses/Unauthorized"
  3307. "200":
  3308. content:
  3309. application/json:
  3310. examples:
  3311. response:
  3312. value:
  3313. - log:
  3314. - mailbox
  3315. - edit
  3316. - mailbox
  3317. - active: "1"
  3318. force_pw_update: "0"
  3319. name: Full name
  3320. password: "*"
  3321. password2: "*"
  3322. quota: "3072"
  3323. sender_acl:
  3324. - default
  3325. - info@domain2.tld
  3326. - domain3.tld
  3327. - "*"
  3328. sogo_access: "1"
  3329. username:
  3330. - info@domain.tld
  3331. tags: ["tag3", "tag4"]
  3332. - null
  3333. msg:
  3334. - mailbox_modified
  3335. - info@domain.tld
  3336. type: success
  3337. schema:
  3338. properties:
  3339. log:
  3340. description: contains request object
  3341. items: {}
  3342. type: array
  3343. msg:
  3344. items: {}
  3345. type: array
  3346. type:
  3347. enum:
  3348. - success
  3349. - danger
  3350. - error
  3351. type: string
  3352. type: object
  3353. description: OK
  3354. headers: {}
  3355. tags:
  3356. - Mailboxes
  3357. description: >-
  3358. You can update one or more mailboxes per request. You can also send just
  3359. attributes you want to change
  3360. operationId: Update mailbox
  3361. requestBody:
  3362. content:
  3363. application/json:
  3364. schema:
  3365. example:
  3366. attr:
  3367. active: "1"
  3368. force_pw_update: "0"
  3369. name: Full name
  3370. authsource: mailcow
  3371. password: ""
  3372. password2: ""
  3373. quota: "3072"
  3374. sender_acl:
  3375. - default
  3376. - info@domain2.tld
  3377. - domain3.tld
  3378. - "*"
  3379. sogo_access: "1"
  3380. tags: ["tag3", "tag4"]
  3381. items:
  3382. - info@domain.tld
  3383. properties:
  3384. attr:
  3385. properties:
  3386. active:
  3387. description: is mailbox active or not
  3388. type: boolean
  3389. force_pw_update:
  3390. description: force user to change password on next login
  3391. type: boolean
  3392. name:
  3393. description: Full name of the mailbox user
  3394. type: string
  3395. authsource:
  3396. description: Specifies the authentication source for the mailbox.
  3397. type: string
  3398. enum: [mailcow, ldap, keycloak, generic-oidc]
  3399. password2:
  3400. description: new mailbox password for confirmation
  3401. type: string
  3402. password:
  3403. description: new mailbox password when using `mailcow` as the authentication source.
  3404. type: string
  3405. quota:
  3406. description: mailbox quota
  3407. type: number
  3408. sender_acl:
  3409. description: list of allowed send from addresses
  3410. type: object
  3411. sogo_access:
  3412. description: is access to SOGo webmail active or not
  3413. type: boolean
  3414. type: object
  3415. items:
  3416. description: contains list of mailboxes you want update
  3417. type: object
  3418. type: object
  3419. summary: Update mailbox
  3420. /api/v1/edit/mailbox/custom-attribute:
  3421. post:
  3422. responses:
  3423. "401":
  3424. $ref: "#/components/responses/Unauthorized"
  3425. "200":
  3426. content:
  3427. application/json:
  3428. examples:
  3429. response:
  3430. value:
  3431. - log:
  3432. - mailbox
  3433. - edit
  3434. - mailbox_custom_attribute
  3435. - mailboxes:
  3436. - moo@mailcow.tld
  3437. attribute:
  3438. - role
  3439. - foo
  3440. value:
  3441. - cow
  3442. - bar
  3443. - null
  3444. msg:
  3445. - mailbox_modified
  3446. - moo@mailcow.tld
  3447. type: success
  3448. schema:
  3449. properties:
  3450. log:
  3451. description: contains request object
  3452. items: {}
  3453. type: array
  3454. msg:
  3455. items: {}
  3456. type: array
  3457. type:
  3458. enum:
  3459. - success
  3460. - danger
  3461. - error
  3462. type: string
  3463. type: object
  3464. description: OK
  3465. headers: {}
  3466. tags:
  3467. - Mailboxes
  3468. description: >-
  3469. You can update custom attributes of one or more mailboxes per request.
  3470. operationId: Update mailbox custom attributes
  3471. requestBody:
  3472. content:
  3473. application/json:
  3474. schema:
  3475. example:
  3476. attr:
  3477. attribute:
  3478. - role
  3479. - foo
  3480. value:
  3481. - cow
  3482. - bar
  3483. items:
  3484. - moo@mailcow.tld
  3485. properties:
  3486. attr:
  3487. properties:
  3488. attribute:
  3489. description: Array of attribute keys
  3490. type: object
  3491. value:
  3492. description: Array of attribute values
  3493. type: object
  3494. type: object
  3495. items:
  3496. description: contains list of mailboxes you want update
  3497. type: object
  3498. type: object
  3499. summary: Update mailbox custom attributes
  3500. /api/v1/edit/mailq:
  3501. post:
  3502. responses:
  3503. "401":
  3504. $ref: "#/components/responses/Unauthorized"
  3505. "200":
  3506. content:
  3507. application/json:
  3508. examples:
  3509. response:
  3510. value:
  3511. msg: Task completed
  3512. type: success
  3513. description: OK
  3514. headers: {}
  3515. tags:
  3516. - Queue Manager
  3517. description: >-
  3518. Using this API you can flush the current mail queue. This will try to
  3519. deliver all mails currently in it.
  3520. This API uses the command: `postqueue -f`
  3521. operationId: Flush Queue
  3522. requestBody:
  3523. content:
  3524. application/json:
  3525. schema:
  3526. example:
  3527. action: flush
  3528. properties:
  3529. action:
  3530. description: use flush to flush the mail queue
  3531. type: string
  3532. type: object
  3533. summary: Flush Queue
  3534. /api/v1/edit/pushover:
  3535. post:
  3536. responses:
  3537. "401":
  3538. $ref: "#/components/responses/Unauthorized"
  3539. "200":
  3540. content:
  3541. application/json:
  3542. examples:
  3543. response:
  3544. value:
  3545. - log:
  3546. - pushover
  3547. - edit
  3548. - active: "0"
  3549. evaluate_x_prio: "0"
  3550. key: 21e8918e1jksdjcpis712
  3551. only_x_prio: "0"
  3552. sound: "pushover"
  3553. senders: ""
  3554. senders_regex: ""
  3555. text: ""
  3556. title: Mail
  3557. token: 9023e2ohcwed27d1idu2
  3558. username:
  3559. - info@domain.tld
  3560. msg: pushover_settings_edited
  3561. type: success
  3562. schema:
  3563. properties:
  3564. log:
  3565. description: contains request object
  3566. items: {}
  3567. type: array
  3568. msg:
  3569. items: {}
  3570. type: array
  3571. type:
  3572. enum:
  3573. - success
  3574. - danger
  3575. - error
  3576. type: string
  3577. type: object
  3578. description: OK
  3579. headers: {}
  3580. tags:
  3581. - Mailboxes
  3582. description: >-
  3583. Using this endpoint it is possible to update the pushover settings for
  3584. mailboxes
  3585. operationId: Update Pushover settings
  3586. requestBody:
  3587. content:
  3588. application/json:
  3589. schema:
  3590. example:
  3591. attr:
  3592. active: "0"
  3593. evaluate_x_prio: "0"
  3594. key: 21e8918e1jksdjcpis712
  3595. only_x_prio: "0"
  3596. sound: "pushover"
  3597. senders: ""
  3598. senders_regex: ""
  3599. text: ""
  3600. title: Mail
  3601. token: 9023e2ohcwed27d1idu2
  3602. items: info@domain.tld
  3603. properties:
  3604. attr:
  3605. properties:
  3606. active:
  3607. description: Enables pushover 1 disable pushover 0
  3608. type: number
  3609. evaluate_x_prio:
  3610. description: Send the Push with High priority
  3611. type: number
  3612. key:
  3613. description: Pushover key
  3614. type: string
  3615. only_x_prio:
  3616. description: Only send push for prio mails
  3617. type: number
  3618. sound:
  3619. description: Set notification sound
  3620. type: string
  3621. senders:
  3622. description: Only send push for emails from these senders
  3623. type: string
  3624. senders_regex:
  3625. description: Regex to match senders for which a push will be send
  3626. type: string
  3627. text:
  3628. description: Custom push noficiation text
  3629. type: string
  3630. title:
  3631. description: Push title
  3632. type: string
  3633. token:
  3634. description: Pushover token
  3635. type: string
  3636. type: object
  3637. items:
  3638. description: contains list of mailboxes you want to delete
  3639. type: object
  3640. type: object
  3641. summary: Update Pushover settings
  3642. /api/v1/edit/quarantine_notification:
  3643. post:
  3644. responses:
  3645. "401":
  3646. $ref: "#/components/responses/Unauthorized"
  3647. "200":
  3648. description: OK
  3649. headers: {}
  3650. tags:
  3651. - Mailboxes
  3652. description: You can update one or more mailboxes per request.
  3653. operationId: Quarantine Notifications
  3654. requestBody:
  3655. content:
  3656. application/json:
  3657. schema:
  3658. example:
  3659. attr:
  3660. quarantine_notification: hourly
  3661. items:
  3662. anyOf:
  3663. - mailbox1@domain.tld
  3664. - mailbox2@domain.tld
  3665. properties:
  3666. attr:
  3667. properties:
  3668. quarantine_notification:
  3669. description: recurrence
  3670. enum:
  3671. - hourly
  3672. - daily
  3673. - weekly
  3674. - never
  3675. type: string
  3676. type: object
  3677. items:
  3678. description: >-
  3679. contains list of mailboxes you want set qurantine
  3680. notifications
  3681. type: object
  3682. type: object
  3683. summary: Quarantine Notifications
  3684. /api/v1/edit/syncjob:
  3685. post:
  3686. responses:
  3687. "401":
  3688. $ref: "#/components/responses/Unauthorized"
  3689. "200":
  3690. content:
  3691. application/json:
  3692. examples:
  3693. response:
  3694. value:
  3695. log:
  3696. - entity
  3697. - action
  3698. - object
  3699. msg:
  3700. - message
  3701. - entity name
  3702. type: success
  3703. schema:
  3704. properties:
  3705. log:
  3706. description: contains request object
  3707. items: {}
  3708. type: array
  3709. msg:
  3710. items: {}
  3711. type: array
  3712. type:
  3713. enum:
  3714. - success
  3715. - danger
  3716. - error
  3717. type: string
  3718. type: object
  3719. description: OK
  3720. headers: {}
  3721. tags:
  3722. - Sync jobs
  3723. description: >-
  3724. You can update one or more sync jobs per request. You can also send just
  3725. attributes you want to change.
  3726. operationId: Update sync job
  3727. requestBody:
  3728. content:
  3729. application/json:
  3730. schema:
  3731. example:
  3732. attr:
  3733. active: "1"
  3734. automap: "1"
  3735. custom_params: ""
  3736. delete1: "0"
  3737. delete2: "0"
  3738. delete2duplicates: "1"
  3739. enc1: SSL
  3740. exclude: (?i)spam|(?i)junk
  3741. host1: imap.server.tld
  3742. maxage: "0"
  3743. maxbytespersecond: "0"
  3744. mins_interval: "20"
  3745. password1: supersecret
  3746. port1: "993"
  3747. skipcrossduplicates: "0"
  3748. subfolder2: External
  3749. subscribeall: "1"
  3750. timeout1: "600"
  3751. timeout2: "600"
  3752. user1: username
  3753. items: "1"
  3754. properties:
  3755. attr:
  3756. properties:
  3757. active:
  3758. description: Is sync job active
  3759. type: boolean
  3760. automap:
  3761. description: >-
  3762. Try to automap folders ("Sent items", "Sent" => "Sent"
  3763. etc.)
  3764. type: boolean
  3765. custom_params:
  3766. description: Custom parameters passed to imapsync command
  3767. type: string
  3768. delete1:
  3769. description: Delete from source when completed
  3770. type: boolean
  3771. delete2:
  3772. description: Delete messages on destination that are not on source
  3773. type: boolean
  3774. delete2duplicates:
  3775. description: Delete duplicates on destination
  3776. type: boolean
  3777. enc1:
  3778. description: Encryption
  3779. enum:
  3780. - TLS
  3781. - SSL
  3782. - PLAIN
  3783. type: string
  3784. exclude:
  3785. description: Exclude objects (regex)
  3786. type: string
  3787. host1:
  3788. description: Hostname
  3789. type: string
  3790. maxage:
  3791. description: >-
  3792. Maximum age of messages in days that will be polled from
  3793. remote (0 = ignore age)
  3794. type: number
  3795. maxbytespersecond:
  3796. description: Max. bytes per second (0 = unlimited)
  3797. type: number
  3798. mins_interval:
  3799. description: Interval (min)
  3800. type: number
  3801. password1:
  3802. description: Password
  3803. type: string
  3804. port1:
  3805. description: Port
  3806. type: string
  3807. skipcrossduplicates:
  3808. description: >-
  3809. Skip duplicate messages across folders (first come,
  3810. first serve)
  3811. type: boolean
  3812. subfolder2:
  3813. description: >-
  3814. Sync into subfolder on destination (empty = do not use
  3815. subfolder)
  3816. type: string
  3817. subscribeall:
  3818. description: Subscribe all folders
  3819. type: boolean
  3820. timeout1:
  3821. description: Timeout for connection to remote host
  3822. type: number
  3823. timeout2:
  3824. description: Timeout for connection to local host
  3825. type: number
  3826. user1:
  3827. description: Username
  3828. type: string
  3829. type: object
  3830. items:
  3831. description: contains list of aliases you want update
  3832. type: object
  3833. type: object
  3834. summary: Update sync job
  3835. /api/v1/edit/user-acl:
  3836. post:
  3837. responses:
  3838. "401":
  3839. $ref: "#/components/responses/Unauthorized"
  3840. "200":
  3841. content:
  3842. application/json:
  3843. examples:
  3844. response:
  3845. value:
  3846. - log:
  3847. - acl
  3848. - edit
  3849. - user
  3850. - user_acl:
  3851. - spam_alias
  3852. - tls_policy
  3853. - spam_score
  3854. - spam_policy
  3855. - delimiter_action
  3856. - syncjobs
  3857. - eas_reset
  3858. - quarantine
  3859. - sogo_profile_reset
  3860. - quarantine_attachments
  3861. - quarantine_notification
  3862. - app_passwds
  3863. - pushover
  3864. username:
  3865. - info@domain.tld
  3866. msg:
  3867. - acl_saved
  3868. - info@domain.tld
  3869. type: success
  3870. schema:
  3871. properties:
  3872. log:
  3873. description: contains request object
  3874. items: {}
  3875. type: array
  3876. msg:
  3877. items: {}
  3878. type: array
  3879. type:
  3880. enum:
  3881. - success
  3882. - danger
  3883. - error
  3884. type: string
  3885. type: object
  3886. description: OK
  3887. headers: {}
  3888. tags:
  3889. - Mailboxes
  3890. description: Using this endpoints its possible to update the ACL's for mailboxes
  3891. operationId: Update mailbox ACL
  3892. requestBody:
  3893. content:
  3894. application/json:
  3895. schema:
  3896. example:
  3897. attr:
  3898. user_acl:
  3899. - spam_alias
  3900. - tls_policy
  3901. - spam_score
  3902. - spam_policy
  3903. - delimiter_action
  3904. - syncjobs
  3905. - eas_reset
  3906. - quarantine
  3907. - sogo_profile_reset
  3908. - quarantine_attachments
  3909. - quarantine_notification
  3910. - app_passwds
  3911. - pushover
  3912. items: info@domain.tld
  3913. properties:
  3914. attr:
  3915. properties:
  3916. user_acl:
  3917. description: contains a list of active user acls
  3918. type: object
  3919. type: object
  3920. items:
  3921. description: contains list of mailboxes you want to delete
  3922. type: object
  3923. type: object
  3924. summary: Update mailbox ACL
  3925. "/api/v1/get/alias/{id}":
  3926. get:
  3927. parameters:
  3928. - description: id of entry you want to get
  3929. example: all
  3930. in: path
  3931. name: id
  3932. required: true
  3933. schema:
  3934. enum:
  3935. - all
  3936. - "1"
  3937. - "2"
  3938. - "5"
  3939. - "10"
  3940. type: string
  3941. - description: e.g. api-key-string
  3942. example: api-key-string
  3943. in: header
  3944. name: X-API-Key
  3945. required: false
  3946. schema:
  3947. type: string
  3948. responses:
  3949. "401":
  3950. $ref: "#/components/responses/Unauthorized"
  3951. "200":
  3952. content:
  3953. application/json:
  3954. examples:
  3955. response:
  3956. value:
  3957. - active: "1"
  3958. address: alias@domain.tld
  3959. created: "2019-04-04 19:29:49"
  3960. domain: domain.tld
  3961. goto: destination@domain.tld
  3962. id: 6
  3963. in_primary_domain: ""
  3964. is_catch_all: 0
  3965. modified: null
  3966. private_comment: null
  3967. public_comment: null
  3968. - active: "1"
  3969. address: "@domain.tld"
  3970. created: "2019-04-27 13:42:39"
  3971. domain: domain.tld
  3972. goto: destination@domain.tld
  3973. id: 10
  3974. in_primary_domain: ""
  3975. is_catch_all: 1
  3976. modified: null
  3977. private_comment: null
  3978. public_comment: null
  3979. description: OK
  3980. headers: {}
  3981. tags:
  3982. - Aliases
  3983. description: You can list mailbox aliases existing in system.
  3984. operationId: Get aliases
  3985. summary: Get aliases
  3986. "/api/v1/get/time_limited_aliases/{mailbox}":
  3987. get:
  3988. parameters:
  3989. - description: mailbox you want to get aliasses from
  3990. example: domain.tld
  3991. in: path
  3992. schema:
  3993. type: string
  3994. name: mailbox
  3995. required: true
  3996. - description: e.g. api-key-string
  3997. example: api-key-string
  3998. in: header
  3999. name: X-API-Key
  4000. required: false
  4001. schema:
  4002. type: string
  4003. responses:
  4004. "401":
  4005. $ref: "#/components/responses/Unauthorized"
  4006. "200":
  4007. content:
  4008. application/json:
  4009. examples:
  4010. response:
  4011. value:
  4012. - address: alias@domain.tld
  4013. goto: destination@domain.tld
  4014. validity: 1668251246
  4015. created: "2021-11-12 12:07:26"
  4016. modified: null
  4017. description: OK
  4018. headers: {}
  4019. tags:
  4020. - Aliases
  4021. description: You can list time limited mailbox aliases existing in system.
  4022. operationId: Get time limited aliases
  4023. summary: Get time limited aliases
  4024. "/api/v1/get/app-passwd/all/{mailbox}":
  4025. get:
  4026. parameters:
  4027. - description: mailbox of entry you want to get
  4028. example: hello@mailcow.email
  4029. in: path
  4030. name: mailbox
  4031. required: true
  4032. schema:
  4033. enum:
  4034. - hello@mailcow.email
  4035. type: string
  4036. - description: e.g. api-key-string
  4037. example: api-key-string
  4038. in: header
  4039. name: X-API-Key
  4040. required: false
  4041. schema:
  4042. type: string
  4043. responses:
  4044. "401":
  4045. $ref: "#/components/responses/Unauthorized"
  4046. "200":
  4047. content:
  4048. application/json:
  4049. examples:
  4050. response:
  4051. value:
  4052. - active: "1"
  4053. created: "2019-12-21 16:04:55"
  4054. domain: mailcow.email
  4055. id: 2
  4056. mailbox: hello@mailcow.email
  4057. modified: null
  4058. name: emclient
  4059. description: OK
  4060. headers: {}
  4061. tags:
  4062. - App Passwords
  4063. description: >-
  4064. Using this endpoint you can get all app passwords from a specific
  4065. mailbox.
  4066. operationId: Get App Password
  4067. summary: Get App Password
  4068. "/api/v1/get/bcc/{id}":
  4069. get:
  4070. parameters:
  4071. - description: id of entry you want to get
  4072. example: all
  4073. in: path
  4074. name: id
  4075. required: true
  4076. schema:
  4077. enum:
  4078. - all
  4079. - "1"
  4080. - "2"
  4081. - "5"
  4082. - "10"
  4083. type: string
  4084. - description: e.g. api-key-string
  4085. example: api-key-string
  4086. in: header
  4087. name: X-API-Key
  4088. required: false
  4089. schema:
  4090. type: string
  4091. responses:
  4092. "401":
  4093. $ref: "#/components/responses/Unauthorized"
  4094. "200":
  4095. content:
  4096. application/json:
  4097. examples:
  4098. response:
  4099. value:
  4100. - active: "1"
  4101. bcc_dest: bcc@awesomecow.tld
  4102. created: "2019-10-02 21:44:34"
  4103. domain: mailcow.tld
  4104. id: 3
  4105. local_dest: "@mailcow.tld"
  4106. modified: null
  4107. type: sender
  4108. description: OK
  4109. headers: {}
  4110. tags:
  4111. - Address Rewriting
  4112. description: Using this endpoint you can get all BCC maps.
  4113. operationId: Get BCC Map
  4114. summary: Get BCC Map
  4115. "/api/v1/get/dkim/{domain}":
  4116. get:
  4117. parameters:
  4118. - description: name of domain
  4119. in: path
  4120. name: domain
  4121. required: true
  4122. schema:
  4123. type: string
  4124. - description: e.g. api-key-string
  4125. example: api-key-string
  4126. in: header
  4127. name: X-API-Key
  4128. required: false
  4129. schema:
  4130. type: string
  4131. responses:
  4132. "401":
  4133. $ref: "#/components/responses/Unauthorized"
  4134. "200":
  4135. content:
  4136. application/json:
  4137. examples:
  4138. response:
  4139. value:
  4140. dkim_selector: dkim
  4141. dkim_txt: >-
  4142. v=DKIM1;k=rsa;t=s;s=email;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA21tUSjyasQy/hJmVjPnlRGfzx6TPhYj8mXY9DVOzSAE64Gddw/GnE/GcCR6WXNT23u9q4zPnz1IPoNt5kFOps8vg/iNqrcH++494noaZuYyFPPFnebkfryO4EvEyxC/c66qts+gnOUml+M8uv5WObBJld2gG12jLwFM0263J/N6J8LuUsaXOB2uCIfx8Nf4zjuJ6Ieez2uyHNK5dXjDLfKA4mTr+EEK6W6e34M4KN1liWM6r9Oy5S1FlLrD42VpURxxBZtBiEtaJPEKSQuk6GQz8ihu7W20Yr53tyCdaORu8dhxXVUWVf+GjuuMEdAmQCjYkarXdYCrt56Psw703kwIDAQAB
  4143. length: "2048"
  4144. privkey: ""
  4145. pubkey: >-
  4146. MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA21tUSjyasQy/hJmVjPnlRGfzx6TPhYj8mXY9DVOzSAE64Gddw/GnE/GcCR6WXNT23u9q4zPnz1IPoNt5kFOps8vg/iNqrcH++494noaZuYyFPPFnebkfryO4EvEyxC/c66qts+gnOUml+M8uv5WObBJld2gG12jLwFM0263J/N6J8LuUsaXOB2uCIfx8Nf4zjuJ6Ieez2uyHNK5dXjDLfKA4mTr+EEK6W6e34M4KN1liWM6r9Oy5S1FlLrD42VpURxxBZtBiEtaJPEKSQuk6GQz8ihu7W20Yr53tyCdaORu8dhxXVUWVf+GjuuMEdAmQCjYkarXdYCrt56Psw703kwIDAQAB
  4147. description: OK
  4148. headers: {}
  4149. tags:
  4150. - DKIM
  4151. description: >-
  4152. Using this endpoint you can get the DKIM public key for a specific
  4153. domain.
  4154. operationId: Get DKIM Key
  4155. summary: Get DKIM Key
  4156. /api/v1/get/domain-admin/all:
  4157. get:
  4158. responses:
  4159. "401":
  4160. $ref: "#/components/responses/Unauthorized"
  4161. "200":
  4162. content:
  4163. application/json:
  4164. examples:
  4165. response:
  4166. value:
  4167. - active: "1"
  4168. created: "2019-10-02 10:29:41"
  4169. selected_domains:
  4170. - mailcow.tld
  4171. tfa_active: "0"
  4172. unselected_domains:
  4173. - awesomemailcow.de
  4174. - mailcowisgreat.de
  4175. username: testadmin
  4176. description: OK
  4177. headers: {}
  4178. tags:
  4179. - Domain admin
  4180. description: ""
  4181. operationId: Get Domain Admins
  4182. summary: Get Domain Admins
  4183. "/api/v1/get/domain/{id}":
  4184. get:
  4185. parameters:
  4186. - description: id of entry you want to get
  4187. example: all
  4188. in: path
  4189. name: id
  4190. required: true
  4191. schema:
  4192. enum:
  4193. - all
  4194. - mailcow.tld
  4195. type: string
  4196. - description: comma seperated list of tags to filter by
  4197. example: "tag1,tag2"
  4198. in: query
  4199. name: tags
  4200. required: false
  4201. schema:
  4202. type: string
  4203. - description: e.g. api-key-string
  4204. example: api-key-string
  4205. in: header
  4206. name: X-API-Key
  4207. required: false
  4208. schema:
  4209. type: string
  4210. responses:
  4211. "401":
  4212. $ref: "#/components/responses/Unauthorized"
  4213. "200":
  4214. content:
  4215. application/json:
  4216. examples:
  4217. response:
  4218. value:
  4219. - active: "1"
  4220. aliases_in_domain: 0
  4221. aliases_left: 400
  4222. backupmx: "0"
  4223. bytes_total: "5076666944"
  4224. def_new_mailbox_quota: 3221225472
  4225. def_quota_for_mbox: 3221225472
  4226. description: Some description
  4227. domain_name: domain.tld
  4228. gal: "0"
  4229. max_new_mailbox_quota: 10737418240
  4230. max_num_aliases_for_domain: 400
  4231. max_num_mboxes_for_domain: 10
  4232. max_quota_for_domain: 10737418240
  4233. max_quota_for_mbox: 10737418240
  4234. mboxes_in_domain: 0
  4235. mboxes_left: 10
  4236. msgs_total: "172440"
  4237. quota_used_in_domain: "0"
  4238. relay_all_recipients: "0"
  4239. relayhost: "0"
  4240. rl: false
  4241. tags: ["tag1", "tag2"]
  4242. - active: "1"
  4243. aliases_in_domain: 0
  4244. aliases_left: 400
  4245. backupmx: "1"
  4246. bytes_total: "5076666944"
  4247. def_new_mailbox_quota: 3221225472
  4248. def_quota_for_mbox: 3221225472
  4249. description: domain description
  4250. domain_name: domain2.tld
  4251. gal: "0"
  4252. max_new_mailbox_quota: 10737418240
  4253. max_num_aliases_for_domain: 400
  4254. max_num_mboxes_for_domain: 10
  4255. max_quota_for_domain: 10737418240
  4256. max_quota_for_mbox: 10737418240
  4257. mboxes_in_domain: 0
  4258. mboxes_left: 10
  4259. msgs_total: "172440"
  4260. quota_used_in_domain: "0"
  4261. relay_all_recipients: "0"
  4262. relayhost: "0"
  4263. rl: false
  4264. tags: ["tag3", "tag4"]
  4265. description: OK
  4266. headers: {}
  4267. tags:
  4268. - Domains
  4269. description: You can list all domains existing in system.
  4270. operationId: Get domains
  4271. summary: Get domains
  4272. /api/v1/get/fail2ban:
  4273. get:
  4274. responses:
  4275. "401":
  4276. $ref: "#/components/responses/Unauthorized"
  4277. "200":
  4278. content:
  4279. application/json:
  4280. examples:
  4281. response:
  4282. value:
  4283. ban_time: 604800
  4284. ban_time_increment: 1
  4285. blacklist: |-
  4286. 45.82.153.37/32
  4287. 92.118.38.52/32
  4288. max_attempts: 1
  4289. max_ban_time: 604800
  4290. netban_ipv4: 32
  4291. netban_ipv6: 128
  4292. perm_bans:
  4293. - 45.82.153.37/32
  4294. - 92.118.38.52/32
  4295. retry_window: 7200
  4296. whitelist: 1.1.1.1
  4297. description: OK
  4298. headers: {}
  4299. tags:
  4300. - Fail2Ban
  4301. description: Gets the current Fail2Ban configuration.
  4302. operationId: Get Fail2Ban Config
  4303. summary: Get Fail2Ban Config
  4304. /api/v1/get/fwdhost/all:
  4305. get:
  4306. responses:
  4307. "401":
  4308. $ref: "#/components/responses/Unauthorized"
  4309. "200":
  4310. content:
  4311. application/json:
  4312. examples:
  4313. response:
  4314. value:
  4315. - host: 5.1.76.202
  4316. keep_spam: "yes"
  4317. source: hosted.mailcow.de
  4318. - host: "2a00:f820:417::202"
  4319. keep_spam: "yes"
  4320. source: hosted.mailcow.de
  4321. description: OK
  4322. headers: {}
  4323. tags:
  4324. - Fordwarding Hosts
  4325. description: You can list all Forwarding Hosts in your mailcow.
  4326. operationId: Get Forwarding Hosts
  4327. summary: Get Forwarding Hosts
  4328. "/api/v1/get/logs/acme/{count}":
  4329. get:
  4330. parameters:
  4331. - description: Number of logs to return
  4332. in: path
  4333. name: count
  4334. required: true
  4335. schema:
  4336. type: number
  4337. - description: e.g. api-key-string
  4338. example: api-key-string
  4339. in: header
  4340. name: X-API-Key
  4341. required: false
  4342. schema:
  4343. type: string
  4344. responses:
  4345. "401":
  4346. $ref: "#/components/responses/Unauthorized"
  4347. "200":
  4348. content:
  4349. application/json:
  4350. examples:
  4351. response:
  4352. value:
  4353. - message: >-
  4354. Certificate validation done, neither changed nor due for
  4355. renewal, sleeping for another day.
  4356. time: "1569927728"
  4357. description: OK
  4358. headers: {}
  4359. tags:
  4360. - Logs
  4361. description: >-
  4362. This Api endpoint lists all ACME logs from issued Lets Enctypts
  4363. certificates.
  4364. Tip: You can limit how many logs you want to get by using `/<count>` at
  4365. the end of the api url.
  4366. operationId: Get ACME logs
  4367. summary: Get ACME logs
  4368. "/api/v1/get/logs/api/{count}":
  4369. get:
  4370. parameters:
  4371. - description: Number of logs to return
  4372. in: path
  4373. name: count
  4374. required: true
  4375. schema:
  4376. type: number
  4377. - description: e.g. api-key-string
  4378. example: api-key-string
  4379. in: header
  4380. name: X-API-Key
  4381. required: false
  4382. schema:
  4383. type: string
  4384. responses:
  4385. "401":
  4386. $ref: "#/components/responses/Unauthorized"
  4387. "200":
  4388. content:
  4389. application/json:
  4390. examples:
  4391. response:
  4392. value:
  4393. - data: ""
  4394. method: GET
  4395. remote: 1.1.1.1
  4396. time: 1569939001
  4397. uri: /api/v1/get/logs/api/2
  4398. description: OK
  4399. headers: {}
  4400. tags:
  4401. - Logs
  4402. description: >-
  4403. This Api endpoint lists all Api logs.
  4404. Tip: You can limit how many logs you want to get by using `/<count>` at
  4405. the end of the api url.
  4406. operationId: Get Api logs
  4407. summary: Get Api logs
  4408. "/api/v1/get/logs/autodiscover/{count}":
  4409. get:
  4410. parameters:
  4411. - description: Number of logs to return
  4412. in: path
  4413. name: count
  4414. required: true
  4415. schema:
  4416. type: number
  4417. - description: e.g. api-key-string
  4418. example: api-key-string
  4419. in: header
  4420. name: X-API-Key
  4421. required: false
  4422. schema:
  4423. type: string
  4424. responses:
  4425. "401":
  4426. $ref: "#/components/responses/Unauthorized"
  4427. "200":
  4428. content:
  4429. application/json:
  4430. examples:
  4431. response:
  4432. value:
  4433. - service: activesync
  4434. time: 1569684212
  4435. ua: >-
  4436. Microsoft Office/16.0 (Windows NT 6.2; MAPICPL
  4437. 16.0.11328; Pro)
  4438. user: awesome@mailcow.de
  4439. description: OK
  4440. headers: {}
  4441. tags:
  4442. - Logs
  4443. description: >-
  4444. This Api endpoint lists all Autodiscover logs.
  4445. Tip: You can limit how many logs you want to get by using `/<count>` at
  4446. the end of the api url.
  4447. operationId: Get Autodiscover logs
  4448. summary: Get Autodiscover logs
  4449. "/api/v1/get/logs/dovecot/{count}":
  4450. get:
  4451. parameters:
  4452. - description: Number of logs to return
  4453. in: path
  4454. name: count
  4455. required: true
  4456. schema:
  4457. type: number
  4458. - description: e.g. api-key-string
  4459. example: api-key-string
  4460. in: header
  4461. name: X-API-Key
  4462. required: false
  4463. schema:
  4464. type: string
  4465. responses:
  4466. "401":
  4467. $ref: "#/components/responses/Unauthorized"
  4468. "200":
  4469. content:
  4470. application/json:
  4471. examples:
  4472. response:
  4473. value:
  4474. - message: >-
  4475. managesieve-login: Disconnected (no auth attempts in 0
  4476. secs): user=<>, rip=172.22.1.3, lip=172.22.1.250
  4477. priority: info
  4478. program: dovecot
  4479. time: "1569938740"
  4480. description: OK
  4481. headers: {}
  4482. tags:
  4483. - Logs
  4484. description: >-
  4485. This Api endpoint lists all Dovecot logs.
  4486. Tip: You can limit how many logs you want to get by using `/<count>` at
  4487. the end of the api url.
  4488. operationId: Get Dovecot logs
  4489. summary: Get Dovecot logs
  4490. "/api/v1/get/logs/netfilter/{count}":
  4491. get:
  4492. parameters:
  4493. - description: Number of logs to return
  4494. in: path
  4495. name: count
  4496. required: true
  4497. schema:
  4498. type: number
  4499. - description: e.g. api-key-string
  4500. example: api-key-string
  4501. in: header
  4502. name: X-API-Key
  4503. required: false
  4504. schema:
  4505. type: string
  4506. responses:
  4507. "401":
  4508. $ref: "#/components/responses/Unauthorized"
  4509. "200":
  4510. content:
  4511. application/json:
  4512. examples:
  4513. response:
  4514. value:
  4515. - message: "Whitelist was changed, it has 1 entries"
  4516. priority: info
  4517. time: 1569754911
  4518. - message: Add host/network 1.1.1.1/32 to blacklist
  4519. priority: crit
  4520. time: 1569754911
  4521. description: OK
  4522. headers: {}
  4523. tags:
  4524. - Logs
  4525. description: >-
  4526. This Api endpoint lists all Netfilter logs.
  4527. Tip: You can limit how many logs you want to get by using `/<count>` at
  4528. the end of the api url.
  4529. operationId: Get Netfilter logs
  4530. summary: Get Netfilter logs
  4531. "/api/v1/get/logs/postfix/{count}":
  4532. get:
  4533. parameters:
  4534. - description: Number of logs to return
  4535. in: path
  4536. name: count
  4537. required: true
  4538. schema:
  4539. type: number
  4540. - description: e.g. api-key-string
  4541. example: api-key-string
  4542. in: header
  4543. name: X-API-Key
  4544. required: false
  4545. schema:
  4546. type: string
  4547. responses:
  4548. "401":
  4549. $ref: "#/components/responses/Unauthorized"
  4550. "200":
  4551. content:
  4552. application/json:
  4553. examples:
  4554. response:
  4555. value:
  4556. - message: "EF1711500458: removed"
  4557. priority: info
  4558. program: postfix/qmgr
  4559. time: "1569937433"
  4560. description: OK
  4561. headers: {}
  4562. tags:
  4563. - Logs
  4564. description: >-
  4565. This Api endpoint lists all Postfix logs.
  4566. Tip: You can limit how many logs you want to get by using `/<count>` at
  4567. the end of the api url.
  4568. operationId: Get Postfix logs
  4569. summary: Get Postfix logs
  4570. "/api/v1/get/logs/ratelimited/{count}":
  4571. get:
  4572. parameters:
  4573. - description: Number of logs to return
  4574. in: path
  4575. name: count
  4576. required: true
  4577. schema:
  4578. type: number
  4579. - description: e.g. api-key-string
  4580. example: api-key-string
  4581. in: header
  4582. name: X-API-Key
  4583. required: false
  4584. schema:
  4585. type: string
  4586. responses:
  4587. "401":
  4588. $ref: "#/components/responses/Unauthorized"
  4589. "200":
  4590. content:
  4591. application/json:
  4592. examples:
  4593. response:
  4594. value:
  4595. - from: awesome@mailcow.email
  4596. header_from: '"Awesome" <awesome@mailcow.email>'
  4597. header_subject: Mailcow is amazing
  4598. ip: 172.22.1.248
  4599. message_id: 6a-5d892500-7-240abd80@90879116
  4600. qid: E3CF91500458
  4601. rcpt: hello@mailcow.email
  4602. rl_hash: RLsdz3tuabozgd4oacbdh8kc78
  4603. rl_info: mailcow(RLsdz3tuabozgd4oacbdh8kc78)
  4604. rl_name: mailcow
  4605. time: 1569269003
  4606. user: awesome@mailcow.email
  4607. description: OK
  4608. headers: {}
  4609. tags:
  4610. - Logs
  4611. description: >-
  4612. This Api endpoint lists all Ratelimit logs.
  4613. Tip: You can limit how many logs you want to get by using `/<count>` at
  4614. the end of the api url.
  4615. operationId: Get Ratelimit logs
  4616. summary: Get Ratelimit logs
  4617. "/api/v1/get/logs/rspamd-history/{count}":
  4618. get:
  4619. parameters:
  4620. - description: Number of logs to return
  4621. in: path
  4622. name: count
  4623. required: true
  4624. schema:
  4625. type: number
  4626. - description: e.g. api-key-string
  4627. example: api-key-string
  4628. in: header
  4629. name: X-API-Key
  4630. required: false
  4631. schema:
  4632. type: string
  4633. responses:
  4634. "401":
  4635. $ref: "#/components/responses/Unauthorized"
  4636. "200":
  4637. description: OK
  4638. headers: {}
  4639. tags:
  4640. - Logs
  4641. description: >-
  4642. This Api endpoint lists all Rspamd logs.
  4643. Tip: You can limit how many logs you want to get by using `/<count>` at
  4644. the end of the api url.
  4645. operationId: Get Rspamd logs
  4646. summary: Get Rspamd logs
  4647. "/api/v1/get/logs/sogo/{count}":
  4648. get:
  4649. parameters:
  4650. - description: Number of logs to return
  4651. in: path
  4652. name: count
  4653. required: true
  4654. schema:
  4655. type: number
  4656. - description: e.g. api-key-string
  4657. example: api-key-string
  4658. in: header
  4659. name: X-API-Key
  4660. required: false
  4661. schema:
  4662. type: string
  4663. responses:
  4664. "401":
  4665. $ref: "#/components/responses/Unauthorized"
  4666. "200":
  4667. content:
  4668. application/json:
  4669. examples:
  4670. response:
  4671. value:
  4672. - message: >-
  4673. [109]:
  4674. mailcowdockerized_watchdog-mailcow_1.mailcowdockerized_mailcow-network
  4675. "GET /SOGo.index/ HTTP/1.1" 200 2531/0 0.005 - - 0
  4676. priority: notice
  4677. program: sogod
  4678. time: "1569938874"
  4679. description: OK
  4680. headers: {}
  4681. tags:
  4682. - Logs
  4683. description: >-
  4684. This Api endpoint lists all SOGo logs.
  4685. Tip: You can limit how many logs you want to get by using `/<count>` at
  4686. the end of the api url.
  4687. operationId: Get SOGo logs
  4688. summary: Get SOGo logs
  4689. "/api/v1/get/logs/watchdog/{count}":
  4690. get:
  4691. parameters:
  4692. - description: Number of logs to return
  4693. in: path
  4694. name: count
  4695. required: true
  4696. schema:
  4697. type: number
  4698. - description: e.g. api-key-string
  4699. example: api-key-string
  4700. in: header
  4701. name: X-API-Key
  4702. required: false
  4703. schema:
  4704. type: string
  4705. responses:
  4706. "401":
  4707. $ref: "#/components/responses/Unauthorized"
  4708. "200":
  4709. content:
  4710. application/json:
  4711. examples:
  4712. response:
  4713. value:
  4714. - hpdiff: "0"
  4715. hpnow: "1"
  4716. hptotal: "1"
  4717. lvl: "100"
  4718. service: Fail2ban
  4719. time: "1569938958"
  4720. - hpdiff: "0"
  4721. hpnow: "5"
  4722. hptotal: "5"
  4723. lvl: "100"
  4724. service: Rspamd
  4725. time: "1569938956"
  4726. description: OK
  4727. headers: {}
  4728. tags:
  4729. - Logs
  4730. description: >-
  4731. This Api endpoint lists all Watchdog logs.
  4732. Tip: You can limit how many logs you want to get by using `/<count>` at
  4733. the end of the api url.
  4734. operationId: Get Watchdog logs
  4735. summary: Get Watchdog logs
  4736. "/api/v1/get/mailbox/{id}":
  4737. get:
  4738. parameters:
  4739. - description: id of entry you want to get
  4740. example: all
  4741. in: path
  4742. name: id
  4743. required: true
  4744. schema:
  4745. enum:
  4746. - all
  4747. - user@domain.tld
  4748. type: string
  4749. - description: comma seperated list of tags to filter by
  4750. example: "tag1,tag2"
  4751. in: query
  4752. name: tags
  4753. required: false
  4754. schema:
  4755. type: string
  4756. - description: e.g. api-key-string
  4757. example: api-key-string
  4758. in: header
  4759. name: X-API-Key
  4760. required: false
  4761. schema:
  4762. type: string
  4763. responses:
  4764. "401":
  4765. $ref: "#/components/responses/Unauthorized"
  4766. "200":
  4767. content:
  4768. application/json:
  4769. examples:
  4770. response:
  4771. value:
  4772. - active: "1"
  4773. attributes:
  4774. force_pw_update: "0"
  4775. mailbox_format: "maildir:"
  4776. quarantine_notification: never
  4777. sogo_access: "1"
  4778. tls_enforce_in: "0"
  4779. tls_enforce_out: "0"
  4780. domain: doman3.tld
  4781. is_relayed: 0
  4782. local_part: info
  4783. max_new_quota: 10737418240
  4784. messages: 0
  4785. name: Full name
  4786. percent_class: success
  4787. percent_in_use: 0
  4788. quota: 3221225472
  4789. quota_used: 0
  4790. rl: false
  4791. spam_aliases: 0
  4792. username: info@doman3.tld
  4793. tags: ["tag1", "tag2"]
  4794. description: OK
  4795. headers: {}
  4796. tags:
  4797. - Mailboxes
  4798. description: You can list all mailboxes existing in system.
  4799. operationId: Get mailboxes
  4800. summary: Get mailboxes
  4801. /api/v1/get/mailq/all:
  4802. get:
  4803. responses:
  4804. "401":
  4805. $ref: "#/components/responses/Unauthorized"
  4806. "200":
  4807. content:
  4808. application/json:
  4809. examples:
  4810. response:
  4811. value:
  4812. - arrival_time: 1570091234
  4813. message_size: 1848
  4814. queue_id: B98C6260CA1
  4815. queue_name: incoming
  4816. recipients:
  4817. - recipient@awesomecow.tld
  4818. sender: sender@mailcow.tld
  4819. description: OK
  4820. headers: {}
  4821. tags:
  4822. - Queue Manager
  4823. description: Get the current mail queue and everything it contains.
  4824. operationId: Get Queue
  4825. summary: Get Queue
  4826. "/api/v1/get/oauth2-client/{id}":
  4827. get:
  4828. parameters:
  4829. - description: id of entry you want to get
  4830. example: all
  4831. in: path
  4832. name: id
  4833. required: true
  4834. schema:
  4835. enum:
  4836. - all
  4837. - "1"
  4838. - "2"
  4839. - "5"
  4840. - "10"
  4841. type: string
  4842. - description: e.g. api-key-string
  4843. example: api-key-string
  4844. in: header
  4845. name: X-API-Key
  4846. required: false
  4847. schema:
  4848. type: string
  4849. responses:
  4850. "401":
  4851. $ref: "#/components/responses/Unauthorized"
  4852. "200":
  4853. content:
  4854. application/json:
  4855. examples:
  4856. response:
  4857. value:
  4858. - client_id: 17c76aaa88c0
  4859. client_secret: 73fc668a88147e32a31ff80c
  4860. grant_types: null
  4861. id: 1
  4862. redirect_uri: "https://mailcow.tld"
  4863. scope: profile
  4864. user_id: null
  4865. description: OK
  4866. headers: {}
  4867. tags:
  4868. - oAuth Clients
  4869. description: Using this endpoint you can get all oAuth clients.
  4870. operationId: Get oAuth Clients
  4871. summary: Get oAuth Clients
  4872. "/api/v1/get/policy_bl_domain/{domain}":
  4873. get:
  4874. parameters:
  4875. - description: name of domain
  4876. in: path
  4877. name: domain
  4878. required: true
  4879. schema:
  4880. type: string
  4881. - description: e.g. api-key-string
  4882. example: api-key-string
  4883. in: header
  4884. name: X-API-Key
  4885. required: false
  4886. schema:
  4887. type: string
  4888. responses:
  4889. "401":
  4890. $ref: "#/components/responses/Unauthorized"
  4891. "200":
  4892. content:
  4893. application/json:
  4894. examples:
  4895. response:
  4896. value:
  4897. - object: domain.tld
  4898. prefid: 2
  4899. value: "*@baddomain.tld"
  4900. description: OK
  4901. headers: {}
  4902. tags:
  4903. - Domain antispam policies
  4904. description: You can list all blacklist policies per domain.
  4905. operationId: List blacklist domain policy
  4906. summary: List blacklist domain policy
  4907. "/api/v1/get/policy_wl_domain/{domain}":
  4908. get:
  4909. parameters:
  4910. - description: name of domain
  4911. in: path
  4912. name: domain
  4913. required: true
  4914. schema:
  4915. type: string
  4916. - description: e.g. api-key-string
  4917. example: api-key-string
  4918. in: header
  4919. name: X-API-Key
  4920. required: false
  4921. schema:
  4922. type: string
  4923. responses:
  4924. "401":
  4925. $ref: "#/components/responses/Unauthorized"
  4926. "200":
  4927. content:
  4928. application/json:
  4929. examples:
  4930. response:
  4931. value:
  4932. - object: domain.tld
  4933. prefid: 1
  4934. value: "*@gooddomain.tld"
  4935. description: OK
  4936. headers: {}
  4937. tags:
  4938. - Domain antispam policies
  4939. description: You can list all whitelist policies per domain.
  4940. operationId: List whitelist domain policy
  4941. summary: List whitelist domain policy
  4942. /api/v1/get/quarantine/all:
  4943. get:
  4944. responses:
  4945. "401":
  4946. $ref: "#/components/responses/Unauthorized"
  4947. "200":
  4948. content:
  4949. application/json:
  4950. examples:
  4951. response:
  4952. value:
  4953. created: 1572688831
  4954. id: 33
  4955. notified: 1
  4956. qid: 8224615004C1
  4957. rcpt: admin@domain.tld
  4958. score: 15.48
  4959. sender: bounces@send.domain.tld
  4960. subject: mailcow is awesome
  4961. virus_flag: 0
  4962. description: OK
  4963. headers: {}
  4964. tags:
  4965. - Quarantine
  4966. description: Get all mails that are currently in Quarantine.
  4967. operationId: Get mails in Quarantine
  4968. summary: Get mails in Quarantine
  4969. "/api/v1/get/recipient_map/{id}":
  4970. get:
  4971. parameters:
  4972. - description: id of entry you want to get
  4973. example: all
  4974. in: path
  4975. name: id
  4976. required: true
  4977. schema:
  4978. enum:
  4979. - all
  4980. - "1"
  4981. - "2"
  4982. - "5"
  4983. - "10"
  4984. type: string
  4985. - description: e.g. api-key-string
  4986. example: api-key-string
  4987. in: header
  4988. name: X-API-Key
  4989. required: false
  4990. schema:
  4991. type: string
  4992. responses:
  4993. "401":
  4994. $ref: "#/components/responses/Unauthorized"
  4995. "200":
  4996. content:
  4997. application/json:
  4998. examples:
  4999. response:
  5000. value:
  5001. - active: "1"
  5002. created: "2019-10-02 22:06:29"
  5003. id: 3
  5004. modified: null
  5005. recipient_map_new: target@mailcow.tld
  5006. recipient_map_old: recipient@mailcow.tld
  5007. description: OK
  5008. headers: {}
  5009. tags:
  5010. - Address Rewriting
  5011. description: Using this endpoint you can get all recipient maps.
  5012. operationId: Get Recipient Map
  5013. summary: Get Recipient Map
  5014. "/api/v1/get/relayhost/{id}":
  5015. get:
  5016. parameters:
  5017. - description: id of entry you want to get
  5018. example: all
  5019. in: path
  5020. name: id
  5021. required: true
  5022. schema:
  5023. enum:
  5024. - all
  5025. - "1"
  5026. - "2"
  5027. - "5"
  5028. - "10"
  5029. type: string
  5030. - description: e.g. api-key-string
  5031. example: api-key-string
  5032. in: header
  5033. name: X-API-Key
  5034. required: false
  5035. schema:
  5036. type: string
  5037. responses:
  5038. "401":
  5039. $ref: "#/components/responses/Unauthorized"
  5040. "200":
  5041. content:
  5042. application/json:
  5043. examples:
  5044. response:
  5045. value:
  5046. - active: "1"
  5047. hostname: "mailcow.tld:25"
  5048. id: 1
  5049. password: supersecurepassword
  5050. password_short: tes...
  5051. used_by_domains: ""
  5052. username: testuser
  5053. description: OK
  5054. headers: {}
  5055. tags:
  5056. - Routing
  5057. description: Using this endpoint you can get all Sender-Dependent Transports.
  5058. operationId: Get Sender-Dependent Transports
  5059. summary: Get Sender-Dependent Transports
  5060. /api/v1/get/resource/all:
  5061. get:
  5062. responses:
  5063. "401":
  5064. $ref: "#/components/responses/Unauthorized"
  5065. "200":
  5066. content:
  5067. application/json:
  5068. examples:
  5069. response:
  5070. value:
  5071. - active: "1"
  5072. description: test
  5073. domain: mailcow.tld
  5074. kind: location
  5075. local_part: test
  5076. multiple_bookings: 0
  5077. name: test@mailcow.tld
  5078. description: OK
  5079. headers: {}
  5080. tags:
  5081. - Resources
  5082. description: Using this endpoint you can get all Resources.
  5083. operationId: Get Resources
  5084. summary: Get Resources
  5085. "/api/v1/get/rl-mbox/{mailbox}":
  5086. get:
  5087. parameters:
  5088. - description: name of mailbox or all
  5089. in: path
  5090. name: mailbox
  5091. required: true
  5092. schema:
  5093. type: string
  5094. - description: e.g. api-key-string
  5095. example: api-key-string
  5096. in: header
  5097. name: X-API-Key
  5098. required: false
  5099. schema:
  5100. type: string
  5101. responses:
  5102. "401":
  5103. $ref: "#/components/responses/Unauthorized"
  5104. "200":
  5105. content:
  5106. application/json:
  5107. examples:
  5108. response:
  5109. value:
  5110. - frame: s
  5111. mailbox: leon@mailcow.tld
  5112. value: "5"
  5113. - frame: s
  5114. mailbox: lisa@mailcow.tld
  5115. value: "3"
  5116. description: OK
  5117. headers: {}
  5118. tags:
  5119. - Ratelimits
  5120. description: >-
  5121. Using this endpoint you can get the ratelimits for a certain mailbox.
  5122. You can use all for all mailboxes.
  5123. operationId: Get mailbox ratelimits
  5124. summary: Get mailbox ratelimits
  5125. "/api/v1/get/rl-domain/{domain}":
  5126. get:
  5127. parameters:
  5128. - description: name of domain or all
  5129. in: path
  5130. name: domain
  5131. required: true
  5132. schema:
  5133. type: string
  5134. - description: e.g. api-key-string
  5135. example: api-key-string
  5136. in: header
  5137. name: X-API-Key
  5138. required: false
  5139. schema:
  5140. type: string
  5141. responses:
  5142. "401":
  5143. $ref: "#/components/responses/Unauthorized"
  5144. "200":
  5145. content:
  5146. application/json:
  5147. examples:
  5148. response:
  5149. value:
  5150. - frame: s
  5151. domain: domain.tld
  5152. value: "5"
  5153. - frame: s
  5154. mailbox: domain2.tld
  5155. value: "3"
  5156. description: OK
  5157. headers: {}
  5158. tags:
  5159. - Ratelimits
  5160. description: >-
  5161. Using this endpoint you can get the ratelimits for a certain domains.
  5162. You can use all for all domain.
  5163. operationId: Get domain ratelimits
  5164. summary: Get domain ratelimits
  5165. /api/v1/edit/rl-mbox/:
  5166. post:
  5167. responses:
  5168. "401":
  5169. $ref: "#/components/responses/Unauthorized"
  5170. "200":
  5171. content:
  5172. application/json:
  5173. examples:
  5174. response:
  5175. value:
  5176. - type: success
  5177. log:
  5178. - ratelimit
  5179. - edit
  5180. - mailbox
  5181. - object:
  5182. - info@domain.tld
  5183. rl_value: "10"
  5184. rl_frame: h
  5185. msg:
  5186. - rl_saved
  5187. - info@domain.tld
  5188. schema:
  5189. properties:
  5190. log:
  5191. description: contains request object
  5192. items: {}
  5193. type: array
  5194. msg:
  5195. items: {}
  5196. type: array
  5197. type:
  5198. enum:
  5199. - success
  5200. - danger
  5201. - error
  5202. type: string
  5203. type: object
  5204. description: OK
  5205. headers: {}
  5206. tags:
  5207. - Ratelimits
  5208. description: >-
  5209. Using this endpoint you can edit the ratelimits for a certain mailbox.
  5210. operationId: Edit mailbox ratelimits
  5211. requestBody:
  5212. content:
  5213. application/json:
  5214. schema:
  5215. example:
  5216. attr:
  5217. rl_value: "10"
  5218. rl_frame: "h"
  5219. items:
  5220. - info@domain.tld
  5221. properties:
  5222. attr:
  5223. properties:
  5224. rl_frame:
  5225. description: contains the frame for the ratelimit h,s,m
  5226. type: string
  5227. rl_value:
  5228. description: contains the rate for the ratelimit 10,20,50,1
  5229. type: number
  5230. type: object
  5231. items:
  5232. description: contains list of mailboxes you want to edit the ratelimit of
  5233. type: object
  5234. type: object
  5235. summary: Edit mailbox ratelimits
  5236. /api/v1/edit/rl-domain/:
  5237. post:
  5238. responses:
  5239. "401":
  5240. $ref: "#/components/responses/Unauthorized"
  5241. "200":
  5242. content:
  5243. application/json:
  5244. examples:
  5245. response:
  5246. value:
  5247. - type: success
  5248. - log:
  5249. - ratelimit
  5250. - edit
  5251. - domain
  5252. - object:
  5253. - domain.tld
  5254. rl_value: "50"
  5255. rl_frame: "h"
  5256. msg:
  5257. - rl_saved
  5258. - domain.tld
  5259. schema:
  5260. properties:
  5261. log:
  5262. description: contains request object
  5263. items: {}
  5264. type: array
  5265. msg:
  5266. items: {}
  5267. type: array
  5268. type:
  5269. enum:
  5270. - success
  5271. - danger
  5272. - error
  5273. type: string
  5274. type: object
  5275. description: OK
  5276. headers: {}
  5277. tags:
  5278. - Ratelimits
  5279. description: >-
  5280. Using this endpoint you can edit the ratelimits for a certain domains.
  5281. operationId: Edit domain ratelimits
  5282. requestBody:
  5283. content:
  5284. application/json:
  5285. schema:
  5286. example:
  5287. attr:
  5288. rl_value: "10"
  5289. rl_frame: "h"
  5290. items:
  5291. - domain.tld
  5292. properties:
  5293. attr:
  5294. properties:
  5295. rl_frame:
  5296. description: contains the frame for the ratelimit h,s,m
  5297. type: string
  5298. rl_value:
  5299. description: contains the rate for the ratelimit 10,20,50,1
  5300. type: number
  5301. type: object
  5302. items:
  5303. description: contains list of domains you want to edit the ratelimit of
  5304. type: object
  5305. type: object
  5306. summary: Edit domain ratelimits
  5307. /api/v1/get/status/containers:
  5308. get:
  5309. responses:
  5310. "401":
  5311. $ref: "#/components/responses/Unauthorized"
  5312. "200":
  5313. content:
  5314. application/json:
  5315. examples:
  5316. response:
  5317. value:
  5318. acme-mailcow:
  5319. container: acme-mailcow
  5320. image: "mailcow/acme:1.63"
  5321. started_at: "2019-12-22T21:00:08.270660275Z"
  5322. state: running
  5323. type: info
  5324. clamd-mailcow:
  5325. container: clamd-mailcow
  5326. image: "mailcow/clamd:1.35"
  5327. started_at: "2019-12-22T21:00:01.622856172Z"
  5328. state: running
  5329. type: info
  5330. dockerapi-mailcow:
  5331. container: dockerapi-mailcow
  5332. image: "mailcow/dockerapi:1.36"
  5333. started_at: "2019-12-22T20:59:59.984797808Z"
  5334. state: running
  5335. type: info
  5336. dovecot-mailcow:
  5337. container: dovecot-mailcow
  5338. image: "mailcow/dovecot:1.104"
  5339. started_at: "2019-12-22T21:00:08.988680259Z"
  5340. state: running
  5341. type: info
  5342. ipv6nat-mailcow:
  5343. container: ipv6nat-mailcow
  5344. image: robbertkl/ipv6nat
  5345. started_at: "2019-12-22T21:06:37.273225445Z"
  5346. state: running
  5347. type: info
  5348. memcached-mailcow:
  5349. container: memcached-mailcow
  5350. image: "memcached:alpine"
  5351. started_at: "2019-12-22T20:59:58.0907785Z"
  5352. state: running
  5353. type: info
  5354. mysql-mailcow:
  5355. container: mysql-mailcow
  5356. image: "mariadb:10.3"
  5357. started_at: "2019-12-22T21:00:02.201937528Z"
  5358. state: running
  5359. type: info
  5360. netfilter-mailcow:
  5361. container: netfilter-mailcow
  5362. image: "mailcow/netfilter:1.31"
  5363. started_at: "2019-12-22T21:00:09.851559297Z"
  5364. state: running
  5365. type: info
  5366. nginx-mailcow:
  5367. container: nginx-mailcow
  5368. image: "nginx:mainline-alpine"
  5369. started_at: "2019-12-22T21:00:12.9843038Z"
  5370. state: running
  5371. type: info
  5372. olefy-mailcow:
  5373. container: olefy-mailcow
  5374. image: "mailcow/olefy:1.2"
  5375. started_at: "2019-12-22T20:59:59.676259274Z"
  5376. state: running
  5377. type: info
  5378. php-fpm-mailcow:
  5379. container: php-fpm-mailcow
  5380. image: "mailcow/phpfpm:1.55"
  5381. started_at: "2019-12-22T21:00:00.955808957Z"
  5382. state: running
  5383. type: info
  5384. postfix-mailcow:
  5385. container: postfix-mailcow
  5386. image: "mailcow/postfix:1.44"
  5387. started_at: "2019-12-22T21:00:07.186717617Z"
  5388. state: running
  5389. type: info
  5390. redis-mailcow:
  5391. container: redis-mailcow
  5392. image: "redis:5-alpine"
  5393. started_at: "2019-12-22T20:59:56.827166834Z"
  5394. state: running
  5395. type: info
  5396. rspamd-mailcow:
  5397. container: rspamd-mailcow
  5398. image: "mailcow/rspamd:1.56"
  5399. started_at: "2019-12-22T21:00:12.456075355Z"
  5400. state: running
  5401. type: info
  5402. sogo-mailcow:
  5403. container: sogo-mailcow
  5404. image: "mailcow/sogo:1.65"
  5405. started_at: "2019-12-22T20:59:58.382274592Z"
  5406. state: running
  5407. type: info
  5408. unbound-mailcow:
  5409. container: unbound-mailcow
  5410. image: "mailcow/unbound:1.10"
  5411. started_at: "2019-12-22T20:59:58.760595825Z"
  5412. state: running
  5413. type: info
  5414. watchdog-mailcow:
  5415. container: watchdog-mailcow
  5416. image: "mailcow/watchdog:1.65"
  5417. started_at: "2019-12-22T20:59:56.028660382Z"
  5418. state: running
  5419. type: info
  5420. description: OK
  5421. headers: {}
  5422. tags:
  5423. - Status
  5424. description: >-
  5425. Using this endpoint you can get the status of all containers and when
  5426. hey where started and a few other details.
  5427. operationId: Get container status
  5428. summary: Get container status
  5429. /api/v1/get/status/vmail:
  5430. get:
  5431. responses:
  5432. "401":
  5433. $ref: "#/components/responses/Unauthorized"
  5434. "200":
  5435. content:
  5436. application/json:
  5437. examples:
  5438. response:
  5439. value:
  5440. disk: /dev/mapper/mail--vg-root
  5441. total: 41G
  5442. type: info
  5443. used: 11G
  5444. used_percent: 28%
  5445. description: OK
  5446. headers: {}
  5447. tags:
  5448. - Status
  5449. description: >-
  5450. Using this endpoint you can get the status of the vmail and the amount
  5451. of used storage.
  5452. operationId: Get vmail status
  5453. summary: Get vmail status
  5454. /api/v1/get/status/version:
  5455. get:
  5456. responses:
  5457. "401":
  5458. $ref: "#/components/responses/Unauthorized"
  5459. "200":
  5460. content:
  5461. application/json:
  5462. examples:
  5463. response:
  5464. value:
  5465. version: "2022-04"
  5466. description: OK
  5467. headers: {}
  5468. tags:
  5469. - Status
  5470. description: >-
  5471. Using this endpoint you can get the current running release of this
  5472. instance.
  5473. operationId: Get version status
  5474. summary: Get version status
  5475. /api/v1/get/syncjobs/all/no_log:
  5476. get:
  5477. responses:
  5478. "401":
  5479. $ref: "#/components/responses/Unauthorized"
  5480. "200":
  5481. content:
  5482. application/json:
  5483. examples:
  5484. response:
  5485. value:
  5486. - active: "1"
  5487. authmd51: 0
  5488. authmech1: PLAIN
  5489. automap: 1
  5490. created: "2019-05-22 11:37:25"
  5491. custom_params: ""
  5492. delete1: 0
  5493. delete2: 0
  5494. delete2duplicates: 1
  5495. domain2: ""
  5496. enc1: TLS
  5497. exclude: (?i)spam|(?i)junk
  5498. host1: imap.server.tld
  5499. id: 1
  5500. is_running: 0
  5501. last_run: "2019-05-22 11:40:02"
  5502. log: ""
  5503. maxage: 0
  5504. maxbytespersecond: "0"
  5505. mins_interval: "20"
  5506. modified: "2019-05-22 11:40:02"
  5507. port1: 993
  5508. regextrans2: ""
  5509. skipcrossduplicates: 0
  5510. subfolder2: External
  5511. subscribeall: 1
  5512. timeout1: 600
  5513. timeout2: 600
  5514. user1: username
  5515. user2: mailbox@domain.tld
  5516. description: OK
  5517. headers: {}
  5518. tags:
  5519. - Sync jobs
  5520. description: You can list all syn jobs existing in system.
  5521. operationId: Get sync jobs
  5522. summary: Get sync jobs
  5523. "/api/v1/get/tls-policy-map/{id}":
  5524. get:
  5525. parameters:
  5526. - description: id of entry you want to get
  5527. example: all
  5528. in: path
  5529. name: id
  5530. required: true
  5531. schema:
  5532. enum:
  5533. - all
  5534. - "1"
  5535. - "2"
  5536. - "5"
  5537. - "10"
  5538. type: string
  5539. - description: e.g. api-key-string
  5540. example: api-key-string
  5541. in: header
  5542. name: X-API-Key
  5543. required: false
  5544. schema:
  5545. type: string
  5546. responses:
  5547. "401":
  5548. $ref: "#/components/responses/Unauthorized"
  5549. "200":
  5550. content:
  5551. application/json:
  5552. examples:
  5553. response:
  5554. value:
  5555. - parameters: ""
  5556. active: "1"
  5557. created: "2019-10-03 08:42:12"
  5558. dest: mailcow.tld
  5559. id: 1
  5560. modified: null
  5561. policy: encrypt
  5562. description: OK
  5563. headers: {}
  5564. tags:
  5565. - Outgoing TLS Policy Map Overrides
  5566. description: Using this endpoint you can get all TLS policy map override maps.
  5567. operationId: Get TLS Policy Map
  5568. summary: Get TLS Policy Map
  5569. "/api/v1/get/transport/{id}":
  5570. get:
  5571. parameters:
  5572. - description: id of entry you want to get
  5573. example: all
  5574. in: path
  5575. name: id
  5576. required: true
  5577. schema:
  5578. enum:
  5579. - all
  5580. - "1"
  5581. - "2"
  5582. - "5"
  5583. - "10"
  5584. type: string
  5585. - description: e.g. api-key-string
  5586. example: api-key-string
  5587. in: header
  5588. name: X-API-Key
  5589. required: false
  5590. schema:
  5591. type: string
  5592. responses:
  5593. "401":
  5594. $ref: "#/components/responses/Unauthorized"
  5595. "200":
  5596. content:
  5597. application/json:
  5598. examples:
  5599. response:
  5600. value:
  5601. - active: "1"
  5602. destination: example.org
  5603. id: 1
  5604. lookup_mx: "0"
  5605. nexthop: "host:25"
  5606. password: supersecurepw
  5607. password_short: sup...
  5608. username: testuser
  5609. description: OK
  5610. headers: {}
  5611. tags:
  5612. - Routing
  5613. description: Using this endpoint you can get all Transport Maps.
  5614. operationId: Get Transport Maps
  5615. summary: Get Transport Maps
  5616. /api/v1/edit/spam-score/:
  5617. post:
  5618. responses:
  5619. "401":
  5620. $ref: "#/components/responses/Unauthorized"
  5621. "200":
  5622. content:
  5623. application/json:
  5624. examples:
  5625. response:
  5626. value:
  5627. - type: success
  5628. log:
  5629. - mailbox
  5630. - edit
  5631. - spam_score
  5632. - username:
  5633. - info@domain.tld
  5634. spam_score: "8,15"
  5635. msg:
  5636. - mailbox_modified
  5637. - info@domain.tld
  5638. schema:
  5639. properties:
  5640. log:
  5641. description: contains request object
  5642. items: {}
  5643. type: array
  5644. msg:
  5645. items: {}
  5646. type: array
  5647. type:
  5648. enum:
  5649. - success
  5650. - danger
  5651. - error
  5652. type: string
  5653. type: object
  5654. description: OK
  5655. headers: {}
  5656. tags:
  5657. - Mailboxes
  5658. description: >-
  5659. Using this endpoint you can edit the spam filter score for a certain mailbox.
  5660. operationId: Edit mailbox spam filter score
  5661. requestBody:
  5662. content:
  5663. application/json:
  5664. schema:
  5665. example:
  5666. - items:
  5667. - info@domain.tld
  5668. attr:
  5669. spam_score: "8,15"
  5670. summary: Edit mailbox spam filter score
  5671. "/api/v1/get/mailbox/all/{domain}":
  5672. get:
  5673. parameters:
  5674. - description: name of domain
  5675. in: path
  5676. name: domain
  5677. required: true
  5678. schema:
  5679. type: string
  5680. - description: e.g. api-key-string
  5681. example: api-key-string
  5682. in: header
  5683. name: X-API-Key
  5684. required: false
  5685. schema:
  5686. type: string
  5687. responses:
  5688. "401":
  5689. $ref: "#/components/responses/Unauthorized"
  5690. "200":
  5691. content:
  5692. application/json:
  5693. examples:
  5694. response:
  5695. value:
  5696. - active: "1"
  5697. attributes:
  5698. force_pw_update: "0"
  5699. mailbox_format: "maildir:"
  5700. quarantine_notification: never
  5701. sogo_access: "1"
  5702. tls_enforce_in: "0"
  5703. tls_enforce_out: "0"
  5704. custom_attributes: {}
  5705. domain: domain3.tld
  5706. is_relayed: 0
  5707. local_part: info
  5708. max_new_quota: 10737418240
  5709. messages: 0
  5710. name: Full name
  5711. percent_class: success
  5712. percent_in_use: 0
  5713. quota: 3221225472
  5714. quota_used: 0
  5715. rl: false
  5716. spam_aliases: 0
  5717. username: info@domain3.tld
  5718. tags: ["tag1", "tag2"]
  5719. description: OK
  5720. headers: {}
  5721. tags:
  5722. - Mailboxes
  5723. description: You can list all mailboxes existing in system for a specific domain.
  5724. operationId: Get mailboxes of a domain
  5725. summary: Get mailboxes of a domain
  5726. /api/v1/edit/cors:
  5727. post:
  5728. responses:
  5729. "401":
  5730. $ref: "#/components/responses/Unauthorized"
  5731. "200":
  5732. content:
  5733. application/json:
  5734. examples:
  5735. response:
  5736. value:
  5737. - type: "success"
  5738. log: ["cors", "edit", {"allowed_origins": ["*", "mail.mailcow.tld"], "allowed_methods": ["POST", "GET", "DELETE", "PUT"]}]
  5739. msg: "cors_headers_edited"
  5740. description: OK
  5741. headers: { }
  5742. tags:
  5743. - Cross-Origin Resource Sharing (CORS)
  5744. description: >-
  5745. This endpoint allows you to manage Cross-Origin Resource Sharing (CORS) settings for the API.
  5746. CORS is a security feature implemented by web browsers to prevent unauthorized cross-origin requests.
  5747. By editing the CORS settings, you can specify which domains and which methods are permitted to access the API resources from outside the mailcow domain.
  5748. operationId: Edit Cross-Origin Resource Sharing (CORS) settings
  5749. requestBody:
  5750. content:
  5751. application/json:
  5752. schema:
  5753. example:
  5754. attr:
  5755. allowed_origins: ["*", "mail.mailcow.tld"]
  5756. allowed_methods: ["POST", "GET", "DELETE", "PUT"]
  5757. properties:
  5758. attr:
  5759. type: object
  5760. properties:
  5761. allowed_origins:
  5762. type: array
  5763. items:
  5764. type: string
  5765. allowed_methods:
  5766. type: array
  5767. items:
  5768. type: string
  5769. summary: Edit Cross-Origin Resource Sharing (CORS) settings
  5770. "/api/v1/get/spam-score/{mailbox}":
  5771. get:
  5772. parameters:
  5773. - description: name of mailbox or empty for current user - admin user will retrieve the global spam filter score
  5774. in: path
  5775. name: mailbox
  5776. required: true
  5777. schema:
  5778. type: string
  5779. - description: e.g. api-key-string
  5780. example: api-key-string
  5781. in: header
  5782. name: X-API-Key
  5783. required: false
  5784. schema:
  5785. type: string
  5786. responses:
  5787. "401":
  5788. $ref: "#/components/responses/Unauthorized"
  5789. "200":
  5790. content:
  5791. application/json:
  5792. examples:
  5793. response:
  5794. value:
  5795. spam_score: "8,15"
  5796. description: OK
  5797. headers: {}
  5798. tags:
  5799. - Mailboxes
  5800. description: >-
  5801. Using this endpoint you can get the global spam filter score or the spam filter score of a certain mailbox.
  5802. operationId: Get mailbox or global spam filter score
  5803. summary: Get mailbox or global spam filter score
  5804. /api/v1/edit/identity-provider:
  5805. post:
  5806. responses:
  5807. "401":
  5808. $ref: "#/components/responses/Unauthorized"
  5809. "200":
  5810. content:
  5811. application/json:
  5812. examples:
  5813. response:
  5814. value:
  5815. - type: "success"
  5816. log:
  5817. - "identity_provider"
  5818. - "edit"
  5819. - authsource: "keycloak"
  5820. server_url: "https://auth.mailcow.tld"
  5821. realm: "mailcow"
  5822. client_id: "mailcow_client"
  5823. client_secret: "*"
  5824. redirect_url: "https://mail.mailcow.tld"
  5825. version: "26.1.3"
  5826. default_template: "Default"
  5827. mappers:
  5828. - "small_mbox"
  5829. - "medium_mbox"
  5830. templates:
  5831. - "small"
  5832. - "medium"
  5833. ignore_ssl_error: true
  5834. mailpassword_flow: true
  5835. periodic_sync: true
  5836. import_users: true
  5837. sync_interval: 30
  5838. msg:
  5839. - "object_modified"
  5840. - ""
  5841. description: OK
  5842. headers: { }
  5843. tags:
  5844. - Identity Provider
  5845. description: >-
  5846. Configure an external Identity Provider to use as user authentication
  5847. operationId: Edit external Identity Provider settings
  5848. requestBody:
  5849. content:
  5850. application/json:
  5851. schema:
  5852. properties:
  5853. items:
  5854. type: array
  5855. default: ["identity-provider"]
  5856. attr:
  5857. type: object
  5858. properties:
  5859. authsource:
  5860. description: Specifies the type of the Identity Provider
  5861. type: string
  5862. enum: [ldap, keycloak, generic-oidc]
  5863. server_url:
  5864. description: The base URL of your Keycloak server. Required if `authsource` is keycloak.
  5865. type: string
  5866. realm:
  5867. description: The Keycloak realm where the mailcow client is configured. Required if `authsource` is keycloak.
  5868. type: string
  5869. client_id:
  5870. description: The Client ID assigned to mailcow Client in OIDC Provider. Required if `authsource` is keycloak or generic-oidc.
  5871. type: string
  5872. client_secret:
  5873. description: The Client Secret assigned to mailcow Client in OIDC Provider. Required if `authsource` is keycloak or generic-oidc.
  5874. type: string
  5875. redirect_url:
  5876. description: The redirect URL that OIDC Provider will use after authentication. Required if `authsource` is keycloak or generic-oidc.
  5877. type: string
  5878. version:
  5879. description: Specifies the Keycloak version. Required if `authsource` is keycloak.
  5880. type: string
  5881. default_template:
  5882. description: (Optional) If no matching Attribute Mapping exists for a User, the default template will be used for creating the mailbox, but not for updating the mailbox.
  5883. type: string
  5884. mappers:
  5885. description: (Optional) Attribute values used to match a mailbox template. Each element corresponds to the respective index in the templates array (i.e., the first element matches the first element of templates, the second matches the second, and so on).
  5886. type: array
  5887. templates:
  5888. description: (Optional) Defines the mailbox templates to be assigned. Each element corresponds to the respective index in the `mappers` array.
  5889. type: array
  5890. ignore_ssl_error:
  5891. description: If enabled, SSL certificate validation is bypassed
  5892. type: boolean
  5893. default: false
  5894. mailpassword_flow:
  5895. description: If enabled, mailcow will attempt to validate user credentials using the Keycloak Admin REST API instead of relying solely on the Authorization Code Flow.
  5896. type: boolean
  5897. default: false
  5898. periodic_sync:
  5899. description: If enabled, mailcow periodically performs a full sync of all users from Keycloak or LDAP.
  5900. type: boolean
  5901. default: false
  5902. import_users:
  5903. description: If enabled, new users are automatically imported from Keycloak or LDAP into mailcow.
  5904. type: boolean
  5905. default: false
  5906. sync_interval:
  5907. description: Defines the time interval (in minutes) for periodic synchronization and user imports.
  5908. type: number
  5909. default: 15
  5910. host:
  5911. description: The address of your LDAP server. You can provide a single hostname or a comma-separated list of hosts for fallback in case the primary server is unreachable. Required if `authsource` is ldap.
  5912. type: string
  5913. port:
  5914. description: The port used to connect to the LDAP server. Required if `authsource` is ldap.
  5915. type: string
  5916. use_ssl:
  5917. description: enable LDAPS connection. If Port is set to 389 it will be overriden to 636.
  5918. type: boolean
  5919. default: false
  5920. use_tls:
  5921. description: enable TLS connection. TLS is recommended over SSL. SSL Ports cannot be used.
  5922. type: boolean
  5923. default: false
  5924. basedn:
  5925. description: The Distinguished Name (DN) from which searches will be performed. Required if `authsource` is ldap.
  5926. type: string
  5927. username_field:
  5928. description: The LDAP attribute used to identify users during authentication. Required if `authsource` is ldap.
  5929. type: string
  5930. default: mail
  5931. filter:
  5932. description: An optional LDAP search filter to refine which users can authenticate.
  5933. type: string
  5934. attribute_field:
  5935. description: Specifies an LDAP attribute that holds a specific value which can be mapped to a mailbox template using the Attribute Mapping section. Required if `authsource` is ldap.
  5936. type: string
  5937. binddn:
  5938. description: The Distinguished Name (DN) of the LDAP user that will be used to authenticate and perform LDAP searches. This account should have sufficient permissions to read the required attributes. Required if `authsource` is ldap.
  5939. type: string
  5940. bindpass:
  5941. description: The password for the Bind DN user. It is required for authentication when connecting to the LDAP server. Required if `authsource` is ldap.
  5942. type: string
  5943. authorize_url:
  5944. description: The OIDC provider's authorization server URL. Required if `authsource` is generic-oidc.
  5945. type: string
  5946. token_url:
  5947. description: The OIDC provider's token server URL. Required if `authsource` is generic-oidc.
  5948. type: string
  5949. userinfo_url:
  5950. description: The OIDC provider's user info server URL. Required if `authsource` is generic-oidc.
  5951. type: string
  5952. client_scopes:
  5953. description: Specifies the OIDC scopes requested during authentication.
  5954. type: string
  5955. default: "openid profile email mailcow_template"
  5956. examples:
  5957. keycloak:
  5958. value:
  5959. items:
  5960. - "identity-provider"
  5961. attr:
  5962. authsource: "keycloak"
  5963. server_url: "https://auth.mailcow.tld"
  5964. realm: "mailcow"
  5965. client_id: "mailcow_client"
  5966. client_secret: "Xy7GdPqvJ9m3R8sT2LkVZ5W1oNbCaYQf"
  5967. redirect_url: "https://mail.mailcow.tld"
  5968. version: "26.1.3"
  5969. default_template: "Default"
  5970. mappers: ["small_mbox", "medium_mbox"]
  5971. templates: ["small", "medium"]
  5972. ignore_ssl_error: true
  5973. mailpassword_flow: true
  5974. periodic_sync: true
  5975. import_users: true
  5976. sync_interval: 30
  5977. ldap:
  5978. value:
  5979. items:
  5980. - "identity-provider"
  5981. attr:
  5982. authsource: "ldap"
  5983. host: "127.0.0.1"
  5984. port: "389"
  5985. use_ssl: false
  5986. use_tls: false
  5987. ignore_ssl_error: false
  5988. basedn: "DC=mailcow,DC=local"
  5989. username_field: "mail"
  5990. filter: "(memberOf:1.2.840.113556.1.4.1941:=DC=mailcow,DC=local)"
  5991. attribute_field: "othermailbox"
  5992. binddn: "CN=LDAP Read Only,CN=Users,DC=mailcow,DC=local"
  5993. bindpass: "moohoo"
  5994. default_template: "Default"
  5995. mappers: ["small_mbox", "medium_mbox"]
  5996. templates: ["small", "medium"]
  5997. periodic_sync: true
  5998. import_users: true
  5999. sync_interval: 30
  6000. generic-oidc:
  6001. value:
  6002. items:
  6003. - "identity-provider"
  6004. attr:
  6005. authsource: "generic-oidc"
  6006. authorize_url: "https://auth.mailcow.tld/application/o/authorize/"
  6007. token_url: "https://auth.mailcow.tld/application/o/token/"
  6008. userinfo_url: "https://auth.mailcow.tld/application/o/userinfo/"
  6009. client_id: "mailcow_client"
  6010. client_secret: "Xy7GdPqvJ9m3R8sT2LkVZ5W1oNbCaYQf"
  6011. redirect_url: "https://mail.mailcow.tld"
  6012. client_scopes: "openid profile email mailcow_template"
  6013. default_template: "Default"
  6014. mappers: ["small_mbox", "medium_mbox"]
  6015. templates: ["small", "medium"]
  6016. ignore_ssl_error: true
  6017. summary: Edit external Identity Provider
  6018. tags:
  6019. - name: Domains
  6020. description: You can create antispam whitelist and blacklist policies
  6021. - name: Domain antispam policies
  6022. description: You can edit the Domain Antispam policies
  6023. - name: Mailboxes
  6024. description: You can manage mailboxes
  6025. - name: Aliases
  6026. description: You can manage aliases
  6027. - name: Sync jobs
  6028. description: Using Syncjobs you can sync your mails with other email servers
  6029. - name: Fordwarding Hosts
  6030. description: Forwarding Hosts enable you to send mail using a relay
  6031. - name: Logs
  6032. description: Get all mailcow system logs
  6033. - name: Queue Manager
  6034. description: Manage the postfix mail queue
  6035. - name: Quarantine
  6036. description: Check what emails went to quarantine
  6037. - name: Fail2Ban
  6038. description: Manage the Netfilter fail2ban options
  6039. - name: DKIM
  6040. description: Manage DKIM keys
  6041. - name: Domain admin
  6042. description: Create or udpdate domain admin users
  6043. - name: Single Sign-On
  6044. description: Issue tokens for users
  6045. - name: Address Rewriting
  6046. description: Create BCC maps or recipient maps
  6047. - name: Outgoing TLS Policy Map Overrides
  6048. description: Force global TLS policys
  6049. - name: oAuth Clients
  6050. description: Use mailcow as a oAuth server
  6051. - name: Routing
  6052. description: Define your own email routes
  6053. - name: Resources
  6054. description: Manage ressources
  6055. - name: App Passwords
  6056. description: Create mailbox app passwords
  6057. - name: Status
  6058. description: Get the status of your cow
  6059. - name: Ratelimits
  6060. description: Edit domain ratelimits
  6061. - name: Cross-Origin Resource Sharing (CORS)
  6062. description: Manage Cross-Origin Resource Sharing (CORS) settings
  6063. - name: Identity Provider
  6064. description: Manage external Identity Provider settings