# 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 Search for... Access denied Alias names Allowed addresses Autosend Browser CapiCall CapiFax Configuration Daemon Domain/mailer Domains/gateway Fax transmission File reception File types Firewall Folder Folders From alias Gateway cfg. Group address HELO filter Holidays HTML files HTX files HTTP server Light version List server Mail exchange Notification Own number Installation Internet provider LAN access Log files Mail to fax Mailer Mailer-Daemon Network Overview Outlook Passwords Phone call POP3 POP3 clients Popup program Provider RAS connection Return mails Saturday/Sun. Secretary Size limit SMS configuration SMTP Spam filter Subject alias Subject password Tar pit Task bar Tech. details Timeout To alias Usage User unknown Username Virus Voice call Webmail Weekdays Weekend (Javascript required)

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 *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:

• The Light version accepts a maximum of three users in the account configuration.
• The integrated list server (e.g. news.listmyname.com) accepts only 10 addresses per list.
• Sending and receiving of SMS messages via a GSM modem is not supported.

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

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.

- 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.

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.

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

• Connection: Select a RAS connection previously configured in Windows, or "-" (none) if you are using a router or if the SMTP/POP3 servers are within your local-area network. Please note that with "-" the program cannot disconnect the line after the mail exchange; the router is liable for disconnecting e.g. using an inactivity timer..
• Username: Typically this field is automatically filled with the username of an existing RAS connection.

### POP3 (retrieving mails from the provider)

• Host name: Enter the Internet address of the POP3 server from which emails should be retrieved. If this field is empty, no POP3 functions are used, and the RAS connection (if configured) is only used if there are mails to send.
• Username: You should have got the POP3 username from your Internet service provider. Typically, this should be the name of a catch-all account from which all emails can be retrieved regardless of the name before @ in the destination address.
• Max. size [K]: Mails bigger than defined here will not be retrieved completely in order to protect you against huge unwanted emails. Instead, only the addressing header is retrieved. Enter 0 for no limit, or e.g. 5000 for 5 MB.
• Port: The standard TCP/IP port for POP3 is 110. Changes are only necessary if a local proxy is used. If so, the mailer will use an existing RAS connection and will not disconnect it at the end of the mail transfer.
• To retrieve mails from additional POP3 accounts, additional Mailer instances can be launched.

### SMTP (sending mails to the provider)

• Host name: Enter the Internet address of the SMTP server here to which your mails should be sent.
• Own domain: If you have a domain of your own like myname.com, enter it here.  Otherwise enter your full e-mail address here, e.g. smith2gmx.net. If your entry does not contain a @, the mailer assumes that you own the whole domain.
• Authentication: Some SMTP servers require an authentication. If so, try activating this option, typically if the server denies sending mails saying "550 Relaying Denied". The same username and password are used as for POP3.
• Local mails: If activated, emails to addresses within your own domain (see above) are not sent over the Internet but routed internally to other NetMail clients.
• Port: The standard TCP/IP port for SMTP is 25. Changing the port is only necessary if a proxy is used.
• Address limit: A few Internet service providers use a "tar pit" to protect themselves against mass mailings. The tar pit slows down the SMTP dialogue after e.g. 50 destination addresses. To avoid high RAS connection costs, you may enter the tar pit limit here so that no more than e.g. 50 mails are sent within one connection.

### Frequency of mail exchange

• Mon. - Fri. every ... minutes: Typically you want to have a more frequent mail exchange during work hours. This field sets the pause between mail transfers for Monday to Friday during daytime.
• Sat./Sun./hol: Defines the pause between mail transfers for Saturdays, Sundays and holidays. 0 means never.
• Holidays: This button opens a list of holidays. Please note that the date format uses two digits for day and month and four digits for the year.
• From ... to ... hours: Enter here when your working hours begin and when they end.
• Otherwise only ... min.: This defines the pause between mail transfers during the night and for weekends and holidays. 0 means never.
• Max. 2 minutes if outgoing mails: If activated, the pause between mail transfers is reduced to 2 minutes as long as there are any outgoing emails. If the SMTP authentication is enabled and a connection is caused by outgoing mails, no POP3 connection will be initiated.
• Duplex: Allows simultaneous sending (SMTP) and receiving (POP3) to save RAS connection time. Should stay off for broadband connections (cable, DSL, LAN).

