Provided by: alamin-server_0.3.7-2_all bug


       gsgcmd - Alamin GSM SMS Gateway Core Module


       gsgcmd [--version│--help]

       gsgcmd [--configfile config_file_name] [--debug│--nodebug]
       [--verbose│--noverbose] [--copyright│--nocopyright] [--pidfile
       pid_file] [--port port_number] [--accounting accounting_file_name]
       [--syslog facility│--nosyslog] [--spool spool_directory] [--alias
       alias_file_name] [--maxaliasnestinglevel number] [--smsc
       [--allowclientsmsc│--noallowclientsmsc] [--defallowserv
       default_allowed_services_list] [--usersfile users_file_name]


       gsgcmd is the gateway core module. It receives connections from the ip
       network using the sms query protocol (smsqp) and saves messages in
       their queue.


       --configfile <file_name>
           (default: /etc/alamin/gsgc.conf) Sets the config file to be used.
           The configfile option is not valid inside a config file (to
           redirect into another config file). You can put any number of times
           an option inside the config file, but only the latest is used. Use
           only lowercase letters. Options specified in the command line have
           preference over options listed inside a config file.

           (default: --debug) You can turn debugging on or off. Just use debug
           to see all messages in the log.

           (default: --verbose) Set this option if you want to see messages
           about usual events in the log.

           (default: --nocopyright) If you set this option, copyright messages
           will be show every time Alamin starts.

       --pidfile <pid_file>
           (default: /var/run/alamin/ File to save the pid of the
           proccess. This option can only be used as a command line option,
           not inside the config file.

       --port <tcp_port_number│tcp_service_name>
           (default: smsqp, or 11201 if smsqp does not exist in /etc/services)
           Port where the gateway server is listening for connections.

       --accounting <accounting_file_with_complete_path>
           (default: /var/log/alamin/gsgd-accounting.log) Accounting file,
           where every attempt to send or receive a message is logged. You can
           use it to generate usage reports per user, computer, phone...

       --syslog <facility_name>
           (default: local4) Syslog facility to log messages, or nosyslog to
           avoid using syslog.

       --spool <spool_directory>
           (default: /var/spool/alamin) Directory structure path where
           messages are waiting to be sent.

       --allowip <list_of_ips_from_where_we_accept_connections>
           (default: all) You can set here a list of ip addresses from where
           you accept connections. The special word "all" allows all ips. If
           the special word "all" is used, then you can deny some ips with the
           "--denyip" option.  Remote ip is matched from the beginning, so,
           "192.168." represents the range from "" to
           "". The list is space separated.

       --denyip <list_of_ips_from_where_we_not_accept_connec.>
           (default: none) You can set here a list of ip addresses from where
           you do not accept connections. The special word "none" denies all
           ips. This option is used only if the "--allowip" option has the
           value "all".  Remote ip is matched from the beginning, so,
           "192.168." represents the range from "" to
           "". The list is space separated.

       --alias <alias_file>
           (default: /etc/alamin/alias.conf) This is the name of the file that
           has a list of alias to be used for phone numbers. You can send
           messages to "myphonenumber" if an entry exists in the alias file
           associating "myphonenumber" with your real phone number. The alias
           file is a list of lines with words, where the first word is changed
           by the rest of the words at the time gsgcmd queues the message, so
           a message can be sent to a lot of phones at a time, if more than
           one word follows the first word of a line.  You can use one or more
           alias inside other alias. The level of nested alias allowed is
           defined in the "maxaliasnestinglevel" option. See example
           alias.conf file for examples. Alias can be used as groups of

       --maxaliasnestinglevel <level>
           (default: 4) Max number of times an alias can be inside other alias
           thas is inside other alias that is inside other alias that ... You
           know.  Increasing this level you increment the time is needed to
           decide what numbers are inside an alias if you use nesting of
           aliases (groups of groups). I think 4 is a good start. Change it to
           1 if you do not use alias inside other alias (groups of groups).

       --smsc <short_message_service_center_number>
           (default: default) You can use this option to send messages over
           different SMSCs. The special word "default" causes not to send the
           SMSC to the gsm device. Just use the default SMSC of your gsm SIM
           card. You must specify the SMSC in international format, that is,
           plus sign (+), country prefix and phone number (+34123123123).

           (default: --allowclientsmsc) You can allow clients (or not) to
           select other SMSC than the default or the one you have specified in
           "--smsc" option. Some mobile phone operators charges you with big
           costs if you use external SMSCs, so, perhaps, you do not want
           clients to select other SMSCs.

       --defallowserv <default_allowed_service_list>
           (default: send_all) List of comma separated services from the
           following list: all_services, none, send_all, send_qx (x between 1
           and 9), system_down, query_queue, retry_all, retry_qx (x between 1
           and 9).  Currently, query and retry options are not implemented.
           This list applies to anonymous connections. When a user is
           authenticated, he has its own allowed services list from the users

       --usersfile <users_file_name>
           (default: /etc/alamin/user.conf) This is the users file where
           Alamin keeps information about users names, passwords, email
           addresses, allowed services and so on. Its fields are separated by
           (:). The list of fileds is "user:password:email:
           allowed_services_list:allowed_numbers_list". Email field can be
           blank. allowed_services_list is a comma separated list of the
           services valid to the "--defallowserv" option. Allowed_numbers_list
           is a comma separated list of phone numbers that the user is allowed
           to send message to. The special words "all" and "none" can be used.
           A filename (fullpath is needed) can be used to search allowed phone
           numbers inside a file.  YOU MUST KEEP THIS FILE WITH READ PRIVILEGE
           ONLY FOR alamin USER, as it contains passwords. See example file
           for examples. Default users and passwords are in the example file
           (root, operator and user). Users are authenticated from the client
           using a schema similar to CHAP. Passwords are not send in clear
           text over the network.


       0   successful.

       1   syntax error, incorrect command line.

       2   parameter lost.


       /etc/alamin/gsgd.conf, gateway config file.
       /var/run/alamin/, default pid file.
       /var/log/alamin/gsgd-accounting.log, def. accounting file.
       /var/spool/alamin, default spool directory.  /etc/alamin/user.conf,
       default users file.


       See also gsgc(1), gsgcmd(8), gsgmdd(8), gsgsmppin(8), gsgsmppout(8) and


       Send bugs to the author, please. I would like to keep the program
       without bugs.


       Alamin GSM SMS Gateway Copyright (C) Andres Seco Hernandez and others.

       This program is free software; you can redistribute it and/or modify it
       under the terms of the GNU General Public License as published by the
       Free Software Foundation; either version 2 of the License, or (at your
       option) any later version.

       This program is distributed in the hope that it will be useful, but
       WITHOUT ANY WARRANTY; without even the implied warranty of
       General Public License for more details.


       Andres Seco Hernandez <>.