- 论坛徽章:
- 0
|
dovecot+postfix+postfixadmin:
dovecot mail_location = maildir:/var/mailbox/%d/%n
1)main.cf :
home_mailbox = :Maildir/
virtual_transport = virtual
#=====================VritualMailboxsettings======================
virtual_mailbox_base = /var/mailbox/
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_alias_domains =
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_uid_maps = static:12345
virtual_gid_maps = static:12345
virtual_transport = virtual
#====================QUOTA=====================
message_size_limit = 14336000
virtual_mailbox_limit = 20971520
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later.
virtual_overquota_bounce = yes
#====================SASL========================
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = /var/run/dovecot/auth-client
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks,
smtpd_sals_local_domain,
reject_invalid_hostname,
reject_invalid_hostname,
reject_non_fqdn_hostname,
reject_unknown_sender_domain,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
reject_unknown_recipient_domain,
reject_unauth_pipelining,
reject_unauth_destination
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_banner=$myhostname ESMTP
--------------------------------------------------
2)mysql_virtual_domains_maps.cf :
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = domain
select_field = description
where_field = domain
----------------------------------------
3)mysql_virtual_alias_maps.cf:
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = alias
select_field = goto
where_field = address
----------------------------------------
4)mysql_virtual_mailbox_limit_maps.cf :
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = description
where_field = domain
-------------------------------------------
5)mysql_virtual_mailbox_maps.cf :
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = maildir
where_field = username |
|