免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: who8383
打印 上一主题 下一主题

[Mail] postfix+dovecot+mysql+postfixadmin 发信问题 [复制链接]

论坛徽章:
0
11 [报告]
发表于 2014-11-28 14:45 |显示全部楼层
  我的邮件日志如下
  1. Nov 28 14:31:18 mail dovecot: auth: mysql: Connected to localhost (postfix)
  2. Nov 28 14:31:19 mail dovecot: imap-login: Login: user=<fsl@fsl.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=1403, secured
  3. Nov 28 14:31:19 mail dovecot: imap(fsl@fsl.com): Disconnected: Logged out bytes=148/1475
  4. Nov 28 14:31:20 mail dovecot: imap-login: Login: user=<fsl@fsl.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=1405, secured
  5. Nov 28 14:31:20 mail dovecot: imap(fsl@fsl.com): Disconnected: Logged out bytes=148/1475
  6. Nov 28 14:31:24 mail dovecot: pop3-login: Disconnected (auth failed, 1 attempts): method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
  7. Nov 28 14:31:24 mail postfix/smtpd[1407]: connect from localhost[::1]
  8. Nov 28 14:31:24 mail postfix/smtpd[1407]: 75EEA22E6C: client=localhost[::1]
  9. Nov 28 14:31:24 mail postfix/cleanup[1414]: 75EEA22E6C: message-id=<df2f527b2252972418bc89e4eeddf0b1.squirrel@10.0.0.191>
  10. Nov 28 14:31:24 mail postfix/qmgr[1338]: 75EEA22E6C: from=<fsl@fsl.com>, size=700, nrcpt=1 (queue active)
  11. Nov 28 14:31:24 mail postfix/smtpd[1407]: disconnect from localhost[::1]
  12. Nov 28 14:31:24 mail postfix/virtual[1417]: 75EEA22E6C: to=<fsl@fsl.com>, relay=virtual, delay=0.15, delays=0.11/0.03/0/0.02, dsn=2.0.0, status=sent (delivered to maildir)
  13. Nov 28 14:31:24 mail postfix/qmgr[1338]: 75EEA22E6C: removed
  14. Nov 28 14:31:28 mail dovecot: imap-login: Login: user=<fsl@fsl.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=1419, secured
  15. Nov 28 14:31:28 mail dovecot: imap(fsl@fsl.com): Disconnected: Logged out bytes=611/459
  16. Nov 28 14:31:28 mail dovecot: imap-login: Login: user=<fsl@fsl.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=1421, secured
  17. Nov 28 14:31:28 mail dovecot: imap(fsl@fsl.com): Disconnected: Logged out bytes=309/3727
  18. [root@mail ~]#
复制代码
我在这个目录下发现我的邮件,
  1. [root@mail new]# pwd
  2. /var/vmail/fsl.com/fsl.com/fsl/new
  3. [root@mail new]# ll
  4. 总用量 28
  5. -rw------- 1 vmail vmail 2885 11月 27 17:56 1417082206.Vfd00I22ec4M300308.mail.dktest.com
  6. -rw------- 1 vmail vmail  735 11月 28 13:42 1417153326.Vfd00I23102M71539.mail.dktest.com
  7. -rw------- 1 vmail vmail  739 11月 28 14:16 1417155412.Vfd00I2310aM465017.mail.dktest.com
  8. -rw------- 1 vmail vmail  745 11月 28 14:17 1417155451.Vfd00I23111M393924.mail.dktest.com
  9. -rw------- 1 vmail vmail  735 11月 28 14:19 1417155587.Vfd00I2310fM761379.mail.dktest.com
  10. -rw------- 1 vmail vmail  748 11月 28 14:27 1417156069.Vfd00I23113M287552.mail.dktest.com
  11. -rw------- 1 vmail vmail  750 11月 28 14:31 1417156284.Vfd00I230cbM587211.mail.dktest.com
  12. [root@mail new]#
复制代码
可是我发现在上级目录也有fsl 这个帐号的目录,可是这个目录下没有邮件,是空的
  1. [root@mail fsl.com]# pwd
  2. /var/vmail/fsl.com
  3. [root@mail fsl.com]# ls
  4. fsl  fsl.com
  5. [root@mail fsl.com]#
  6. [root@mail fsl.com]# cd fsl/Maildir/new/
  7. [root@mail new]# ls
  8. [root@mail new]# ll
  9. 总用量 0
  10. [root@mail new]# pwd
  11. /var/vmail/fsl.com/fsl/Maildir/new
  12. [root@mail new]# ls
  13. [root@mail new]#   
