1
Failing to set MaxKeySize for DKIM/DomainKeys via API
Problem reported by Derek Sims - 10/23/2015 at 3:37 PM
Resolved
When setting DomainKeys and DKIM settings via SmarterMail's API, it appears that MaxKeySize changes don't take.
 
My code is:
DomainKeysSettings DKSettings = new DomainKeysSettings();
DKSettings.EnabledFiltering = true;
DKSettings.EnabledIncomingBlocking = true;
DKSettings.FailWeight = 5;
DKSettings.PassWeight = 0;
DKSettings.NoneWeight = 0;
DKSettings.MaxKeySize = DKKeySize._2048;
DKSettings.MaxMessageSizeToSignMB = 100;
DKSettings.MaxMessageSizeToVerifyMB = 100;
SpamAdmin.SetDomainKeysSettings(username, password, DKSettings);
I've tested this on SmarterMail 7, 8, 10, 13 and 14, and it all exhibits the same behavior. 
 
Setting a breakpoint at the call to SetDomainKeysSettings/SetDKIMSettings shows that the object has MaxKeySize to _2048:
DKSettings	{SMSpamSetup.svcSpamAdmin.DomainKeysSettings}	SMSpamSetup.svcSpamAdmin.DomainKeysSettings
EnabledFiltering	true	bool
EnabledFilteringField	true	bool
EnabledIncomingBlocking	true	bool
EnabledIncomingBlockingField	true	bool
EnabledOutgoingBlocking	false	bool
EnabledOutgoingBlockingField	false	bool
ExtensionData	null	System.Runtime.Serialization.ExtensionDataObject
FailWeight	5	int
FailWeightField	5	int
MaxKeySize	_2048	SMSpamSetup.svcSpamAdmin.DKKeySize
MaxKeySizeField	_2048	SMSpamSetup.svcSpamAdmin.DKKeySize
MaxMessageSizeToSignMB	100	int
MaxMessageSizeToSignMBField	100	int
MaxMessageSizeToVerifyMB	100	int
MaxMessageSizeToVerifyMBField	100	int
NoneWeight	0	int
NoneWeightField	0	int
PassWeight	0	int
PassWeightField	0	int
extensionDataField	null	System.Runtime.Serialization.ExtensionDataObject
DKSettings.MaxMessageSizeToVerifyMB	100	int
SpamAdmin	{SMSpamSetup.svcSpamAdmin.svcSpamAdminSoapClient}	SMSpamSetup.svcSpamAdmin.svcSpamAdminSoapClient
I tried all the other options available (_512, _768, _1024, _1536) and they didn't take either.
 
Everything else sets fine via the API.
 
If anyone has any ideas, or if this can be looked into as a bug, that would be appreciated.

1 Reply

Reply to Thread
1
Employee Replied
Employee Post
Derek, thank you for bringing this to our attention.  I was able to replicate the issue.  It has been fixed and will be included in the next minor release of SM 14.  Please contact sales@smartertools.com if you would like a custom build.

Reply to Thread