The program smsd needs a config file in /etc/smsd.conf. You may specifiy another file by using the option -c. During installation an example file will be copied to /etc/smsd.conf directory.
The config file has the following structure:
The syntax of the file is similar to most others. Each line has a part name or a value setting:
[part name]
name = value
List elements are separated by commas. Lists may contain 1 or more items. Example: beer, tv, women
The config file is case sensitive, except boolean values. A number is a string of characters in the range 0-9 and no other characters. The difference between numbers and integers is that integers cannot have leading zeroes. Comments begin with a # character.Boolean values are the following (not case sensitive):
yes , no
true , false
on , off
1 , 0
The global part begins at the top of the config file.
devices = list of strings
Specifies the number and name of modems that you want to use. You may compose the names using the characters
A-Z, 0-9 and _. Do not use space or control characters. The name is a label for your modems. They appear
in this config file, in the log file and in the statistic files.
The first 5 characters plus 6 random characters are used to give received messages a filename. Therefore it is
a good idea to use max. 5 characters for device names (but you can also use longer names).
spool = string
Specifies the path of the outgoing spool directory.
failed = string
Specifies the path of the failed spool directory. Delete this line if you do not want to keep failed files.
incoming = string
Specifies the path of the incoming spool directory.
sent = string
Specifies the path of the sent spool directory. Delete this line, if you do not want to keep sent SMS files.
mypath = string
Specifies the directory where you installed the SMS Server Tools binaries.
logfile = string
Name of the log file. Delete this line, if you want to use the syslog daemon for logging.
You can use "1" to write to the console.
(Numbers are interpreted as file handles and
1 is the file handle for stdout). Windows has no syslog daemon, the program uses the event log
on windows NT instead syslog.
If you want a list of all possible alarms and loglevels go into
the src directory and enter grep LOG_ *.c
loglevel = integer
Specifies the verbosity of your log file (see above). 4 means that all warnings and errors are logged.
The following loglevels are used:
debug | 7 | All AT-Commands and modem answers and other detailed informations useful for debugging |
info | 6 | Information what is going on at the moment. Not detailled enough for debugging but maybe interesting. |
notice | 5 | Information when a message was received or sent and when something not normal happens but program still works fine (for example wrong destination number in SMS file). |
warning | 4 | Warning when the program has a problem sending a single short message. |
error | 3 | Error message when the program has temporary problem (for example modem answered with ERROR during initialization or a file can not be accessed). |
critical | 2 | Error message when the program has a permament problem (for example sending failed many times or wrong permissions to a queue). |
alarmhandler = string
Specifies a program or script that will be called whenever an alarm occures.
Use full path name. Delete this line if you do not use an eventhandler.
alarmlevel = integer
Sets the verbosity of the alarm handler if you use one (see above). 2 means that only critical error messages
cause the alarm handler to be called. You can use value between 2 and 5.
delaytime = integer
Specifies the time smsd sleeps if the queues are empty before re-checking for new files (seconds).
errorsleeptime = integer
Specifies the delay between ERROR answers from the modem and the next retry (seconds).
blocktime = integer
If three consecutive messages fail to send the modem will be blocked for this time (seconds).
eventhandler = string
Specifies an eventhandler program or script that will execute whenever a message was sent, received or failed.
Use full path name. Delete this line if you do not use an eventhandler.
stats = string
Specifies the directory where smsd stores statistic files.
The filename is a timestamp in the format YYMMDD.HHMMSS .
You have to create the directory yourself before start smsd. Delete this line if you dont need
statistic files.
stats_interval = integer
This sets the timer that control the time difference between each statistic file in seconds. For
example 3600 results in one file for each hour. Delete this line if you dont need
statistic files.
blacklist = string
Specifies the filename of a black-list. The black list contains numbers that are not allowed to receive SM.
Delete this line if you do not want to use a black list.
whitelist = string
Specifies the filename of a white-list. The white list contains numbers that are allowed to receive SM.
If you do not have a white list, everybody can receive SM. The black list takes precedence before the white list.
Delete this line if you do not use a white list.
checkhandler = string
Specifies an external program that tells smsd if this sms file is valid. If the eventhandler return a non-zero exitcode
the message will not be sent.
autosplit = boolean
Enables or disables automatic splitting of large SMS files. If set to "yes" (wich is the default) then messages larger than 160 characters
are splittet into many short messages. Note: Smsd splits only text messages, not binary messages.
receive_before_send = boolean
Forces smsd to flush the first SIM card memory before sending SM.
This is a workaround for modems that cannot send SM with a full SIM card.
number_parts = boolean
Enable or disable part numbers at the beginning of every splitted SM. Default is enabled.
The queue definition specifies the number and names of provider queues that you want to use. You may compose the provider name using the characters A-Z, 0-9 and _. Do not use space or control characters.
This part contains one or more provider definitions:
[queue]
string = string
...
The first string is a provider name. The second string is the path of the spool directory for this provider.
The provider definition specifies the dial prefixes of all phone network providers. The number format is xxyyyy where xx is the international area code and yyyy is the provider dial prefix (local area code). yyyy may be shorter or longer in your country. Do not prefix the number with a + character.
[provider]
string = list of number
...
The first string is a provider name (as specified in [queues]). The list of strings are the dial prefixes of this provider.
If you want a queue for all destinations without filtering by dial prefixes you can use this list:
0,1,2,3,4,5,6,7,8,9
See also Mobile Number Portability.
The following part specifies settings for one modem. You have to repeat this part for each of your modems.
[string]
Begin of a modem settings block. The modem name must be the same as in the devices= line in the global part.
init = string
Specifies a modem initialisation string. If you think that your modem do not need an initialisation, delete this line.
Some mobile phones need the init string ATE0+CPMS="SM" or ATE0+CPMS="ME" to tell the phone where it should store and read received messages. SM=SIM Card, ME=Mobiles internal memory.
Siemens Modems need the init string ATE0+CNMI=2,0,0,2,1 when you want to receive status report.
Use ATE0 if you are not sure wich init string you should use. This works find with most modems.
device = string
Specifies the device name of the serial port to the modem. Normally a device under /dev.
Linux example: /dev/ttyS0. Windows example: /dev/com1. Solaris example: /dev/cuaa.
incoming = special
Specifies if the program should read incoming SM from this modem. "Yes" or "1" means that smsd reads incoming
messages from the modem. The value "high" or "2" means that smsd reads with higher priority. This means
that it sends only messages when there is nothing to receive. "No" or "0" means that smsd does not
read received messages.
queues = list of number
Specifies the queues that you want to serve by this modem. Use the same provider names as in [queues] and [provider].
pin = 4 digit number
Specifies the PIN number of the modems SIM card. Delete thisline, if you do not need a PIN. All mobile phones do not
need a PIN.
mode = string
Specifies wich version of command set your modem has got.
old for Falcom A1 and maybe some other old modems
new for nearly all mobile phones and modems
ascii for ascii mode. This simplifies debugging but is limited to 140 characters and cannot send or receive
binary SM. Some modems and mobile phones do not support ascii mode.
digicom for old digicom modems.
smsc = number
Specifies the SMSC number that this modem should use to send SM. Delete this line, if you think that you do not need
this setting. Most modems and phones use a default setting from the SIM card if you delete this line.
baudrate = integer
Specifies the speed of the serial communication in bits per second. Most modems work well with 19200 baud, some
need 9600 baud.
rtscts = boolean
You can disable hardware handshake (using the RTS and CTS control lines of the serial port) by setting this option to "no".
The default value is "yes". Some not original cables for mobile phones do not support hardware handshake. I recommend
to use always cables with RTS and CTS lines because without handshake the program may talk too fast to your modem.
cs_convert = boolean
If you enable this, the program will convert the SM character set to iso-8859-15 whend sending and receiving messages.
If you disable this, the program will send messages without character set conversion.
There is one exception: the @ charcter is ASCII 0 and is converted to ASCII 183 because ASCII 0 are not
allowed in C Programming language.
report = boolean
If you enable this, the program will request a status report SM from the SMSC for each sent message.
This does not work on many mobile phones and on some modems.
eventhandler = string
Specifies an eventhandler script or program that will execute whenever you send or receive a message on this modem.
Delete this line if you do not need it. If you specify an eventhandler in this part, smsd will ignore the
global eventhandler for this modem. Smsd does not call both eventhanlder!