error with 3.4-20180903 postfix command

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

error with 3.4-20180903 postfix command

Noel Jones-2
Using the new 3.4-20180903 snapshot.


# main.cf
postscreen_reject_footer = \c; Contact [hidden email] for
assistance.  Include this data: servertime=($localtime)
client=([$client_address]:$client_port) server=($server_name) (postscr
een)


run "postfix reload"

postconf: warning: /etc/postfix/main.cf: undefined parameter: localtime
postconf: warning: /etc/postfix/main.cf: undefined parameter:
client_address
postconf: warning: /etc/postfix/main.cf: undefined parameter:
client_port
postconf: warning: /etc/postfix/main.cf: undefined parameter:
server_name




  -- Noel Jones
Reply | Threaded
Open this post in threaded view
|

Re: error with 3.4-20180903 postfix command

Wietse Venema
Noel Jones:

> Using the new 3.4-20180903 snapshot.
>
>
> # main.cf
> postscreen_reject_footer = \c; Contact [hidden email] for
> assistance.  Include this data: servertime=($localtime)
> client=([$client_address]:$client_port) server=($server_name) (postscr
> een)
>
>
> run "postfix reload"
>
> postconf: warning: /etc/postfix/main.cf: undefined parameter: localtime
> postconf: warning: /etc/postfix/main.cf: undefined parameter:
> client_address
> postconf: warning: /etc/postfix/main.cf: undefined parameter:
> client_port
> postconf: warning: /etc/postfix/main.cf: undefined parameter:
> server_name

Does it work properly with "postscreen_reject_footer =
$smtpd_reject_footer", and setting the footer in smtpd_reject_footer?

postconf has to jump some extra hoops to make postscreen variables
work.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: error with 3.4-20180903 postfix command

Noel Jones-2
On 9/4/2018 1:57 PM, Wietse Venema wrote:

> Noel Jones:
>> Using the new 3.4-20180903 snapshot.
>>
>>
>> # main.cf
>> postscreen_reject_footer = \c; Contact [hidden email] for
>> assistance.  Include this data: servertime=($localtime)
>> client=([$client_address]:$client_port) server=($server_name) (postscr
>> een)
>>
>>
>> run "postfix reload"
>>
>> postconf: warning: /etc/postfix/main.cf: undefined parameter: localtime
>> postconf: warning: /etc/postfix/main.cf: undefined parameter:
>> client_address
>> postconf: warning: /etc/postfix/main.cf: undefined parameter:
>> client_port
>> postconf: warning: /etc/postfix/main.cf: undefined parameter:
>> server_name
>
> Does it work properly with "postscreen_reject_footer =
> $smtpd_reject_footer", and setting the footer in smtpd_reject_footer?
>
> postconf has to jump some extra hoops to make postscreen variables
> work.
>
> Wietse
>


Yes, that fixes both problems; both the "postfix" warnings and the
fatal "postscreen" errors reported separately.


  -- Noel Jones
Reply | Threaded
Open this post in threaded view
|

Re: error with 3.4-20180903 postfix command

Noel Jones-2
On 9/4/2018 2:01 PM, Noel Jones wrote:

> On 9/4/2018 1:57 PM, Wietse Venema wrote:
>> Noel Jones:
>>> Using the new 3.4-20180903 snapshot.
>>>
>>>
>>> # main.cf
>>> postscreen_reject_footer = \c; Contact [hidden email] for
>>> assistance.  Include this data: servertime=($localtime)
>>> client=([$client_address]:$client_port) server=($server_name) (postscr
>>> een)
>>>
>>>
>>> run "postfix reload"
>>>
>>> postconf: warning: /etc/postfix/main.cf: undefined parameter: localtime
>>> postconf: warning: /etc/postfix/main.cf: undefined parameter:
>>> client_address
>>> postconf: warning: /etc/postfix/main.cf: undefined parameter:
>>> client_port
>>> postconf: warning: /etc/postfix/main.cf: undefined parameter:
>>> server_name
>>
>> Does it work properly with "postscreen_reject_footer =
>> $smtpd_reject_footer", and setting the footer in smtpd_reject_footer?
>>
>> postconf has to jump some extra hoops to make postscreen variables
>> work.
>>
>> Wietse
>>
>
>
> Yes, that fixes both problems; both the "postfix" warnings and the
> fatal "postscreen" errors reported separately.
>
>
>   -- Noel Jones
>



While we're at it:

# postconf -d | grep reject_foot
postscreen_reject_footer = $smtpd_reject_footer
postscreen_reject_footer = $smtpd_reject_footer_maps
smtpd_reject_footer =
smtpd_reject_footer_maps =

note the duplicated "postscreen_reject_footer" parameter and
"postscreen_reject_footer_maps" missing.


 -- Noel Jones
Reply | Threaded
Open this post in threaded view
|

PATCH: error with 3.4-20180903 postfix command

Viktor Dukhovni
In reply to this post by Noel Jones-2


> On Sep 4, 2018, at 2:47 PM, Noel Jones <[hidden email]> wrote:
>
> postconf: warning: /etc/postfix/main.cf: undefined parameter: localtime
> postconf: warning: /etc/postfix/main.cf: undefined parameter:
> client_address
> postconf: warning: /etc/postfix/main.cf: undefined parameter:
> client_port
> postconf: warning: /etc/postfix/main.cf: undefined parameter:
> server_name


--- src/global/mail_params.h
+++ src/global/mail_params.h
@@ -3775,5 +3775,5 @@ extern int var_psc_cconn_limit;
 extern char *var_psc_rej_footer;
 
-#define VAR_PSC_REJ_FTR_MAPS   "postscreen_reject_footer"
+#define VAR_PSC_REJ_FTR_MAPS   "postscreen_reject_footer_maps"
 #define DEF_PSC_REJ_FTR_MAPS   "$" VAR_SMTPD_REJ_FTR_MAPS
 extern char *var_psc_rej_ftr_maps;

--
        Viktor.

Reply | Threaded
Open this post in threaded view
|

Re: PATCH: error with 3.4-20180903 postfix command

Noel Jones-2
On 9/4/2018 2:23 PM, Viktor Dukhovni wrote:

>
>
>> On Sep 4, 2018, at 2:47 PM, Noel Jones <[hidden email]> wrote:
>>
>> postconf: warning: /etc/postfix/main.cf: undefined parameter: localtime
>> postconf: warning: /etc/postfix/main.cf: undefined parameter:
>> client_address
>> postconf: warning: /etc/postfix/main.cf: undefined parameter:
>> client_port
>> postconf: warning: /etc/postfix/main.cf: undefined parameter:
>> server_name
>
>
> --- src/global/mail_params.h
> +++ src/global/mail_params.h
> @@ -3775,5 +3775,5 @@ extern int var_psc_cconn_limit;
>  extern char *var_psc_rej_footer;
>  
> -#define VAR_PSC_REJ_FTR_MAPS   "postscreen_reject_footer"
> +#define VAR_PSC_REJ_FTR_MAPS   "postscreen_reject_footer_maps"
>  #define DEF_PSC_REJ_FTR_MAPS   "$" VAR_SMTPD_REJ_FTR_MAPS
>  extern char *var_psc_rej_ftr_maps;
>



And like magic, that fixed all the problems.

Thanks.



  -- Noel Jones
Reply | Threaded
Open this post in threaded view
|

Re: PATCH: error with 3.4-20180903 postfix command

Viktor Dukhovni
On Tue, Sep 04, 2018 at 02:42:19PM -0500, Noel Jones wrote:

> > @@ -3775,5 +3775,5 @@ extern int var_psc_cconn_limit;
> >  extern char *var_psc_rej_footer;
> >  
> > -#define VAR_PSC_REJ_FTR_MAPS   "postscreen_reject_footer"
> > +#define VAR_PSC_REJ_FTR_MAPS   "postscreen_reject_footer_maps"
> >  #define DEF_PSC_REJ_FTR_MAPS   "$" VAR_SMTPD_REJ_FTR_MAPS
> >  extern char *var_psc_rej_ftr_maps;
>
> And like magic, that fixed all the problems.

Yes, the same typo caused all the symptoms.  Spoiler alert, below
my signature I am going to shed some light on the "magic".  If
ignorance is bliss move on... :-)

--
        Viktor.

1.  The typo caused the same parameter name to be listed twice, with
    different default values.

2.  Non-empty values of "postscreen_reject_footer" are unlikely to
    be a valid table definition for the "_maps" parameter.

3.  The "_maps" parameter expands early with substitutions from other
    main.cf parameters, so does not like the late substitutions valid
    with the static footer.