Fix deadlock situation if adding a skipped mail fails
Merge remote-tracking branch 'chiiph/bug/fix_deadlock' into develop