邮件服务器 Postfix+ Cyrus-SASL+cyrus-IMAPD+日常维护
2011-12-06 19:52
701 查看
一,安装Postfix
postfix-2.6.5.tar.gz
postfix-2.6.5-vda-ng.patch.gz
二,rpm包安装Cyrus-SASL+cyrus-IMAPD
三,Postfix基本配置
[root@Postfix ~]# cat /etc/postfix/main.cf
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = localhost, localhost.$mydomain, $myhostname, $mydomain
mydomain = example.com
myhostname = example.com
mynetworks = 111.111.111.111/28 , 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
relay_domains = example.com,163.com,gmail.com,qq.com,yahoo.com.cn,126.com,hotmail.com,sina.com,sohu.com,tom.com,yahoo.com,189.com,baidu.com,qq163.com
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 550
smtpd_client_connection_count_limit = 1024
smtpd_client_connection_rate_limit = 5
#Cyrus-SASL
smtpd_client_restrictions = permit_sasl_authenticated
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_invalid_hostname
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
#Cyrus-imapd
mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp
readme_directory = no
sample_directory = /etc/postfix
#data_directory = /var/lib/postfix
四,用户邮箱管理
[root@Postfix ~]# cyradm -u cyrus localhost
IMAP Password:
localhost.localdomain> cm user.test
localhost.localdomain> cm user.test.Send
localhost.localdomain> cm user.test.Trash
localhost.localdomain> cm user.test.Drafts
localhost.localdomain> sq user.test 51200 //(kb,50M)设置配额:
quota:51200
五,开机自动启动
六,邮箱日常维护
新建邮箱设置
1,建账户
[root@images ~]# useradd -g postfix -M -s /sbin/nologin test
[root@images ~]# passwd test
2,建邮箱
[root@images ~]# cyradm -u cyrus localhost
IMAP Password:
localhost.localdomain> cm user.test
localhost.localdomain> cm user.test.Send
localhost.localdomain> cm user.test.Trash
localhost.localdomain> cm user.test.Drafts
localhost.localdomain> sq user.test 51200
quota:51200
3,删邮箱
[root@images ~]# cyradm -u cyrus localhost
IMAP Password:
localhost.localdomain> dm user.test
deletemailbox: Permission denied
localhost.localdomain> setacl user.test cyrus all
localhost.localdomain> dm user.test
4,删账户
[root@images ~]userdel test
5,管理
看邮箱列表
[root@images user]# postqueue -p
(host mail.example.com[/var/lib/imap/socket/lmtp] said: 452 4.2.2 Over quota (in reply to RCPT TO command))
test@example.com
解决邮箱超出
[root@images user]# cyradm -u cyrus localhost
IMAP Password:
localhost.localdomain> lq user.test
STORAGE 53508/51200 (104.5078125%)
localhost.localdomain> sq user.test 102400
quot: command not found
localhost.localdomain> lq user.test
STORAGE 53508/102400 (52.25390625%)
localhost.localdomain> quit
手动重新发送
[root@images user]# postqueue -f
本文出自 “jerrymin” 博客,请务必保留此出处http://jerrymin.blog.51cto.com/3002256/735735
postfix-2.6.5.tar.gz
postfix-2.6.5-vda-ng.patch.gz
二,rpm包安装Cyrus-SASL+cyrus-IMAPD
三,Postfix基本配置
[root@Postfix ~]# cat /etc/postfix/main.cf
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = localhost, localhost.$mydomain, $myhostname, $mydomain
mydomain = example.com
myhostname = example.com
mynetworks = 111.111.111.111/28 , 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
relay_domains = example.com,163.com,gmail.com,qq.com,yahoo.com.cn,126.com,hotmail.com,sina.com,sohu.com,tom.com,yahoo.com,189.com,baidu.com,qq163.com
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 550
smtpd_client_connection_count_limit = 1024
smtpd_client_connection_rate_limit = 5
#Cyrus-SASL
smtpd_client_restrictions = permit_sasl_authenticated
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_invalid_hostname
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
#Cyrus-imapd
mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp
readme_directory = no
sample_directory = /etc/postfix
#data_directory = /var/lib/postfix
四,用户邮箱管理
[root@Postfix ~]# cyradm -u cyrus localhost
IMAP Password:
localhost.localdomain> cm user.test
localhost.localdomain> cm user.test.Send
localhost.localdomain> cm user.test.Trash
localhost.localdomain> cm user.test.Drafts
localhost.localdomain> sq user.test 51200 //(kb,50M)设置配额:
quota:51200
五,开机自动启动
六,邮箱日常维护
新建邮箱设置
1,建账户
[root@images ~]# useradd -g postfix -M -s /sbin/nologin test
[root@images ~]# passwd test
2,建邮箱
[root@images ~]# cyradm -u cyrus localhost
IMAP Password:
localhost.localdomain> cm user.test
localhost.localdomain> cm user.test.Send
localhost.localdomain> cm user.test.Trash
localhost.localdomain> cm user.test.Drafts
localhost.localdomain> sq user.test 51200
quota:51200
3,删邮箱
[root@images ~]# cyradm -u cyrus localhost
IMAP Password:
localhost.localdomain> dm user.test
deletemailbox: Permission denied
localhost.localdomain> setacl user.test cyrus all
localhost.localdomain> dm user.test
4,删账户
[root@images ~]userdel test
5,管理
看邮箱列表
[root@images user]# postqueue -p
(host mail.example.com[/var/lib/imap/socket/lmtp] said: 452 4.2.2 Over quota (in reply to RCPT TO command))
test@example.com
解决邮箱超出
[root@images user]# cyradm -u cyrus localhost
IMAP Password:
localhost.localdomain> lq user.test
STORAGE 53508/51200 (104.5078125%)
localhost.localdomain> sq user.test 102400
quot: command not found
localhost.localdomain> lq user.test
STORAGE 53508/102400 (52.25390625%)
localhost.localdomain> quit
手动重新发送
[root@images user]# postqueue -f
本文出自 “jerrymin” 博客,请务必保留此出处http://jerrymin.blog.51cto.com/3002256/735735
相关文章推荐
- Postfix 日常维护队列管理[邮件服务器维护]
- Postfix+Cyrus-SASL+dovecot搭建POP3/SMTP邮件服务器
- postfix 日常维护队列管理[邮件服务器维护]
- postfix+dovecot+Cyrus-sasl+postfixadmin 邮件服务器设置
- Postfix 日常维护队列管理[邮件服务器维护
- Postfix+Cyrus-SASL+dovecot搭建POP3/SMTP邮件服务器
- postfix+cyrus-imapd+Squirrelmail实现邮件服务器
- Centos7搭建邮件服务器-Postfix+Cyrus-sasl+Courier-authlib+Dovecot+ExtMail+Centos7
- Centos7下postfix+Dovecot+cyrus-sasl搭建个人局域网邮件服务器(测试使用)
- Postfix + Cyrus-IMAP + Cyrus-SASL + MySQL + IMP
- 邮件服务器postfix+cyrus
- Ubuntu 12.04安装配置Postfix dovecot cyrus sasl(mysql虚拟用户)
- postfix安装(四)-- cyrus-sasl安装
- RedHat AS 4.1 + Postfix + Dovecot + Cyrus-sasl 安装笔记
- Postfix邮件系统安装与配置:Postfix,Cyrus-IMAP,Cyrus-sasl,Dovecot和SPF
- dnsmasq+postfix+sasl+tls+dovecot(邮件服务器)
- 在postfix中实现基于cyrus-sasl的SMTP认证
- Postfix+Cyrus-SASL+dovecot搭建POP3/IMAP/SMTP邮件服务器
- Postfix + Cyrus-IMAP + Cyrus-SASL + MySQL + IMP
- CentOS+postfix+ExtMail+amavisd-new+Spam_Locker+DSpam配置指南:九、配置Cyrus-SASL