Jump to:navigation, search
Wiki





notempty
Dieser Artikel bezieht sich auf eine nicht mehr aktuelle Version!

notempty
Der Artikel für die neueste Version steht hier

notempty
Zu diesem Artikel gibt es bereits eine neuere Version, die sich allerdings auf eine Reseller-Preview bezieht





































To include all senders of an e-mail domain in the whitelist, this entry is entered as Regular expression: »/.*@ttt-point\.de/}}}

































































































































































De.png
En.png
Fr.png






Configuration of the mailrelay
Last adaptation to the version: 12.2.2
New:
  • Adding headers for greylisting can be disabled
notempty
This article refers to a Resellerpreview

11.8.8 11.8.4 11.8.2 11.8 11.7


Configuration of the Mailrelay

The Securepoint UTM appliance can receive emails using the mailrelay and forward them to a mail server in the internal network. The mail relay checks the received emails and divides them into an appropriate category. Based on the category, it is decided whether an email is forwarded to the internal mail server or not.

To protect against spam or to relieve the [Mailfilter] further options can be configured. More than 90% of spam does not come from regular mail servers, but rather from private and work computers compromised by viruses and Trojans. On the other hand, checking target email addresses, greylisting and the greeting pause have proven to be effective functions.


Preconditions

Settings on the provider side

In order to ensure a smooth participation in the mail traffic, some conditions must be fulfilled:

  • A fixed IP address.
  • An A record on the DNS server of the provider that resolves to this IP (e.g. mail.ttt-point.de).
  • An MX record that determines the address at which the mail server of a domain can be reached (e.g. mail.ttt-point.de).
  • A PTR record that resolves the fixed IP back to the MX record (reverse DNS).

These are all settings that have to be made by the provider and NOT on the Securepoint Appliance!

Note: Since a certain amount of storage space must be available for rejected mails or mails that could not yet be delivered to the internal mail server, the hardware recommendations should be considered without fail!

Set of rules

Port filter rule for incoming mails

To enable other mail servers to deliver mails to the mail relay, access to the external interface with the SMTP protocol must be allowed in the port filter:


Note: If there is no other connection available besides the Internet connection with the IP over which the mail is sent, it must be ensured that ONLY the mail server is allowed to send mail via SMTP. Otherwise a single computer in the network compromised by a Trojan could seriously disrupt the sending of mails or even make it completely impossible, because it spreads spam and malware with the public IP and is listed on corresponding blocklists for spammers within a very short time.

Important: There must be no port forwarding for SMTP. This would ensure that the mails are forwarded past the mail relay!

Email address

Under → Network →Appliance Settings Global email address: a postmaster address should be configured. Otherwise undeliverable mails will remain on the disk space. This can cause the available memory to become insufficient at some point and mails to no longer be accepted.


Basic configuration of the mailrelay for receiving mails

The configuration of the mailrelay takes place under → Applications →Mailrelay.


General

General
General mailrelay settings



Function Value Description
Activate mail filter: On Activate
Postmaster Address: admin-mail@anyideas.de Hier muss eine korrekte Mail-Adresse hinterlegt sein.
Diese E-Mail-Adresse wird im Dialog → Netzwerk → Servereinstellungen im Feld Globale E-Mail Adresse festgelegt. Änderungen sind nur dort möglich.
Maximale Nachrichtengröße: 20Link=  Megabytes Maximale Größe der Mails in Megabytes, die vom Mailrelay angenommen werden.
Ausgehende IP-Adresse:    /---  Bei Multipath-Routing kann hier eine ausgehende Schnittstelle durch die IP-Adresse angegeben werden.
Auch die Kommunikation aus dem internen Netz läuft dann über diese IP-Adresse. Auf dem Mailserver und seiner Firewall müssen weitere Einstellungen vorgenommen werden, damit Mails von dieser IP-Adresse angenommen werden.
SPF
in 11.8.7
Aus Ermöglicht Mailfilter
Adds RFC 8601 Authentication-Results Header to email. Not performed for mails sent by SASL-authenticated users or mails coming from "trusted hosts", i.e. hosts that have an entry in the relaying list with action RELAY and option "Connect" or no option.
  
Weitere Hinweise im Artikel zum Mailfilter




Smarthost

Smarthost
Smarthost settings of the mailrelay


Settings for a Smarthost are only required if such a setting is required for outgoing mails. This is the case, for example, if no own mail server is operated or no fixed public IP address is available.

