• No results found

Sending and Receiving Mail

12.2 SMTP server

SMTP server settings protect the server on which Kerio Connect is running from misuse.

Protection of the SMTP server enables users to define who will be allowed to use this server and what actions he/she can perform. This way, the server is protected from being misused. If the SMTP server is available from the Internet (anytime when at least one MX record is directed to it and the port 25 is available for access), any client can connect and use the server to send an email message. Thus the server can be misused to send spam messages. Recipients of such email messages will see your SMTP server as the sender in the source text and might block receiving messages sent from this server. Thus your company might be considered a spam sender and your server can be added to a database of spam servers.

Kerio Connect provides a protection system that enables users to define who will be allowed to send email via this server and where. Anyone can connect to the SMTP server to send messages to local domains. However, only authorized users will be allowed to send email to other domains.

In this section, the delivery parameters can be also set:

Relay Control Tab

Use the Relay control tab to set groups of allowed IP addresses and/or user authentication against SMTP server.

Allow relay only for

Use this option to activate user authentication by IP addresses or usernames and passwords (see below). Generally, authenticated senders can use email messages to any domain via this server, whereas unauthorized users can send messages only to local domains.

Also add all trustworthy servers to this IP group. These servers will not be checked by the SPF and Caller ID modules (for details, see chapter13.5). Trusted servers will not be

12.2 SMTP server

Figure 12.1 Relay Control tab

even checked by SpamAssassin. However, this filter can be enabled by a special option in the Spam Filter section on the Spam Rating tab if necessary (for more information, refer to chapter13.1).

Users from IP address group

Use this option to define a group of IP addresses from which email can be sent to any domain. Use the IP address group menu to choose an item from the list of groups defined in Configuration → Definition → IP Address Groups. Use the Edit button to edit a selected group or to create a new one (see chapter19.1).

Users authenticated through SMTP server for outgoing mail

Users authenticated through SMTP server using a valid username and password will be allowed to send email to any domain. Thus, all users that have their own accounts in Kerio Connect will have this right.

Users authenticated through POP3 from the same IP address

Users authenticated through POP3 (username and password) will be granted relay access from their IP address for a period of time given in the Allow SMTP relay for ... minutes after successful POP3 login field.

Authentication by IP addresses is independent from authentication by usernames; therefore users must meet at least one of these conditions. If both Users from IP address group and

Sending and Receiving Mail

Open relay

In this mode, the SMTP server does not check users who use it to send email. Thus any user can send email messages to any domain.

Warning:

We recommend you not to use this mode if Kerio Connect is available from the Internet (i.e. it uses a public IP address and port 25 is not blocked by afirewall).

If Kerio Connect is available from the Internet and uses a public IP address with port 25 not behind the firewall, it is highly probable that it will be misused to send spam. This could overload your Internet connection. This might also cause that your server will be included in databases of spammer SMTP servers (see below).

Security Options Tab

