NetMail

Gateway Manual for Version 3.22, 29 May 2017 > Deutsch

Gateway functions
Installation, first steps
Mailer configuration
Router configuration
Account management
Gateway usage
HTTP server
Webmail interface
Technical details
License agreement
German version
Client manual

Shamrock online

The NetMail gateway is used as a mail server by the NetMail clients and/or for POP3/SMTP-based mail programs. The gateway exchanges emails with an Internet service provider. NetMail-Light is a free version for up to three users, while NetMail XL does not limit the number of users and also supports a GSM modem for SMS. - Shamrock does not offer a hotline support for free software by phone, but e-mail requests are welcome. By installing the software, the license agreement is accepted automatically.

Gateway functions

The modular gateway software consists of the configuration (gateconf.exe), the mail router (gateway.exe) and the POP3/SMTP mailer as an interface to your Internet service provider (mailer.exe). Mailer.exe and gateway.exe must run to make the gateway work and should be loaded by linking them in the start-up folder of Windows. If mobile NetMail clients are to be used, the transfer module host32.exe must run additionally.

Internet
Provider
--POP3->
<-SMTP-
NetMail gateway PC   Clients
Mailer
mailer.exe
->
<-
Mail
router

gateway.exe

-- Transfer
host32.exe
-Modem/ISDN/TCP-
Mobile clients
- - - - - - - - - - - - -Network- - - -
NetMail LAN
    -- SMS
capisms.exe
<- - -> SMS and POP3/
SMTP clients

At your Internet service provider (ISP), only a single POP3 catch-all account needs to be configured. If you have a domain of your own like www.myname.com, you should configure a catch-all account like *(at)myname.com and delete all other POP3 accounts. The gateway mail router will then retrieve all emails from the catch-all account and analyze their headers (like To: and Cc:) in order to route them to the correct local user(s).

To use a NetMail client in a LAN (local-area network), any workstation can load autosync.exe from the gateway's hard disk, e.g. from \\server\c\shamrock\netmail\autosync.exe. This means that the NetMail software is only installed on the gateway PC, not on the other workstations. It is useful to create a desktop link on each workstation to autosync.exe on the server. Using the Netmail client allows shared mail archives, a shared calendar, a shared pinboard, and alternate access via webmail, so it is ideally suited as a groupware for workstations within a network. Furthermore the NetMail client - in contrary to POP3 clients - allows several workstations to access the same account.

For using conventional e-mail programs like Outlook or Thunderbird, POP3 and SMTP ports can be opened in the gateway. The account settings allow to define whether a mailbox is being used in mixed mode (typically the NetMail client in the office and a smartphone out and about) so that all emails can still be viewed and archived in NetMail (really nice after the temporary usage of a smartphone!), or in POP3-only mode so that the external client uses its own archives.

The NetMail client software can also be used as a stand-alone mobile/external client, connecting to the NetMail server via TCP, ISDN, modem, or GSM. Please see "Mobile client" in the client manual.

The free version NetMail Light has the following limitations compared to the commercial XL version:

It is possible to combine NetMail with Shamrock's programs CapiCall (allowing telephone notifications if new emails arrive, and also voice to mail) and CapiFax (fax to mail, mail to fax).

Installation and first steps

Starting SETUP
Step by step - a short instruction (PLEASE READ!)
The transfer module for mobile clients
TCP/IP driver, RAS, Internet service provider
Log files

Starting SETUP

This software can be used with all 32- and 64-bit Windows versions starting with Windows 2000.

  1. If you have downloaded the free 3-user Light version from the Internet as a ZIP file, or if you got an upgrade or update from Shamrock by E-Mail: Unpack the ZIP file into an empty, temporary folder (e.g. c:\windows\temp) and then launch the SETUP program there. After the installation, the temporary folder can be deleted.
  2. If you got the software on CD, launch CDSTART (this normally happens automatically when the CD is inserted) and click on "NetMail Server". The gateway and client software will be installed.

For installing the software you will administrator privileges, otherwise the creation of the start menu entries with the NetMail modules Router, Mailer, Transfer, Configuration and Client will fail.

Important: Do not install the software to the "Program Files" folder in Windows Vista or Windows 7! In Vista and later versions, but also for 2000/XP/2003 users with restricted privileges, file access below C:\Program Files is restricted: Write access from the network is typically impossible, and even local file access results in contradictory content due to the Program Files virtualization used in Vista. Network-capable programs like NetMail require write access in their own directory, e.g. for saving e-mail files from network users. This is why Shamrock Software no longer uses C:\Program Files but C:\Shamrock as the default installation path. Consequently, the default path for NetMail is C:\Shamrock\NetMail. If you would use "C:\Program Files\NetMail", using NetMail from network clients would be impossible!

Data Execution Prevention (DEP) is often enabled in Windows XP SP2 and later versions. If the NetMail Setup program or a NetMail module cannot be started, you will have to disable it. The Data Execution Prevention tab in System Properties can be used to selectively disable DEP for an application. Depending on the processor there might also be an Execution Prevention option in the BIOS which has to be disabled, too.

International code pages in received emails are converted to UTF-8 for the clients. This requires that all used Windows code pages are installed on the NetMail server, otherwise an error is written to the gateway log like "MultiByteToWideChar error: missing codepage 28671". In Windows Vista/7/2008 and later, all code pages are already installed by default. We recommend to add all international code pages (like Chinese, Japanese etc.) on earlier Windows versions like 2000 and XP.

Mailer.exe, gateway.exe and, if and only if mobile external clients will be used, also host32.exe should be linked in the startup folder of Windows to ensure that they are loaded automatically at boot time.

Step by step - a short instruction

First of all, you should create a catch-all POP3 account at your Internet service provider. Other POP3 accounts for this domain must either be deleted or redirected to the catch-all account. (Mails for other domains or accounts can be retrieved separately.)

