Changes to config file: All queue-directory directives replaced by single 'storage-directory' directive.
This commit is contained in:
parent
bcb1f8fe1c
commit
720f81d04f
|
@ -9,10 +9,7 @@ hostname = ds.co.ug
|
|||
host-alias = mmsc
|
||||
local-mmsc-domains = dsmagic.com
|
||||
local-prefixes = 037;+25637;25637
|
||||
send-queue-directory = /tmp/spool/global
|
||||
mm1-queue-directory = /tmp/spool/mm1
|
||||
mm4-queue-directory = /tmp/spool/mm4
|
||||
mmbox-root-directory = /tmp/spool/mmbox
|
||||
storage-directory = /tmp/spool
|
||||
max-send-threads = 5
|
||||
send-mail-prog = /usr/sbin/sendmail -f '%f' '%t'
|
||||
unified-prefix = "+25637,037,37"
|
||||
|
@ -27,7 +24,6 @@ mms-port = 1981
|
|||
mm7-port = 1982
|
||||
#allow-ip = 192.168.129.11
|
||||
email2mms-relay-prefixes = "037;035;25637"
|
||||
ua-profile-cache-directory = /tmp/misc/profiles
|
||||
billing-module-parameters = "/tmp/log/cdr.log"
|
||||
# billing-library = billdemo.so
|
||||
#prov-server-notify-script = ~/src/mmprov/provnotify.sh
|
||||
|
|
|
@ -579,14 +579,8 @@ mbuni.org,service.com<br>
|
|||
local-prefixes
|
||||
= 075;+25675;25675<br>
|
||||
|
||||
send-queue-directory
|
||||
= spool/global<br>
|
||||
|
||||
mm1-queue-directory
|
||||
= spool/mm1<br>
|
||||
|
||||
mm4-queue-directory
|
||||
= spool/mm4<br>
|
||||
directory-store
|
||||
= spool<br>
|
||||
|
||||
max-send-threads
|
||||
= 5<br>
|
||||
|
@ -691,12 +685,12 @@ lists all the configuration directives</p>
|
|||
<td valign=top >
|
||||
Number prefixes
|
||||
that should be considered local. Messages to numbers that match these
|
||||
prefixes will be delivered locally (via <tt>mmsmobilesender</tt>)
|
||||
prefixes will be delivered locally (via <tt>mmsrelay</tt>)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top >
|
||||
<tt>send-queue-directory
|
||||
<tt>storage-directory
|
||||
</tt>
|
||||
</td>
|
||||
<td valign=top >
|
||||
|
@ -704,54 +698,11 @@ lists all the configuration directives</p>
|
|||
(string)
|
||||
</td>
|
||||
<td valign=top >
|
||||
Global Queue directory:
|
||||
Used by <tt>mmsglobalsender</tt> to store out-going messages.
|
||||
All messages will be stored here until they can be delivered
|
||||
Directory where Mbuni creates message queues, MMBoxes, and the
|
||||
User Agent profiles cache. Mbuni creates a set of sub-directories in here
|
||||
for each function
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top >
|
||||
<tt>mm1-queue-directory</tt>
|
||||
|
||||
</td>
|
||||
<td valign=top>
|
||||
Directory name
|
||||
(string)
|
||||
</td>
|
||||
<td valign=top >
|
||||
Queue directory
|
||||
for messages destined to (local) MMS clients. Used by <tt>mmsmobilesender</tt>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top >
|
||||
<tt>mm4-queue-directory</tt>
|
||||
|
||||
</td>
|
||||
<td valign=top>
|
||||
Directory name
|
||||
(string)
|
||||
</td>
|
||||
<td valign=top >
|
||||
Queue directory
|
||||
for messages destined to or coming from foreign MMS
|
||||
gateways. <tt>mmsglobalsenderfromemail</tt> manages this queue
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top >
|
||||
<tt>mmbox-root-directory</tt>
|
||||
|
||||
</td>
|
||||
<td valign=top>
|
||||
Directory name
|
||||
(string)
|
||||
</td>
|
||||
<td valign=top >
|
||||
Directory where all user/subscriber MMboxes will be stored. This
|
||||
directory will contain a set of sub-directories under which user
|
||||
MMboxes will be stored. Each user MMbox has a maildir-like structure </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign=top >
|
||||
<tt>max-send-threads</tt>
|
||||
|
@ -848,8 +799,8 @@ lists all the configuration directives</p>
|
|||
Integer
|
||||
</td>
|
||||
<td valign=top >
|
||||
<tt>mmsmobilesender</tt> uses a form of exponential back-off
|
||||
when sending notifications to phones. This figure provides the starting
|
||||
<tt>mmsrelay</tt> uses a form of exponential back-off
|
||||
when sending notifications to MMS clients. This figure provides the starting
|
||||
back-off value (in seconds).
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -1170,12 +1121,12 @@ lists all the configuration directives</p>
|
|||
<td valign=top >
|
||||
Subscriber
|
||||
database interface script 2: This script is called
|
||||
by <tt>mmsmobilesender</tt> to determine whether the recipient's
|
||||
by <tt>mmsrelay</tt> to determine whether the recipient's
|
||||
device supports MMS. The script should exit with a value of 0 to indicate
|
||||
that the device does not support receipt of MMS notifications; 1 to indicate
|
||||
that the device supports MMS; -1 if the subscriber is not known or not
|
||||
provisioned for MMS. The return value determines how
|
||||
<tt>mmsmobilesender</tt> will deliver the message (see below).
|
||||
<tt>mmsrelay</tt> will deliver the message (see below).
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -717,8 +717,8 @@ diff -Naur gateway-1.4.0/gw/xml_shared.h gateway-1.4.0-patched/gw/xml_shared.h
|
|||
/*
|
||||
diff -Naur gateway-1.4.0/gwlib/cfg.def gateway-1.4.0-patched/gwlib/cfg.def
|
||||
--- gateway-1.4.0/gwlib/cfg.def Mon Jun 28 18:18:35 2004
|
||||
+++ gateway-1.4.0-patched/gwlib/cfg.def Tue Apr 12 11:50:00 2005
|
||||
@@ -544,6 +544,73 @@
|
||||
+++ gateway-1.4.0-patched/gwlib/cfg.def Fri Apr 22 17:11:25 2005
|
||||
@@ -544,6 +544,69 @@
|
||||
OCTSTR(unified-prefix)
|
||||
)
|
||||
|
||||
|
@ -728,9 +728,7 @@ diff -Naur gateway-1.4.0/gwlib/cfg.def gateway-1.4.0-patched/gwlib/cfg.def
|
|||
+ OCTSTR(host-alias)
|
||||
+ OCTSTR(local-mmsc-domains)
|
||||
+ OCTSTR(local-prefixes)
|
||||
+ OCTSTR(send-queue-directory)
|
||||
+ OCTSTR(mm1-queue-directory)
|
||||
+ OCTSTR(mm4-queue-directory)
|
||||
+ OCTSTR(storage-directory)
|
||||
+ OCTSTR(max-send-threads)
|
||||
+ OCTSTR(send-mail-prog)
|
||||
+ OCTSTR(unified-prefix)
|
||||
|
@ -747,7 +745,6 @@ diff -Naur gateway-1.4.0/gwlib/cfg.def gateway-1.4.0-patched/gwlib/cfg.def
|
|||
+ OCTSTR(allow-ip)
|
||||
+ OCTSTR(deny-ip)
|
||||
+ OCTSTR(email2mms-relay-prefixes)
|
||||
+ OCTSTR(ua-profile-cache-directory)
|
||||
+ OCTSTR(billing-module-parameters)
|
||||
+ OCTSTR(billing-library)
|
||||
+ OCTSTR(resolver-module-parameters)
|
||||
|
@ -768,7 +765,6 @@ diff -Naur gateway-1.4.0/gwlib/cfg.def gateway-1.4.0-patched/gwlib/cfg.def
|
|||
+ OCTSTR(mms-client-ip-header)
|
||||
+ OCTSTR(allow-ip-type)
|
||||
+ OCTSTR(optimize-notification-size)
|
||||
+ OCTSTR(mmbox-root-directory)
|
||||
+)
|
||||
+
|
||||
+MULTI_GROUP(mmsproxy,
|
||||
|
|
|
@ -60,7 +60,7 @@ typedef struct MmsEnvelope {
|
|||
Octstr *mdata; /* Generic string data used by any interface. */
|
||||
Octstr *fromproxy; /* Which proxy sent us this message.*/
|
||||
Octstr *viaproxy; /* Which proxy must we send this message through. */
|
||||
struct { /* Name of the queue file, pointer to it (locked). DO NOT USE WITH THESE! */
|
||||
struct { /* Name of the queue file, pointer to it (locked). DO NOT USE THESE! */
|
||||
char name[QFNAMEMAX]; /* Name of the file. */
|
||||
char dir[QFNAMEMAX]; /* Directory in which file is .*/
|
||||
char subdir[64]; /* and the sub-directory. */
|
||||
|
|
|
@ -81,6 +81,7 @@ MmsBoxSettings *mms_load_mmsbox_settings(Cfg *cfg)
|
|||
MmsBoxSettings *m = gw_malloc(sizeof *m);
|
||||
long port = -1;
|
||||
Octstr *user, *pass, *from;
|
||||
Octstr *qdir = NULL;
|
||||
int i, n;
|
||||
|
||||
memset(m, 0, sizeof *m);
|
||||
|
@ -109,9 +110,17 @@ MmsBoxSettings *mms_load_mmsbox_settings(Cfg *cfg)
|
|||
|
||||
m->sendmail = cfg_getx(grp, octstr_imm("send-mail-prog"));
|
||||
|
||||
m->global_queuedir = cfg_getx(grp, octstr_imm("send-queue-directory"));
|
||||
m->mm1_queuedir = cfg_getx(grp, octstr_imm("mm1-queue-directory"));
|
||||
m->mm4_queuedir = cfg_getx(grp, octstr_imm("mm4-queue-directory"));
|
||||
qdir = cfg_getx(grp, octstr_imm("storage-directory"));
|
||||
|
||||
if (mkdir(octstr_get_cstr(qdir),
|
||||
S_IRWXU|S_IRWXG) < 0 &&
|
||||
errno != EEXIST)
|
||||
panic(0, "Failed to create queue directory: %s - %s!",
|
||||
octstr_get_cstr(qdir), strerror(errno));
|
||||
|
||||
m->global_queuedir = octstr_format("%S/global", qdir);
|
||||
m->mm1_queuedir = octstr_format("%S/mm1", qdir);
|
||||
m->mm4_queuedir = octstr_format("%S/mm4", qdir);
|
||||
|
||||
|
||||
if (mms_init_queuedir(m->mm1_queuedir) < 0)
|
||||
|
@ -120,10 +129,24 @@ MmsBoxSettings *mms_load_mmsbox_settings(Cfg *cfg)
|
|||
else if (mms_init_queuedir(m->global_queuedir) < 0)
|
||||
panic(0, "Failed to initialise global queue directory: %s - %s!",
|
||||
octstr_get_cstr(m->global_queuedir), strerror(errno));
|
||||
else if (mms_init_queuedir(m->mm4_queuedir) < 0)
|
||||
panic(0, "Failed to initialise global queue directory: %s - %s!",
|
||||
octstr_get_cstr(m->mm4_queuedir), strerror(errno));
|
||||
|
||||
|
||||
m->mmbox_rootdir = cfg_getx(grp, octstr_imm("mmbox-root-directory"));
|
||||
m->mmbox_rootdir = octstr_format("%S/mmbox", qdir);
|
||||
|
||||
if (mmbox_root_init(octstr_get_cstr(m->mmbox_rootdir)) != 0)
|
||||
panic(0, "Failed to initialise mmbox root directory, error: %s!",
|
||||
strerror(errno));
|
||||
|
||||
m->ua_profile_cache_dir = octstr_format("%S/UserAgent_Profiles", qdir);
|
||||
|
||||
if (mkdir(octstr_get_cstr(m->ua_profile_cache_dir),
|
||||
S_IRWXU|S_IRWXG) < 0 &&
|
||||
errno != EEXIST)
|
||||
panic(0, "Failed to initialise UA Profile directory, error: %s!",
|
||||
strerror(errno));
|
||||
|
||||
if (cfg_get_integer(&m->maxsendattempts, grp, octstr_imm("maximum-send-attempts")) == -1)
|
||||
m->maxsendattempts = MAXQTRIES;
|
||||
|
||||
|
@ -177,9 +200,7 @@ MmsBoxSettings *mms_load_mmsbox_settings(Cfg *cfg)
|
|||
|
||||
m->email2mmsrelay_prefixes = cfg_getx(grp,
|
||||
octstr_imm("email2mms-relay-prefixes"));
|
||||
m->ua_profile_cache_dir = cfg_getx(grp,
|
||||
octstr_imm("ua-profile-cache-directory"));
|
||||
|
||||
|
||||
m->prov_notify = cfg_getx(grp,octstr_imm("prov-server-notify-script"));
|
||||
m->prov_notify_arg = cfg_getx(grp,octstr_imm("prov-server-notify-script-arg"));
|
||||
|
||||
|
@ -248,10 +269,8 @@ MmsBoxSettings *mms_load_mmsbox_settings(Cfg *cfg)
|
|||
m->allow_ip_type = 1;
|
||||
cfg_get_bool(&m->optimize_notification_size, grp, octstr_imm("optimize-notification-size"));
|
||||
|
||||
if (mmbox_root_init(octstr_get_cstr(m->mmbox_rootdir)) != 0)
|
||||
warning(0, "Failed to initialise mmbox root directory, error: %s!",
|
||||
strerror(errno));
|
||||
|
||||
if (qdir)
|
||||
octstr_destroy(qdir);
|
||||
|
||||
/* Now load the VASP list. */
|
||||
l = cfg_get_multi_group(cfg, octstr_imm("mms-vasp"));
|
||||
|
|
Loading…
Reference in New Issue