NetMail SMTP Server

Shamrock Software GmbH

> English     > History

Dieses Programm setzt eine vorhandene NetMail-Installation voraus. Kopieren Sie den Inhalt der Datei SMTP.ZIP bitte einfach in das NetMail-Gateway-Verzeichnis und starten Sie dann das Programm SMTP.EXE. Das Symbol [x] rechts oben im Fenster minimiert das SMTP-Programm nur, das Beenden erfolgt mit der rechten Maustaste auf das gelbe Symbol im System-Tray der Taskleiste.

Zweck

Sie können den SMTP-Server als einen aus dem Internet zugänglichen Mail-Server betreiben, etwa um Mails an einem DSL-Anschluss mit statischer oder dynamischer IP-Adresse verzögerungsfrei direkt zu empfangen. Wir empfehlen dafür einen DynDNS-Provider wie Selfhost.de oder DynDNS.org. Bei einigen Hosting-Providern (z.B. 1und1) ist es auch möglich, eine "normale" Domain per MX-DNS-Eintrag zu einer solchen DynDNS-Domain umzuleiten. Falls Sie einen Router benutzen, ist auf diesem der TCP-Port 25 auf den PC weiterzuleiten, auf dem NetMail läuft. Bei Verwendung einer Firewall muss Port 25 für ankommende TCP-Verbindungen freigegeben werden. Ferner muss man noch dafür sorgen, dass die DSL-Verbindung nicht wegen Inaktivität getrennt wird; die einfachste Lösung dafür ist, mit dem NetMail-Mailer alle 15 Minuten irgend ein POP3-Postfach abzufragen.

Beispiel: Sie haben die Domain example.com und registrieren sich mit Ihrem DSL-Anschluss bei DynDNS als Subdomain example.dyndns.org. Setzen Sie den MX-Eintrag beim Provider von example.com auf example.dyndns.org. Nach einer vom DNS-Caching bedingten Wartezeite von einigen Stunden erhalten Sie dann alle Mails, deren Zieladresse auf @example.com endet, direkt an Ihrem DSL-Anschluss. Der NetMail-SMTP-Server verfügt über die modernsten und ausgefeiltesten Anti-Spam-Maßnahmen.

Das SMTP-Modul erlaubt es auch, dass Geräte (z.B. eine Webcam) oder Programme (z.B. ein Motherboard-Monitor) Meldungen und Dateien an NetMail-Benutzer senden, ohne dass diese den Weg über einen externen Provider gehen müssen.

Eigenschaften

Das SMTP-Programm meldet beim Start automatisch die lokale IP-Adresse des lokalen Rechners und ist über den SMTP-Standard-Port 25 erreichbar. Es ist keinerlei Konfiguration erforderlich. Der SMTP-Dialog wird in einem kleinen Textfenster zu Diagnosezwecken angezeigt.

Angelieferte Mails werden intern (an NetMail-Benutzer) oder nach extern (über den NetMail-Mailer) weitergeleitet, sofern mindestens eine der folgenden Bedingungen erfüllt ist:

  1. der Absender hat eine lokale bzw. vertrauenswürdige IP-Adresse wie etwa 192.168.0.1,
  2. der Absender benutzt SMTP-AUTH (Authentifizierung), um sich mit einem NetMail-Benutzernamen und Passwort zu identifizieren,
  3. die Zieladresse ist eine in NetMail konfigurierte Domain oder ein To-Alias.

Mails, die von einem externen nicht authentifizierten Absender kommen und an einen externen Empfänger gehen sollen, werden mit der Fehlermeldung "Relaying denied" abgelehnt, um einen Missbrauch z.B. durch Spam-Versender zu verhindern.

Konfigurations-Optionen

Klicken Sie auf "Config", um die nötigen SMTP-Einstellungen vorzunehmen.

RBL/DNSBL (Real-Time Black List, DNS Black List)
Falls Sie den SMTP-Server an einem vom Internet aus zugänglichen Anschluss betreiben, können Sie durch Benutzung einer "Real-Time Black List" verhindern, dass man Ihnen Mails von Rechnern sendet, deren IP-Adressen als Spam- oder Virus-Quellen bekannt sind. Beispiel: zen.spamhaus.org, eine recht zuverlässige Spam-/Viren-Blacklist von Spamhaus

Es gibt zwei Optionen, wie verfahren wird, wenn die IP-Adresse in der Blacklist gefunden wird ("If blacklisted"):

  1. Reject mail: Die Mail wird abgewiesen, der Absender erhält die Meldung "550 IP blacklisted".
  2. X-RBL-Warning: Die Mail wird akzeptiert, aber in den Kopfdaten wird eine Zeile X-RBL-Warning eingefügt. In diesem Fall kann der Mail-Router von NetMail entscheiden, was weiter geschieht.

Der SMTP-Server benutzt einen eigenen DNS-Cache für bis zu 1000 IP-Adressen. Die Cache-Lebensdauer beträgt vier Tage bei Dialup-Listen ("dul." oder "dial" am Anfang) und zwei Tage bei anderen. Zu jeder Adresse wird der Wochentag und die Antwort des RBL-Service gespeichert. Beim Beenden des Servers speichert er den Cache-Inhalt in eine Datei SMTP.RBL und liest sie beim Neustart wieder ein, falls sie jünger als vier Tage ist. - Die DNSBL-Prüfung nicht für Absender durchgeführt, deren IP-Adresse in SMTP_IP.TXT mit einem vorangestellten Pluszeichen markiert ist.

Clear Cache: Damit hat man die Möglichkeit, die beim Provider nicht mehr gelisteten Absender sofort aus dem lokalen Cache zu entfernen. Nicht gelistete Einträge bleiben aus Performance-Gründen erhalten.

Blocked HELO (blockiertes HELO)
Zeichenfolgen, die in der HELO- bzw. EHLO-Identifikation unerwünschter Absender vorkommen, kann man hier jeweils durch Leerräume getrennt eingeben. Groß- oder Kleinschreibung ist dabei egal. Das Zeichen am Anfang ^ erzwingt eine Übereinstimmung ab dem ersten Zeichen, $ am Ende erfordert Übereinstimmung am Schluss (so blockt .kr$ alle koreanischen Mail-Server), beides zusammen erfordert eine exakte Übereinstimmung (z.B. ^yahoo.com$ - der echte Yahoo-Mailserver heißt mx00.yahoo.com und eben nicht nur yahoo.com!). Typisches Beispiel:
dsl. dsl- cable. cable- dialin. .kr$ ^yahoo.com$
Die Anzahl der nötigen RBL-Abfragen kann damit deutlich reduziert werden. Seien Sie aber vorsichtig, keine zu mehrdeutigen Zeichenfolgen einzugeben, die unabsichtlich auch erlaubte Absender sperren könnten. Die in der NetMail-Konfiguration eingegebenen HELO-Sperren werden zusätzlich zu den hier konfigurierten beachtet, die Gesamtzahl darf jedoch 32 nicht überschreiten.

Also block typical dynamic IP HELOs (auch typische dynamische HELOs blockieren)
Mit dieser Option werden zusätzlich zu den oben aufgeführten Helo-Zeichenfolgen auch solche abgewiesen, die typisch für Dial-Up-Hosts sind, also entweder mehr als 8 Ziffern enthalten oder min. 3 Minuszeichen oder min. 5 Punkte sowie min. 5 Ziffern, zum Beispiel:
213-236-114-200.fibertel.com.ar

Sender=HELO (Absender=HELO)
Mails von hier eingetragenen Provider-Namen werden nur dann akzeptiert, wenn sich der sendende Mailserver (From-Domain) mit demselben Namen auch in Helo identifiziert. Einträge sind jeweils mit einem Leerraum getrennt. Wenn eine bestimmte From-Domain zu einer anderen Helo-Domain gehört, ist eine solche Angabe mit "=" möglich; in diesem Fall können mehrere erlaubte Helo-Angaben mit ";" getrennt werden. Beispiele:
yahoo. gmail.=google. paypal
Hiermit werden Mails mit "yahoo." und "paypal" unmittelbar hinter @ in der Absenderadresse nur akzeptiert, wenn dieselbe Angabe auch in Helo vorkommt, und für Mails von GMail wird "google" in Helo erwartet.

Current DoS (aktuelle Attacke)
Hier werden, falls vorhanden, die zuletzt als Denial-of-Service-Angriff erkannten IP-Adressen angezeigt (DoS attack, siehe auch Option "DoS check" weiter unten). Sie können einzeln mit [Remove] gelöscht werden. Mails von diesen Adressen werden innerhalb der nächsten 60 oder 360 Minuten abgelehnt. Mit Block DoS IPs for ... können Sie die maximale Dauer der Sperre auswählen (die tatsächliche Dauer kann bei hohem Fehleraufkommen anderer IPs kürzer sein).

