Open lucasRolff opened 4 years ago
Latest
MX entries for feedback.domain.com gets cleared out
Removing MX entries should be an exact match, not all MX entries for domain.com zone
domain.com
SpamExperts module uses listmxs function ( https://documentation.cpanel.net/display/DD/WHM+API+1+Functions+-+listmxs ) , which will return MX entries for the domain including subdomains.
listmxs
That in itself is fine, but you should do an exact match for the domain when removing MX entries.
In https://github.com/SpamExperts/cpanel-addon/blob/75cc25c48dc421f11c50f1cb14cc12edeade823f/library/SpamFilter/PanelSupport/Cpanel.php#L1123-L1144 you simply loop over every matched entry and removes it, even for subdomains.
Alternatively you can implement UAPI where it does actual filtering on the exact domain in https://documentation.cpanel.net/display/DD/UAPI+Functions+-+Email%3A%3Alist_mxs
Version information
Latest
Steps to replicate
Actual result
MX entries for feedback.domain.com gets cleared out
Expected result
Removing MX entries should be an exact match, not all MX entries for
domain.com
zoneOther notes
SpamExperts module uses
listmxs
function ( https://documentation.cpanel.net/display/DD/WHM+API+1+Functions+-+listmxs ) , which will return MX entries for the domain including subdomains.That in itself is fine, but you should do an exact match for the domain when removing MX entries.
In https://github.com/SpamExperts/cpanel-addon/blob/75cc25c48dc421f11c50f1cb14cc12edeade823f/library/SpamFilter/PanelSupport/Cpanel.php#L1123-L1144 you simply loop over every matched entry and removes it, even for subdomains.
Alternatively you can implement UAPI where it does actual filtering on the exact domain in https://documentation.cpanel.net/display/DD/UAPI+Functions+-+Email%3A%3Alist_mxs