warning: maildir access problem for UID/GID=501/501: create maildir file /var/ma

 

在 /usr/local/courier-authlib/etc/authlib/authmysqlrc
MYSQL_UID_FIELD  '501' 
MYSQL_GID_FIELD  '501'

在 /etc/postfix/main.cf
virtual_uid_maps = static:501 
uid virtual_gid_maps = static:501 

在使用extmail发邮件的时候,查看日志得到以下信息
Aug 12 06:36:00 localhost postfix/smtpd[2621]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Aug 12 06:36:00 localhost postfix/smtpd[2621]: connect from localhost.localdomain[127.0.0.1]
Aug 12 06:36:00 localhost postfix/smtpd[2621]: 3E9041C0183: client=localhost.localdomain[127.0.0.1]
Aug 12 06:36:00 localhost postfix/cleanup[2627]: 3E9041C0183: message-id=<[email protected]>
Aug 12 06:36:00 localhost postfix/qmgr[2467]: 3E9041C0183: from=<[email protected]>, size=649, nrcpt=1 (queue active)
Aug 12 06:36:00 localhost postfix/virtual[2629]: warning: maildir access problem for UID/GID=501/501: create maildir file /var/mailbox/mazq.com/test1/Maildir/tmp/1250030160.P2629.localhost.localdomain: Permission denied
Aug 12 06:36:00 localhost postfix/virtual[2629]: warning: perhaps you need to create the maildirs in advance
Aug 12 06:36:00 localhost postfix/smtpd[2621]: disconnect from localhost.localdomain[127.0.0.1]
Aug 12 06:36:00 localhost postfix/virtual[2629]: 3E9041C0183: to=<[email protected]>, relay=virtual, delay=0.16, delays=0.1/0.02/0/0.04, dsn=4.2.0, status=deferred (maildir delivery failed: create maildir file /var/mailbox/mazq.com/test1/Maildir/tmp/1250030160.P2629.localhost.localdomain: Permission denied)

=======================================================================

/etc/passwd

extmail:x:501:501::/home/extmail:/bin/bash
postfix:x:502:502::/home/postfix:/bin/bash

 

### 分析原因 /var/mailbox 的权限是 postfix.postfix uid.gid = 502
但是使用extmail登陆邮箱的时候,访问/var/mailbox可能不是postfix用户,目前只能将/var/mailbox的权限给其他用户也放开读写权限才可以解决

chown postfix.postfix /var/mailbox
chmod 766 /var/mailbox

你可能感兴趣的:(mysql,bash,Access)