Trusted IPs (vertrauenswürdige IP-Adressen)
Die hier eingetragenen IP-Bereiche (ggf. bis zu 25, jeweils durch einen Leerraum getrennt) werden als lokale IP-Adressen betrachtet. Nur von ihnen dürfen Mails auch ohne Authentifizierung an externe Empfänger gesendet werden, und es findet dann auch keine Überprüfung statt, ob die IP-Adressen gesperrt sind (siehe Special IPs). Es kann jeweils eine einzelne Adresse, ein Bereich mit einem Minuszeichen (z.B. 4.1.0.1-4.1.0.254) oder ein Netzblock mit Schrägstrich angegebenwerden (z.B. 4.1.0.0/24). Beim Erststart sind folgende Bereiche konfiguriert:
10.0.0.0/8 192.168.0.0/16 127.0.0.0/8 169.254.0.0/16 172.16.0.0/12
Wenn Sie dagegen eine IP-Adresse generell und ohne Log-Einträge blockieren möchten, schreiben Sie ein Minuszeichen davor, zum Beispiel:
-210.22.111.42

Special IPs: Edit (spezielle IP-Adressen bearbeiten)
In einer als Beispiel mitgelieferten Datei SMTP_IP.TXT kann man externe IP-Adressen sperren (-) oder von Greylisting, Tarpit, RBL-, DoS- und HELO-Prüfung ausnehmen (+). Die Datei enthält zeilenweise ein Plus- oder Minuszeichen und dahinter entweder eine einzelne Adresse, einen mit einem Minuszeichen angegebenen Bereich (z.B. 4.1.0.0-4.1.0.255) oder einen Netzblock mit Schrägstrich (z.B. 4.1.0.0/24) sowie optional einen Kommentar hinter mindestens einem Leerzeichen. Jede IP-Adresse muss genau drei Punkte enthalten. Innerhalb einer Adresse oder Bereichsangabe ist kein Leerraum erlaubt. Zeilen, die nicht mit + oder - beginnen, werden ignoriert.

Greylist: Clear (Greylist löschen)
Unabhängig davon, ob Greylisting (siehe unten) aktiviert ist oder nicht, merkt sich der SMTP-Server die bisher aufgetretenen Kombinationen aus IP-Adresse, Absender und Empfänger. Dadurch kann Greylisting jederzeit aktiviert oder deaktiviert werden, ohne dass diese Informationen verloren gehen, ferner kann die Greylist vor dem Aktivieren trainiert werden. Wenn diese Greylist dennoch ausnahmsweise gelöscht werden soll, kann das mit diesem Knopf geschehen.

Mail size limit (Mail-Größenlimit)
Sie können angeben, wie groß empfangene Mails maximal in Megabyte sein dürfen. Zulässige Werte sind 1 bis 99, voreingestellt ist 5. Falls der Absender den SIZE-Parameter versteht, werden größere Mails dann abgelehnt.

Allow AUTH (SMTP-Authentifizierung erlauben)
Wenn aktiviert, können sich Clients mit dem SMTP-Authentifizierungs-Verfahren "Login" anmelden und werden dann wie LAN-Clients behandelt, d.h. sie dürfen dann Mails nicht nur an interne, sondern auch an externe Zieladressen senden.

DoS check (Attacken-Erkennung)
Hiermit wird eingestellt, ob eine IP-Adresse nach zehn SMTP-Fehlern gesperrt wird, oder auch dann, wenn sich bei einem erneuten Fehler der HELO-String ändert. WICHTIG: Wenn Sie Mails immer, teilweise oder zeitweise von Ihrem Provider empfangen (z.B. Backup-MX-Spooler oder SMTP-Relay), lassen Sie diese Option unbedingt ausgeschaltet, da sonst nach einigen Fehlern alle Mails abgelehnt würden!

