- 论坛徽章:
- 0
|
我建立了staff@ibaihe.com的一个别名
我想只允许域内root@ibaihe.com才能发送到staff@ibaihe.com这个别名其他用户都不能发到到这个别名
我照着论坛里的帖子配置完以后还是能正常发送,往大家帮忙看看到底是哪里设置的不对!谢谢!
我的设置方法如下:
1)在main.cf里定义如下的smtpd_restriction_classes:
# senders
smtpd_restriction_classes = local_only
local_only = check_sender_access hash:/etc/postfix/local_domains, reject
2)将main.cf里的smtpd_sender_restrctions定义为:
smtpd_sender_restrictions =
check_recipient_access hash:/etc/postfix/local_recipient
3)vi /etc/postfix/local_recipient:
staff@ibaihe.com local_only
4)vi /etc/postfix/local_domains:
root@ibaihe.com OK
5)为3,4的文件建立hash:
postmap hash:/etc/postfix/local_recipient
postmap hash:/etc/postfix/local_domains
我的配置如下
broken_sasl_auth_clients = yes
command_directory = /usr/local/postfix/sbin
config_directory = /etc/postfix
content_filter = amavisfeed:[127.0.0.1]:10024
daemon_directory = /usr/local/postfix/libexec
debug_peer_level = 2
html_directory = /var/www/postfix_html
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/postfix/man
message_size_limit = 14336000
mydestination = $myhostname localhost localhost.$mydomain
mydomain = ibaihe.com
myhostname = mail.ibaihe.com
mynetworks = 192.168.0.0/24, 127.0.0.0/24
myorigin = ibaihe.com
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
recipient_delimiter = +
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_banner = Welcome to our $myhostname ESMTP,Warning: Version not Available!
smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/local_recipient check_sender_access hash:/etc/postfix/local_senders permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unauth_destination, reject_unauth_pipelining, reject_invalid_hostname
smtpd_restriction_classes = local_only
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
unknown_local_recipient_reject_code = 550
virtual_alias_domains =
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:1001
virtual_mailbox_base = /var/mailbox
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 20971520
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_transport = maildrop
virtual_uid_maps = static:1001
我的配置环境和使用软件是
linux as4
用的软件包为
Postfix-2.4.5
Mysql-5.0.45
Sasl-2.1.22
DB-4.5.20
Openssl-0.98e
httpd-2.2.4
Php-5.2.3
courier-authlib-0.59.3
courier-imap-4.1.3
Extmail-1.0.2
Extman-0.2.2
maildrop-2.0.4
clamav-0.91.2
amavisd-new
SpamAssassin-3.2.3
别名是我用extman来建立的 |
|