Apart from completely blocking certain senders Kerio Connect provides options that limit, for example, sending too many messages or opening too many connections (known asDoS attack.

These options can be set in the Security Options section.

Figure 12.2 Security Options — IP address based limits

Max. number of messages per hour...

Maximum count of messages that can be sent from one IP address per hour. This protects the disk memory from overload by too many messages (often identical and undesirable).

Note: Maximum count of messages received from a single IP address is checked always for the last hour. If this option is enabled, any new message sent from the IP address where the limit was exceeded in the recent our is discarded.

Max. number of concurrent SMTP connections...

Maximum number of concurrent TCP connections to the SMTP server from one IP address.

This is a method of protection against DoS attacks (Denial of Service — too many concurrent connections overload the system and no other users can connect to the server).

12.2 SMTP server

Max. number of unknown recipients

Also known as a Directory harvest attack, this condition is met when an application that guesses common usernames of recipients’ fails up to the number of allowed unknown recipients. If this type of protection is enabled, the server sending messages to an unknown recipient is blocked for an hour.

Do not apply these limits to IP address group

Group of IP addresses on which the limitations will not be applied. This rule is often used for groups of local users (see the Relay Control tab). These users send all their outgoing mail through Kerio Connect — the count of messages sent by these users to this server is therefore much higher than the number of messages sent by external users (servers) that use it only to deliver mail to local domains.

It is also recommended to include the secondary SMTP server to the list of allowed IP addresses, because in some cases, its behavior can be similar to that of an attacking server.

Figure 12.3 Security Options — Advanced options

Block if sender’s mail domain was not found in DNS

When a message is received Kerio Connect checks whether the sender’s domain has a record in DNS. If not, the message will be rejected. This feature protects from senders with fictional email addresses.

Note: This function may slow down Kerio Connect (responses of DNS servers may take up to several seconds).

Max. number of recipients in a message

Maximum number of message recipients that will be accepted (in number of Rcpt commands in the SMTP envelope).

Max. number of failed commands...

Spam is often sent by special applications that connect to SMTP servers and ignore its error reports. If this option is enabled, Kerio Connect will close the SMTP connection automatically after the defined number of failed commands has been expired.

Sending and Receiving Mail

Limit maximum incoming SMTP message size to

Maximum size of a message that will be accepted by the SMTP server. This protects the server from being overloaded by large messages, therefore we strongly recommend to activate this option. The 0 value means that no limitation is set. For easy definition you can switch between kilobytes (kB) and megabytes (MB).

Maximum number of accepted Received headers (hops)

This parameter helps the server block messages that have been trapped in a loop.

SMTP Delivery tab

In this section, the delivery parameters can be also set:

Figure 12.4 SMTP Delivery tab

Deliver directly using DNS MX records

Mail will be delivered directly to destination domains using MX records.

Use relay SMTP server

All outgoing mail will be sent via another relay SMTP server.

12.2 SMTP server

SMTP server

DNS name orIP addressof relay SMTP server.

Relay server port

Port where the relay SMTP is running. Typically the standard port 25 is used (this value is also set as Default).

Relay server requires authentication

Use this option if relay server requires authentication of sender (Kerio Connect) using username and password. Specify the User and Password entries.

Authentication

A method used for authentication at the parent server: SMTP AUTH Command or POP3 before SMTP.

First, the user authenticates to the POP3 account at the server. After this authentication the user is known already and they can send email via the SMTP server. Username and password used here will be used to login to the mailbox and no messages can be read.

Therefore you do not need to define mailbox in Configuration → Delivery → POP3 Down-load to send an email message.

Use SSL if supported by remote SMTP server...

When sending a message, SMTP server attempts to use encrypted connection first (SSL). If SSL connection is not supported, unencrypted connection will be used. Thus the maximal possible security of sent messages is ensured.

Queue Options

In this tab, mail queue can be set. It can be viewed in Status → Mail Queue.

Maximum number of delivery threads

Maximum number of delivery threads that will send messages from the queue (maximum count of messages sent at one moment). The value should be chosen with respect to processor capacity and to speed of the Internet connection.

Delivery retry interval

Interval that will be used for repeated retry attempts for sending an email message.

Bounce the message to sender if not delivered in...

If the message is not delivered in the time defined, it will be discarded and its header including DSNwill bounce to the sender. It will be also automatically removed from the queue and no more delivery attempts will be taken by the server.

You can also use preset time units (minutes, hours, days) to specify the interval.

However, these time units will not be considered if the messages are delivered via relay SMTP server.

Sending and Receiving Mail

Figure 12.5 Queue Options

Report language

Language that will be used for error, warning and informative reports (such as information about non-delivered messages, viruses found, subscribing/unsubscribing to/from mailing lists).

Note: Reports are stored in the reports subdirectory of the directory where Kerio Con-nect is installed (UTF-8 coding is used). Administrator can modify individual reports or add a new language report version.

12.3 Aliases

Use aliases to create virtual email addresses. The principle of virtual addresses is best understood through examples:

1. Mr. Smith would like all his messages sent to [email protected] to be stored to the Info public folder. This can be achieved by the following alias:

info → #public/Info

2. Messages sent to invalid addresses (addresses in which the part before @ does not correspond with any user account nor alias) can be delivered to a specified user (typically to the administrator). Use the following alias to achieve this:

* → Admin

If this (or the next) alias is not defined, Kerio Connect returns such messages to their senders as undeliverable.

12.3 Aliases

3. The * symbol is used as a substitution of any number of characters in an alias (e.g.: *sms*, a*00*, etc.). The alias will be applied to all email addresses that conform to this mask.

4. To replace just one symbol or character in an alias, use the ? symbol. (for example, ?ime stands for time, dime, etc.).

5. Messages will be delivered to both addresses at once:

jwayne → info jwayne → jwayne

It is recommended to specify this alias directly in the user account settings (see chapter8.2), because it is more comprehensive.

Each account or group can be associated with any number of aliases. It is also possible to bind a new alias to an alias already existing. If a message is sent to a username, it is marked by a flag so that the aliases not get looped. If such message arrives to the username marked by the flag, it will be stored in the mailbox that belongs to the last unmarked alias:

jwayne → wayne wayne → john.wayne john.wayne → wayne

Note: Aliases can be used also for assigning another email address to a user or a group, or forwarding messages for a user or a group to other addresses. However, it is recommended to specify these settings directly during the process of user definition (see chapter8.2), or group definition (see chapter9.1).

Defining Aliases

To define aliases, use the Accounts → Aliases section.

First you need to choose a domain for which the aliases will be defined. Aliases always relate to one of the local domains. Therefore, you only need to use the local part of the email address (i.e. the part preceding @) in the alias header.

Add the alias by clicking on the Add button. The following dialog window will be displayed:

Sending and Receiving Mail

Alias

A virtual address (e.g. sales or john.wayne).

Character type Description

a-z all lower-case letters except special characters (diacritics) A-Z all upper-case letters except special characters (diacritics)

0-9 all numbers

Table 12.2 Symbols allowed in alias name

Description

Text description of the alias. May be left blank.

Deliver To

Where messages to this address will be sent to. Select the place where the messages will be stored:

Email address — an email address. Click Select to select a user or a group from the list.

Public folder — name of the public folder in this format: #public/Folder. This item is active only in case at least one public folder of Mail type has been created.

The same dialog window will be displayed by clicking on the Edit button. Remove the alias using the Remove button.

Alias Check

When creating more complex aliases (multiple aliases), it is easy to make mistakes (e.g. by mistyping a name). Kerio Connect has an Alias Check feature that displays a list of local accounts and external addresses to which the email will be delivered.

Use the Zkontrolovat adresu button to check aliases. Enter the address that you would like to run a check on (if an alias is selected in a list, it will be displayed as a choice). After the check has been performed, the result is displayed (i.e. the list of addresses to which the alias will deliver messages).