### Other settings

• RAS/TCP timeout: The mailer will abort a mail transfer if it does not get an answer for a longer time than defined here. 30 seconds should work in most cases.
• Write log: Select if and how explicit a log file (mailer.txt) should be created by the mailer. With max. size [K] the maximum size of this file can be determined (0 = unlimited, not recommended). Delete kills an existing log file.
• HTTP server port: To activate the HTTP server with its webmail interface, enter 80 here (0 or empty = deactivated). If you have another web server running on the same PC on port 80, you may choose a different port, e.g. 8080. This will require a slightly different URL in your browser for NetMail's web interface:
http://Server:8080/index.htx
• Automatic virus filter update: This option is not available in the free "Light" version of NetMail. If activated, and after at least one mail with a size of 10...100 K has been received via POP3, a file filter is downloaded about once a day.

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

• Own main domain: If you own one or more domains, enter the most frequently used here. Otherwise enter the part of your e-mail address behind @, e.g. gmx.net.
• More domains: If you have more than one domains from which mails are routed to the POP3 mailbox of your main domain, enter them here. This ensures that incoming emails will be handled correctly. The name before @ will always address the same person in your network regardless of the domain name, except you are using an alias.

### Reception

• Backup copies of incoming mails: It is possible to store backups of incoming mails as TXT files in the SPOOL.DIR folder for later analysis. These files will be deleted each night at 2 a.m. if they are older than 12 hours.
• Envelope-To: Many POP3 servers add a header line "envelope-to:", "x-envelope-to:", "delivered-to:" or "x-pop3-rcpt:". NetMail can use this to handle BCC-addressed emails correctly even if no proper Received line is found. (The option is ignored if the provider does not create an envelope header line.)
Never: Only the To, Cc and Received header lines are used. Use this if the envelope header is bogus.
Only: Only the envelope is used, To and Cc are ignored. Use this if the envelope address is always correct.
Too: The envelope address is used in addition to To, Cc and Received. Use this if an e-mail to several users of your domain is stored only once in the provider's POP3 mailbox.
• Check for duplicate mails: Depending on the POP3 provider, the same mail might be delivered multiple times if it is addressed to multiple local recipients. If you often receive the same e-mail more than one time, enable this option; mails with the same sending time, sender and recipient are then stored only once.
• HTML alternative: Some emails contain two copies of the same text - one as plain text and one as HTML. If you do not want to get the HTML copy, set this option to OFF. This saves money when transferring emails to mobile users, and also enhances security because HTML files may load online content.
• Create plain text for HTML-only mails: If an HTML-only email is received and this option is enabled, NetMail tries to create a plain-text alternative which allows to view the text in the preview window, to search it in archives and to quote it in an answer.
• Force own HTML text decoder: With this option enabled (default off), NetMail always tries to decode the HTML alternative instead of using the plain-text part. Image links are then displayed as double-clickable [IMG ...] in the text.

### Transmission