Caption Value Description
Enable Smarthost: On activates the Smarthost function.
Smarthost: smtp.anyideas.de smtp.anyideas.de
Mail server that is to receive and send outgoing mails.(sample address)
Port: 465Link= Mail port for external mail server
25: Default port for smtp (default)
465: default port for implicit TLS
587: default port for STARTTLS
Use implicit TLS:
New from 11.8.4
Off By default (deactivated), a connection is first established via smtp and then attempts to initiate TLS encryption with the remote terminal.
On When activated, the connection is first encrypted with TLS before smtp communication is established. If the remote terminal does not control TLS, no connection is established. The TLS version is configured under → Authentication →Encryption.
Smarthost Verification: None There is no verification of the smarthost.
pki The smarthost is verified by default installed root CAs or a self-signed CA.
CA: SystemCAs (Default) Alternatively, a CA (previously created or imported under → Authentication →Certificates) can be selected for authentication.
dane The Smarthost is only verified using the DANE protocol (RFC 6698) and must support this protocol..

The DANE protocol requires the mandatory activation of DNSSEC

Enable Authentication: On Enables authentication on the smarthost mail server.
User: Credentials
Password: Credentials



Relaying

Relaying

Relaying list
 Relaying list 
Configuration Relaying


Here it is configured which mails are accepted by the Securepoint appliance and forwarded to the internal mail server. Relaying can be allowed for certain hosts or certain domains.

Add Domain / Host Dialog

Add an entry with the button Add Domain / Host

Specification of the following values:
Caption Value Description
Domain: Email domain name or IP address
Option NONE The action is applied to all events.
From The sender domain is evaluated here. Example: Domain: ttt-point.de - This applies to all mails with the domain ttt-point.de in the sender.
Since the sender domain can easily be faked, this option is to be used only after careful examination.
To The recipient domain is evaluated here. Example: Domain: anyideas.de - This concerns all mails with the domain anyideas.de in the recipient.
Connect Here the IP, hostname or domain of the mail server that wants to deliver the mail is evaluated. Example: Domain: ttt-point.de - Affects all mails from mail servers in the domain ttt-point.de - regardless of the sender or recipient of the mail.
Action RELAY Mails that meet the relevant conditions will be accepted and forwarded.
REJECT Mails are rejected.
OK Mails are accepted and delivered to a local mailbox, but not forwarded.


In order to relay all mails intended for recipients of your own domain, the following entry must be configured:

Domain / Host hizufügen
Domain anyideas.de
Option To
Aktion RELAY


 Use exact domain name for relaying: 

On The relay reacts only to the domain name entered in the list and not to unregistered subdomains or extensions.
Example: Domain entered in the relay list: anyideas.de

On
accepted by mailrelay:
@anyideas.de
Off
 accepted by mailrelay:
@anyideas.de
@support.anyideas.de
@anyideas.de.com
On
accepted by mailrelay:
Off
accepted by mailrelay:
@anyideas.de @anyideas.de
@support.anyideas.de
@anyideas.de.com


TLS Settings
TLS Settings

Caption Default Description
TLS encryption as server: On If TLS is deactivated, mails are sent over unencrypted connections!
Certificate: default The mailrelay uses a self-signed certificate for transport encryption. Optionally, a certificate whose CN corresponds to the UTM host name can be imported under → Authentication → Certificates.
TLS authentication as client: may Uses TLS if it is offered.
encrypt Always uses TLS. Connection with servers that do not offer TLS will be cancelled.
dane Authenticates and uses TLS to DANE-compliant servers, if offered.



SMTP Routen

SMTP Routing

SMTP Routing List
 SMTP Routing List 

Configuration of SMTP routes

Here you have to set to which mail server a received mail should be forwarded. If this does not happen, the mail relay evaluates the MX record of the recipient domain - which points to the relay itself! A so-called "loopback" is then detected, which cancels the acceptance of the mail with a corresponding error message. In the following, further domains can be forwarded to the same or to other mail servers.

With the button + Add SMTP-Routing  further routes are created.

Required information:
Domain: anyideas.de (or the corresponding mail domain)
Mailserver: either as FQDN or the IP address

Options
Options

In this section you can configure the verification of the destination email address. It causes mails to unknown recipients to be rejected. On the one hand the attempt to deliver spam to "invented" recipients is effectively prevented, on the other hand legitimate senders receive feedback that their mail could not be delivered, for example because they have committed themselves to the recipient address.


Function Option Description
Email address validation: Off The Securepoint appliance queries the internal mail server in the background.
SMTP The Securepoint appliance queries the internal mail server in the background.
Note: The validation must also be active on the mail server! (Recipient Verification e.g. with an Exchange)
LDAP For example, the Securepoint appliance queries the Active Directory server.
In the case of authentication via LDAP, the corresponding server must be configured under → Authentication →AD/LDAP Authentication. The user does not necessarily have to be the administrator, one user with read privileges is sufficient.
Local email address list Mail address list
A list of accepted mail recipients can also be created locally.
Edit Local Email Address List This can be used to add and remove mail addresses.






Signing

Signing

Signing with DKIM

New in 11.8.8 Outgoing emails can be signed using DomainKeys Identified Mail. The individual segments in the header and the body are signed separately, so that forwarding a mail via a mail server and changing the mail header does not destroy the signature.

Caption Value Description
General
DKIM Sign: Off (Default) At On activation, DKIM signing can be used.
Maximum processes: 2Link= determines the number of filter processes and smtp instances used for DKIM signing

Domains
Add default configuration Adds a default configuration. For this purpose, an RSA key is generated (Selector) and assigned to each mail domain entered as SMTP route
Add Adds a domain name record
/ Opens / closes the overview that shows the selectors for a domain that are used for signing.
Removes a selector from a domain entry
Displays the DNS Settings
Plain text Nein With Yes activation the DNS settings will be displayed in one window.
If a separate authoritative DNS server is operated, this value can be copied directly into a BIND zone file.
Subdomain Copies the entry to the clipboard
To assign the subdomain at the DNS hoster.
TXT Record Copies the entry to the clipboard
This is the public part of the RSA key, which must be stored in the TXT record of the mail domain.
Can also be found under → Authentication →RSA Key Public part (of the associated key) PEM
  
Edits the respective domain name
Deletes the entry

DKIM Selectors
Add Adds a DKIM selector
Adds the selector to the active (blue highlighted) domain entry.
Edits the entry
Name: selector-2020-02-13-1 Name of the selector
RSA Key Key name Select existing key or create a new key pair with the button
Hash algorithm: sha256 Algorithm used

Advanced settings
Email Header Canonicalization: relaxed Canonicalize the email headers.
Since various sources (like relaying mailservers) might alter the email headers, it is possible to use a canonicalized version of those headers before creating the signature and also before validating it - the headers itself will stay unaffected. This will make the digital signing more reliable.
  
simple Do not canonicalize the email headers.
Email Body Canonicalization: relaxed Remove trailing blank lines and cleanup whitespaces.
Since various sources (like relaying mailservers) might alter the email body, it is possible to use a canonicalized version of the body before creating the signature and also before validating it - the body itself will stay unaffected. This will make the digital signing more reliable.
  
simple Remove trailing blank lines only.
Sign default email headers: Yes Default: h=From:Reply-To:Subject:Date:To:Cc:Resent-Date:Resent-From:Resent-To:Resent-Cc:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;   
Email headers to be signed: »From »Date
»Subject »To
»List-Unsubscribe »List-ID
Email headers to be signed.

Optional Settings

Further settings are recommended, but not mandatory for operative use:

Greylisting

Greylisting

Configuration of Greylisting

Greylisting causes the delivery attempt of an unknown mail server to be initially rejected. Usually, spambots do not make any further delivery attempts, so that the delivery of spam was already successfully prevented before the mail had to run through the spam filter engine.

A regular mail server, on the other hand, will make another successful delivery attempt after a certain period of time.
The following configurations are possible:

Allowlist