复制代码
我的main.cf文件配置指明邮件存储的位置在 /var/vmail ,可是现在有了俩个账户目录,我该如何去指定mail的保存位置?  还有就是postfixadmin可以自动创建邮件储存目录吗?
main.cf 配置文件
  1. [root@mail new]# postconf -n
  2. alias_database = hash:/etc/aliases
  3. alias_maps = hash:/etc/aliases
  4. broken_sasl_auth_clients = yes
  5. command_directory = /usr/sbin
  6. config_directory = /etc/postfix
  7. daemon_directory = /usr/libexec/postfix
  8. data_directory = /var/lib/postfix
  9. debug_peer_level = 2
  10. home_mailbox = /var/vmail
  11. html_directory = no
  12. inet_interfaces = all
  13. inet_protocols = all
  14. mail_owner = postfix
  15. mailq_path = /usr/bin/mailq.postfix
  16. manpage_directory = /usr/share/man
  17. mydestination = $myhostname, localhost.$mydomain, localhost
  18. mydomain = dktest.com
  19. myhostname = mail.dktest.com
  20. mynetworks = 0.0.0.0/0
  21. myorigin = $mydomain
  22. newaliases_path = /usr/bin/newaliases.postfix
  23. queue_directory = /var/spool/postfix
  24. readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
  25. sample_directory = /usr/share/doc/postfix-2.6.6/samples
  26. sendmail_path = /usr/sbin/sendmail.postfix
  27. setgid_group = postdrop
  28. smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
  29. smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
  30. smtpd_sasl_auth_enable = yes
  31. smtpd_sasl_path = /var/run/dovecot/auth-client
  32. smtpd_sasl_security_options = noanonymous
  33. smtpd_sasl_type = dovecot
  34. unknown_local_recipient_reject_code = 550
  35. virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
  36. virtual_gid_maps = static:2000
  37. virtual_mailbox_base = /var/vmail
  38. virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
  39. virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
  40. virtual_transport = virtual
  41. virtual_uid_maps = static:2000
  42. [root@mail new]#
复制代码
dovecot 配置文件
  1. [root@mail new]# doveconf -n
  2. # 2.0.9: /etc/dovecot/dovecot.conf
  3. # OS: Linux 2.6.32-71.el6.x86_64 x86_64 CentOS Linux release 6.0 (Final) ext4
  4. auth_mechanisms = plain login cram-md5
  5. dict {
  6.   expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
  7.   quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
  8. }
  9. disable_plaintext_auth = no
  10. listen = *
  11. mail_location = maildir:/var/vmail
  12. mbox_write_locks = fcntl
  13. passdb {
  14.   args = /etc/dovecot/dovecot-sql.conf.ext
  15.   driver = sql
  16. }
  17. protocols = imap pop3
  18. service auth {
  19.   unix_listener auth-client {
  20.     group = postfix
  21.     mode = 0600
  22.     user = postfix
  23.   }
  24. }
  25. service dict {
  26.   unix_listener dict {
  27.     group = vmail
  28.     mode = 0600
  29.     user = vmail
  30.   }
  31. }
  32. ssl = no
  33. ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
  34. ssl_key = </etc/pki/dovecot/private/dovecot.pem
  35. userdb {
  36.   args = /etc/dovecot/dovecot-sql.conf.ext
  37.   driver = sql
  38. }
  39. [root@mail new]#
复制代码
现在可以看到这个目录才是真正的邮件目录,我要怎么去改呢,还有就是postfixadmin可以自动创建邮件储存目录文件吗?
  1. [root@mail new]# cd /var/vmail/fsl.com/fsl.com/fsl/new/
  2. [root@mail new]# ls
  3. 1417082206.Vfd00I22ec4M300308.mail.dktest.com  1417155587.Vfd00I2310fM761379.mail.dktest.com
  4. 1417153326.Vfd00I23102M71539.mail.dktest.com   1417156069.Vfd00I23113M287552.mail.dktest.com
  5. 1417155412.Vfd00I2310aM465017.mail.dktest.com  1417156284.Vfd00I230cbM587211.mail.dktest.com
  6. 1417155451.Vfd00I23111M393924.mail.dktest.com
复制代码
回复 18# woxizishen


   

论坛徽章:
0
12 [报告]
发表于 2014-11-28 15:55 |显示全部楼层
postfixadmin  能在linux下自动创建邮件目录吗 回复 17# cryboy2001


   

论坛徽章:
0
13 [报告]
发表于 2014-11-28 16:07 |显示全部楼层
问题解决了 ,我修改了这个“mail_location = maildir:/var/vmail/%d/%d/%u”

论坛徽章:
0
14 [报告]
发表于 2014-12-01 18:00 |显示全部楼层
是的解决了,目录指定的问题   回复 22# cryboy2001


   
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP