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.