Viktor Dukhovni: > > > > On Apr 27, 2018, at 6:53 AM, Wietse Venema <wie...@porcupine.org> wrote: > > > > Meanwhile, you can set "-o {smtpd_reject_footer = text... }" in master.cf, > > I seem to recall that the OP is using Postfix 2.11 which does not > have that feature. :-( > > As for smtpd_reject_footer it is expanded via smtpd_expand_lookup() > which contains the comment: > > /* > * Don't query main.cf parameters, as the result of expansion could > * reveal system-internal information in server replies. > * > * XXX: This said, multiple servers may be behind a single client-visible > * name or IP address, and each may generate its own logs. Therefore, it > * may be useful to expose the replying MTA id (myhostname) in the > * contact footer, to identify the right logs. So while we don't expose > * the raw configuration dictionary, we do expose "$myhostname" as > * expanded in var_myhostname. > * > * Return NULL only for non-existent names. > */ > > So it seems that using master.cf overrides of the generally recommended > form won't work here... :-(
And it's even documented: Notes: o NOT SUPPORTED are other attributes such as sender, recipient, or main.cf parameters. This is working as intended, though perhaps not as expected. With postscreen_reject_footer I had to make a special case when the value contains exactly one $name and nothing else: if (*var_psc_rej_footer == '$' && mail_conf_lookup(var_psc_rej_footer + 1)) { tmp = mail_conf_eval_once(var_psc_rej_footer); myfree(var_psc_rej_footer); var_psc_rej_footer = mystrdup(tmp); } Ditto for postscreen_expansion_filter. Adding such cleverness to postconf could be challenging. Wietse