On the gateway PC, simply follow these steps:
- Unpack NetMail.ZIP into an empty temporary folder, e.g. c:\Windows\Temp (not applicable for CD).
- Launch the SETUP program, select English as language, and install NetMail e.g. to c:\NetMail.
- For LAN clients, the gateway's hard disk (typically C:) must be accessible as a network share (read+write).
- Launch the gateway configuration from the Windows start menu (Programs/NetMail).
- Enter your own main domain, e.g. mydomain.com, and (if applicable) additional domains.
- Create at least one user in the configuration program (username = address part before @).
- Launch "Mailer" and "Mail router" using the windows start menu, they must run always!
- Open the Mailer configuration menu and enter the settings for POP3, SMTP and (if applicable) RAS.
- If you want to use conventional mail programs as clients, enable the SMTP/POP3 ports.

On the network workstations, please follow these steps:
- Create a desktop link to autosync.exe on the server, e.g. to
   \\server\c\shamrock\netmail\autosync.exe
- Click on this link to launch the NetMail client program.
- Select "Own e-mail address" in the client configuration menu to choose a username.

In the gateway PC, at least mailer.exe (Mailer) and gateway.exe (Mail router) must run all the time. All settings are explained in detail later in this manual. - Please note that clicking on [x] at the top right of these programs only minimizes the corresponding window. To terminate the mailer or router program, right-click its symbol in the system tray at the end of the task bar.

The transfer module for mobile clients

The NetMail transfer module host32.exe needs to run on the gateway PC only if mobile external NetMail clients should be able to access the gateway via modem, GSM or ISDN. Normally it is only visible as a small world symbol in the task bar and can be opened by clicking on it.

The transfer program automatically knows that it is running in gateway mode because it detects that gateway.exe is present in the same directory. In this case, it will use the account database for verifying logins.

TCP/IP driver, RAS, Internet service provider

If the POP3 and SMTP servers are accessible via a router or are located in a local network segment, the TCP/IP protocol must be bound to the network adapter. Set the RAS configuration to "none" in the NetMail mailer module.

If you are using a dial-in connection to your Internet service provider, a RAS entry must exist for this provider. TCP/IP should be the only protocol bound to this RAS entry. In the NetMail mailer program, this RAS entry can be selected.

Log files

The NetMail modules create log files in the NetMail folder. If you have any problems using NetMail, please check these log files first since they give valuable information about possible causes.

File name max. size Content
Mailer.txt
Gateway.txt
Log_host.txt
Sms.log
Errors.txt
Status.txt
SmtpPop3.txt
configurable
1 MB
200 KB
100 KB
10 KB
one line
100 KB
POP3/SMTP/HTTP log
Mail router log
Transfer log for mobile clients
SMS log
Detected errors for alerting the administrator
Last mail exchange status for client status line
Trace or log of SMTP and POP3 ports

If the maximum log file is reached, the log is deleted to avoid filling up the hard disk space.

Mailer configuration

The mailer program on the gateway PC (mailer.exe) uses the standard protocols POP3 and SMTP to retrieve and to send emails from and to an Internet provider, either over a RAS connection or a router. The mailer automatically uses a POP3 login for authentication before it sends emails using SMTP. Alternatively, the SMTP "login" authentication is supported which is used by some providers. The mailer is also able to use duplex transfers, i.e. while emails are retrieved, outgoing emails are sent simultaneously.

All settings are immediately valid when you click on OK in the configuration window, restarting the mailer is not required.

RAS connection
POP3 (retrieving mails)
SMTP (sending mails)
Frequency of mail transfer
Other settings
Virus filter update

If your e-mail provider offers POP3/SMTP over SSL only (secure socket layer, encrypted connection), you can use the free STUNNEL tool which can be downloaded here (please unpack into the NetMail folder and read the file STUNNEL.TXT).

RAS connection

POP3 (retrieving mails from the provider)

SMTP (sending mails to the provider)

Frequency of mail exchange

Other settings

In the text windows of the mailer you will see the complete dialogue between your system and the POP3 and SMTP servers. The letter on the left of each line means:: D = RAS, P = POP3, S = SMTP, H =HTTP.

Virus filter update

The menu item "virus filter update" in the Mailer configuration menu manually loads an up-to-date list of barred file types from the Shamrock server. The proxy and RAS settings from the Internet options in the Windows control panel are used. The configuration program should be closed prior to this action. - In the commercial version NetMail XL, a daily automatic download can be configured in the Mailer settings.

Router configuration

The mail router (gateway.exe) distributes incoming emails to the appropriate users by checking the mail headers, and routes outgoing mails to the mailer which then sends it to an SMTP server. The mail router is displayed as a small symbol in the task bar which can be opened by clicking on it. The configuration button or also the gateway configuration item in the Windows start menu at Programs/NetMail allows these settings:

Domains
Users
Reception
Transmission
SMS configuration
Printing
Return mails
External programs
User alias
Subject alias
From alias
To alias
Spam options
Spam text filter
Blocked senders
Allowed addresses
Blocked file types
SMTP/POP3
Log files

Domains

Users

Reception

Transmission

SMS configuration

To use the SMS function, you will need an external GSM modem (e.g. Siemens TC35i for reception and transmission) or an HTTP-based SMS provider (transmission only). The ISDN sending option is only available in Germany.

If Shamrock's CapiCall software is installed, its SMS module will be used instead of the NetMail SMS module. Consequently, the SMS settings in NetMail are not available in this case.

With a GSM modem at the gateway, it is also possible to receive SMS messages from cell phones. These message should have this format, including either a local user name or a full Internet address before a colon:

postmaster: Hello postmaster, call me please!
smith
(at)gmx.net: Mr Smith, I'll be one hour later today.

If no valid address is found at the beginning of the message, the gateway will look up which user has sent a message to this cell phone earlier, and will route the incoming SMS to this user.

In the configuration program the following settings are available:

Common

Configured networks

This option tells the program which ISDN SMSCs are available for different networks and is only applicable in Germany. It is best to delete all entries if you are outside of Germany. In this case all messages are sent via HTTP (if configured) or via the GSM modem. It is also possible to block specific area codes setting the protocol to OFF.

ISDN

Only applicable in Germany. But please note that the first item (external access digit) must be configured even if you are using a GSM modem.

GSM (not supported by NetMail-Light)

HTTP (not supported by NetMail-Light)

If you send many SMS messages every day, a registration at a web-based service may be an alternative. NetMail supports providers like massenversand.de or smscreator.de and requires the following configuration parameters for it:

If HTTP delivery fails two times for one message and GSM is configured also, then the third try will use the GSM modem. If five consecutive HTTP deliveries fail, then the software falls back to GSM for 10 messages and then retries HTTP.

Printing

You may select here if sent and/or received emails are printed out automatically using the standard printer, and how many pages shall be printed.

Return mails

The gateway sends return mails back to the sender if an e-mail cannot be processed or is deleted (at least if the Return-Path in the original header is not empty and matches the From address, and if either at least one mail was sent to this address before or if the mail contains a Received-SPF: pass header). If required, you may deselect some of them:

* If one sender causes this error or is blocked by the virus filter 5 times consecutively within one hour, further mails from him will be blocked without a return mail and with "(blocked by DoS policy)" in the log for one hour.

The following return mails only apply to the fax redirection and cannot be deactivated:

In addition, there are two text fields:

The option Detection of unjustified return mails due to faked sender addresses analyses bounce mails if they were sent due to spam or viruses with a faked From field, and deletes them accordingly. For this purpose, an internal list is used with all addresses where NetMail users have sent emails during the last 21 days. If a return mail either does not contain one of these addresses or a line "Received: by mailer.<local domain> ...", it will be deleted.

External programs

User alias

You can create virtual users with alias names. For instance, you can create names like "info" or "postmaster" and reroute these names to existing persons like "Smith" and "Johnson". The alias destination can either be an internal address (name only without @ or domain) and/or any external Internet address (including @ and domain). Upper or lower case is ignored.

Even a two-stage alias is possible. You may route a mail destined for info to postmaster and from there to smith. It is also possible to use more than one destination address for an alias name, separated by commas, even including an archive. The following destinations are reserved:

An asterisk (*) is used if no valid local destination address is found. If you route * to postmaster, the postmaster will get all emails which are addressed incorrectly. If you do not have such an asterisk alias, return mails are created ("user does not exist" or "no local address found").

If you do not own a domain of your own, you must configure an asterisk alias to avoid that the gateway creates return mails if a received e-mail contains other addressees within the same domain. If you do have a domain of your own (or more than one), you should at least create postmaster and webmaster as alias names and redirect them to a person.

The alias settings also determine if a user is allowed to use a different name than his own when sending emails. If he does so, his real name in the From line (like "George Bush", taken from the user database) will be replaced by the alias name, e.g. "Info". With NetMail XL, the NetMail-XL license name will be added in front of it, e.g. "Whitehouse-Info". However, if you write an exclamation mark at the end of the alias destination (e.g. "bush!"), the license name will not be added.

The alias destination can be comma-delimited combination of several usernames (no @), mail addresses (with @ and domain) and/or archives (A: or P:). The received mail will be copied to all these destinations.

Subject alias

Depending on the subject line external emails can be rerouted to different addresses. This is handy for unsolicited emails containing words like "Make $$$" or "porn". Upper or lower case is ignored. If the word you enter here does not contain spaces or punctuation characters, then camouflaged subject words like v-iag.ra are also found.

The destination may be one or several internal user names, one or several external and internal Internet addresses, or a special alias like NOSPAM or REJECT (see user alias). Please note a few special cases:

From alias

In some cases emails do not contain valid addressing information, e.g. newsletters. To avoid that these emails are lost, it is possible to route them to predefined internal users depending on the sender. For the From alias, any part of the sender's address will do, e.g. "letter" instead of "newsletter(at)somewhere.com". Upper or lower case is ignored. The same destination options (like NULL, SPAM or NOSPAM) apply as for the user alias. A:... or P:... can be used for redirecting emails to a public or private archive; no spam check is done in these two cases.

If there are different aliases for a given mail, they will be used in this priority: From, subject, user alias. If different alias methods use SPAM and NOSPAM for the same e-mail, the NOSPAM keyword has a higher priority.

To alias

If you redirect mails from a different, rarely used domain or from a single mail address to your POP3 provider, it makes no sense to configure it as an additional domain in the mail router. Instead, you can use a "to" alias to route all mails addressed to e.g. my-name(at)example.com to a NetMail user name, like postmaster. So all rerouted mails from your secondary account will be treated as they were addressed to your postmaster mailbox. Please be aware that the destination cannot be an external address with @, it must be a valid NetMail username or alias. Special alias destinations like SPAM, NOSPAM or A: are also supported for this alias type, see user alias.

If you want a special realname to be displayed when selecting the To Alias as "From" for sending an e-mail, add the To-alias mail address and a corresponding realname in the NetMail address book.

Spam options

NetMail checks if an incoming external e-mail is probably an unsolicited, unwanted spam e-mail, using a number of rules. If the percentages of the matching rules add up to 100 % or more, the mail will be blocked, and a return mail "blocked by spam filter" is sent back. (Values in [brackets] are recommended, partly higher than defaults.)

