免费注册 查看新帖 |

Chinaunix

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

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

论坛徽章:
26
CU十二周年纪念徽章
日期:2013-10-24 15:41:34技术图书徽章
日期:2014-07-11 16:27:52辰龙
日期:2014-09-04 13:40:43白羊座
日期:2014-09-09 12:51:55双子座
日期:2014-09-26 11:00:042014年中国系统架构师大会
日期:2014-10-14 15:59:00子鼠
日期:2014-10-23 16:48:23巨蟹座
日期:2014-10-27 08:21:10申猴
日期:2014-12-08 10:16:282015年辞旧岁徽章
日期:2015-03-03 16:54:15NBA常规赛纪念章
日期:2015-05-04 22:32:03IT运维版块每日发帖之星
日期:2016-01-29 06:20:00
11 [报告]
发表于 2014-11-26 10:45 |只看该作者
可以收到其它的邮件服务器发来的邮件吗?
你的MX有没有设好

论坛徽章:
0
12 [报告]
发表于 2014-11-26 10:54 |只看该作者
我没有设置DNS.在局域网内不搭建DNS也是OK的吧,回复 11# cryboy2001


   

论坛徽章:
0
13 [报告]
发表于 2014-11-26 11:03 |只看该作者
  1. [root@mail new]# pwd
  2. /var/vmail/dktest.com/dktest.com/1235/new
  3.   
复制代码
我在这个目录下找到了我发过来的邮件,邮件内容被加密了,请问是哪里的配置错误导致我不能收到邮件?回复 11# cryboy2001


   

论坛徽章:
26
CU十二周年纪念徽章
日期:2013-10-24 15:41:34技术图书徽章
日期:2014-07-11 16:27:52辰龙
日期:2014-09-04 13:40:43白羊座
日期:2014-09-09 12:51:55双子座
日期:2014-09-26 11:00:042014年中国系统架构师大会
日期:2014-10-14 15:59:00子鼠
日期:2014-10-23 16:48:23巨蟹座
日期:2014-10-27 08:21:10申猴
日期:2014-12-08 10:16:282015年辞旧岁徽章
日期:2015-03-03 16:54:15NBA常规赛纪念章
日期:2015-05-04 22:32:03IT运维版块每日发帖之星
日期:2016-01-29 06:20:00
14 [报告]
发表于 2014-11-26 13:41 |只看该作者
who8383 发表于 2014-11-26 10:54
我没有设置DNS.在局域网内不搭建DNS也是OK的吧,回复 11# cryboy2001


做邮件服务器一定要设dns中的mx。

论坛徽章:
26
CU十二周年纪念徽章
日期:2013-10-24 15:41:34技术图书徽章
日期:2014-07-11 16:27:52辰龙
日期:2014-09-04 13:40:43白羊座
日期:2014-09-09 12:51:55双子座
日期:2014-09-26 11:00:042014年中国系统架构师大会
日期:2014-10-14 15:59:00子鼠
日期:2014-10-23 16:48:23巨蟹座
日期:2014-10-27 08:21:10申猴
日期:2014-12-08 10:16:282015年辞旧岁徽章
日期:2015-03-03 16:54:15NBA常规赛纪念章
日期:2015-05-04 22:32:03IT运维版块每日发帖之星
日期:2016-01-29 06:20:00
15 [报告]
发表于 2014-11-26 14:22 |只看该作者
回复 13# who8383

postfix配置如下:
37.virtual_mailbox_base = /var/vmail

dovecot 配置
11.mail_location = maildir:~/Maildir

你改一下邮件目录位置试试
    mail_location = maildir:/var/vmail/%u


多看看日志,有没有什么提示

论坛徽章:
0
16 [报告]
发表于 2014-11-26 14:42 |只看该作者
   日志里也没看到有什么问题。现在就是有俩个疑惑。1.本域之内的邮件内容为什么是加密的    2. 为何用客户端软件接收不到邮件,但是在虚拟用户目录下可以看到邮件并且邮件正文被base64加密了回复 15# cryboy2001


   

论坛徽章:
26
CU十二周年纪念徽章
日期:2013-10-24 15:41:34技术图书徽章
日期:2014-07-11 16:27:52辰龙
日期:2014-09-04 13:40:43白羊座
日期:2014-09-09 12:51:55双子座
日期:2014-09-26 11:00:042014年中国系统架构师大会
日期:2014-10-14 15:59:00子鼠
日期:2014-10-23 16:48:23巨蟹座
日期:2014-10-27 08:21:10申猴
日期:2014-12-08 10:16:282015年辞旧岁徽章
日期:2015-03-03 16:54:15NBA常规赛纪念章
日期:2015-05-04 22:32:03IT运维版块每日发帖之星
日期:2016-01-29 06:20:00
17 [报告]
发表于 2014-11-26 14:44 |只看该作者
1.本域之内的邮件内容为什么是加密的  
这个加密是很正常的,防止非本用户跳过认证,直接查看

2、看看是不是邮件目录设置不对

论坛徽章:
24
天蝎座
日期:2014-05-13 18:05:59IT运维版块每日发帖之星
日期:2015-11-26 06:20:00操作系统版块每月发帖之星
日期:2015-12-02 14:57:54IT运维版块每月发帖之星
日期:2016-01-07 23:01:56IT运维版块每周发帖之星
日期:2016-01-07 23:04:2615-16赛季CBA联赛之青岛
日期:2016-01-23 07:58:272016猴年福章徽章
日期:2016-02-18 15:30:3415-16赛季CBA联赛之北控
日期:2016-03-23 14:20:06IT运维版块每日发帖之星
日期:2016-04-01 06:20:0015-16赛季CBA联赛之吉林
日期:2016-06-28 13:51:54IT运维版块每日发帖之星
日期:2016-07-01 06:20:00IT运维版块每日发帖之星
日期:2015-11-23 06:20:00
18 [报告]
发表于 2014-11-26 18:42 |只看该作者
回复 10# who8383

查看dovecot配置是不是有问题,检查仔细点。
   

论坛徽章:
0
19 [报告]
发表于 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
20 [报告]
发表于 2014-11-28 15:55 |只看该作者
postfixadmin  能在linux下自动创建邮件目录吗 回复 17# cryboy2001


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

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP