I have a docker-mailserver with a relay on a tiers server (Oracle cloud email delivery).
When I send a message to a non-existing address (e.g. to gmail), I get a Code 250 Ok Sent (should not it be a code 550 ?), but I would like to receive an email in the sender mailbox saying something like "The message could not be sent to {someaddresswichdoesnotexist}."
Here are some logs:
Jul 3 08:14:17 mail dovecot: imap-login: Login: user=<contact@my-domain.org>, method=PLAIN, rip=my-ip, lip=172.19.0.5, mpid=6461, TLS, session=<wJCqNOLiYt6M7tku>
Jul 3 08:14:17 mail postfix/submission/smtpd[6462]: connect from unknown[my-ip]
Jul 3 08:14:17 mail postfix/submission/smtpd[6462]: Anonymous TLS connection established from unknown[my-ip]: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
Jul 3 08:14:17 mail postfix/submission/smtpd[6462]: AFDDEFD48F: client=unknown[my-ip], sasl_method=PLAIN, sasl_username=contact@my-domain.org
Jul 3 08:14:17 mail postfix/sender-cleanup/cleanup[6467]: AFDDEFD48F: replace: header MIME-Version: 1.0 from unknown[my-ip]; from=<contact@my-domain.org> to=<EFC370246DA40A0B17C288103EF@gmail.com> proto=ESMTP helo=<mail.my-domain.org>: Mime-Version: 1.0
Jul 3 08:14:17 mail postfix/sender-cleanup/cleanup[6467]: AFDDEFD48F: message-id=<e860ccc620b36af95cd3b7cf5bed326e@my-domain.org>
Jul 3 08:14:17 mail opendkim[260]: AFDDEFD48F: DKIM-Signature field added (s=mail, d=my-domain.org)
Jul 3 08:14:17 mail postfix/qmgr[1471]: AFDDEFD48F: from=<contact@my-domain.org>, size=936, nrcpt=1 (queue active)
Jul 3 08:14:17 mail postfix/submission/smtpd[6462]: disconnect from unknown[my-ip] ehlo=2 starttls=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=8
Jul 3 08:14:17 mail dovecot: imap(contact@my-domain.org)<6461><wJCqNOLiYt6M7tku>: Logged out in=972 out=573 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Jul 3 08:14:17 mail dovecot: imap-login: Login: user=<contact@my-domain.org>, method=PLAIN, rip=my-ip, lip=172.19.0.5, mpid=6474, TLS, session=<O8GvNOLiZN6M7tku>
Jul 3 08:14:17 mail dovecot: imap(contact@my-domain.org)<6474><O8GvNOLiZN6M7tku>: Logged out in=90 out=1054 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Jul 3 08:14:17 mail postfix/smtp[6468]: Trusted TLS connection established to smtp.email.eu-zurich-1.oci.oraclecloud.com[192.29.182.152]:587: TLSv1.2 with cipher DHE-RSA-AES256-SHA256 (256/256 bits)
Jul 3 08:14:18 mail postfix/smtp[6468]: AFDDEFD48F: to=<EFC370246DA40A0B17C288103EF@gmail.com>, relay=smtp.email.eu-zurich-1.oci.oraclecloud.com[192.29.182.152]:587, delay=0.46, delays=0.08/0.02/0.22/0.15, dsn=2.0.0, status=sent (250 Ok)
Jul 3 08:14:18 mail postfix/qmgr[1471]: AFDDEFD48F: removed
How can I configure a delivery failure message on my local setup (I have a rainloop client) ?