Detected spam emails are written to the gateway log (gateway.txt) with "Blocked by spam filter" and a combination of these underlined letters, e.g. H=HTML. In addition, an A is possible for the Alias destination "SPAM", P for Phrase (text filter), and * if it is a known sender. If "Always write spam probability to log" is enabled, these criteria will be written to the gateway log even if their sum does not reach 100 %. A sum above 200 % will suppress any return mail, and 1000 % or more will ignore any whitelisting (NOSPAM alias).

A From alias "NOSPAM" disables the spam filter for specified senders. (No spam check is done for internal NetMail senders, so this entry is not required for them.)

If one or more spam criteria are found in a mail, but it is not deleted because their sum does not reach 100 %, an additional header line "X-Spam-Status" with a list of these criteria is inserted. To find the optimum settings, it is useful to activate backup files for deleted mails in the router settings. To view these files in spool.dir later, the commandline option /v of the client software can be used, for instance:
c:\shamrock\netmail\mailedit.exe /v:c:\shamrock\netmail\spool.dir\13958379.txt

HELO filter: The HELO filter can be useful for fighting spam. It searches the Received lines in the mail header for "(Helo=...)" or "(Helo ...)". Several space-delimited entries are possible. The symbol ^ matches from the beginning of the string and $ at its end. Without ^ and $, the position can be anywhere in the HELO string. The search is not case-sensitive. Example:
.kr$ ^yahoo.com$ .dsl.
The mail will be blocked if .kr is at the end of the HELO string, if the string is exactly yahoo.com, or it contains .dsl. somewhere. (Mails from yahoo.com will not be blocked, because the true mail server of Yahoo is e.g. mx01.yahoo.com and not just yahoo.com!).

Spam text filter

In addition to the options above, NetMail allows to define words or phrases with a spam probability in percent, e.g. 80 % for "Viagra". Negative values are allowed for words which are typical for non-spam. If several words in a phrase are delimited by "+", the phrase requires all these words to appear in the text, e.g. "offer+cheap". No return mail "Blocked by spam filter" will be sent if the sum reaches 200 or more. The phrases are searched in the mail subject and (for performance reasons) in the first 1000 characters of the text body. Punctuation marks are ignored when comparing the text. If the entered string contains such characters, the remaining relevant characters are displayed for reference as "Effective filter".

Blocked senders

Known senders of spam or viruses, like "hahaha(at)sexyfun.net", can be blocked explicitely by entering any part of the address, like "hahaha". Mails from them are deleted without sending a return mail. The gateway log will show something like "(blocked by HAHA)". The function is basically the same as using a From alias with NULL as destination.

Allowed addresses

If you have entered a subject password in the user database, it is possible to enter addresses (or any part of them) for which the subject password will not be checked. Several addresses or address parts can be entered within one line, separated with commas.

It is not necessary to enter addresses containing the words Postmaster or Daemon because emails from them are always allowed, ensuring that return mails are not suppressed. The spam filter is not affected by these addresses, however it can be deactivated by using NOSPAM as a From alias.

Blocked files

Some file extensions can be blocked in received attachment, e.g. .vbs, .exe or .scr with specified file lengths. (The menu item "virus filter update" of the Mailer program updates the current definitions with a simple mouse click.)

A received attachment name will be compared with the list of blocked file types from right to left. Several types can be combined in one line using "+" signs. Optionally, a comma and a file length can be written behind the extension, e.g. for known viruses. If an asterisk is inserted, the string left of it can appear anywhere in the file name. Upper or lower case is ignored. If the file type matches, the receiver gets an "error.txt" which replaces the original attachment. A few samples:

.vbs
.???.exe
.exe+.com,72192
.exe,22000-24000
me.exe
\readme.exe
\ab*.exe
ab*.exe
Visual Basic script files (extension .vbs) are blocked
Faked EXE files with double extensions are blocked
Blocks .exe and .com files with a length of 72192 bytes
Blocks .exe files with a length of 22000 to 24000 bytes
Blocks file names ending with me.exe, e.g. readme.exe
All files with the exact name readme.exe are blocked
Names beginning with ab and ending with .exe are blocked
Names containing ab and ending with .exe are blocked

The comment for each file type can contain keywords with special meanings:

In addition, to avoid typical mail viruses, NetMail will delete a mail completely and writes "blocked by HTML scan", "Executable without text", "HTML decoder line length xxx exceeds limit" into the gateway log if:

  1. an HTML attachment or alternative contains the character string "<iframe ...>" which is typical for viruses,
  2. the content-type for an executable file is faked so the MSIE would start them without asking the user,
  3. the mail comes with an executable attachment and an HTML file but without a plain text body,
  4. the resulting line length of a decoded HTML body exceeds 10 K.

If an HTML alternative text (or an HTML-only mail) contains a section <SCRIPT ...> ... </SCRIPT> then this section will be deleted for security reasons. The mail is accepted, however the spam flag "M" (MIME problem) is set.

No return mail is sent in these cases because the sender's address is typically faked.

SMTP/POP3

You can not only use the NetMail client (autosync.exe) but also conventional email programs like Outlook, Thunderbird or a smartphone after activating the SMTP and POP3 ports in the NetMail server configuration. Recommended settings:

If you are using a firewall software, it must allow both configured ports for accessing the program Gateway.exe. If SMTP/POP3 should be possible from the Internt, a port forwarding must be configured in the DSL/cable router for both ports. For a dynamic IP address a DynDNS provider is useful, e.g. dyndns.org.

The dialogue also allows to enable traces into a file SMTPPOP3.TXT; however, for performance reasons we recommend to do this temporarily for test purposes only.

In the mail client software, authentication is required both for sending and retrieving mails with the user name and password as configured in the NetMail account management (no @ and no domain). The method used is "Login" for SMTP and "Password" for POP3.

