postfix-unix-users

Limit E-Mail access for users using group membership in Postfix
git clone git://git.server.ky/slackcoder/postfix-unix-users
Log | Files | Refs | README

README.md (1012B)


      1 # User Group Membership for Postfix
      2 
      3 Limit E-Mail access for users using group membership in Postfix.
      4 
      5 The default Postfix setup restricts E-Mail to all system users, which includes
      6 service users such as 'www'.
      7 
      8 ## Installation
      9 
     10 ```sh
     11 go build .
     12 sudo mv postfix-unix-users /usr/local/bin
     13 sudo chown root:root /usr/local/bin/postfix-unix-users
     14 ```
     15 
     16 ## Configuration
     17 
     18 Tell Postfix to start the program as part of its operation, using allowed user groups listed in the file '/etc/postfix/user_groups'.
     19 
     20 /etc/postfix/master.cf:
     21 ```
     22 unix-users    unix  -       n       n       -       1       spawn
     23   user=nobody argv=/usr/local/bin/postfix-unix-users
     24     --hostname $myhostname
     25     --groups /etc/postfix/user_groups
     26     email-group-1 email-group-2
     27 ```
     28 
     29 Tell Postfix to lookup local users using the program's unix socket.
     30 
     31 /etc/postfix/main.cf:
     32 ```
     33 # Replace 'unix:passwd.byname' with 'socketmap:unix:private/unix-users:membership'.
     34 local_recipient_maps = socketmap:unix:private/unix-users:membership $alias_maps
     35 ```