Greylisting (Spam-Schutz)
Greylisting ist eine von manchen Anwendern gern eingesetzte Methode zur Spam-Reduzierung. Dabei wird bei einer vorher noch nicht aufgetretenen Kombination aus IP-Adresse, Absender und Empfänger ein temporärer Fehlercode "451 Try again later" generiert. Normale Mailserver wiederholen die Zustellung nach einigen Minuten, und da die Kombination dann bekannt ist, wird die Mail nun akzeptiert. Spam-Versender und Viren versuchen die Zustellung dagegen meist nur einmal und fallen dadurch dem Greylisting zum Opfer. Der Greylisting-Mechanismus wird nicht bei Absendern verwendet, die in der NetMail-Konfiguration als From-Alias "NOSPAM" eingetragen sind oder deren IP-Adresse in SMTP_IP.TXT mit einem Pluszeichen markiert ist, und auch nicht bei LAN- oder authentifizierten Absendern, so dass Mails von diesen immer verzögerungsfrei angenommen werden. Die binäre Datei SMTP.GRY dient als Cache für bisher bekannte Absender. Der Greylisting-Cache kann 5000 Einträge aufnehmen; unbenutzte Ersteinträge werden nach zwei Tagen gelöscht.

Tarpit
Diese Option nennt sich deutsch "Teergrube", sie ist nur bei aktivem Greylisting nutzbar. Mit ihr kann man unautorisierten Massenversand zusätzlich behindern, indem sie bei externen Absendern nach jeder neuen Zieladresse eine Pause von 15 Sekunden erzwingt, indem die Greylisting-Antwort "Try again later" entsprechend verzögert wird. Für autorisierte oder lokale Absender hat diese Option keine Auswirkungen. Bei sehr starker Auslastung Ihres Servers sollte diese Option ausgeschaltet bleiben, da sie die Anzahl der gleichzeitigen TCP-Verbindungen deutlich erhöht.

Spam filter
Wenn diese Option eingeschaltet ist, werden alle externen Mails abgelehnt wenn mindestens eine der folgenden Bedingungen erfüllt ist:

  1. Der Hostname hinter HELO ist kein gültiger Domain-Name.
  2. Der sendende Server versucht in HELO eine lokale Domain vorzutäuschen.
  3. Die Absenderadresse ist syntaktisch falsch bzw. enthält ungewöhnliche Zeichen.

Beim Empfang von Mails aus dem Internet sollte diese Option unbedingt eingeschaltet sein.

Log (Protokolldatei)
Abhängig von der Log-Einstellung wird eine bis zu 8 MB große Logdatei erzeugt. Bei der Einstellung "Errors" werden alle geblockten Mails im Log vermerkt, mit "Warnings" zusätzlich auch temporäre Meldungen (z.B. Greylisting).

Ferner werden Error-Meldungen auch an das in NetMail enthaltene Popup-Programm gesandt, wenn im Mail-Router die entsprechende Option aktiviert ist.

Optionen in der NetMail-Konfiguration

Der Mail-Router von NetMail besitzt unter "Empfang" eine Konfigurations-Option "Envelope-Adresse benutzen". Sie sollte auf "immer" stehen, wenn Sie Mails überwiegend mit dem SMTP-Modul empfangen.

Die Option "Betreff-Alias" beim SMTP-Servers funktioniert nicht immer wie beabsichtigt, wenn sie verwendet wird, um Mails umzuleiten, denn unbekannte Zieladressen werden im SMTP-Dialog bereits abgelehnt, bevor der Mail-Inhalt und damit die Betreff-Zeile übermittelt werden. Das Sperren von Betreff-Wörtern wie z.B. Viagra durch Zuweisen von SPAM oder REJECT funktioniert aber.

Beim Alias-Ziel NULL wird die Mail vom SMTP-Server dagegen zwar angenommen, aber sofort stillschweigend gelöscht (Logzeile "Discarded"). Dabei ist die akzeptierte Mail-Größe aber auf 25 K limitiert, andernfalls erhält der Absender die Fehlermeldung "Mail too long". Ein From-Alias NULL ist somit insbesondere nützlich, um zu verhindern, dass ein bekannter Spam-Absender Zieladressen verifiziert.

Statistik

Der Knopf "Stats" öffnet ein Statistik-Fenster, das die Anzahl angenommener und abgelehnter Mails zeigt. Der Knopf "Reset" setzt alle Werte auf Null und beginnt einen neuen Auswertezeitraum.

Die Statistik kann auch via Netzwerk abgefragt werden: Stellen Sie mit TELNET <Serveradresse> 25 die Verbindung zum SMTP-Server her, geben Sie X-STATS ein und drücken Sie Enter. Mit QUIT <Enter> können Sie die Verbindung beenden, sie wird nach einem Timeout aber auch automatisch getrennt.