If the POP3 client software is configured to delete retrieved mails on the server (recommended!), they will only be marked as read if the account is set for a mixed-mode usage of the NetMail client and POP3, otherwise they will actually be deleted on the NetMail server. Note that if mixed mode is used, you can limit the size and file types of attachments transferred to the POP3 client by selecting the configuration item "Other mail clients" in the NetMail client. For a POP3-only account always all attachments are transferred.

Log files

Several log files can be displayed in the configuration program. Total status opens a window with a list of all user mailboxes (gate_mon.exe). It is possible to run it over the network but this should not be done all the time since it causes a significant network load. With small as a commandline parameter the program is an icon the system tray at first and opens a window when a new e-mail arrives for one user. Double-clicking the username opens the client with this account.

Account management

The account management function is the "Users" item in the configuration program. The free Light version of NetMail is limited to three users. LAN users are displayed in black, external clients in blue, administrators in red.

Create or edit user

Click on "New" to create a new user, or "Edit" to change an existing entry.

NetMail supports a mixed internal/external usage for someone who sometimes is a local network user but sometimes uses the mobile NetMail client. These users should be configured as LAN users. Emails which are retrieved or sent by the mobile user will then be archived in the gateway, thus they are still available when this user comes back to his network workstation.

The secretary function allows to use a different identity for outgoing mails. For instance, if your own identity is Smith but you want to send outgoing mails using the alias info(at)mydomain.com, simply enter "Sek:Info" in the Remarks field of the user account.

Notifications

If a user is declared as a "LAN user", the SMS or voice notification is delayed 10 minutes. It will be suppressed if the new mail has been read within this time; this avoids redundant notifications. No delay is used if the subject of the e-mail starts with "Alarm:". No notifications will be used for emails coming from a daemon, like return mails from a Mailer-Daemon, or fax confirmations from the Fax-Daemon.

A button User status allows viewing which alias names exist for a selected user and how many mails are in his mailbox. When deleting a user, please also delete the alias names (if applicable).

Gateway usage

Symbols in the Windows task bar

The mailer, gateway and transfer modules appear as small symbols in a corner of the Windows task bar. By clicking on a symbol using the primary mouse button, the module opens a larger window. The secondary mouse button (typically the right button) opens a small context menu.

Mail exchange

The mailer is designed to exchange emails automatically with a predefined frequency. For test purposes or for urgent mails, "Connect now" in the file menu can be used. In addition, the network client has a symbol "Dial now" which does the same thing from any workstation.

Mobile client

Using the mobile client it is possible to receive and send emails from and to the NetMail gateway via Modem, GSM, or ISDN, which is more efficient than other e-mail software due to its highly optimized, compressed and duplex transfer. If there is an unintentional disconnect, the transfer of a file will continue at the point where the connection was lost, which can save a lot of time and money in mobile applications. The mobile software is installed using SETUPM (not SETUP).

Unretrieved mails of mobile users (i.e. non-LAN users) will be deleted after 30 days. Archives and sent messages are kept on the mobile PC's hard disk instead of the gateway.

NetMail in a LAN

NetMail is a full-fledged network e-mail system. Workstations simply load the client software autosync.exe from the gateway's hard disk, using network shares. If you want to ensure privacy among network users, you can use the Windows read/write privileges for user folders.

Pinboard files in the For_all subfolder can be accessed from all workstations. Only one user can edit them at one time using the NetMail editor. These files cannot be created or deleted from within the NetMail client; the Windows explorer must be used to do this. Documents in For_all are also transferred to mobile users if they are new or their file time has changed. To make them available over the web interface of NetMail, simply add a line like For_all=c:\Shamrock\Netmail\For_all,U below [Alias] in HTTPSERV.INI. For instance, the list with all current dates is then available in a browser using http://servername/for_all/termin.txt as address.

List server

The NetMail gateway has an integrated list server, allowing to send one mail to many recipients by using a special destination address like news.list(at)mydomain.com. (In the free NetMail Light version, the number of addresses in a list is limited to 10.)

For using a distribution list, you have to create a folder LIST.DIR below the NetMail folder with one or more .TXT files containing addresses (one per line). If the file name is news.txt, for instance, the address of this list is news.list(at)mydomain.com. Here is a step-by-step instruction:

  1. Ensure that "local mails" is activated in the mailer configuration.
  2. Create a file NEWS.TXT in a subfolder LIST.DIR.
  3. The first line can optionally contain flags with list properties (see below).
  4. The following lines contain all destination addresses, one per line. These are also used for identifying legal senders.
  5. To send a mail to all list addresses, send it to news.list(at)mydomain.com (with mydomain.com as your main domain as configured in the mailer and gateway mail router modules).

In the first line of NEWS.TXT it is possible to write "Flags:" and a combination of these characters (if there is no Flags line, S and U are activated automatically):

1 = One mail per recipient instead of Bcc addressing.
M = A normal mail is sent without a Reply-To: <list address> in the header; useful if the list is being used as a replacement for a long address book entry.
S = New users can subscribe sending a mail to news.list(at)mydomain.com with "subscribe" in the subject.
U =Users can unsubscribe sending a mail to news.list(at)mydomain.com with "unsubscribe" in the subject.
P = Mails to the list can be sent from anywhere from the internet, otherwise only from local NetMail users.
A = The sender of a mail will be anonymous (only applicable if P is used at the same time). Otherwise his address will be displayed at the end of the text.

If you write a NetMail username behind the flags, separated by a comma, only this person is allowed to send list mails, and mails to the list address will be rerouted to him. This will also work if a To alias pointing to this username is the sender.

Sample of a list server file NEWS.TXT
in the subfolder LIST.DIR:
Flags: 1SU
smith
(at)gmx.net
john
(at)hotmail.com

It is possible to add comments into each line as long as do not contain a @ character and they are separated by spaces, e.g.:
Smith smith@gmx.net (Customer)

In public lists (flag P) mails will be rejected if their length exceeds 100 K. Please also note that it is illegal to send emails to persons who did not opt-in for this service.

The From: field will always contain the original sender of the e-mail. If flag P is used or the list is moderated (username behind flags), an additional Reply-To line with the list address and the primary domain is inserted so that all answers to the the list.

HTTP server

The mailer module contains an HTTP server. Its primary purpose is the Webmail interface, which allows reading and writing emails with a conventional web browser. But you can also use it as a simple Intranet server for HTML documents.

TCP/IP connection

A prerequisite for running the HTTP server is that TCP/IP is bound to the network interfaces on both the gateway PC and on the workstations. If there is no DNS server in your network, it may be necessary to create a HOSTS file in the Windows folder of all workstations which tells the system what IP address the gateway has. Example:

127.0.0.1   localhost
192.168.0.1 server

On the gateway PC, you can enter http://localhost in the address line of the browser to access the NetMail HTTP server, and http://server (without www) from other workstations if "server" is the gateway computer name. Alternatively, you may also use http://192.168.0.1 (i.e. the gateway's IP address).

HTML files

The file being displayed when the HTTP server is addressed without explicitly entering a file name is index.htm, index.html or index.htx.

It is possible to edit .htx files using Frontpage or Frontpage Express, quite similar to .htm files. The extension .htx is commonly used for files containing server variables. Some server parameters can be edited in the file HTTPSERV.INI. HTTP access is only logged in the mailer log if the log is set to "normal" or "explicit" in the mailer configuration.

Webmail interface

If you do not use Windows, or if you have a handheld PC or tablet PC with Windows CE, you cannot use the normal NetMail client. For this reason, NetMail comes with a nice Webmail interface, so you can read and write emails with any web browser like Internet Explorer, Netscape, Opera or Mozilla, even on a palm-sized Pocket PC (it is a good idea to set the font size to "small" in the Pocket Internet Explorer so that more fits onto the screen!).

To use the webmail interface, you will have to activate the HTTP server in the mailer program and enable webmail access in the account management.

(Because of the limited capabilities of a web browser and to limit the data transfer volume e.g. on GPRS connections, the webmail interface does not have all of the capabilities of the Windows client: There are no archives, including the trash, and the address list cannot be edited here.)

If your browser supports Javascript and cookies, the login page will come up with the last recently used username automatically, but you still have to enter the correct password.

Technical details

Sounds
Tips for CapiCall users
Mail to fax with CapiFax
Sending files automatically
Receiving files automatically
Additional POP3 accounts
Mailer integration in other applications
Folder structure
Configuration data in HTTPSERV.INI
HTML files for the webmail interface
SMS interface
What you should know

Sounds

The mailer uses Windows standard sounds in some situations, for instance when an error occurs. You can use the Windows sound settings to change these.

Tips for CapiCall users

When the CapiCall voice server is started, it automatically detects if NetMail is installed. In this case, the MAPI interface is no longer used for voice-to-mail functions, but instead CapiCall creates OUT files in the SPOOL.DIR folder of NetMail.

CapiCall already comes with a list of holidays. NetMail can use this CapiCall file if you replace the content of FEIERTAG.INI in the NetMail folder by a single line (the path is an example only):
c:\Programme\CapiCall\Feiertag.ini

Also, NetMail will use the SMS interface of CapiCall if it detects that CapiCall is installed. Consequently the SMS settings in the NetMail configuration are blocked in this case.

Mail to fax with CapiFax

If you create a NeMail username FAX and CapiFax is installed on the NetMail gateway PC, external mail senders can transmit faxes via your NetMail server by sending a plain text e-mail e.g. to 0891234567.fax(at)mydomain.com. If the subject contains the four characters Ref= (case-insensitive), all characters behind it up to the next space, semicolon or comma will appear as a remark in the CapiFax log.

The mail to fax interface cannot send attachments. The footer text configured in the mail router is added to the text. It may be advisable to configure a subject password to avoid misuse. The maximum text length is 7000 characters. The mail sender will get a positive or negative confirmation after the fax has been sent.

Besides CapiFax, an ISDN adapter with a CAPI 2.0 driver is required supporting fax functions, e.g. AVM Fritz, B1, C2, C4. A CapiFax account has to be selected in the mail router.

Sending files automatically

The mailer module can send predefined files automatically at specified times. To do this, you simply have to create a file AUTOSEND.TXT in the NetMail folder which must look like this:

M07:00 W12:00 15:30
ab(at)xy.net, cd(at)xy.de
c:\work\abc.txt
\\server\d\*.log
1st line: Time(s), M=Monday, W=weekdays
2nd line: Destination address(es)
3rd line: First file to send (or file mask)
4th line: 2nd file (or file mask)

One or more time(s) can be given in the first line. A preceding W means weekdays only (not Saturday, Sunday or holidays), an M means Monday only. The files are transmitted during the next dial-up after these times. Please also note:

All file names must have a fully qualified path. Joker (*) and wildcards (?) can be used in file names (not in the path). The files must not be write protected or open when they are sent.

It is also possible to send different files to different addresses by writing destination addresses and files alternatively. The same autosend times apply for all addresses:

07:00 W17:00
ab(at)xy.net, cd(at)xy.de
c:\work\abc.txt
info(at)def.com
c:\work\def.txt
1st line: Time(s), W=weekdays only
First destination address(es)
Line(s) with file(s) for first destination
Second destination address(es)
Line(s) with file(s) for 2nd destination

The menu item Autosend in the mailer module allows to use this function at any time. It creates an outgoing e-mail which will be sent during the next mail exchange.

Receiving files automatically

a) Appending new data to existing files

If you send a file from a web server as an e-mail to the NetMail gateway PC which should then be sent as SMS, this data must be appended to SMS.JOB in the NetMail folder (or in the CapiCall folder, if CapiCall is installed). To achieve this, create a user "Job-Daemon" in the account management. A subject password may be advisable to avoid misuse.

An incoming mail to Job-Daemon(at)mydomain.com should then have this structure:
<Product>/<Filename>:<Line-content>
Example:
NetMail/SMS.JOB:3,00.00.0000 00:00,491721234567,,Smith: Test message
All Shamrock programs can be used for "product". NetMail will search WIN.INI below [Shamrock] for a line <Product>=<Path>.

b) Creating files from received mails

NetMail can save received attachments to any path. To do this, create a user "File-Daemon" in the account management. A subject password may be advisable to avoid misuse. A path in the "Remarks" field is used as a filter: Received files not matching this path are deleted.

An incoming e-mail must have a path information in the text body. The form is:
<attachment-filename>=<destination-pathname>
Example:
Test.bin=C:\work\Test.bin
If an asterisk (*) is used before the dot in the destination name, the filename is filled up with digits to a length of eight characters, so a new file is created for each mail. Example: Test*.bin as destination file name will create Test0000.bin,  Test0001.bin and so on. If the file name already has eight or more characters, three digits are appended, e.g. Long_file*.bin is expanded to Long_file000.bin.

Additional POP3 accounts

By starting the Mailer program a second time with a digit as commandline parameter, it is possible to retrieve emails from an additional POP3 account, e.g. a formerly used account. Example:
mailer.exe 1
The digit specifies the additional instance of the program. Its configuration is totally independent from the first one, but only the POP3 functions are available for it, no SMTP or HTTP server functions. Up to nine additional POP3 accounts can be used this way.

In addition, a To alias must be configured from the additional POP account (e.g. smith(at)example.com) to a local username or user alias (e.g. info or postmaster). When sending emails, this additional account will appear in the list of available From addresses..

The domains of these accounts should not be entered as additional domains in the mail router configuration. If RAS is used, it is advisable to use different daytime hours and a different dial-in frequency for each POP3 account to avoid conflicts. In the mail router, the envelope-to setting must not be "never" for using this feature.

Mailer integration in other applications

Sending and receiving emails

Mails to send must be RFC2822 and MIME compatible and reside in the NetMail subfolder SPOOL.DIR as .OUT files. Other applications creating such files should first create these as .TMP files and rename them to .OUT when they are ready. This avoids access conflicts while they are open.

The mailer sends an e-mail to all addresses behind the header fields To:, Cc: and Bcc:. Several addresses can be separated by commas. The Bcc line will be removed when sending the mail (blind copy).

Received files are saved as .IN files in SPOOL.DIR. Typically they are read, processed and deleted by the mail router program (gateway.exe).

To force a mail exchange, an application can create a file POLL.NOW in the NetMail folder. The mailer will delete this file after the mail exchange (POP3/SMTP) took place.

The mailer creates a file ERRORS.TXT if a mail exchange fails three times. The gateway mail router detects when the archive attribute of this file changes and can alert the administrator e.g. by writing a file SMS.JOB.

HTTP server applications

In a folder /cgi-bin/ below the HTTP root, applications with .EXE or .BAT as file extensions can be stored and used by HTML forms. When such programs are called, two commandline parameters are passed to them:

  1. Pathname of the file which the application must create as an HTML answer page;
  2. Pathname of a file with the form data of the calling page. The first line contains the MIME encoding type, and the following line shows field names and their values, typically in the form name=value with & as delimiter. The parameters HTTP_REFERER (previous URL) and REMOTE_IP (user IP) are added automatically.

Note that it is not possible to read files in the reserved cgi-bin folder for privacy reasons, and that the runtime of such programs is limited to five seconds.

Folder structure

The following subfolders are created in the NetMail folder:

Below RECEIVED, SEND_TO and ARCHIVE additional folders are created using e-mail addresses as names. Each mail will get a unique file name and the extension .TXT. For attachments a subfolder with the same name is created.

Configuration data in HTTPSERV.INI

HTTPSERV.INI contains optional and special settings for the webmail interface and the HTTP server. You can use any text editor to change these settings. Comments are allowed behind a semicolon. The mailer should be restarted after changes.

[Server]
Root=http.dir
Bind=192.168.0.1
Accept=192.168.
Blocked=1.2.3.4
AddMon=c:\*.log
MonLen=1000
Root is the main folder for HTML files. If no absolute path is given, the path is relative to the NetMail folder.
Bind binds the server to a specified IP address. This may be useful if the gateway PC has more than one network card or uses RAS connections.
Accept can be used to allow a group of IP addresses, typically a local-area network segment.
Changes to the following values do not require a mailer restart:
Blocked can be used to block one specific IP address..
AddMon extends the server variable <%monitor%> with extra files. Several names can be given, separated by commas. Wildcards and jokers are allowed. A full path is required.
MonLen
sets the maximum length of a file displayed by the server variable <%monitor%> (default is 500 bytes).
[Alias]
mydocs=d:\work
c=c:\,smith:xyzt
pub=d:\public,U
c=c:\,L
Lines below [Alias] allow to create virtual paths or files. In this example, http://localhost/mydocs/ will display the contents of d:\work, and http://localhost/c/ displays the root directory of the hard disk. Optionally, behind a comma, an authentication can be given:
Username:Password requires a log-in with these credentials (not case-sensitive), or
A requires a NetMail administrator user/password,
L requires a NetMail user/password who is configured as a LAN user,
U requires any valid NetMail username and password.
It is also possible to use a new URL as destination, e.g. google=http://www.google.com, but not authentification can be requested in this case.
Note: Be careful! An alias to a local folder can be a security risk if no password is required.
[Hosts]
xyz.com=c:\xyz
If several domains or subdomains are hosted under one IP address, additional domains can use different HTML folders. The Root= and [Alias] settings is irrelevant for these, but the same path syntax and authentication methods as for Alias can be used.
[Colors] Here the colors used in the webmail interface can be changed.
[MIME] Defines the MIME types of file extensions. Typically no change is required.

