mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-01 01:06:11 +00:00
Added DKIM logging
This commit is contained in:
parent
18c85872f3
commit
8cb5a52ae7
1 changed files with 13 additions and 2 deletions
|
@ -2561,15 +2561,26 @@ public class MessageHelper {
|
|||
sig.update(data);
|
||||
|
||||
boolean verified = sig.verify(signature);
|
||||
Log.i("DKIM valid=" + verified +
|
||||
String msg = "DKIM valid=" + verified +
|
||||
" algo=" + salgo +
|
||||
" dns=" + dns +
|
||||
" from=" + formatAddresses(getFrom()));
|
||||
" from=" + formatAddresses(getFrom());
|
||||
Log.i(msg);
|
||||
EntityLog.log(context, verified ? EntityLog.Type.Debug2 : EntityLog.Type.Debug3, msg);
|
||||
|
||||
if (verified)
|
||||
return signer;
|
||||
} catch (Throwable ex) {
|
||||
Log.e("DKIM", ex);
|
||||
Address[] from;
|
||||
try {
|
||||
from = getFrom();
|
||||
} catch (Throwable ignored) {
|
||||
from = null;
|
||||
}
|
||||
EntityLog.log(context, EntityLog.Type.Debug3, "DKIM failed" +
|
||||
" from=" + formatAddresses(from) +
|
||||
" ex=" + Log.formatThrowable(ex));
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
Loading…
Reference in a new issue