FR: add support for rejected mail
Problem to be solved
Control Center doesn't have information about rejected mail.
This is because there is no queue ID attributed to a rejection.
Describe the solution that you'd like
Save rejected mails to database, maybe with a new status of delivery?
Example logs from a postfix mailserver
Mar 10 16:17:53 mymailserver postfix/smtps/smtpd[15102]: connect from unknown[1.2.3.5]
Mar 10 16:17:54 mymailserver postfix/smtps/smtpd[15102]: Anonymous TLS connection established from unknown[1.2.3.5]: TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
Mar 10 16:17:55 mymailserver postfix/smtps/smtpd[15102]: NOQUEUE: reject: RCPT from unknown[1.2.3.5]: 550 5.1.1 <someone@locallyblocked.address>: Recipient address rejected: Some custom message configured on postfix; from=<postmaster@mymailserver.org> to=<someone@locallyblocked.address> proto=ESMTP helo=<[9.8.7.7]>