HTML files for the webmail interface

The HTTP server interpreters server variables in .htx files. They start with <% and end with %>. These strings are replaced by the content shown in the following table.

Server variable Purpose
<%addresses%>
<%addurl%>
<%date%>
<%from%>
<%include:file%>
<%mail%>
<%monitor%>
<%readmail%>
<%reclist%>
<%sentlist%>
<%server%>
<%status%>
<%std%>
<%subject%>
<%time%>
<%to%>
<%username%>
<%wapstatus%>
A list of all e-mail addresses (private and non-private).
Adds the query string in an URL required for authentication.
Displays the current date.
Inserts a selection list will the user name and all alias names.
Inserts text file (use <pre>, max. 32K, relative or absolute path).
Relative path to mail file (from &r=... in URL)
Current gateway state (use <pre>, for LAN users only).
Displays header and body of an e-mail (name in URL parameter).
Shows a list of all received mails for the logged-in user.
Shows a list of all sent mails for the logged-in user.
Shows version of the NetMail software.
Result of the last mail exchange.
Standard macro (define "std" with Ctrl-F2 in the Windows client).
Inserts the subject text from the URL query string.
Shows the current time.
Inserts the destination address from the query string.
Inserts the current user name.
Returns the server status (number of new emails).

When submitting a form, the parameter action="@" is used for the mail interface. A file name behind "@" defines an HTML file which should be displayed after submitting the form. You will find an example in index.htx. The following form field names are checked by the webmail interface (upper/lowercase is ignored):

Field name Purpose
Bcc
Cc
From
Password
query
Sms
Subject
Text
To
Username
Blind copy address for sending mails
Copy address for sending mails
Sender's e-mail address (empty=default name)
Password for webmail log-in
Query string from URL as hidden field
SMS destination number
Subject text
Text of SMS to be sent
Destination address(es) for sending mails
Username for log-in

A virtual reserved path /sys/, used as a link in an HTML page, allows special actions. A file name behind /sys/ is mirrored to the browser as virtual name. The action depends on the "f" parameter in the query string of the URL. "r" is used for a relative pathname of a file; a "0" prefix defines the send_to subfolder, a "1" the archive subfolder. The "f" parameter can have these values:

/sys/ parameter Purpose
f=*open
f=*del
f=*dial
f=*logout
f=*hang
f=*reject
f=*popup
f=Filename
Opens a mail as a text file
Deletes a mail
Forces the mailer to initiate a POP3/SMTP mail exchange
Logs out the current user
Disconnects an existing RAS connection (e.g. proxy)
Deletes received mail, creates a return mail "User does not exist"
Relays a popup message from the Internet to LAN clients
Opens an attachment

The parameter f=*hang is especially useful to disconnect a proxy on the gateway PC. No NetMail user login is required for this, but the command is ignored if the client's IP address does not begin with 192.168. Example:
http://server/sys/?f=*hang

The command f=*popup can also be used by a PHP or Perl script on a web server to send a status message to NetMail clients. To do this, a simple HTTP GET command with the following syntax is sufficient:
http://Domain/sys/?f=*popup&t=From,To,Password,URL_encoded_text
A typical sample:
http://example.dyndns.org/sys/?f=*popup&t=Webserver,*,Secret,This+is+a+test

You will find a couple of examples for some variables and URL commands in the .htx files located in the NetMail subfolder HTTP$.DIR, representing the HTML templates for the webmail interface.

SMS interface

SMS messages can be sent from any other application by appending a line to SMS.JOB. Example:
3,00.00.0000 00:00,491721234567,,Test message
The parameters of this line have the following meaning:

With a GSM modem connected to the gateway PC, SMS messages can also be received. They will be written into the SMS log. Example:
08.07.2001,09:08:14,GSM <<,+491721234567,0.0,Hi this is a test.

A received binary (non-text) SMS will be create this log entry::
08.07.2001,09:08:14,GSM <<,+491721234567,0.0,FILE=SMS\4822FE00.SMS
In the SMS subfolder the binary SMS will be saved with a 16-byte header:

16 byte sender number  (terminated by null byte)
11 byte reserved
1 byte UDHI (User Data Header), typically  0
1 byte PID (Protocol IDentifier), typically 0 = normal SMS
1 byte DCS (Data Coding Scheme), recommended: hex F7
2 byte SMS data length, least significant byte first

A received binary SMS can be re-sent using this line in SMS.JOB:
3,00.00.0000 00:00,491721234567,FILE=SMS\4822FE00.SMS
In this case the sender's number in the header is ignored.

What you should know

Addresses and domains

Numerical limits

License agreement

For NetMail-Light:
The free NetMail-Light version is limited to three usernames and does not support GSM modems for SMS. Shamrock does not offer a hotline by phone for free software. Distribution of this version on other web sites or on CD ROMs without an explicit permission from Shamrock is prohibited. Shamrock Software is the author of the program and of this manual and reserves all rights, including copyright regulations.

For NetMail-XL:
The owner of a NetMail license is authorized to install and run the gateway software on one PC. The client software may be started from and installed on any other local or remote PC. Shamrock Software grants the right to use the software but does not transfer ownership. This right ends if the invoice is not paid in time or if any term of this license agreement is violated by the user.

For all NetMail versions:
Shamrock Software does not allow the use of this software for purposes which are illegal in the customer's country, such as sending spam mails. - NetMail includes a basic protection against e-mail worms and spam. This additional function is not covered by a guarantee. By principle, it cannot find all harmful attachments one can think of. Shamrock therefore recommends not to open or save any file attachments which have not been demanded from the sender.

Shamrock Software GmbH

Shamrock Software GmbH