Methods |
public
|
_proxy(): Module_Skeleton
|
#
|
public
|
get_provider(): string
Get DNS provider
|
#
|
public
|
configured(): bool
Mail configured for account
Mail configured for account
|
#
|
public
|
providers(): array
Get known mail providers
|
#
|
public
|
list_aliases()
|
#
|
public
|
user_mailboxes(string|null $username = null)
List all mailboxes deliverable to user
List all mailboxes deliverable to user
|
#
|
public
|
list_mailboxes($filter = null, $address = null, $domain = null): array
Retrieve mailbox delivery maps from system
Retrieve mailbox delivery maps from system
|
#
|
public
|
enable_address($account, $domain = null)
|
#
|
public
|
rename_mailbox($olduser, $olddomain, $newuser, $newdomain, $newmailbox, $newtype = null)
|
#
|
public
|
modify_mailbox(
string $olduser,
string $olddomain,
string $newuser = '',
string $newdomain = '',
string $newdestination = '',
string|null $newtype = null,
): bool
Rename a mailbox
Rename a mailbox
IMPORTANT: a mailbox may not be remapped into a catchall here
Parameters
$newdestination |
username or integer
|
|
#
|
public
|
address_exists($user, $domain)
|
#
|
public
|
mailbox_type($user, $domain): bool|null|string
Get mailbox type
|
#
|
public
|
save_mailboxes(): boolean
Save all mailboxes to a serialized file
Save all mailboxes to a serialized file
|
#
|
public
|
dump_mailboxes(): array
List all mailboxes for backup/restore purposes
List all mailboxes for backup/restore purposes
Throws
|
#
|
public
|
remove_alias(string $user, string $domain)
Remove an e-mail alias
|
#
|
public
|
delete_mailbox($user, $domain, $type = '')
|
#
|
public
|
get_mailbox($user, $domain)
|
#
|
public
|
remove_maildir($mailbox)
|
#
|
public
|
restore_mailboxes(string $file = self::MAILBOX_SAVE_DEFAULT): boolean
Restore a saved copy of mailboxes
Restore a saved copy of mailboxes
|
#
|
public
|
remove_mailbox($user, $domain)
|
#
|
public
|
transport_exists(string $domain): bool
Domain is designated to receive e-mail on hosting server
Domain is designated to receive e-mail on hosting server
|
#
|
public
|
get_spool_size($username)
|
#
|
public
|
get_spool_size_backend(string $path): bool|int
Get mail folder size
|
#
|
public
|
get_vacation_options(): array
Get vacation options
|
#
|
public
|
get_vacation_message($user = null)
|
#
|
public
|
add_vacation($response, null $user = null, array|null $flags = null): bool|mixed|void
Wrapper to set_vacation
|
#
|
public
|
enable_vacation(null|string $user = null, array|null $flags = null): bool|mixed|void
Enable vacation auto-responder
Enable vacation auto-responder
Parameters
|
#
|
public
|
set_vacation_options(array $options): bool
Set vacation options
|
#
|
public
|
vacation_exists($user = null)
|
#
|
public
|
change_vacation_message(string $response, string|null $user = null, array|null $flags = []): bool
Change existing vacation message
Change existing vacation message
|
#
|
public
|
remove_vacation(string $user = null): bool
Disable vacation status
|
#
|
public
|
import_from_domain(string $domain, string $src): bool
Clone inboxes from domain
Clone inboxes from domain
Wrapper to emulate dns:import-from-domain similarity
Parameters
$domain |
domain to import into
|
$src |
domain to derive mailboxes from
|
Throws
|
#
|
public
|
clone_domain_mailboxes($source, $destination): bool
Clone inboxes from domain
Clone inboxes from domain
Throws
|
#
|
public
|
remove_virtual_transport(string $domain, bool $keepdns = null): bool|int
Deauthorize server from handling mail for domain
Deauthorize server from handling mail for domain
Parameters
$domain |
domain name to deauthorize
|
$keepdns |
purge DNS MX settings, null auto-detect to purge
|
|
#
|
public
|
get_records(string $domain, string $subdomain = ''): array
Get DNS records
Deprecated
use provisioning_records()
|
#
|
public
|
provisioning_records(string $domain, string $subdomain = ''): Record[]
Get DNS records
|
#
|
public
|
add_virtual_transport(string $domain, string $subdomain = ''): bool|void
Add transport to handle mail
Add transport to handle mail
Parameters
$domain |
primary domain
|
$subdomain |
optional subdomain
|
Throws
|
#
|
public
|
add_mailbox($user, $domain, $uid, string $mailbox = ''): bool|void
Add mailbox for account
|
#
|
public
|
add_alias($user, $domain, $destination)
|
#
|
public
|
disable_address($account, $domain = null)
|
#
|
public
|
get_mail_ip(): array
Get mail server IPs
|
#
|
public
|
set_webmail_location(string $app, string|null $subdomain): bool
Bind subdomain for webmail access
Bind subdomain for webmail access
Parameters
$subdomain |
null to delete
|
Throws
|
#
|
public
|
webmail_apps()
|
#
|
public
|
get_webmail_location($app)
|
#
|
public
|
_create()
|
#
|
public
|
_create_user(string $user)
|
#
|
public
|
_reload(string $why = '', array $args = [])
|
#
|
public
|
create_maildir_backend($user, $mailbox): bool|void
Create Maildir backend
|
#
|
public
|
create_maildir($mailbox)
|
#
|
public
|
_delete()
|
#
|
public
|
_edit()
|
#
|
public
|
_edit_user(string $userold, string $usernew, array $oldpwd)
|
#
|
public
|
user_enabled($user = null, $svc = null)
|
#
|
public
|
user_permitted($user = null, $svc = null): bool
Mail service is enabled for user
Mail service is enabled for user
|
#
|
public
|
enabled(null|string $which = null): bool
Verify service is enabled
Verify service is enabled
|
#
|
public
|
merge_ssl($site = null): bool
Merge issued certificates into haproxy's SNI
Merge issued certificates into haproxy's SNI
|
#
|
public
|
list_virtual_transports()
|
#
|
public
|
_delete_user(string $user)
|
#
|
public
|
permit_user($user, $svc = null)
|
#
|
public
|
deny_user($user, $svc = null)
|
#
|
public
|
roll_srs(): bool
Generate new SRS secret
|
#
|
public
|
convert_mailbox(string $src, string $dest = '~/' . Storage::MAILDIR_HOME, array $args = []): bool
Convert mailbox using Dovecot
Convert mailbox using Dovecot
Parameters
$src |
source mail location
|
$dest |
target Maildir path
|
$args |
doveadm-sync flags
|
|
#
|
public
|
_verify_conf(ConfigurationContext $ctx): bool
|
#
|
public
|
_cron(Cronus $c)
|
#
|
public
|
_housekeeping()
|
#
|