Irgendwelche Probleme?

Wenn die Konfiguration nicht gespeichert werden kann, müssen Sie das Windows-Verzeichnis oder zumindest die beiden Dateien WIN.INI und SHAMROCK.INI darin für den angemeldeten Benutzer zum Schreiben freigeben.

Falls es nicht auf Anhieb klappt, prüfen Sie bitte im Fenster des SMTP-Servers sowie auch im Protokoll des Mail-Routers (gateway.txt), ob dort Fehlermeldungen zu sehen sind. Stellen Sie beispielsweise bitte sicher, dass die z.B. in einer Webcam oder einem SMTP-Client eingetragene Zieladresse nicht nur aus einem Benutzernamen besteht, sondern die vollständige Domain enthält, also z.B. info@example.com.

Den Meldungen ist ein standardisierter dreistelliger Code vorangestellt. Dessen erste Ziffer bedeutet:

Sie können den SMTP-Server mit dem optionalen Kommandozeilen-Parameter DEBUG starten. In diesem Fall werden alle Bildschirmausgaben in einer Textdatei SMTP.LOG protokolliert. Dies sollte aus Performance-Gründen allerdings nur zu Testzwecken zeitlich begrenzt erfolgen. Alternativ können Sie auch einfach den momentanen Inhalt des Textfensters mit einem Doppelklick in die Zwischenablage kopieren.

Nutzungsbedingungen

(c) Shamrock Software GmbH. Shamrock gestattet die Benutzung der Software, überträgt dabei aber kein Eigentum. Diese Software, das Handbuch oder ein Bestandteil davon dürfen ohne die ausdrückliche Erlaubnis von Shamrock nicht vervielfältigt oder auf einem Download-Server zur Verfügung gestellt werden. Da die Software ein kostenloses Zusatzprogramm zu NetMail ist, wird die Eignung für einen bestimmten Einsatzzweck nicht garantiert.

This program requires an installed NetMail. Please copy the content of SMTP.ZIP into the existing NetMail gateway folder und launch SMTP.EXE. The symbol [x] at the top right of the window only minimizes the SMTP program; to terminate it, right-click its yellow symbol in the system tray of the task bar.

Purpose

It is possible to run the SMTP server as an Internet mail server in order to receive mails e.g. for a selfhost.de or dyndns.org subdomain using a DSL or cable modem with a static or dynamic IP address. Some providers also allow to set an MX DNS entry from a "normal" domain to this DynDNS address. When using a router, it has to be configured to forward port 25 to the IP address of the NetMail gateway PC. To avoid that the DSL or cable modem disconnects due to inactivity, the NetMail Mailer can connect to a POP3 mailbox every 15 minutes or so.

Example: You own a domain example.com and register your dynamic IP at DynDNS as example.dyndns.org. Set the DNS MX entry at the provider of example.com to example.dyndns.org, and you will receive all mails destined to @example.com directly via your own SMTP server. The NetMail SMTP server also features the most modern and sophisticated anti-spam mechanisms.

The SMTP module also allows other devices (e.g. a webcam) or programs (e.g. a motherboard monitor) to send messages and files to NetMail users without sending them via an Internet provider.

Features

The SMTP program displays the local IP address when started. No configuration is required. The SMTP dialogue is displayed in a text window for diagnosing problems.

Incoming mails are routed internally (to NetMail users) or externally (via the NetMail mailer), if at least one of the following conditions applies:

  1. the sender has a trusted network IP address, like 192.168.0.1,
  2. the sender uses authentication (SMTP AUTH) to identify himself with a NetMail username and password,
  3. the destination address is a local NetMail domain or a To Alias.

Mails from an external unauthenticated sender to an external recipient are rejected with "Relaying denied" to block spam.

Configuration options

Click on "Config" to open the SMTP settings.

RBL/DNSBL (Real-Time Black List, DNS Black List)
If you run the SMTP server on a PC which is accessible from the Internet, you can use a "real-time black list" to avoid that you receive e-mails from IP addresses which are known for sending spam. Example: zen.spamhaus.org, a reliable general spam/virus blacklist operated by Spamhaus (UK).

