Postfix 无法创建锁定文件,权限被拒绝

Postfix 无法创建锁定文件,权限被拒绝

我以为我已经在 Amazon Ubuntu 服务器上设置好了所有 postfix 配置,但事实并非如此。我正在尝试为 3 个虚拟托管的 Apache 网站设置一个管理员电子邮件帐户。这是我的 postfix main.cf 文件:

myhostname = ip-XX-XXX-XX-XXX.us-west-2.compute.internal
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = ip-XX-XXX-XX-XXX.us-west-2.compute.internal, localhost.us-west-2.compute.internal, , localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

virtual_mailbox_domains = example1.com, example2.com, example3.com
virtual_mailbox_base = /var/mail/vhosts
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 100
virtual_uid_maps = static:115
virtual_gid_maps = static:115
virtual_alias_maps = hash:/etc/postfix/virtual

这是我的 vmailbox 文件:

[email protected]                  example1.com/admin
[email protected]                  example2.com/admin
[email protected]                  example3.com/admin
@example1.com                       example1.com/catchall
@example2.com                       example2.com/catchall
@example3.com                       example3.com/catchall

最后是我的虚拟文件:

[email protected]                 postmaster
[email protected]                 postmaster
[email protected]                 postmaster

当我尝试通过 netcat 向我的一个域发送电子邮件时,我收到:

unable to create lock file /var/mail/vhosts/example1.com/admin.lock: Permission denied

尽管我将 example1.com 组设置为 postfix,并且我的 virtual_uid_maps 和 virtual_gid_maps 都设置为 Postfix 组 ID 115,但情况仍然如此。

答案1

postfix组应该对该/var/mail/vhosts文件夹具有读/写/执行权限。

相关内容