Commit fadb1df0 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix logic

parent b86a4e25
...@@ -85,7 +85,6 @@ void DKIMCheckFullJob::checkAuthenticationResults() ...@@ -85,7 +85,6 @@ void DKIMCheckFullJob::checkAuthenticationResults()
void DKIMCheckFullJob::checkSignature(const QVector<DKIMCheckSignatureJob::DKIMCheckSignatureAuthenticationResult> &lst) void DKIMCheckFullJob::checkSignature(const QVector<DKIMCheckSignatureJob::DKIMCheckSignatureAuthenticationResult> &lst)
{ {
//TODO store lst;
DKIMCheckSignatureJob *job = new DKIMCheckSignatureJob(this); DKIMCheckSignatureJob *job = new DKIMCheckSignatureJob(this);
connect(job, &DKIMCheckSignatureJob::storeKey, this, &DKIMCheckFullJob::storeKey); connect(job, &DKIMCheckSignatureJob::storeKey, this, &DKIMCheckFullJob::storeKey);
connect(job, &DKIMCheckSignatureJob::result, this, &DKIMCheckFullJob::slotCheckSignatureResult); connect(job, &DKIMCheckSignatureJob::result, this, &DKIMCheckFullJob::slotCheckSignatureResult);
...@@ -169,6 +168,15 @@ void DKIMCheckFullJob::storeResult(const DKIMCheckSignatureJob::CheckSignatureRe ...@@ -169,6 +168,15 @@ void DKIMCheckFullJob::storeResult(const DKIMCheckSignatureJob::CheckSignatureRe
} }
if (mCheckPolicy.autogenerateRule()) { if (mCheckPolicy.autogenerateRule()) {
if (mCheckPolicy.autogenerateRuleOnlyIfSenderInSDID()) { if (mCheckPolicy.autogenerateRuleOnlyIfSenderInSDID()) {
//Check value SDID !
if (checkResult.status == DKIMCheckSignatureJob::DKIMStatus::Valid) {
DKIMGenerateRuleJob *job = new DKIMGenerateRuleJob(this);
job->setResult(checkResult);
if (!job->start()) {
qCWarning(MESSAGEVIEWER_DKIMCHECKER_LOG) << "Impossible to start autogenerate rule";
}
}
} else {
if (checkResult.status == DKIMCheckSignatureJob::DKIMStatus::Valid) { if (checkResult.status == DKIMCheckSignatureJob::DKIMStatus::Valid) {
DKIMGenerateRuleJob *job = new DKIMGenerateRuleJob(this); DKIMGenerateRuleJob *job = new DKIMGenerateRuleJob(this);
job->setResult(checkResult); job->setResult(checkResult);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment