- Home
- API reference
- API documentation (JSON/XML)
- Tasks
- MailProxy tasks
Mailproxy update
Function
The MailproxyUpdate task changes a MailProxy entry.Please note that the name of the domain cannot be changed with this type of request.
With the "merge" value for the optional <key> keyword or the query parameter keys[]=, the values of the keywords greylisting, virus, bannedfiles, header, spam, blacklist, whitelist, excludelist, if not specified in the request, are kept. Applies only to CUSTOM value.
Description
Route: PUT /mailProxy/{domain} or PUT /mailProxy/herede.de?keys=merge
{
"domain": "Example.com",
"target": "example1.com",
"admin": "new.joe@example.com",
"protection": "CUSTOM",
"greylisting": "ENABLED",
"virus": "ACCEPT",
"bannedFiles": "ACCEPT",
"spam": {
"modifySubject": false,
"tagHeader": "-555",
"spam": "5.5",
"kill": "555"
},
"whitelist": {
"emails": [
"person2@good-example-domain.com",
"someone-else2@company123.net"
]
},
"blacklist": {
"emails": [
"bad-person2@example.de",
"someone-bad2@company987.net"
]
},
"excludelist": {
"emails": [
"admin@somethingsomething73456.net",
"hostmaster@somethingsomething73456.net"
]
}
}{
"stid": "20190919-app2-dev-16525",
"status": {
"code": "S0512",
"text": "MaMailProxy updated successfully.",
"type": "SUCCESS"
},
"object": {
"type": "MailProxy",
"value": "somethingsomething73456.net"
}
}
Task code: 0512
Uses MailProxy object
<request>
<auth>
<user>customer</user>
<password>password</password>
<context>4</context>
</auth>
<task>
<code>0512</code>
<mail_proxy>
<target>example1695.com</target>
<protection>CUSTOM</protection>
<!-- HIGH|MEDIUM|LOW|OFF|CUSTOM -->
<greylisting>
<mode>DISABLED</mode>
<!-- DISABLED|ENABLED -->
</greylisting>
<virus>
<mode>ACCEPT</mode>
<!-- QUARANTINE|DISABLED|ACCEPT|DISCARD -->
</virus>
<banned_files>
<mode>DISABLED</mode>
<!-- QUARANTINE|DISABLED|ACCEPT|DISCARD -->
</banned_files>
<header>
<mode>QUARANTINE</mode>
<!-- QUARANTINE|DISABLED|ACCEPT|DISCARD -->
</header>
<spam>
<modify_subject>1</modify_subject>
<!-- 0|1-->
<tag_header>5</tag_header>
<!-- -999.9:999.9-->
<spam>6</spam>
<!-- -999.9:999.9-->
<kill>10</kill>
<!-- -999.9:999.9-->
<mode>QUARANTINE</mode>
<!-- QUARANTINE|DISABLED|ACCEPT|DISCARD -->
</spam>
<whitelist>
<email>nospam@example2.com</email>
<email>nospam2@example3.com</email>
</whitelist>
<blacklist>
<email>spammer@example4.com</email>
<email>spammer2@example5.com</email>
</blacklist>
<excludelist>
<email>postmaster@example6.com</email>
</excludelist>
<domain>example1695.com</domain>
<admin>customer@example.com</admin>
</mail_proxy>
<key>merge</key>
</task>
</request><response>
<result>
<data/>
<status>
<code>S0512</code>
<text>MailProxy updated successfully.</text>
<type>success</type>
<object>
<type>mailproxy</type>
<value>example1695.com</value>
</object>
</status>
</result>
<ctid/>
<stid>20150427-app1-test-6059</stid>
</response>