There are two options for what happens if the sender is blacklisted:

  1. Reject mail: The e-mail is not accepted, the sender immediately gets an error "IP blacklisted".
  2. X-RBL-Warning: The e-mail is accepted, but a line X-RBL-Warning is inserted in the mail header. In this case, the mail router of NetMail can decide what happens.

The SMTP server uses its own DNS cache for up to 1000 addresses. The cache lifetime is four days for dial-up lists (RBL name starting with "dul." or "dial") or two days for all others. The weekday and the RBL service answer is stored for each address. When the server is unloaded, it saves the contents of the cache into a file SMTP.RBL and reloads it when the program is restarted if this file is not older than four days. - The DNSBL check is done even for senders with a From alias NOSPAM in the NetMail configuration but not for IP addresses marked with a plus sign in SMTP_IP.TXT.

Clear Cache: This button allows to remove DNSBL entries from the local cache which are no longer listed at the provider. For performance reasons, entries which are not blacklisted will not be deleted.

Blocked HELO
Space-delimited strings which occur somewhere in the HELO or EHLO parameter of unwanted senders can be entered here. Uppercase or lowercase is ignored. The symbol ^ at the beginning compares from the start, $ at the end (like .kr$ for blocking servers ending with .kr), and both together require an exact match like ^yahoo.com$ (the true Yahoo mail server is mx00.yahoo.com and not simply yahoo.com). Typical example:
dsl. dsl- cable. cable- dialin. .kr$ ^yahoo.com$
Blocking HELO strings can reduce the need for RBL requests significantly, but be careful not to enter too ambiguous strings here which might block senders unintentionally. The HELO strings blocked in the NetMail configuration are also barred in the SMTP dialogue and need not to be configured twice, but their sum must not exceed 32 strings.

Also block typical dynamic IP Helos
This option blocks typical dial-up helo strings (in addition to the strings configured above) if they contain either more than 8 digits, or at least five digits and also at least 3 minus symbols or at least 5 dots, for instance:
213-236-114-200.fibertel.com.ar

Sender=Helo
Mails from providers configured here are accepted only if the sending server (From domain) identifies itself with the same domain in Helo. Entries are space-delimited. Optionally a different Helo can be noted behind "="; in this case, multiple Helos are possible using ";". Example:
yahoo. gmail.=google paypal
Mails with "yahoo." or "paypal" mmediately after @ in the From field are accepted only if the same string is also found in Helo. For mails from GMail "google" is expected in Helo.

Current DoS
The IP addresses (if any) of the last Denial-of-Service attackers (DoS, see option "DoS check" below). They can be cleared one by one with the [Remove] button. Connections from these addresses are refused within the next 60 or 360 minutes. Use Block DoS IPs for... to select the maximum duration; the actual duration may be shorter if there are many errors from other IPs.

Trusted IPs
Only IP address ranges entered here (up to 30, space-delimited) are allowed to send e-mails to external recipients, and they are also not checked in the Special IPs list (see below). Each entry contains either one single address, a range with a minus symbol between two address limits (e.g. 4.1.0.0-4.1.0.255), or a net block with "/" (e.g. 4.1.0.0/24). After the first start of the SMTP server, these ranges are configured:
10.0.0.0/8 192.168.0.0/16 127.0.0.0/8 169.254.0.0/16 172.16.0.0/12
If you wish to block an IP immediately without creating log entries, place a minus sign before it, e.g.:
-210.22.111.42

Special IPs: Edit
In a file SMTP_IP.TXT you can enter external IP addresses which are either blocked (-) or excluded from greylisting, tarpit, DoS, RBL and HELO checks (+). Each line contains a plus or minus sign and then either one single address, a range with a minus symbol between two address limits (e.g. 4.1.0.0-4.1.0.255), or a net block with "/" (e.g. 4.1.0.0/24), and optionally a comment behind at least one space or tab. Each IP address must contain exactly three dots. No spaces are allowed within addresses or ranges. Lines not starting with + or - are ingored. Please have a look at the sample file to see how it should look like. The host will get an error message.

Greylist: Clear
All combinations of IP address, sender and recipient are saved in a greylist, even if greylisting is disabled (see below). This ensures that these triplets are not lost when greylisting is disabled temporarily, and the greylist can be trained before activating it. However, if you wish to delete the list for some reason, use this button.

Mail size limit
You can enter the maximum size of received mails in megabytes. Possible values are 1 to 99, default is 5. If the sender supports the SIZE parameter, larger mails than configured here will be denied.

