Postfix: smtpd_helo_restrictions being executes multiple times with smtpd_delay_reject = yes

23 views Asked by At

What I am trying to achieve is to add the HELO/EHLO command to the email header, so I tried to utilize smtpd_helo_restrictions to make it happen. Although it works, but sometimes the same header is appended multiple times.

After looking through some articles, I understand that when the parameter smtpd_delay_reject is being set to yes, the evaluation of smtpd_helo_restrictions will be delayed to the RCPT TO stage. That explains why sometimes the header is appended multiple times as there are multiple RCPT TO so the smtpd_helo_restrictions is being evaluated multiple times.

Due to the design, the parameter smtpd_delay_reject has to be fixed to yes. So is there any ways I can append the EHLO/HELO command to the header only once even in scenarios where there are multiple RCPT TO in the message?

0

There are 0 answers