Anti-spam can be implemented by checking the source IP address of the sender's SMTP server or by filtering fields in the MIME header.
Junk mails are unsolicited mails sent to the inboxes of users. Massive junk mails bring about problems as follows:
When the FW functions as a security gateway, all external mails need to be forwarded by the FW. The FW effectively filters out junk mails by checking the IP address of the sender's SMTP server or by filtering fields in the MIME header.
According to Mechanism for Sending and Receiving Email, no authentication is required during mail transmission between the PC and the mail server or between the mail servers at both end. Therefore, attackers can use any mail server available on the Internet to send junk mails.
To filter out as many junk mails as possible, the FW performs the legitimacy check on the IP addresses of the sender SMTP servers, as shown in Figure 1.
The FW authenticates the IP address of the sender's SMTP server as follows:
The RBL is a large online database maintained by an anti-spam organization. The database lists the IP address of the SMTP servers that frequently forward junk mails.
Figure 2 shows the RBL query mechanism.
To use RBL blacklist, the administrator must configure the DNS server, RBL service name, and reply code on the FW. For details on the configuration, see Configuring Anti-Spam Based on the IP Address of the SMTP Server.
Multipurpose Internet Mail Extensions (MIME) represents universal mail technology specifications for Internet email. The basic information, format information, and coding mode of an MIME mail are recorded in the fields of the MIME header. MIME defines a large number of fields that store various mail-related information. For example, the sender's name and mail address are stored in the From field, the recipient's mail address is stored in the To field, and the mail subject is stored in the Subject field.
Generally, a junk mail is sent using a non-standard client. Compared with a mail sent by a standard client, fields in the MIME header of a junk mail often contain certain characteristics. Therefore, filtering fields in the MIME header can implement anti-spam. The basic principle is as follows: After receiving a mail sent or forwarded by the client, the FW parses and extracts field names and values in the MIME header, and matches the extracted field names and values with the field filtering rules of the MIME header configured by the user. If the field names and values match the rules, the FW considers the mail as a junk mail and processes the mail according to the action configured by the user. For the configuration procedure, see Configuring Anti-Spam Based on MIME Headers.