PROBLEM
How do I use the CoS Service within my atmail cloud subscription?
ENVIRONMENT
- atmail cloud - us-east
CAUSE
Need to give accounts different services and settings.
RESOLUTION
CoS Service
The CoS service allows you to change the following settings and services for accounts.
- Atmail Spamd Proxy (Anti Malware) - OFF/ON
- Atmail Spamd Proxy (Anti Spam) - OFF/ON
- Calendar - OFF/ON
- Tasks - OFF/ON
- Outbound Envelope = Authenticated not enforced - OFF/ON
- Max Email Size - B
- Total Storage Quota - MB
- Advertising Service - OFF/ON
⚠ Please Note:
Enabling Atmail Spamd Proxy (Anti Malware) or Atmail Spamd Proxy (Anti Spam) will increase monthly billing costs.
Account exceptions
Under account exceptions you can add specific exceptions to specific accounts. For example, turn off the calendar and tasks for account1@domain.com.
- Login to your atmail cloud webadmin.
- Select the Services tab.
- Select Account exceptions.
- Enter the account you want to add expectations for.
- Select the service you want to add expectations for.
- Enter the settings desired for the service exception.
- Multiple exceptions can be added for accounts.
Manage profile
Under manage profile, you can create and edit profiles that can be used on your accounts to provide services.
- Login to your atmail cloud webadmin.
- Select the Services tab.
- Select Manage profile, then select a profile to manage or create a new profile.
- Select to enable or disable a service, or change a services settings.
Class of Service
Under class of service in the account manger is where you can apply profiles to users.
- Login to your atmail cloud webadmin.
- Select the Account manager tab.
- Select the account you want to edit.
- Select Class of Service, then select a profile to apply to the account, click update account to apply change.
API Usage
Pre-requests
Please refer to the API Documentation for details on how the API works.
Account Operations With Cos Extension
View Account
curl -i --data "username=account1@yourdomain.com"-u "admin:changeme""https://yourdomain.com/admin/index.php/api/accounts/view/"
Success Response
<?xml version="1.0" encoding="UTF-8"?>
<api generator="zend" version="1.0">
<accountview>
<status>success</status>
<response>
<message/>
<results>
<accountId>500024</accountId>
<createdByUserId>1</createdByUserId>
<username>account1@yourdomain.com</username>
<domainId>3</domainId>
<dateModified>2019-11-15 15:07:53</dateModified>
<dateCreate>2019-11-15 15:07:53</dateCreate>
<userStatus>0</userStatus>
<migrateStatus>Migrated</migrateStatus>
<forward/>
<quota>40960</quota>
<masterQuota>40960</masterQuota>
<lastLogin/>
<groupId>1</groupId>
<firstName/>
<lastName/>
<homeDir>/var/atmail/users/1/a/b/df878375-0765-11ea-93ae-e55e249b9c3d/</homeDir>
<mboxServer>2</mboxServer>
<mboxType>mdbox</mboxType>
<billingCode/>
<UsedQuota>0</UsedQuota>
<TotalMessages>0</TotalMessages>
<cosProfile>
<key_0>
<profile>
<key_0>
<id>0</id>
<name>Unassigned</name>
<active>0</active>
</key_0>
<key_1>
<id>4</id>
<name>Test</name>
<active>1</active>
</key_1>
<key_2>
<id>5</id>
<name>FreeTier</name>
<active>0</active>
</key_2>
<key_3>
<id>6</id>
<name>Premium</name>
<active>0</active>
</key_3>
</profile>
<origin>USER</origin>
</key_0>
</cosProfile>
</results>
</response>
</accountview>
</api>
The profile info can be found in cosProfile section.
Each key_<n> is a profile object.
The id is the profile ID which will be required when set / update a profile. active=1 means this is the current active profile.
Create Account
curl -i --data "username=account1@yourdomain.com&password=changeme&cosProfileId=6" -u "admin:changeme" "https://yourdomain.com/admin/index.php/api/accounts/create/"
Success Response
<?xml version="1.0" encoding="UTF-8"?>
<api generator="zend" version="1.0">
<accountcreate>
<status>success</status>
<response>
<message>test6@api.dev added</message>
<results>
<accounts>
<accountId>500025</accountId>
<createdByUserId>1</createdByUserId>
<username>account1@yourdomain.com</username>
<domainId>3</domainId>
<dateModified>2019-11-15 15:45:12</dateModified>
<dateCreate>2019-11-15 15:45:12</dateCreate>
<userStatus>0</userStatus>
<migrateStatus>Migrated</migrateStatus>
<forward/>
<quota>40960</quota>
<masterQuota>40960</masterQuota>
<lastLogin/>
<groupId>1</groupId>
<firstName/>
<lastName/>
<homeDir/>
<mboxServer>1</mboxServer>
<mboxType>mdbox</mboxType>
<billingCode/>
<password/>
</accounts>
<accountProfile>
<accountProfileId>25</accountProfileId>
<accountId>500025</accountId>
<changePass/>
<lifetime>120</lifetime>
<calUser/>
<calendarUserStatus>0</calendarUserStatus>
</accountProfile>
<accountSettings>
<accountSettingsId>25</accountSettingsId>
<accountId>500025</accountId>
<realName/>
<refresh/>
<timeZone>America/Los_Angeles</timeZone>
<msgNum/>
<viewThreads/>
<replyTo/>
<signature/>
<mailType/>
<language>en</language>
<autoTrash/>
<mailServer/>
<mailAuth/>
<dateFormat/>
<timeFormat/>
<autoComplete/>
<displayImages/>
<useSSL>0</useSSL>
<sieveSupport>0</sieveSupport>
<deleteTrashOnLogout>0</deleteTrashOnLogout>
</accountSettings>
<Groups>
<groupId>1</groupId>
<domainId/>
<createdByUserId/>
<GroupName>default</GroupName>
<GroupDescription>Default domain group settings</GroupDescription>
<pop3_enable>1</pop3_enable>
<imap_enable>1</imap_enable>
<CalDAVServer>1</CalDAVServer>
<CardDAVServer>1</CardDAVServer>
<licenseType>2</licenseType>
</Groups>
<cosProfile>
<key_0>
<profile>
<key_0>
<id>0</id>
<name>Unassigned</name>
<active>0</active>
</key_0>
<key_1>
<id>4</id>
<name>Test</name>
<active>0</active>
</key_1>
<key_2>
<id>5</id>
<name>FreeTier</name>
<active>0</active>
</key_2>
<key_3>
<id>6</id>
<name>Premium</name>
<active>1</active>
</key_3>
</profile>
<origin>USER</origin>
</key_0>
</cosProfile>
</results>
</response>
</accountcreate>
</api>
Similar to view account response, the profile info can be found in cosProfile section.
Update Account
curl -i --data "username=account1@yourdomain.com&password=changeme&cosProfileId=4" -u "admin:changeme" "https://yourdomain.com/admin/index.php/api/accounts/update/"
<?xml version="1.0" encoding="UTF-8"?>
<api generator="zend" version="1.0">
<accountupdate>
<status>success</status>
<response>
<message></message>
<results>
<accountId>10</accountId>
<username>account1@yourdomain.com</username>
</results>
</response>
</accountupdate>
</api>
Update method will update the cos profile if specified with the input. The response doesn't contains the cos set result. To retrieve the updated account details, please call the view account API.
Comments