主题: 配置mlmmj后无法收邮件
==== 必填信息。没有填写将不予回复 ====
- iRedMail 版本号:0.9.7
- 使用哪个数据库存储用户帐号(OpenLDAP,MySQL,PostgreSQL):mysql
- 使用的 Linux/BSD 发行版名称及版本号:centos6.7
- 与您的问题相关的日志信息:
====
配置步骤
1.下载mlmmj-1.3.0
configure make make install
2.
# useradd -s /bin/false -d /var/spool/mlmmj mlmmj
# ll -d /var/spool/mlmmj/
drwx------ 2 mlmmj mlmmj 4096 Jul 14 09:27 /var/spool/mlmmj/
3.
[root@mail ~]# cd /etc/postfix/mysql/
[root@mail mysql]# cat mlmmj.cf transport_maps_mlmmj.cf
hosts = 127.0.0.1
port = 3306
user = vmail
password = 9KQeezWeNuQXOnqjwrkab4skx2Jy2a
dbname = vmail
query = SELECT '%s' FROM alias WHERE address='%s' AND active=1
hosts = 127.0.0.1
port = 3306
user = vmail
password = 9KQeezWeNuQXOnqjwrkab4skx2Jy2a
dbname = vmail
query = SELECT 'mlmmj:%d/%u' FROM alias WHERE address='%s' AND active=1
# ll mlmmj.cf transport_maps_mlmmj.cf
-rw-r----- 1 root postfix 197 Jul 14 09:34 mlmmj.cf
-rw-r----- 1 root postfix 206 Jul 14 09:35 transport_maps_mlmmj.cf
此两文件属主是否有问题?
[root@mail ~]# which mlmmj-receive
/usr/local/bin/mlmmj-receive
master.cf追加以下内容
# ${nexthop} is '%d/%u' in transport ('mlmmj:%d/%u')
mlmmj unix - n n - - pipe
flags=ORhu user=mlmmj argv=/usr/local/bin/mlmmj-receive -F -L /var/spool/mlmmj/${nexthop}
# flags=ORhu user=mlmmj argv=/usr/local/bin/mlmmj-receive -F -L /var/spool/mlmmj/${domain}/${user}
# vi /etc/postfix/main.cf
mlmmj_destination_recipient_limit = 1
virtual_alias_maps =
proxy:mysql:/etc/postfix/mysql/virtual_alias_maps.cf
proxy:mysql:/etc/postfix/mysql/mlmmj.cf # <-Add this line
transport_maps =
proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf
proxy:mysql:/etc/postfix/mysql/transport_maps_mlmmj.cf # <- Add this line
# service postfix restart
然后就收不到邮件了
# cat /var/log/maillog |grep mlmmj
Jul 14 10:30:02 mail postfix/proxymap[127857]: warning: request for unapproved table: "mysql:/etc/postfix/mysql/mlmmj.cf"
Jul 14 10:30:02 mail postfix/proxymap[127857]: warning: to approve this table for read-only access, list proxy:mysql:/etc/postfix/mysql/mlmmj.cf in main.cf:proxy_read_maps
Jul 14 10:30:02 mail postfix/smtpd[128661]: fatal: proxymap service is not configured for table "mysql:/etc/postfix/mysql/mlmmj.cf"
Jul 14 10:52:38 mail /usr/local/bin/mlmmj-receive[135894]: mlmmj-receive.c:122: Could not stat /var/spool/mlmmj/domain.com/xi.tan: No such file or directory
Jul 14 10:52:38 mail /usr/local/bin/mlmmj-receive[135895]: mlmmj-receive.c:122: Could not stat /var/spool/mlmmj/domain.com/tengfei.zhang: No such file or directory
Jul 14 10:52:38 mail postfix/pipe[135337]: A94A382006DC: to=<tengfei.zhang@domain.com>, relay=mlmmj, delay=0.27, delays=0.21/0/0/0.06, dsn=5.3.0, status=bounced (Command died with status 1: "/usr/local/bin/mlmmj-receive")
Jul 14 10:52:38 mail postfix/pipe[135336]: B24CD82006DF: to=<xi.tan@domain.com>, relay=mlmmj, delay=0.21, delays=0.15/0/0/0.06, dsn=5.3.0, status=bounced (Command died with status 1: "/usr/local/bin/mlmmj-receive")
Jul 14 10:52:39 mail /usr/local/bin/mlmmj-receive[135897]: mlmmj-receive.c:122: Could not stat /var/spool/mlmmj/domain.com/shixiang.liu: No such file or directory
Jul 14 10:52:39 mail /usr/local/bin/mlmmj-receive[135898]: mlmmj-receive.c:122: Could not stat /var/spool/mlmmj/domain.com/shixiang.liu: No such file or directory
Jul 14 10:52:39 mail postfix/pipe[135336]: E64BA82006E7: to=<shixiang.liu@domain.com>, relay=mlmmj, delay=0.13, delays=0.06/0/0/0.06, dsn=5.3.0, status=bounced (Command died with status 1: "/usr/local/bin/mlmmj-receive")
Jul 14 10:52:39 mail postfix/pipe[135337]: E64A382006E5: to=<shixiang.liu@domain.com>, relay=mlmmj, delay=0.13, delays=0.06/0/0/0.06, dsn=5.3.0, status=bounced (Command died with status 1: "/usr/local/bin/mlmmj-receive")
Jul 14 10:52:39 mail /usr/local/bin/mlmmj-receive[135907]: mlmmj-receive.c:122: Could not stat /var/spool/mlmmj/domain.com/xiaoliang.zhai: No such file or directory
Jul 14 10:52:39 mail /usr/local/bin/mlmmj-receive[135908]: mlmmj-receive.c:122: Could not stat /var/spool/mlmmj/domain.com/xinjiang.chen: No such file or directory
Jul 14 10:52:40 mail postfix/pipe[135337]: BCC1B82006DF: to=<xinjiang.chen@domain.com>, relay=mlmmj, delay=0.27, delays=0.17/0.03/0/0.07, dsn=5.3.0, status=bounced (Command died with status 1: "/usr/local/bin/mlmmj-receive")
Jul 14 10:52:40 mail postfix/pipe[135336]: AD8A982006DC: to=<xiaoliang.zhai@domain.com>, relay=mlmmj, delay=0.33, delays=0.23/0.03/0/0.07, dsn=5.3.0, status=bounced (Command died with status 1: "/usr/local/bin/mlmmj-receive")
Jul 14 10:52:40 mail postfix/qmgr[136027]: warning: connect to transport private/mlmmj: Connection refused
Jul 14 10:53:49 mail postfix/qmgr[136027]: warning: connect to transport private/mlmmj: Connection refused
Jul 14 10:54:49 mail postfix/qmgr[136027]: warning: connect to transport private/mlmmj: Connection refused
Jul 14 10:55:49 mail postfix/qmgr[136027]: warning: connect to transport private/mlmmj: Connection refused