Mobilchange news Documentation Contents User Documentation Administrator Documentation Index of terms Technical Support On-line Search

SMTP receiver installation and settings

Description

SMTPreceiver application allows to send messages from SMTP server directly to Mobilchange / Faxchange server without necessity to route message into POP3 mailbox. Also it allows clients or applications to send messages directly using SMTP protocol without necessity to communicate with their own SMTP server. It works as a SMTP_Receiver process started by UMS.TaskManager.

How SMTPreceiver works: it listens to on specified address and port and waits for incoming messages. When message is received, it is processed in this way:

In this way you can send all mails through SMTPreceiver, it process FAX and/or SMS messages and other messages transfer to the forward SMTP server (this function is available from installation CD version 4-6-05).

Installation

Install MobilChange / FaxChange and during gateway selection choose SMTP gateway. When asked for POP3 server, leave this field empty. During MobilChange / FaxChange setup you'll be offered to instal SMTP receiver or you can install it later.
Installation file is located on installation CD - support\smtprcvd\setup\setup.exe
Start this program and installer detects both FaxChange and MobilChange. If necessary it asks for product which SMTP receiver should be integrated with.
Next you'll be asked for SMTP server name, from which users will be allowed to send SMS / faxes. Set appropriate access right on this server to individual users. SMTP receiver 1
Enter username and password used as MobilChange / FaxChange service account (dialog appears only if UMS.TaskManager service is not installed yet).
This account must be member of Administrators group - use the same account as for MobilChange / FaxChange services.
Account can be entered as local in <servername\account_name> format or as domain in <domain\account_name> format. We recommend to use domain account. It must be taken into consideration especially when installing MobilChange / FaxChange on stand-alone server.
If password is incorrect, setup warns you about it.
SMTP receiver 2
Then installation is performed and dialog is displayed with information about connected SMTP server, address type supported and log file location with information about SMTP receiver function. SMTP receiver 3
Dialog with problem summary appears at the end. Press Finish to finalize installation. SMTP receiver 4

Basic configuration:

[HKLM\SOFTWARE\Datasys\UMS\SMTPreceiver]
authentication_lib ProgID of COM object providing client authentication (Mxcomdbapi.mxdbapi - requires to register mxcomdbapi.dll in Mobilchange/bin). Authentication is activated if client's IP address is not on the address list from which SMTP receiver can be accessed. Username is sender's SMTP address, password is checked against password for access to SMTP receiver in user database.
If empty, SMTP receiver can be accessed only from specified IP addresses.
forward_smtp_server SMTP server name, where will be forwarded messages not matching to any application
forward_smtp_server_port SMTP server port for forwarding, usually 25
id_allocated last alocated message ID. Set by SMTPreceiver.
log_console=EWIT amount of messages written into console (in debug mode).
log_event_log=EW amount of messages written into eventlog.
log_file=EWIT amount of messages written into file log, if switched on.
logging_file_name=D:\Faxchange\log\smtp.log filename with full path where log will be written. If empty, log is not created. Filename is extended by date of file creation, so filename according the example will be smtp_YYMMDD.log
log_rcv_data=0 Log received message data (0/1). Active only when logging of trace information is selected
output_code_page=cp1250 codepage for output files
socket_timeout=60 Timeout of TCP reading and writing in seconds
smtp_ip_address IP address, where SMTPreceiver "listens to"
smtp_port=25 TCP port, where SMTPreceiver "listens to"
thread_num=5 Allowed number of concurrently connected clients
thread_priority Working thread priority: 0=normal, -1=lower, -2=low, -15=idle
Log levels: E =error; W =warning; I =info; T =trace

[HKLM\SOFTWARE\Datasys\UMS\SMTPreceiver\clients] - global list of clients, which are allowed to connect to SMTPReceiver. Connection is possible for clients stated on this list, or on any list of allowed clients for specific application.
0=localhost List of allowed clients. More values can be written into one line separated by "," and more registry values can be used.
1=cxhlpsrv,syscae.syscae.cz  
2=192.168.1.0-192.168.1.31 List given by range of allowed addresses.

Configuration of individual "applications"

[HKLM\SOFTWARE\Datasys\UMS\SMTPreceiver\applications\<app_name>] - configuration for app_name application
output_folder=D:\FaxChange\mail\in Path to folder, where application will save its output files.
process_attachments=0 Should be attachments processed? 0 = no
enabled=1 Application is active. 0 = inactive.
format_preference=txt Application output format (allowed txt;eml;mht;htm).
ctl_type=fax control file type ( "sms" or "fax")
cmd_tags= SOFTWARE\Datasys\FaxChange\info\smtp_tag Registry key name, where definition of "@ commands" is stored
nonstandard_data_terminator=\r\n .\r\n Nonstandard terminator for message data (standard is \r\n.\r\n)
process_anonymous=0 Process messages sent by anonymous sender (typically delivery reports)
process_att_msg=0 Process attached email message instead of message itself

