QMail to prevent misuse of the mail relay complete solution

Source: Internet
Author: User
Tags mail net domain domain name qmail

Software Environment: redhat6.2 Qmail1.3

Hardware environment: HP Netserver E60 128M Internal deposit card

1. What is mail relay and why should it be prevented from being abused?

Once a qmail server is set up, the server will have one or more domain names (which should appear in local or viritualdomains files), and QMAIL-SMTPD will listen for Port 25th and wait for a remote request to send mail. Other mail servers on the network, or MUA (mail User Agent, such as Outlook Express, Foxmail, and so on) that send messages are connected to port 25th on the QMail server, requesting mail to be sent. The SMTP session process typically starts with the remote identity itself, as follows:

HELO remote.system.domainname
 250 Qmailserver.domain
 MAIL FROM:user@somewherer.net
 250 OK
 RCPT TO: user1@elsewhere.net

The domain name in the recipient user1@elsewhere.net of the message is not necessarily a local domain name, and the local system may have two answers. In the first case, the local qmail server is allowed to relay, it receives and agrees to send a message that the destination address is not local, and the second does not receive non-local mail.

QMail has a configuration file named Rcpthosts (the file name originates from the RCPT TO command), which determines whether to accept a message. The message is accepted only if the domain name of the recipient address in a RCPT TO command exists in the rcpthosts file, or the message is rejected. If the file does not exist, all messages will be accepted. When a mail server forwards (relay) all messages, regardless of the recipient of the message and the recipient of the message, the mail server is referred to as open forwarding (relay). When the QMail server is not rcpthosts, it is open forwarded.

If your system administrator sets your mail server to open relay, will cause some spammers to use your mail server as a relay station for forwarding spam messages, which will cause spammers to target you, potentially causing retaliatory mail bombs; spam can also consume a lot of your resources, Occupy your bandwidth. The worse thing may be that your name may be blacklisted and become the target of a boycott by other recipients, and your email will be rejected by these recipients.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.