554 Relay access denied 尝试从Outlook客户端发送电子邮件时出现此错误.
我可以阅读收到的邮件,但无法发送.
如果我连接telnet localhost 25我可以发送外部电子邮件,但与Outlook客户端它不起作用.
这是我的postfix和dovecot配置:
postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
mailbox_size_limit = 0
mydestination = localhost
myhostname = mail.mydomain.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = …Run Code Online (Sandbox Code Playgroud) 我刚刚在生产服务器上上传了我的网站,我收到错误:
Warning: mysql_real_escape_string(): Access denied for user 'www-data'@'localhost' (using password: NO) in file.php on line 106
Warning: mysql_real_escape_string(): A link to the server could not be established in file.php on line 106
Run Code Online (Sandbox Code Playgroud)
函数的代码是
include('./../inc/conn.php');
if(isset($_GET['query']))$q = clean($_GET['query']);
function clean($var){
return(mysql_real_escape_string($var));
}
Run Code Online (Sandbox Code Playgroud)
inc/conn.php的代码:
try {
$dns = 'mysql:host=localhost;dbname=mydatabase';
$user = 'root';
$pw = 'rootpw';
$options = array(
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8",
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
);
$db = new PDO( $dns, $user, $pw, $options );
} catch ( Exception $e ) …Run Code Online (Sandbox Code Playgroud) apache ×1
dovecot ×1
function ×1
linux ×1
mail-server ×1
mysql ×1
php ×1
postfix-mta ×1
smtp ×1
warnings ×1