QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1304|回复: 4

[求助]webmail无法发信到外网

[复制链接]
发表于 2006-6-8 06:23:11 | 显示全部楼层 |阅读模式
Apache2 + MySQL + PHP + postfix(虚拟用户)+ Courier-IMAP/POP3 + SquirrelMail

webmail在本域内收发信件一切正常,但是发信到 [email protected] 时squirrelmail提示:
Transaction failed
Server replied: 554 <[email protected]>: Relay access denied.

请问:这是哪里限制了往外发邮件?
附上完整的/etc/postfix/main.cf
inet_interfaces = all
virtual_alias_domains =
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_forwardings.cf mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
发表于 2006-6-8 11:34:00 | 显示全部楼层
发送 mail 时,直接调用 sendmail 程序,看看
回复

使用道具 举报

 楼主| 发表于 2006-6-9 08:31:27 | 显示全部楼层
echo "test" | mail [email protected]

21cn邮箱可以收到邮件。
回复

使用道具 举报

发表于 2006-6-9 17:16:03 | 显示全部楼层
我正是这个意思,叫你的 webmail 直接调用 sendmail 程序
回复

使用道具 举报

 楼主| 发表于 2006-6-10 18:54:21 | 显示全部楼层
gugong老大的意思,我不太明白。难道要修改 squirrelmail 的源代码?

现在的main.cf如下,webmail提示的 Relay 是否就是这里的 relayhost 呢?
# See /usr/share/postfix/main.cf.dist for a commented, more complete version

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

myhostname = debian.example.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = debian.example.com, localhost.example.com, localhost
relayhost =
mynetworks = 127.0.0.0/8
#mailbox_command =
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
virtual_alias_domains =
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_forwardings.cf mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
#home_mailbox = Maildir/
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-2 14:30 , Processed in 0.048961 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表