Allow AUTH
If enabled, external clients may use the SMTP "login" authentication method and are then treated as if they were LAN users so that they are allowed to send mails not only to internal but also to external destination addresses.

DoS check
This enables blocking of an IP address after ten consecutive SMTP errors, or if the HELO string changed when a new error occured. IMPORTANT: If you receive mails always, partly or temporarily from your provider (e.g. backup-MX spooler or SMTP relaying), leave this option disabled, otherwise all your mails would be blocked after a few errors!

Greylisting
Greylisting is sometimes used to reduce spam. Any combination of IP address, sender (From) and recipient (To) which has not been seen before will get a temporary failure code "451 Try again later". Normal servers will retry the delivery a few minutes later and the mail will be accepted then since the address combination is now known. Spam senders and viruses, however, typically do not retry the delivery and are blocked this way. Greylisting is not used for senders who are tagged as NOSPAM in the From alias configuration of NetMail, for IP addresses marked with a plus sign in SMTP_IP.TXT, and also for LAN IP addresses or authenticated users, so their mails are always delivered without a delay. The binary file SMTP.GRY is used as a cache for known address combinations. The greylisting cache supports up to 5000 entries, unused entries will be deleted after two days.

Tarpit
This option can be used together with Greylisting to make unauthorized mass-mailing more time consuming for the sender by inserting a delay of 15 seconds after each new destination address from external or unauthenticated senders. This is done by delaying the "Try again later" Greylisting response. You should leave this option disabled for a heavy-load server since it increases the number of concurrent TCP/IP connections.

Spam filter
If this option is enabled, all external mails will be denied if at least one of these conditions applies:

  1. The hostname given after HELO is not a valid domain name.
  2. The host tries to fake a local domain name with HELO.
  3. The sender address is syntactically incorrect or contains unusual symbols.

This option has proven to be very efficient in blocking most of the received spam mails and viruses.

Log file
Depending on the "Log" setting, a log file SMTP.TXT is written with a maximum size of  8 MB. The "Errors" level writes all blocked e-mails to the log (SMTP code 5xx), while the "Warnings" level also writes temporary error codes like 451 (e.g. greylisting).

The SMTP server will also send error messages to the Popup program of NetMail if the option "Status popups" is activated for errors in the mail router configuration.

Statistics

A click on "Stats" shows a window with the number of accepted and blocked e-mails. "Reset" sets all values to zero and the starting date to the current time.

It is also possible to retrieve the statistics over the network. Simply enter TELNET <address> 25 to connect to the SMTP server, and then enter X-STATS <Enter>. To disconnect, enter QUIT <Enter> or wait for the timeout.

NetMail configuration options

The NetMail mail router configuration has a reception option "Use envelope-to". You should set this to "Always" if you receive most of your e-mails via the SMTP module.

Note that the "Subject alias" option in the NetMail configuration may not always work as desired if it is used to reroute mails to other addresses, since the SMTP dialogue blocks unknown destinations before the mail (including its subject line) is accepted. However, blocking subject keywords like Viagra by assigning them SPAM or REJECT as destination does work.

If the alias is NULL, however, the mail is accepted by the SMTP server but then silently discarded (log line "Discarded") if the size is up to 25 K. Otherwise the sender gets a "Mail too long" error. The "From alias" NULL is especially useful to avoid that a known spammer can verify destination addresses.

Any problems?

If the configuration settings cannot be saved, please make sure that the Windows folder or at least the two files WIN.INI and SHAMROCK.INI in it are writable by the registered user.

If not everything works as expected, please check the SMTP server's log window and the mail router log (gateway.txt) for any error messages. For example, please make sure that the destination address configured e.g. in a webcam or in an SMTP client program includes the full domain, e.g. info@example.com.

A standardized three-digit code is prepended to each message. The first digit means:

You can start the SMTP server with an optional commandline parameter DEBUG so that all screen output is logged in a text file SMTP.LOG. However this should be done only temporarily for testing purposes since it may reduce the performance. Alternatively you may also doubleclick the text window to copy its content to the clipboard.

License agreement

(c) Shamrock Software GmbH. Shamrock grants the right to use the software but does not transfer ownership.This software, the manual or any part of it must not be duplicated or stored on a download server without the written permission of Shamrock Software, who is the author of the program and reserves all rights based on national and international copyright regulations. Since the software is a free add-on to NetMail, no guarantee is given that it works in a specific environment.

