Supported Hardware
Package Content
Server Install
Client Install
Gateway Install
Tech Info
PDU format
Bugs / Todo
Related Links

Jump to Vim Home Page

SMSLink SMS to Mail Gateway Installation Procedure

Table of Contents

  1. Configure your domain name.
    1. Pre-0.12b versions of the gateway module.
    2. Versions 0.12b and higher of the gateway module.
  2. Make sure mail delivery is working.
  3. Synchronize the mailbox check interval.
  4. Untar and compile SMSLink.
  5. Arrange for the service to be started at boot time.
  6. Test your installation.

Configure your domain name.

The DNS domain your machine was to be made part of was probably configured when you first installed it. If so, it will be defined for instance in your /etc/resolv.conf. There are a few more steps involved in making sure the gateway module will be able to pick it up, though.

Pre-0.12b versions of the gateway module.

Note: Versions < 0.12b of the gateway module were shipped with packages versions up to and including 0.54b-8.

In the earlier versions of the gateway module, I started on the wrong assumption that the application should pick up its domain name through the getdomainname(2) call. This was a mistake, since that call is actually a NIS call. Still, for those early versions of the gateway module, you need to be first set your domain through a call to domainname(1). Beware that this might cause a conflict if you're using both NIS and DNS on your network, and both domain names are different (quite often the case in that kind of setup). If this is a cause of concern to you, please upgrade to version 0.12b or higher of the gateway module (shipped with version 0.55b or higher of the SMSLink package). Version 0.12b and higher are backward-compatible with older versions of the server module.

Under older SuSE Linux distributions, you can set the YP_DOMAINNAME variable in /etc/rc.config (under newer ones, just use Yast2 ;-). Under SlackWare Linux, I put my NIS domain in /etc/DOMAINNAME and modified /etc/rc.M to include the following line:

	/bin/domainname `cat /etc/DOMAINNAME`

Versions 0.12b and higher of the gateway module.

As of version 0.12b of the gateway module, the program will try to get the DNS domain it's member of by a reverse lookup call. On the one hand, this means that you don't have anything to do anymore on the gateway side (configuration-wise), but on the other hand, for this to work as expected, you should make sure your machine is properly registered both in the forward and in the reverse map of your DNS server.

If, for some reason, this is not possible, the gateway module now provides the new --defaultdomain= command-line option which enables you to either work around an un-cooperative DNS server or override it when necessary.

Make sure mail delivery is working.

Since the purpose of sms2mailgw is to forward incoming SMSes to mailboxes, it obviously need a working mail delivery system.

By default, sms2mailgw(1) will try to deliver mail by contacting sendmail (or another MTA) on the localhost via the SMTP protocol.

The target SMTP relay can be easily overridden, either by using the --smtprelay= command-line parameter (new to version 0.12b of the gateway module), or by editing ./server/sms_serv.h and modifying the MAILHOST define prior to compilation).

This means that you should make sure sendmail (or other) is properly configured on your machine and able to deliver outbound mail. Ability to deliver inbound mail should be checked as well for future extensions and failure reports.

Synchronize the mailbox check interval.

It is important for the gateway module to know the interval at which the server will process the inbox (will pull incoming messages from the SIM card and dump them in the inbox file). Once the interval is known (elapsed time between 2 mailbox runs), the initial start will be detected automatically (based on the timestamp on the checkpoint file).

The mailbox check interval for both module is set, by default, at compile time, through the #define MBCHKINTERVAL line in the server main header file (./server/sms_serv.h).

As of version 0.55b of the server module and version 0.11b of the gateway module, the compiled-in value can be overriden through the use of the -c or --mbchkinterval command-line option. When using this feature, just make sure you specify the same value for both modules.

Untar and compile SMSLink.

The detailed configuration and installation instructions provided on the server installation page should be followed at this stage (if they haven't already).

Arrange for the service to be started at boot time.

Edit your init scripts to have the service started at boot time. You should make sure the user that the gateway will be running as has the appropriate rights over the inbox file to read messages from it and remove them afterwards (i.e. you'll typically want your gateway module running as the same user as your server module).

Should you wish to have the gateway started by another user, make sure the access rights on the inbox file are set accordingly.

Test your installation.

Now that the gateway is installed, configured and started, it's time to test it. From a GSM, send an SMS to your server, where the message obeys to the following format (see sms2mailgw(1) for more details on the supported "mail-in-SMS" format):

	t:somebody@somedomain This is a test.

Please note: the email address given above should be adapted to your needs, and should of course be deliverable.

Then wait for up to 1 hour for the inbox to be processed (default value as shipped -- the interval value can be reduced or enlarged by modifying the MBCHKINTERVAL define in ./server/sms_serv.h [see above]), and go check your mailbox.

That's all, Folks...

Last Modified: September 29th, 2006.
philipa STRUDEL scarlet PUNKT be
SourceForge Logo