On 09/10/2013 03:30 PM, /dev/rob0 wrote:
On Tue, Sep 10, 2013 at 03:17:30PM +0200, martijn.list wrote:
I must be doing something wrong but I'm unable to add a
check_recipient_access restriction to smtpd in master.cf.

I have added the following additional smtpd daemon to master.cf

127.0.0.1:10027 inet  n       -       n       -       10      smtpd
  -o smtpd_recipient_restrictions=check_recipient_access
hash:/etc/postfix/valid_recipient_domains reject

See the master(5) manual for the file syntax details. To wit: you
cannot use spaces or tabs in "-o" arguments. The only valid
whitespace characters there are commas:

127.0.0.1:10027 inet  n       -       n       -       10      smtpd
   -o 
smtpd_recipient_restrictions=check_recipient_access,hash:/etc/postfix/valid_recipient_domains,reject

Thanks! I knew I was doing something wrong :)


The same manual also suggests a more elegant way of dealing with the
problem: set a custom parameter in main.cf and refer thereto:

main.cf:
10027_recipient_restrictions = check_recipient_access
      hash:/etc/postfix/valid_recipient_domains, reject

master.cf:
127.0.0.1:10027 inet  n       -       n       -       10      smtpd
   -o smtpd_recipient_restrictions=$10027_recipient_restrictions
   -o syslog_name=postfix/10027

Thanks, that's more elegant.

(I might also add: I am curious about your goal and doubtful that
you've found the right solution.)

I want to prevent a local application from sending to unauthorized domains. Not sure whether this is the best approach though.

Kind regards,

Martijn Brinkers


--
DJIGZO email encryption

Reply via email to