[HKLM\SOFTWARE\Datasys\UMS\SMTPreceiver\applications\<app_name>\clients] - list of clients addresses, which are allowed to use application. If not filled in, application is allowed for clients stated in global settings.
0=localhost List of allowed clients. More values can be written into one line separated by "," and more registry values can be used.
1=cxhlpsrv,syscae.syscae.cz  
2=192.168.1.0-192.168.1.31 List given by range of allowed addresses.

[HKLM\SOFTWARE\Datasys\UMS\SMTPreceiver\applications\<app_name>\clients\nonstandard_data_terminator] - list of clients addresses, which send nonstandard message terminator
0=localhost List of clients. More values can be written into one line separated by "," and more registry values can be used.
1=cxhlpsrv,syscae.syscae.cz  
2=192.168.1.0-192.168.1.31 List given by range of allowed addresses.

[HKLM\SOFTWARE\Datasys\UMS\SMTPreceiver\applications\<app_name>\addresses]
addr_re_0=?(P<number>\+?[\d]+)@fax Regular expression for address scope belonging to this application. Another values can be entered into "add_re_1" value etc.
Given example = all from <number@fax> address conforms to selected filter.
addr_re_1= (?:(?P<name>[^/]+)/(?:(?P<company>[^/]+)/
(?:(?P<dept>[^/]+)/)?)?)?(?P<number>[+i]?\d+)@fax$
Name, company, department and faxnumber is taken from address in form [<name>[/<company>[/<department>/]]]<faxnumber>@fax

[HKLM\SOFTWARE\Datasys\UMS\SMTPreceiver\applications\<app_name>\from_enabled]
1=.* Regular expression. List of allowed senders using this application.

[HKLM\SOFTWARE\Datasys\UMS\SMTPreceiver\applications\<app_name>\from_disabled]
1=.*@fax$ Regular expression. List of prohibited senders, which can not use this application. It allows sender filtering.
2=.*@gsm$ 

[HKLM\SOFTWARE\Datasys\UMS\SmtpReceiver\applications\<app_name>\ctl_settings]
Special settings for configuring message properties.
system|maxlen = 1 Saves in CTL file under "system" section line following after | character
system|dr = 0
system|no_send_info = 1
system|nomodify = 1
system|priority = normal
system|user_app_id|parse|subject = .*ID:(\d+).* Saves in CTL file under "system" section value "user_app_id" created by parsing of "subject" field by given regular expression

[HKLM\SOFTWARE\Datasys\UMS\SMTPreceiver\applications\<app_name>\transform]
Special settings, it allows transformation - modification of messages going through SMTPreceiver.

Possible tranformation names

Transformation name (name of text value in registry) Into which item will be transferred in CTL file
subject system/subject
txt text file content
from/name from/name
from/username from/username
from/email from/email (reply address)
from/gateway from/gateway (letter specifying gateway)
from/smtp from/smtp (used for sent SMS/fax accounting)

List of items usable in substitution expression

Item name Meaning
address Address from MAIL FROM: clause
app Application name
format Text format name
messageFromAddress Sender address stored in message header
messageFromName Sender name stored in message header
messageReplyToAddress Email address stored in Reply-to in message header
messageReplyToName Sender name stored in Reply-to in message header
msgFileName Name of file containing message text
pri Message priority
subject Message subject
msg Message text
You can use list separated by | (0x7C) character in transformation configuration. It is evaluated sequentially from left side until it finds valid nonempty value.
E.g.: <%messageReplyToAddress| messageFromAddress |'lamp_room@petrol.org'%>
If Reply-to address is part of email, it is used otherwise sender's email is used. If it is missing too, lamp_room@petrol.org string is the result.

Expressions in transformations are evaluated by eval function, so you can use various internal variables when know program structure.
E.g.: <%time.strftime("%x %X",time.localtime())%> gets current time using Python functions and formats it.

Example of transformation string:

txt = Now is <%time.strftime("%x %X")%>\n Message from:<%messageFromName%> <%messageFromAddress%>\n<%subject%>\n Send reply to: <%messageReplyToAddress|'lamp_room@petrol.org'%> \n<%msg%>

back to top of page