分类: LINUX
2008-04-13 18:45:21
postfix SMTP本地域->To->本地域的邮件伪造
在main.cf增加以下参数:
#列出本地用户的列表,以便验证 From: 本地域 To: 本地域
smtpd_sender_login_maps =
mysql:/etc/postfix/mysql_virtual_sender_maps.cf,
mysql:/etc/postfix/mysql_virtual_alias_maps.cf
smtpd_reject_unlisted_sender = yes
#本地域向本地域发信也需要SMTP身份验证
smtpd_sender_restrictions =
reject_sender_login_mismatch,
reject_authenticated_sender_login_mismatch,
reject_unauthenticated_sender_login_mismatch
mysql_virtual_alias_maps.cf
user = vmail
password = vmailpasswd
hosts = 127.0.0.1
port = 3306
dbname = vmail
table = alias
select_field= goto
where_field = address
additional_conditions = AND active='1'
mysql_virtual_sender_maps.cf
user = vmail
password = vmailpasswd
hosts = 127.0.0.1
port = 3306
dbname = vmail
table = mailbox
select_field = username
where_field = username
additional_conditions = AND active = '1'