On Mon, 30 Sep 2024 22:03:07 +0200,
Quelrond <quelr...@gmail.com> wrote:
> 
> Unfortunately, we are in a corporate environment that we cannot control.
> We MUST use _this_ relay server that don't accept empty 'From' for
> outbound mailing.
> 
> The only thing that we can do is to send NDR directly to the
> destination. As in 99% this is our internal addresses, and in 90% this
> is ~3 pre-defined addresses - we can send these NDR directly to our
> internal mail server, it will deliver these NDR to the internal
> mailboxes. But I don't know OpenSMTPD so good to configure it at this
> manner.
>

This is hardcoded behaviour, but you may hack it like this:

Index: usr.sbin/smtpd/bounce.c
===================================================================
RCS file: /cvs/src/usr.sbin/smtpd/bounce.c,v
retrieving revision 1.90
diff -u -p -r1.90 bounce.c
--- usr.sbin/smtpd/bounce.c     31 May 2023 16:51:46 -0000      1.90
+++ usr.sbin/smtpd/bounce.c     30 Sep 2024 20:23:20 -0000
@@ -422,7 +422,7 @@ bounce_next(struct bounce_session *s)
                }
                log_debug("debug: bounce: %p: found message %08"PRIx32,
                    s, s->msg->msgid);
-               bounce_send(s, "MAIL FROM: <>");
+               bounce_send(s, "MAIL FROM: <MAILER-DAEMON@%s>", s->smtpname);
                s->state = BOUNCE_RCPT;
                break;
 

-- 
wbr, Kirill

Reply via email to