- 论坛徽章:
- 0
|
邮箱路径问题=====非常奇怪
postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
home_mailbox = Maildir/ //使用Maildir格式
html_directory = no
inet_interfaces = all
mail_owner = postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = localhost.localdomain
myhostname = vmail
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
sendmail_path = /usr/sbin/sendmail.postfix
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, rej
ect_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_domains =
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/spool/mail/vhosts
virtual_mailbox_domains = hash:/etc/postfix/vdomains
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 100
virtual_transport = virtual
virtual_uid_maps = static:5000
++++++++++++++++++++++++++++++++++++
dovecot -n
# /etc/dovecot.conf
base_dir: /var/run/dovecot/
protocols: pop3 pop3s imap imaps
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
valid_chroot_dirs: /var/spool/vmail
mail_location: maildir:~/Maildir //收邮件目录
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
pop3_uidl_format(default): %08Xu%08Xv
pop3_uidl_format(imap): %08Xu%08Xv
pop3_uidl_format(pop3): %v
auth default:
passdb:
driver: pam
passdb:
driver: passwd-file
args: /etc/postfix/passwd
userdb:
driver: passwd
userdb:
driver: passwd-file
args: /etc/postfix/users
socket:
type: listen
client:
path: /var/spool/postfix/private/auth
mode: 432
user: postfix
group: postfix
master:
+++++++++++++++++++++++++++++++++++++++++++++++++
cat adddovecotuser //创建生成用户脚本文件
#!/bin/bash
echo "$1" > /tmp/user
user=`cat /tmp/user | cut -f1 -d "@"`
domain=`cat /tmp/user | cut -f2 -d "@"`
echo "$user@$domain::5000:5000::/var/spool/mail/vhosts/$domain/$user/" >> /etc/postfix/users
# Create the needed Maildir directories
#mkdir /var/spool/mail/vhosts/$domain/$user/
#chown 5000:5000 /var/spool/mail/vhosts/$domain/$user/
# To add user to Postfix virtual map file and relode Postfix
echo $1 $domain/$user/Mailidr/ >> /etc/postfix/vmailbox
postmap /etc/postfix/vmailbox
#postfix reload
cat users
test03@try.com.cn::5000:5000::/var/spool/mail/vhosts/try.com.cn/test03/
test04@try.com.cn::5000:5000::/var/spool/mail/vhosts/try.com.cn/test04/
test05@try.com.cn::5000:5000::/var/spool/mail/vhosts/try.com.cn/test05/
test08@try.com.cn::5000:5000::/var/spool/mail/vhosts/try.com.cn/test08/
test09@try.com.cn::5000:5000::/var/spool/mail/vhosts/try.com.cn/test09/
test10@try.com.cn::5000:5000::/var/spool/mail/vhosts/try.com.cn/test10/
cat vmailbox
test03@try.com.cn try.com.cn/test03/Maildir/
test04@try.com.cn try.com.cn/test04/Maildir/
test05@try.com.cn try.com.cn/test05/Maildir/
test08@try.com.cn try.com.cn/test08/Maildir/
test09@try.com.cn try.com.cn/test09/Maildir/
test10@try.com.cn try.com.cn/test10/Maildir/
===============================================
手动添加用户信息,收发邮件正常。
利用adddovecotuser命令生成用户后,发邮件时在::/var/spool/mail/vhosts/try.com.cn/用户/下生成Maildir,收邮件时又生成另外一个Maildir,导致收发邮件不在同一文件里,所以发出的邮件收不到,日志文件也不报错,
这到底是什么原因????????????
各位,帮俺分析一下啊,不胜感激。 |
|