how to use check file in master.cf

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

how to use check file in master.cf

xiedeacc
how to use parameters like
smtpd_recipient_restrictions=check_recipient_access
hash:/etc/postfix/recipient_access in master.cf, postfix will log fatal
error and process exit



--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
Reply | Threaded
Open this post in threaded view
|

Re: how to use check file in master.cf

@lbutlr
On Sep 11, 2017, at 1:55 AM, xiedeacc <[hidden email]> wrote:
> how to use parameters like
> smtpd_recipient_restrictions=check_recipient_access
> hash:/etc/postfix/recipient_access in master.cf, postfix will log fatal
> error and process exit

Formatting matters, and this is well documented. the specific error should help narrow down the problem.

This is what mine looks like (leading spaces on the lines are signifiant):

smtpd_recipient_restrictions =
 permit_mynetworks,
 reject_unauth_destination,
 reject_non_fqdn_sender,
 reject_non_fqdn_recipient,
 reject_unknown_sender_domain,
 reject_invalid_hostname,
 reject_unlisted_recipient,
 reject_unlisted_sender,
 reject_unknown_reverse_client_hostname,
 check_recipient_access hash:$config_directory/recipient_access
 check_sender_access pcre:$config_directory/sender_access.pcre,
 check_client_access hash:$config_directory/access,
 permit

(do not copy this, chances are it will fail for your install)

The problem could be in the recipient access file (most likely), or in master.cf.

--
Apple broke AppleScripting signatures in Mail.app, so no random signatures.

Reply | Threaded
Open this post in threaded view
|

Re: how to use check file in master.cf

@lbutlr
On Sep 11, 2017, at 4:49 AM, @lbutlr <[hidden email]> wrote:
> smtpd_recipient_restrictions =
> permit_mynetworks,

Well, that's useful, the leading spaces were stripped.

Hrm.

--
Apple broke AppleScripting signatures in Mail.app, so no random signatures.

Reply | Threaded
Open this post in threaded view
|

Re: how to use check file in master.cf

Wietse Venema
In reply to this post by xiedeacc
xiedeacc:
> how to use parameters like
> smtpd_recipient_restrictions=check_recipient_access
> hash:/etc/postfix/recipient_access in master.cf, postfix will log fatal
> error and process exit

According to 'man 5 master':

              -o { name = value } (long form, Postfix >= 3.0)

              -o name=value (short form)
                     Override the named main.cf configuration  parameter.
                        ..
                     NOTE 2: with the "short form" shown above, do not specify
                     whitespace around the "="  or  in  parameter  values.  To
                     specify  a  parameter value that contains whitespace, use
                     the long form described above, or use commas  instead  of
                     spaces, or specify the value in main.cf. Example:

                     /etc/postfix/master.cf:
                         submission inet .... smtpd
                             -o smtpd_xxx_yyy=$submission_xxx_yyy

                     /etc/postfix/main.cf
                         submission_xxx_yyy = text with whitespace...


Reply | Threaded
Open this post in threaded view
|

Re: how to use check file in master.cf

xiedeacc
Thanks very much




On Mon, Sep 11, 2017 at 8:02 PM +0800, "Wietse Venema" <[hidden email]> wrote:

xiedeacc:
> how to use parameters like
> smtpd_recipient_restrictions=check_recipient_access
> hash:/etc/postfix/recipient_access in master.cf, postfix will log fatal
> error and process exit

According to 'man 5 master':

              -o { name = value } (long form, Postfix >= 3.0)

              -o name=value (short form)
                     Override the named main.cf configuration  parameter.
			..
                     NOTE 2: with the "short form" shown above, do not specify
                     whitespace around the "="  or  in  parameter  values.  To
                     specify  a  parameter value that contains whitespace, use
                     the long form described above, or use commas  instead  of
                     spaces, or specify the value in main.cf. Example:

                     /etc/postfix/master.cf:
                         submission inet .... smtpd
                             -o smtpd_xxx_yyy=$submission_xxx_yyy

                     /etc/postfix/main.cf
                         submission_xxx_yyy = text with whitespace...