• Pinboard, fax, SMS local only: If enabled, files in the FOR_ALL folder will not be sent to mobile users, e.g. the dates list, and only local users are allowed to send faxes (using the NetMail fax printer driver) and SMS messages. This option is typically activated if all mobile users belong to your own company.
• Allow SMS from internal users: If activated, NetMail users are able to send SMS messages via the gateway.
• Allow SMS from external senders: If activated, people from anywhere in the Internet can send SMS messages over your gateway by addressing them e.g. to 491712345678.smsmydomain.com (international number) or  01712345678.smsyourdomain.com (national number). To avoid abuse, you can create a NetMail user named SMS with a subject password.
• Confirmations to external users: If enabled, acknowledgement mails are created for SMS messages sent by external users to <number>.smsmydomain.com.
• Own mail address: This option allows to send emails with a local part of the sender address where the first letter and also letters behind punctuation symbols are in uppercase, e.g. Bob.Smith; otherwise all chararacters are lowercase like in bob.smith. The option does not affect alias names or domains.
• Anwer to archived mail into same archive: If enabled, an answer to an archived e-mail will be moved into the same archive automatically. Embedded links will be added in brackets and can be opened by double-clicking them.
• Copy all mails to this account: You can select a previously created account where a blind copy of all incoming and outgoing emails will be sent to. Please respect the corporate privacy law in your country and inform all users accordingly.

#### 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
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

• Own country code: The country code without leading zeros, e.g. 41 for Switzerland. This setting is used to check if a mobile number is national or international.
• Own number: Only used for Vodafone ISDN SMSC; should be your own terrestrial  telephone number.
• Start SMS module automatically: Only applicable if no GSM modem is connected; will start the SMS program automatically if there is something to send and uses the ISDN SMSC of the network operator (only applicable in Germany).
• Only last status to log: If deactivated, each retry will write one line into Sms.log. Otherwise, only one line is created no matter how many retries were necessary.
• Debug info in Smsdeb.txt: Writes a file SMSDEB.TXT with a trace of the ISDN/GSM/HTTP communication.

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.

• External access digit: If you are using a PBX, enter the external access digit here (typically a 0).
• Outgoing MSN: Must be a valid number on the PBX ISDN bus (e.g. 42).

GSM (not supported by NetMail-Light)

• Port: Select the port where the GSM modem is connected to, e.g. COM1 or COM2.
• PIN: The PIN required for the SIM card.
• SMSC: The SMS service center number of your network operator.
• Send all messages via GSM: If checked, the Configured Networks list is ignored.

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:

• Customer name: The provider calls this "directory" name. The URL (see below) uses the variable name %USER% for it. If this field is empty, the HTTP interface is not used.
• ID: This is the customer ID you get from the provider. %ID% is used for it in the URL.
• Password: This is the password you get from the provider. %PASSWORD% is used for it in the URL.
• URL: The server address can start with http:// or https://. If your web access requires a proxy, please make sure that it is configured correctly in the Internet Explorer connection settings. The variable %SENDER% is your own number as configured at "Common". The other variables represent the settings above.
• Response: You may leave this field empty if an HTTP 200 response always means no error, or enter a case-sensitive string like "OK" or "success" depending on the provider.
• Send all messages via HTTP: If checked, the Configured networks list is ignored.

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:

• User does not exist: The addressed user (address part before @) does not exist as an account or as an alias, or the user has actively rejected this e-mail. *
• No local address found: The mail retrieved from the POP3 server did not contain header data with a local domain. A From alias can be used to solve this problem e.g. for newsletters.
• Blocked by spam filter: The received mail is rejected as unsolicited bulk e-mail.
• User mailbox full: The maximum mailbox size for each user is ten times the configured maximum length for one attachment, or 50 emails. This limitation only applies to mobile users, not for network workstations.
• Access denied: A subject password is configured for this user, but the mail in question does not contain this word in its subject line. *
• Mail expired: The mail was deleted after the configured mailbox storage period. (This only applies to external/mobile users, not to local network clients.)

* 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:

• Attachments not supported: If a fax redirection has been activated, only plain text mails are possible.
• User temporarily unreachable: Sending an e-mail as a fax failed.
• Mail too long: The maximum text length for a fax redirection is 10 K. If necessary, you can change this in Gateway.ini below [Start] in a new line: Faxlimit=...

In addition, there are two text fields:

• Sender: If you have a domain of your own, like mycompany.com, this field should always contain MAILER-DAEMON. Otherwise enter the part of your e-mail address before @, e.g. smith2, if your address is smith2gmx.net.
• Additional text: This line will be added at the end of all return mails created by the system. It is also used for the mail-to-fax function. The character | can be used for "new line".

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

• CapiFax account: If you are running Shamrock's fax software CapiFax on the gateway PC, select a CapiFax account which will then be used for mail-to-fax.
• CAPI requires fax text with ANSI symbols: Change this option if special characters like ÄÖÜ are not sent correctly in faxes. For most ISDN adapters, the correct setting is off.
• Status popups: If you are using the optional POPUP program (see client manual), you can enter here who gets gateway messages, and which sort of messages will be reported.
• Using Popup over the Internet: For exchanging popup messages with external NetMail servers, enter your own HTTP server domain here (typically a DynDNS domain like example.dyndns.org). Optionally, a group password can be configured; messages not matching this password are silently discarded. See the popup section of the client manual for the addressing scheme.
• External alarm: If the mail exchange fails more than two times, the system can alert you either by sending you an SMS message to a cellphone or, if Shamrock's CapiCall voice software is installed on the same PC, a telephone call. The "Test" button initiates a test alarm.

### 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.

• The alias drop-down box does not contain all possible entries but only user names and some standard values. However, the alias field is editable so that other things like A:archive can also be entered. The validity is not checked so please be careful to avoid lost mails.

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:

• NOSPAM disables the spam filter for this recipient.
• NULL as a destination is used to delete an incoming mail without creating a bounce mail.
• REJECT deletes an incoming mail and sends a bounce to the sender. (An alternative is to block the sender.)
• SPAM will cause a return mail "Blocked by spam filter". However, if you create an alias or a user with the name SPAM, the e-mail will be stored in his mailbox, and no return mail is sent.
• A:archive will automatically store incoming mails to the given public archive name. For instance, If you wish to put all spam emails into an archive Spam, create a user alias from "SPAM" to "A:Spam". For a subarchive below another archive, "!" can used as a delimiter, e.g. "A:customers!smith".
• P:archive will automatically store incoming mails to the given private archive of the addressed user, similar to A:.

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.

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: • The subject alias will not be used for internal e-mails to avoid unwanted side effects. • A subject alias is ignored if the destination is a single user whose autoresponder is active. • If an alias word is written in CAPITALS, it must be an isolated word in the subject, i.e. limited by punctuation marks or spaces. ### 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 "newslettersomewhere.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-nameexample.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.) • [50 %] HTML-only mail without plain-text alternative • [75 %] RBL provider warning (X-RBL-Warning in mail header, Real-Time Blackhole List of open relays) • [50 %] SPF provider Warning (SPF "Softfail"); if enabled, an SPF "Fail" will block the mail without a bounce • [50 %] BCC-addressed (your address is not in To: or Cc: line) • [50 %] Only one Received line without local IP address (spam-typical direct SMTP delivery) • [50 %] Suspicious http link in body text (URL with IP address or with ? behind domain or online image) • [25 %] Suspicious sender address, i.e. real name does not contain all the letters before @ • [25 %] Subject is typical for spam (contains$, min. 5 consecutive spaces, or upper-case only)
• [25 %] Suspicious MIME structure (multipart-alternative without text, HTML does not match text or contains script, missing date)
• [50 %] No valid HELO (all HELO parameters in Received headers are syntactically wrong, e.g. no dot in domain)
• [-25%] Known sender: If a mail was sent to the sender within the last 21 days or the sender is found in the address book, and if no other criteria match 100 %, the spam score is reduced by this value. If 100 % is selected here, all mails from known senders are accepted regardless of other criteria.

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 "hahahasexyfun.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.

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:

