添加列表
# /usr/bin/mlmmj-make-ml -L chat -s /var/spool/mlmmj/domain.com -c mlmmj
# echo 'chat:  "|/usr/bin/mlmmj-receive -L /var/spool/mlmmj/gotechcn.cn/chat/"' >> /etc/postfix/aliases
# newaliases
邀请用户订阅
# /usr/bin/mlmmj-sub -L /var/spool/mlmmj/domain.com/chat -a xiaofeng.lin@domain.com -C


但是该邀请无法发送出去,提示用户不存在,以下为日志报错:
Jul 18 11:51:56 mail postfix/smtpd[20849]: NOQUEUE: reject: RCPT from mail.domain.com[127.0.0.1]: 550 5.1.0 <chat+bounces-confsub-077e7f5f310f3ed4-xiaofeng.lin=domain.com@domain.com>: Sender address rejected: User unknown in virtual mailbox table; from=<chat+bounces-confsub-077e7f5f310f3ed4-xiaofeng.lin=domain.com@domain.com> to=<xiaofeng.lin@domain.com> proto=ESMTP helo=<mail.domain.com>
Jul 18 11:51:56 mail /usr/bin/mlmmj-send[23591]: mlmmj-send.c:294: Error in RCPT TO. Reply = [550 5.1.0 <chat+bounces-confsub-077e7f5f310f3ed4-xiaofeng.lin=domain.com@domain.com>: Sender address rejected: User unknown in virtual mailbox table#015#012]: No such file or directory

# cat /etc/postfix/main.cf(部分)
smtpd_reject_unlisted_recipient = yes
smtpd_reject_unlisted_sender = yes
smtpd_sender_restrictions =
    permit_mynetworks
    reject_unlisted_sender
    reject_authenticated_sender_login_mismatch
    check_policy_service inet:127.0.0.1:7777
    permit_sasl_authenticated
    check_sender_access pcre:/etc/postfix/sender_access.pcre
smtpd_recipient_restrictions =
    check_sender_access hash:/etc/postfix/sender_checks
    check_recipient_access hash:/etc/postfix/access
    reject_unknown_recipient_domain
    reject_non_fqdn_recipient
    reject_unlisted_recipient
    permit_mynetworks
    permit_sasl_authenticated
    reject_unauth_destination
    check_policy_service inet:127.0.0.1:7777
mynetworks = 127.0.0.1
mydestination = $myhostname, localhost, localhost.localdomain
myhostname = mail.domain.com
myorigin = domain.com
mydomain = domain.com
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases
virtual_alias_domains =
virtual_alias_maps =
    proxy:mysql:/etc/postfix/mysql/virtual_alias_maps.cf
    proxy:mysql:/etc/postfix/mysql/mlmmj.cf
    proxy:mysql:/etc/postfix/mysql/domain_alias_maps.cf
    proxy:mysql:/etc/postfix/mysql/catchall_maps.cf
    proxy:mysql:/etc/postfix/mysql/domain_alias_catchall_maps.cf
transport_maps =
    proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf
    proxy:mysql:/etc/postfix/mysql/transport_maps_mlmmj.cf
    proxy:mysql:/etc/postfix/mysql/transport_maps_domain.cf
mlmmj_destination_recipient_limit = 1

重新配置后ok
make uninstall
userdel mlmmj
rm -rf /var/spool/mlmmj
yum install mlmmj
yum安装不会创建mlmmj用户

这一步前面没有做
mlmmj-make-ml -L 'alist' -s /var/spool/mlmmj/domain.com -c mlmmj

status=deferred (unknown mail transport error)
然后收邮件没有退信了,但是报上面错误,把master.cf改成这样才可以收邮件
# flags=ORhu user=mlmmj argv=/usr/bin/mlmmj-receive -F -L /var/spool/mlmmj/${nexthop}
  flags=ORhu user=mlmmj argv=/usr/bin/mlmmj-receive -F -L /var/spool/mlmmj/${domain}/${user}

==== 必填信息。没有填写将不予回复 ====
- 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