我只是安装了postfix 2.6.6和dovecot邮件服务器。
我有如下所示的main.cf中的auth相关的configuration:
smtpd_tls_cert_file=/etc/httpd/ssl/mail.crt smtpd_tls_key_file=/etc/httpd/ssl/mail.key smtpd_use_tls=yes smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous broken_sasl_auth_clients = yes smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
现在我可以发送和接收来自我的域名和通常在外面的电子邮件,这是很好的。
但是,我发现我可以很容易地发送一封邮件,而不需要使用下面的telnet远程validation,这意味着有人可以很容易地发送垃圾邮件到我的域名。 请帮助我,如果你知道如何禁用这个。
Myhost:~/ z$ telnet mail.example.com 25 Trying 232.96.23.130... Connected to mail.example.com. Escape character is '^]'. 220 mail.example.com ESMTP Postfix ehlo mail.example.com 250-mail.example.com 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-STARTTLS 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN mail from:[email protected] 250 2.1.0 Ok rcpt to: [email protected] 250 2.1.5 Ok data 354 End data with <CR><LF>.<CR><LF> subject:how much dust? fdhjaklf fdsahjk; fdajshk . 250 2.0.0 Ok: queued as 08B2C5883481
通常邮件服务器有两个目的:
如果您只希望使用服务器发送传出邮件,而不接收传入的邮件,则需要更改main.cf中的mydestination参数,并从中删除$mydomain 。 这样它就不会接收任何寄给你的域名的邮件。 在postfix文档站点有更多的信息。