Allowlist
Caption Default Description
IP / Networks »10.0.0.0/8 »172.16.0.0/12 »192.168.0.0/16 »127.0.0.0/8 The default are the private IP address ranges and the loopback address. With a click into the clickobx you can add further networks and single hosts (e.g.:»203.0.113.113/32)
Domains     Here single Mailserver domains can be added e.g.: smtp.anyideas.de
The domain of the mail server does not have to be identical with the e-mail domain of the sender.
Example: Sender user@ttt-point.de sends via the mail server »smtp.anyideas.de
Recipient     Individual recipients can be added here, e.g: »MailUser@ttt-point.de
Sender     Individual senders can be added here e.g.:{cb
Settings

Settings
Greylisting: Aus An activates the function
Delivery attempts from unknown mail servers are initially rejected.
  
SPF: Aus If the Sender Policy Framework of the sender domain is correctly entered in the DNS, the mail will be delivered without delay if On is activated.
Add header: New as of v12.2.2 Yes By default, an additional greylisting entry is added for each recipient listed in the mail header.
This can cause problems in case of many recipients.
When disabled no, no greylisting headers are inserted.
Automatic allowlisting for: 7Link= Days(Default) days(Default) : For this period, after a successful delivery mails will be accepted immediately.
Delay: 2Link= Minutes (Default) minutes(Default): The period of time that the sending mail server is given to make another delivery attempt.
Subnet Match

Subnet Match
New from 11.8.4
Subnet mask IPv4: »32 Instead of the sending server having to have the exact IP address as before, this can be changed so that, for example, only the first 2 or 3 octets have to match.
This enables whitelisting even if the sender has several mail servers.
Possible values: (Only one value can be entered.)
»32 (Single Host)
»24 Subnet, with match of first three octets
»29 Any value via keyboard input.
Subnet mask IPv6: »128

  • Depending on the configuration of the sending mail server, the re-delivery may be delayed by much more than the configured period (default 2 minutes) - in extreme cases by several hours. In this case, senders or recipients of particularly time-critical emails can be entered manually in a whitelist.

  • If a larger value for delay of e.g.: 30Link= minutes has been selected, the scan engine may have a higher probability of detection for new outbreaks when re-delivered with virus signatures that have been updated in the meantime.


  • Domain Mapping

    Domain Mapping

    Domain Mapping


    Domains can be mapped to receive incoming mails to e.g. user@anyideas.net also under user@anyideas.de.

    With Add Domain Mapping the mapping between two domains can be activated.

    To do this, a Source-Domain: and a Destination Domain: must be specified.




    Advanced Settings

    Advanced


    Advanced Mail Relay Settings

    Here some further options to avoid spam can be found, each of which can be activated individually:

    Function Description

    Greeting Pause
    Greeting Pause
    Status:
    On activates the function.
    Duration: 2000Link= Miliseconds (default value). Time the mail relay delays the greeting message. If the connected client sends SMTP commands before this time has elapsed, its request is rejected at the RCPT TO command with a "Protocol Error".
    Exceptions can be defined as network or host IP address for known mail servers.
    Successfully waiting mail servers are also automatically whitelisted for one day.

    Recipient Restriction
    Recipient Restriction
    Status: Off
    Limit: 25Link= recipients
    This option blocks mails that have more than one configurable number of recipient addresses.

    Restriction per client
    Restriction per client
    Enable connection limits:

    Off

    Exceptions can be defined as network or host IP address for known mail servers.
    Configuration if a single mail server (identified by its IP address) is to establish a maximum of one connection to the UTM Appliance and a maximum of 5 connections per minute in succession:

    Allowed connections: 1Link= Number of (client) connections, per connected mail server.
    Enable rate control: Limits the number of (client) connections per connected mail server within a time frame.
    Time frame: 60Link= seconds
    Connections per time frame: 5Link=

    Others
    Others
    HELO required: On Should absolutely remain activated (default). This switch exists to ensure backward compatibility.
    Require reverse DNS lookup: Off Requires a reverse lookup (address) to exist for connected mail servers. The forward lookup must return the IP address.
    Accept unresolvable domains: Off Allows sender addresses whose domain cannot be resolved via DNS.
    Maximum processes: 10Link= Controls global number of concurrent connections to mail relay (and attached filtering and anti-spam processes)



    Configuration of the mailrelay for outgoing mails

    To make sure that no spam or malware can be sent from your own network, the mail relay can also be used for outgoing mails.

    Set of rules

    To allow access to the mail relay, the hosts authorized to send mail must be allowed access to the corresponding interface of the Securepoint appliance (depending on the zone in which the hosts are located) via the SMTP protocol. Depending on the requirements, this can be a single host (e.g. the mail server), a group of hosts or the entire network. It is important that all applications that are to send mails via the mail relay have entered the corresponding firewall interface as SMTP server or smarthost.

    Firewall rule for outgoing mails from the internal network

    For example, to allow the internal network access to the mail relay, the set of rules can be created with the predefined network groups:

    Netzwerkobjekt Mailserver

    If only the mail server is to be able to send mails, it must first be created as a network object:

    Firewall rule for outgoing mails from the mail server

    This object can then be used in the firewall rule:

    If a certain group of computers in the internal network is to be allowed to use the mail relay, these computers must be created as network objects. These can then be combined in a group (e.g. "SMTP Authorized").

    Configuration Relaying

    In order for the mailrelay to accept mails from the internal network or from the mail server, the settings in the Relaying} tab must be supplemented by a corresponding entry. The network address of the corresponding subnet or the IP address of the relevant computer serves as criterion:

    + Add Domain / Host

    Domain

    192.0.2.0/30 or 192.0.2.192

    These are sample IPs for the internal mail servers. These have to be replaced by individual addresses!

    Option None
    Action Relay



    Conclusion

    The UTM can now check incoming and outgoing mails for spam and viruses.