NetMail SMTP version history

25.06.15 1.60 Supports username as initial responseparameter after AUTH LOGIN.
19.05.14 1.59 Gateway.ini, [HeaderAlias] can now be used for all header lines.
19.11.13 1.58 Longer TLDs and ones with "-" like "xn--ngbc5azd" allowed.
08.10.13 1.57 Clear cache button for removing blacklisted entries from the local DNS/RBL cache.
03.03.12 1.56 SRS decoding now also works with "+" or "-" instead of "=" behind SRS0 or SRS1.
16.09.11 1.56 NOSPAM no longer circumvents Invalid HELO because sender address may be faked
11.02.11 1.56 iPhone requires "250-domain" before "250 AUTH" line for authentication after EHLO
10.05.10 1.55 Greylist retry of same destination in one connection causes disconnect
22.04.10 1.54 Gateway.ini, [HeaderAlias] allows Nospam/Spam/Null for non-standard header lines
19.10.09 1.53 Long user alias names possible (>16 characters)
02.09.09 1.52 New message "550 Missing sender"; no SPF line in LAN
13.07.09 1.51 More BATV variants decoded
16.01.08 1.50 Corrected year wrap in account creation date
01.12.08 1.49 Received-SPF: pass in header if IP whitelisted in Smtp_ip.txt
18.04.08 1.48 Tarpit delays greylisting response only
07.01.08 1.47 Fixed year wrap for inactive accounts
15.11.07 1.46 Random greylisting table position if list is full
20.07.07 1.45 Tarpit option
02.07.07 1.44 Different BATV variants supported
11.06.07 1.43 SMTP AUTH as new option in the configuration dialogue
25.04.07 1.42 SMTP authentication supported; internal+external destinations can be mixed
11.01.07 1.41 From-Alias now also checks Reply-To if present
27.12.06 1.40 Reading parameters from registry instead of win.ini for Windows Vista
17.11.06 1.39 Faked local domain in Received header line will cause "Content blocked"
20.06.06 1.38 To-Alias adaption for NetMail gateway 2.23
29.04.06 1.37 From/Helo comparison allows multiple Helos using semicolons
02.03.06 1.36 Unused greylist entries are deleted after 2 days
18.01.06 1.35 Max. mobile user limit 10 MB instead of 4 MB (NetMail gateway 2.19)
24.10.05 1.34 Changed index file for user database, requires gateway 2.18 or higher
22.06.05 1.33 Multiple DoS addresses possible
17.06.05 1.32 From/Helo comparison e.g. for Yahoo; SRS decoding
03.06.05 1.31 SMTP_IP.TXT replaces BLOCKED.TXT
28.05.05 1.30 Option to block typical dial-up Helo strings
06.05.05 1.29 Mail size and destination checked for alias names
03.05.05 1.28 Nospam From-alias disables Helo check
04.04.05 1.27 Test of content-type and subject alias during reception
23.03.05 1.26 Log options: None, warnings, errors, all
13.03.05 1.25 Disconnect if pipelining used but not advertised
07.03.05 1.24 Greylist maintained even if greylisting is disabled; clear greylist button
26.01.05 1.23 Configurable trusted IP ranges for local senders
17.12.04 1.22 Check for limited mail size of mobile users
07.12.04 1.21 Enhanced reception speed
26.11.04 1.20 Erraneous destination address written to log (To...)
27.10.04 1.19 Last IP byte ignored for greylisting, but not for RBL check
20.10.04 1.18 DoS blocking, blocked HELO strings, greylisting option
13.10.04 1.17 SMTP extensions SIZE and pipelining
09.10.04 1.16 RBL IP cache, configuration window
03.10.04 1.15 Blocked.txt for blocked IP ranges
17.09.04 1.12 Optional X-RBL-Warning in header
06.09.04 1.10 Error after RCPT if local user or alias does not exist
24.07.04 1.05 Corrected DNSBL problem (byte order)
22.07.04 1.04 RBL error after RCPT instead of hanging up immediately
16.07.04 1.03 Error log, RBL textbox
29.06.04 1.02 Envelope-To for multi-BCC addressing
22.06.04 1.01 Added DNS-RBL support
04.06.04 1.00 Initial version

© Shamrock Software GmbH