• Virus: The e-mail will be deleted completely, only a gateway log entry is written. Files with this comment are also searched in ZIP attachments since many worms are now using this file type for spreading.
• Complain: A return mail is sent to the sender stating that an attachment has been deleted but the rest of the mail is being transferred to the receiver. (This should only be used in rare and special cases!)
• Ignore: The attachment is deleted without notice. Can be used together with Complain, if applicable.
• If none of these keywords is present, the attachment is replaced by a text file ERRORxx.TXT, informing the receiver about what was deleted.

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:

• SMTP port = 587 (so-called submission port; we recommend not to use port 25 which is reserved for mail deliveries between servers).
• POP3 port = 110 (standard port for mail retrieval).
• Allowed IP ranges = 192.168.0.0/16 127.0.0.0/8 169.254.0.0/24 172.16.0.0/12 (these are the common local-area network ranges). If you want to open the whole Internet, enter 0.0.0.0/0 here but make sure that the passwords are not too easy to guess.

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.

• It is a known problem of some smartphones, e.g. with the Android operating system, that they do not always handle the deletion of POP3 mails properly. As a result, emails may re-appear as unread once again after they have been deleted on the phone. This is not a NetMail bug; you can see it in the trace file what goes wrong. If the problem arises, delete emails in the NetMail client or in the web interface instead.

### 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.

• Important: If the "server configuration" privilege is set for at least one user, you will be asked for a name and password when re-starting the configuration program. If you forget the password, there is no chance to open the program again!

### Create or edit user

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

• Name: Enter the "real name" of the user here, e.g. "James Smith".
• User name: This is the part before @ in the e-mail address. The maximum length is 16 characters. Digits, letters, dots, underscores and dashes are allowed.
• Domain (behind @): If you have defined more than one domain in the gateway (mail router) configuration, you can select a default domain for this user which will be used when this user sends emails.
• Password: Only letters and digits are allowed here. The program makes a proposal with three random letters and three digits.
• Notes: This is a text field where you can put in any other information. With "Sek:Name" a secretary function can be activated.
• LAN user: Activate this for local network users, it ensures that the client reflects changes in the mail list and also enables popup messages for new emails (see client manual).
• All domains allowed: If checked, any configured domain can be selected in the "From" field when sending emails. (This option does not affect the reception of emails: A username or alias is always valid with all configured domains.)
• Must register locally: If set, the LAN user must always enter his name and password after starting the client (autosync.exe). Otherwise the last-used identity is reused.
• Webmail and POP3 allowed: If enabled, the user is allowed to access emails over the webmail interface and via POP3.
• Access to shared archives: If ticked, a LAN user can access shared archives in his Windows client and also the public address book. This option is not available for mobile/external users.
• Account management: If this option is set for at least one user, the configuration program can be started only after entering the name and password of a user with this privilege.
• Only used with an external mail program (POP3/SMTP): If enabled, emails retrieved/deleted by an external SMTP/POP3 client program are deleted in NetMail. Otherwise, e.g. for parallel use with a smart phone, they will stay in the new mails folder but retrieved emails will be marked as read; only unread emails are retrieved via POP3.
• Reception of HTML emails allowed: If enabled, this setting overrides the global setting under "Reception"; this is primarily useful for POP3 clients.
• Subject keyword: If you enter something here, incoming mails for this user are rejected if they do not contain this string of characters in the subject line. The string itself is removed when the mail is put into the local mailbox. If allowed mail addresses are specified, mails from these will go through even if they do not contain the subject password.
• Notification: There are several ways to notify a user when a new e-mail is received. Select "LAN" for local network users. Other options are described below.

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 infomydomain.com, simply enter "Sek:Info" in the Remarks field of the user account.

