[MacPorts] #68135: postfix creates incorrect permissions on postfix.log after updates

MacPorts noreply at macports.org
Thu Sep 7 11:14:56 UTC 2023


#68135: postfix creates incorrect permissions on postfix.log after updates
-----------------------+---------------------
 Reporter:  essandess  |      Owner:  (none)
     Type:  defect     |     Status:  new
 Priority:  Normal     |  Milestone:
Component:  ports      |    Version:
 Keywords:             |       Port:  postfix
-----------------------+---------------------
 {{{postfix}}} fails to launch after every update because the file
 {{{maillog_file = /opt/local/var/log/mail/postfix.log}}} (set by
 {{{/opt/local/etc/postfix/main.cf}}}) is created with incorrect
 permissions.

 Diagnostics after update:

 {{{
 $ sudo port load postfix
 # port 25 fails to open
 $ sudo less /opt/local/var/log/mail/postfix.log

 Sep 07 06:50:08 mail /postfix-script[55273]: fatal: Postfix integrity
 check fail
 ed!

 $ sudo postsuper -sv
 postsuper: name_mask: all
 postsuper: inet_addr_local: configured 4 IPv4 addresses
 postsuper: inet_addr_local: configured 25 IPv6 addresses
 postsuper: queue: defer
 postsuper: fatal: open logfile '/opt/local/var/log/mail/postfix.log':
 cannot open file: Permission denied

 $ ls -l /opt/local/var/log/mail/postfix.log
 -rw-r-----  1 root  admin  1041875 Sep  7 06:51
 /opt/local/var/log/mail/postfix.log
 }}}

 Fix:
 {{{
 $ sudo chgrp _postfix /opt/local/var/log/mail/postfix.log
 $ sudo chmod g+w /opt/local/var/log/mail/postfix.log
 $ sudo postsuper -sv
 postsuper: name_mask: all
 postsuper: inet_addr_local: configured 4 IPv4 addresses
 postsuper: inet_addr_local: configured 25 IPv6 addresses
 postsuper: queue: defer
 postsuper: queue: bounce
 postsuper: queue: maildrop
 postsuper: warning: bogus file name: maildrop/.turd_postfix
 postsuper: queue: incoming
 postsuper: queue: active
 postsuper: queue: deferred
 postsuper: queue: hold
 postsuper: queue: flush

 $ ls -l /opt/local/var/log/mail/postfix.log
 -rw-rw----  1 root  _postfix  1043322 Sep  7 07:02
 /opt/local/var/log/mail/postfix.log
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/68135>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list