Previous | Contents | Index |
SPAM mailing lists contain thousands of addresses and sending a SPAM takes a great deal of time. Therefore, SPAMmers prefer to use hosts other than their own to send the message. SPAMmers routinely use unaware Internet hosts as route-through hosts for their SPAM. The victim is a host not protected by a firewall or by SPAM-aware software. The SPAMming SMTP client software connects to the victim SMTP server host and issues multiple RCPT TO commands, which may number in the thousands. The SPAMing SMTP client then sends the message to the victim host and closes the link. It is now left to the victim host to do the real work of relaying the SPAM to the thousands of recipients.
Fortunately, the route-through attack can often be detected. Most or all of the recipients of the SPAM will not be within the victim's own domains or IP networks. They will be somewhere outside in the expanse of the Internet. You must trap for the situation where an unknown SMTP client is trying to use your system to relay mail to recipients in domains outside its own. If you specify the "known world" and the "unknown world," the SMTP server can detect this type of SPAM attack.
SMTP allows you to configure two lists:
Together, these lists define the "known good world" to the SMTP server for relay purposes. They are used to prevent SPAM routing as follows:
If neither Good-Clients nor Relay-Zones is configured, relay checking depends on the setting of the SMTP configuration relay flag. If the relay flag is set, all relays are allowed; if it is not set, relays are not allowed.
To use Good-Clients and Relay-Zones lists, you must still set the SMTP configuration relay flag. Use the following command:
TCPIP> SMTP SET CONFIGURATION/OPTION=RELAY |
Although the configuration of both Good-Clients and Relay-Zones at the same time makes sense for most configurations, it is not required that both be configured. If a Relay-Zones list is specified without a Good-Clients list, relay checking depends on the setting of the relay flag. Information in the Relay-Zones list is ignored.
If you specify a Good-Clients list but no Relay-Zones list, the host
will relay mail from SMTP clients matching the Good-Clients list but
will not relay any mail from unknown SMTP client hosts. The host will
accept mail only from an unknown SMTP client host if it is local mail
(mail destined to the local host or a host listed in the local aliases
list). If you want the host to accept relay mail from unknown SMTP
client hosts, you must specify Relay-Zones or enable Relay-Based-On-Mx
(described in Section 17.6.3.3).
17.6.3.1 Specifying the Good-Clients List
The Good-Clients list is a comma-separated list of clients, specified as one of the following:
To enter an IP network, use the n.n.n.n/m syntax, where n.n.n.n is the IP network and m is the number of bits in the subnet mask. For example:
Good-Clients: 1.2.0.0/16, 2.3.0.0/16, 2.3.4.5, relay.abc.com |
This Good-Clients list contains two IP networks (1.2.0.0 and 2.3.0.0),
an IP address (2.3.4.5), and a DNS entry (
relay.abc.com
). An entry that does not follow the standard IP address or network
format is assumed to be a DNS entry.
17.6.3.2 Processing DNS Entries in the Good-Clients List
The SMTP server uses the Good-Clients list to match the IP addresses of SMTP clients. Therefore, entries are stored internally as IP addresses. DNS hostname and MX domain entries are stored as IP addresses, determined by the following process:
For configurations where the generic mail server name does not have an associated DNS host name, the SMTP server uses the MX records, which specify mail relay hosts. The following example demonstrates this configuration:
TCPIP> show host relay.abc.com %TCPIP-W-NORECORD, information not found -RMS-E-RNF, record not found TCPIP> show mx relay.abc.com BIND MX database Server: 1.2.3.4 host.abc.com Gate address Preference Gate name 1.3.4.5 100 mail11.abc.com 1.3.5.6 100 mail13.abc.com 2.4.5.6 200 mail2.abc.com 2.4.5.7 200 mail1.abc.com 3.4.5.6 300 mail21.abc.com 3.4.6.7 300 mail12.abc.com |
To include the addresses listed as MX gateways in this example, enter
relay.abc.com
in the Good-Clients list.
17.6.3.3 Mail Relay to MX Gateways
You can configure the SMTP server to relay mail from an unknown SMTP client to a domain that does not match the entries Relay-Zones but that has an MX record naming the local host as an MX gateway. To enable this feature, set the Relay-Based-On-Mx option to TRUE in SMTP.CONFIG.
For example, the Relay-Zones list is not specified on example host
VMShost.abc.com
. When an unknown host tries to relay mail to
podunk.def.com
through VMShost, and the Relay-Based-On-Mx option is enabled, the SMTP
server on VMShost searches for MX records for
podunk.def.com
. If one of PODUNK's MX records lists VMShost as the MX gateway, the
relay is accepted, even though the SMTP client is unknown and the RCTP
TO address did not match the Relay-Zones list.
17.6.3.4 Specifying the Relay-Zones List
The Relay-Zones list specifies the domains to which the SMTP server will relay mail from unknown SMTP clients. Do not use wildcards in the entries in this list; wildcarding is implicit (that is, *.domain is implied). For example:
Relay-Zones: def.com, abc.com, company.com |
This example specifies the relay of mail from unknown SMTP clients to
any host within the
def.com
,
abc.com
, or
company.com
domain. Because of implied wildcarding, domains like
VMShost.abc.com
match against this list.
17.6.3.5 Rejecting Route-Through Attempts
If the SMTP server does not resolve the a route-through attempt using
the Good-Clients list and the Relay-Zones list, it rejects the RCPT TO
command. It allows an SMTP client to attempt route-through twice; if a
third attempt is made, the SMTP server rejects the RCPT TO command,
disconnects the link, and reports a SPAM event. For more information
about SPAM event reporting, see Section 17.6.8.
17.6.3.6 Examples of Specifying Good-Clients and Relay-Zones
In the following examples, host.abc.com is the host, and Good-Clients and Relay-Zones lists are configured as follows:
Good-Clients: 1.2.0.0/16, 2.3.0.0/16, relay.abc.com Relay-Zones: def.com, abc.com, company.com |
The Good-Clients list specifies clients whose IP addresses are in the 1.2 or 2.3 subnets or whose IP addresses match the relay.abc.com .
The following examples assume that host.abc.com is not protected by a firewall and has direct Internet connectivity.
<<<RCPT TO:<jones@someplace.else.com> >>>550 User not local, Relay disabled. |
You can configure the SMTP server to automatically reject any mail transactions with specified SMTP clients. To enable this feature, configure the Bad-Clients list in SMTP.CONFIG. The syntax of the Bad-Clients list is the same as the Good-Clients list. For example:
Bad-Clients: 1.2.3.5, 100.101.102.103 |
If Bad-Clients is configured, the SMTP server checks the IP address of
the client against the list. If a match occurs, the SMTP client is
considered "known bad;" the server sends a failure message to
the client and then disconnects the link.
17.6.4.1 Resolving Conflicts between Bad-Clients and Good-Clients
The Bad-Clients and Good-Clients lists are not mutually exclusive. If an SMTP client's IP address may be resolved in both lists, the entry that most closely matches the client's IP address is used.
For example, the following lists are configured:
Bad-Clients: 1.0.0.0/8 Good-Clients: 1.2.3.6 |
When an SMTP connection comes in from IP address 1.2.3.6, which is in the 1.0.0.0 subnet, the client may be considered a known bad client. But because the specific IP address is specified in the Good-Clients list, the message is accepted.
In a case where the exact IP address is specified in both the
Good-Clients list and the Bad-Clients list, the SMTP server accepts the
message.
17.6.5 Real-Time Black Hole Lists (RBL)
To prevent SPAM route-through from clients dialed through an ISP and connecting directly to the destination hosts, the Internet community maintains a list of known SPAMming IP addresses at domain rbl.maps.vix.com . This is called the Realtime Blackhole List (RBL) and contains DNS A records.
To determine whether a specific IP address is in the RBL list, perform these steps:
For example, to check the IP address of 2.2.3.5, do a name lookup of 5.3.2.2.rbl.maps.vix.com . If the query returns something, then IP address 2.2.3.5 is in the rbl.maps.vix.com SPAMmer list. All RBLs are implemented this way.
To take advantage of the RBL, configure the RBLs list in SMTP.CONFIG. The RBLs configuration option lists the domains providing RBL services. You can specify a list of RBLs, thereby accommodating individual RBLs and additional Internet-provided RBLs along with the current one.
For example:
RBLs: rbl.maps.vix.com, rbl.ourcompany.com |
If the SMTP server matches the IP address of the client with an entry in any of the RBLs in the list, the server sends a failure message to the client and disconnects the link.
If a client IP address matches one in the Good-Clients list, the
message is accepted; the SMTP server does not check the RBLs.
17.6.5.1 Using Other RBL Lists
Other lists serve similar functions to the RBL list. For example:
http://maps.vix.com |
If you include relays.orbs.org in the RBLs list, you will not receive mail from any host IP address in the ORBS list. This could prevent legitimate mail from coming in. |
http://www.orbs.org |
You can configure SMTP to translate the client's IP address to a host
name, and to disconnect the link if no host name exists. To enable this
feature, set the Reject-Unbacktranslatable-IP option in SMTP.CONFIG.
Translation is not performed if the SMTP client's IP address matches an
entry in the Good-Clients list.
17.6.7 Blocking Mail from Specified Senders
You configure SMTP to reject mail based on the address of the sender. The sender's address is specified in the MAIL FROM command. (The terms "sender address" and "MAIL FROM address" are synonymous.) To specify sender addresses from whom mail will always be rejected, include the Reject-Mail-From list in the SMTP.CONFIG file.
The Reject-Mail-From list includes wildcarded patterns that are checked against the sender address. If the SMTP server matches the sender address against a pattern in the Reject-Mail_From list, the MAIL FROM command is rejected and the link is disconnected. Wildcarded patterns may include the standard asterisk (*) and percent sign (%) wildcard characters.
For example:
Reject-Mail-From: *.xyz.com, known.spammer@*, *the_internet* |
To specify hosts from which to allow mail, even if the address matches that specified in the Reject-Mail-From list, include them in the Accept-Mail-From list in SMTP.CONFIG.
The Accept-Mail-From list includes wildcarded patterns that are checked against the sender address. If the SMTP server finds that the MAIL FROM address matches an entry in the Reject-Mail-From list, it then checks the Accept-Mail-From list also. You can use this list to allow mail from legitimate senders in the domains listed in the Reject-Mail-From list.
For example:
Accept-Mail-From: *@notabadguy.xyz.com, the_internet_news@somehwere.com |
In this example, the entry the_internet_news@somehwere.com allows mail from the sender address the_internet_news@somehwere.com , even though it matches the entry *the_internet* from the Reject-Mail-From list. Likewise, it accepts mail from jones@notabadguy.xyz.com , even though it matches the entry *.xyz.com in the Reject-Mail-From list.
In addition to the Accept-Mail-From list, you can specify the following configuration options in SMTP.CONFIG to allow mail from senders in the Reject-Mail-From list:
MAIL FROM:<somebody> MAIL FROM:<somebody@someplace> |
Accept-Unqualified-Senders: TRUE |
Accept-Unresolvable-Domains: TRUE |
Whenever the TCP/IP Services SMTP server disconnects a link with a
client, it generates an event message. You can control the way events
are handled using the procedures in the following sections.
17.6.8.1 Reporting SPAM Events
You can customize the SMTP server to report a SPAM event in the following ways. The SMTP server can:
To configure the way SMTP reports the event, use the SPAM-Action field in SMTP.CONFIG. The legal values are:
You can specify multiple values for the SPAM-Action field. For example:
SPAM-Action: OPCOM, ACCOUNTING |
This example causes both OPCOM and accounting messages to be sent for each SPAM event. To disable SPAM event reporting, enter a value of NONE for SPAM-Action in SMTP.CONFIG, as follows:
SPAM-Action: NONE |
When the SMTP server disconnects the link with the client because of one of the antiSPAM checks, it sends a message back to the client. The text of the message is controlled by the Security field in SMTP.CONFIG. The legal values for this field are:
You can specify the rejection text message to be sent to the client. The field names for these options end in "-Text", and the values for them must be a single line of text. These fields override the default text associated with the specific SPAM event.
The following are the fields and default messages for the SECURE option:
The following are the fields and default messages for the FRIENDLY option:
You can change one or more of the default messages by including the field and your message for a value. This will override the default setting for that field. For example:
Unbacktranslatable-IP-Text: Your IP address is unbacktranslatable. SPAMMER! |
Previous | Next | Contents | Index |