diff options
author | Wolfgang Karall-Ahlborn <github@karall-edv.at> | 2021-03-07 19:56:57 +0300 |
---|---|---|
committer | Wolfgang Karall-Ahlborn <github@karall-edv.at> | 2021-03-07 19:56:57 +0300 |
commit | 7c964281954338f587fad4df9ffd77bc4ef12a99 (patch) | |
tree | 4a3740b728915fb2cdcedee601bdd7ad32656a5d | |
parent | 2edcc8de4238fe7cd7950a4128f075bade5f3a92 (diff) |
If possible, move message to $imapmovefoldererr when there's a database error
-rwxr-xr-x | dmarcts-report-parser.pl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/dmarcts-report-parser.pl b/dmarcts-report-parser.pl index ddc8367..611eba4 100755 --- a/dmarcts-report-parser.pl +++ b/dmarcts-report-parser.pl @@ -296,7 +296,13 @@ if ($reports_source == TS_IMAP) { $processedReport++; if ($processResult & 4) { # processXML returned a value with database error bit enabled, do nothing at all! - next; + if ($imapmovefoldererr) { + # if we can, move to error folder + moveToImapFolder($imap, $msg, $imapmovefoldererr); + } else { + # do nothing at all + next; + } } elsif ($processResult & 2) { # processXML return a value with delete bit enabled. $imap->delete_message($msg) |