• None: Typically used for local network users.
• E-mail: Sounds funny, but is quite useful for SMS notifications if the GSM provider has a mail-to-SMS gateway. It is also possible to enter several addresses here, separated by commas.
• SMS: If a new e-mail is received, an SMS message is sent with the sender's address and the subject line. You will need a GSM modem connected to the serial port of the gateway PC to use this function (not applicable for the free Light version of NetMail).
• Fax: Not truly a notification, but a redirection. The text body of an incoming e-mail is sent as a fax, and the e-mail is deleted. It is necessary that the CapiFax software from Shamrock is installed on the gateway PC, and a ISDN card is required which is able to send plain text as fax (e.g. AVM Fritz).
• Voice: New emails cause a telephone call. Shamrock's CapiCall softwae must be installed for this purpose.

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.listmydomain.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.listmydomain.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.listmydomain.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):

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.listmydomain.com with "subscribe" in the subject.
U =Users can unsubscribe sending a mail to news.listmydomain.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 smithgmx.net johnhotmail.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.

• To activate the HTTP server, enter 80 for the HTTP port in the mailer configuration.

#### 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.)

• Protection against brute-force attacks: If somebody uses a wrong log-in three times in sequence, his IP address will be blocked for about 30 seconds (the error page is then "forbidden" instead of "unauthorized").
• If you delete an e-mail and it still appears in the list, re-read the page in your browser. Some older browsers do not interpret the non-caching tags in the webmail pages correctly.
• Access keys: In the mail list the first letter of each menu link can be used as access key (depending on the browser). In other pages, e.g. when reading a mail, 0 brings you back to the mail list. This is handy for mobile phones with a physical keyboard.

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

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.faxmydomain.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 abxy.net, cdxy.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:

• .TXT, .LOG and .CSV files will be deleted automatically after they have been sent.
• Other files are only sent if their archive attribute is set, i.e. if they have changed. After sending them, they are not deleted. Instead, only the archive attribute is reset.

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 abxy.net, cdxy.de c:\work\abc.txt infodef.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-Daemonmydomain.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.

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. smithexample.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:

• Username\SEND_TO: Mails to be sent to mobile clients, or mails for network clients.
• Username\ARCHIVE: Mails which have been sent earlier.
• ARCHIVE.DIR: Non-private archives of network clients.
• FAXSETUP.DIR: Installation files for setting up the fax printer driver.
• LIST.DIR: Address lists for the list server.
• HTTP.DIR: German webmail interface files.

#### 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:

• 3: Maximum retries for transmission.
• 00.00.0000 00:00: If all digits are 0, the message is sent immediately, otherwise the format must be dd.mm.yyyy hh:mm for date and time.
• 4917....:  The destination number, typically a mobile cell phone. We recommend to use the international format including the country code (49 for Germany, 44 for UK).
• ,, : This reserved field between two commas is used internally to send SMS notifications only if new mails are still unread. For other uses it should be empty (as shown here).
• Test message: The message text to be sent.

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

• Mails from a local user to an address which matches the domain configured in the mailer are re-routed internally if the "local mails" option is on. If you do not own the complete domain, like gmx.net, switch this option off and enter your full e-mail address in the mailer instead of the domain.
• Mails to additional domains which are configured in the mail router but not in the mailer will be sent over the Internet. This is why you always should use the main domain for the list server in order to avoid delays.
• NetMail creates a subfolder for each e-mail address. It will be deleted after 24 hours if it is empty.
• In the From address in a received mail and the To/Cc/Bcc fields in sent mails the characters a-z, A-Z, 0-9 and  % # ! + ~ _ . are allowed. Specifically, \ and / are forbidden - if they occur, they and @ are replaced by _ to invalidate the answer address.

Numerical limits

• During one mail exchange, the mailer will retrieve a maximum of 100 mails. If there are more, they will not be lost but retrieved next time. If this limit is reached, the next mail exchange will take place after half of the configured pause time.
• If an outgoing mail contains more than 100 addresses in To:, Cc: or Bcc:, only the first 100 will be used. The list server automatically splits mails so that each outgoing mail will not go to more than 100 addressees.
• When using * or ? in Autosend files, a maximum of 100 files will be sent.
• The holiday list (feiertag.ini) must not contain more than 50 entries.