openapi.yaml 197 KB

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