Provides typing and a easy to use interface for the Mailcow API.
Create a new wrapper using the base url and API_KEY.
import MailCowClient from "./index";
// Create MailCowClient based on BASE_URL and API_KEY
const mcc = new MailCowClient("https://demo.mailcow.email/", "390448-22B69F-FA37D9-19701B-6F033F");
Then you can use the created wrapper for promised-based API calls according to the Mailcow API specification.
// Get all the mailboxes available.
mcc.mailbox.get().then((e) => {
// Print all mailboxes.
console.log(JSON.stringify(e, null, 4));
}).catch(e => {
// Error handling.
console.log(e)
})
- Create domain
- Delete domain
- Update domain
- Get domain
- Create domain policy
- Delete domain policy
- List blacklist/whitelist domain policy
- Create mailbox
- Delete mailbox
- Update mailbox
- Update Pushover settings
- Quarantine Notifications
- Update mailbox ACL
- Get mailboxes
- Edit mailbox spam filter score
- Get Active User Sieve
- Create alias
- Delete alias
- Update alias
- Get aliases
- Create sync job
- Delete sync job
- Update sync job
- Get sync jobs
- Add Forward Host
- Delete Forward Host
- Get Forwarding Hosts
- Get ACME logs
- Get Api logs
- Get Autodiscover logs
- Get Dovecot logs
- Get Netfilter logs
- Get Postfix logs
- Get Ratelimit logs
- Get Rspamd logs
- Get SOGo logs
- Get Watchdog logs
- Delete Queue
- Flush Queue
- Get Queue
- Delete mails in Quarantaine
- Get mails in Quarantaine
- Edit Fail2Ban
- Get Fail2Ban Config
- Generate DKIM key
- Duplicate DKIM key
- Delete DKIM key
- Get DKIM key
- Create Domain Admin user
- Edit Domain Admin ACL
- Edit Domain Admin user
- Delete Domain Admin
- Get Domain Admins
- Create BCC Map
- Create Recipient Map
- Delete BCC Map
- Delete Recipient Map
- Get BCC Map
- Get Recipient Map
- Create TLS Policy Map
- Delete TLS Policy Map
- Get TLS Policy Map
- Create oAuth client
- Delete oAuth client
- Get oAuth Clients
- Create Sender-Dependent Transports
- Create Transport Maps
- Delete Sender-Dependent Transports
- Delete Transport Maps
- Get Sender-Dependent Transports
- Get Transport Maps
- Create Resources
- Delete Resources
- Get Resources
- Create App Passwords
- Delete App Passwords
- Get App Passwords
- Get container status
- Get solr status
- Get vmail status
- Get mailbox ratelimits
- Get domain ratelimits
- Edit domain ratelimits
- Edit mailbox ratelimits