1
0
Fork 0

Changes to config file: All queue-directory directives replaced by single 'storage-directory' directive.

This commit is contained in:
bagyenda 2005-04-22 14:27:50 +00:00
parent bcb1f8fe1c
commit 720f81d04f
5 changed files with 47 additions and 85 deletions

View File

@ -9,10 +9,7 @@ hostname = ds.co.ug
host-alias = mmsc host-alias = mmsc
local-mmsc-domains = dsmagic.com local-mmsc-domains = dsmagic.com
local-prefixes = 037;+25637;25637 local-prefixes = 037;+25637;25637
send-queue-directory = /tmp/spool/global storage-directory = /tmp/spool
mm1-queue-directory = /tmp/spool/mm1
mm4-queue-directory = /tmp/spool/mm4
mmbox-root-directory = /tmp/spool/mmbox
max-send-threads = 5 max-send-threads = 5
send-mail-prog = /usr/sbin/sendmail -f '%f' '%t' send-mail-prog = /usr/sbin/sendmail -f '%f' '%t'
unified-prefix = "+25637,037,37" unified-prefix = "+25637,037,37"
@ -27,7 +24,6 @@ mms-port = 1981
mm7-port = 1982 mm7-port = 1982
#allow-ip = 192.168.129.11 #allow-ip = 192.168.129.11
email2mms-relay-prefixes = "037;035;25637" email2mms-relay-prefixes = "037;035;25637"
ua-profile-cache-directory = /tmp/misc/profiles
billing-module-parameters = "/tmp/log/cdr.log" billing-module-parameters = "/tmp/log/cdr.log"
# billing-library = billdemo.so # billing-library = billdemo.so
#prov-server-notify-script = ~/src/mmprov/provnotify.sh #prov-server-notify-script = ~/src/mmprov/provnotify.sh

View File

@ -579,14 +579,8 @@ mbuni.org,service.com<br>
local-prefixes local-prefixes
= 075;+25675;25675<br> = 075;+25675;25675<br>
send-queue-directory directory-store
= spool/global<br> = spool<br>
mm1-queue-directory
= spool/mm1<br>
mm4-queue-directory
= spool/mm4<br>
max-send-threads max-send-threads
= 5<br> = 5<br>
@ -691,12 +685,12 @@ lists all the configuration directives</p>
<td valign=top > <td valign=top >
Number prefixes Number prefixes
that should be considered local. Messages to numbers that match these 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>)
&nbsp; &nbsp;</td> &nbsp; &nbsp;</td>
</tr> </tr>
<tr> <tr>
<td valign=top > <td valign=top >
<tt>send-queue-directory <tt>storage-directory
</tt> </tt>
&nbsp; &nbsp;</td> &nbsp; &nbsp;</td>
<td valign=top > <td valign=top >
@ -704,54 +698,11 @@ lists all the configuration directives</p>
(string) (string)
&nbsp; &nbsp;</td> &nbsp; &nbsp;</td>
<td valign=top > <td valign=top >
Global Queue directory: Directory where Mbuni creates message queues, MMBoxes, and the
Used by <tt>mmsglobalsender</tt> to store out-going messages. User Agent profiles cache. Mbuni creates a set of sub-directories in here
All messages will be stored here until they can be delivered for each function
&nbsp; &nbsp;</td> &nbsp; &nbsp;</td>
</tr> </tr>
<tr>
<td valign=top >
<tt>mm1-queue-directory</tt>
&nbsp; &nbsp;</td>
<td valign=top>
Directory name
(string)
&nbsp; &nbsp;</td>
<td valign=top >
Queue directory
for messages destined to (local) MMS clients. Used by <tt>mmsmobilesender</tt>
&nbsp; &nbsp;</td>
</tr>
<tr>
<td valign=top >
<tt>mm4-queue-directory</tt>
&nbsp; &nbsp;</td>
<td valign=top>
Directory name
(string)
&nbsp; &nbsp;</td>
<td valign=top >
Queue directory
for messages destined to or coming from foreign MMS
gateways. <tt>mmsglobalsenderfromemail</tt> manages this queue
&nbsp; &nbsp;</td>
</tr>
<tr>
<td valign=top >
<tt>mmbox-root-directory</tt>
&nbsp; &nbsp;</td>
<td valign=top>
Directory name
(string)
&nbsp; &nbsp;</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 &nbsp; &nbsp;</td>
</tr>
<tr> <tr>
<td valign=top > <td valign=top >
<tt>max-send-threads</tt> <tt>max-send-threads</tt>
@ -848,8 +799,8 @@ lists all the configuration directives</p>
Integer Integer
&nbsp; &nbsp;</td> &nbsp; &nbsp;</td>
<td valign=top > <td valign=top >
<tt>mmsmobilesender</tt> uses a form of exponential back-off <tt>mmsrelay</tt> uses a form of exponential back-off
when sending notifications to phones. This figure provides the starting when sending notifications to MMS clients. This figure provides the starting
back-off value (in seconds). back-off value (in seconds).
&nbsp; &nbsp;</td> &nbsp; &nbsp;</td>
</tr> </tr>
@ -1170,12 +1121,12 @@ lists all the configuration directives</p>
<td valign=top > <td valign=top >
Subscriber Subscriber
database interface script 2: This script is called 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 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 does not support receipt of MMS notifications; 1 to indicate
that the device supports MMS; -1 if the subscriber is not known or not that the device supports MMS; -1 if the subscriber is not known or not
provisioned for MMS. The return value determines how 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).
&nbsp; &nbsp;</td> &nbsp; &nbsp;</td>
</tr> </tr>
<tr> <tr>

View File

@ -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 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/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 +++ gateway-1.4.0-patched/gwlib/cfg.def Fri Apr 22 17:11:25 2005
@@ -544,6 +544,73 @@ @@ -544,6 +544,69 @@
OCTSTR(unified-prefix) 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(host-alias)
+ OCTSTR(local-mmsc-domains) + OCTSTR(local-mmsc-domains)
+ OCTSTR(local-prefixes) + OCTSTR(local-prefixes)
+ OCTSTR(send-queue-directory) + OCTSTR(storage-directory)
+ OCTSTR(mm1-queue-directory)
+ OCTSTR(mm4-queue-directory)
+ OCTSTR(max-send-threads) + OCTSTR(max-send-threads)
+ OCTSTR(send-mail-prog) + OCTSTR(send-mail-prog)
+ OCTSTR(unified-prefix) + 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(allow-ip)
+ OCTSTR(deny-ip) + OCTSTR(deny-ip)
+ OCTSTR(email2mms-relay-prefixes) + OCTSTR(email2mms-relay-prefixes)
+ OCTSTR(ua-profile-cache-directory)
+ OCTSTR(billing-module-parameters) + OCTSTR(billing-module-parameters)
+ OCTSTR(billing-library) + OCTSTR(billing-library)
+ OCTSTR(resolver-module-parameters) + 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(mms-client-ip-header)
+ OCTSTR(allow-ip-type) + OCTSTR(allow-ip-type)
+ OCTSTR(optimize-notification-size) + OCTSTR(optimize-notification-size)
+ OCTSTR(mmbox-root-directory)
+) +)
+ +
+MULTI_GROUP(mmsproxy, +MULTI_GROUP(mmsproxy,

View File

@ -60,7 +60,7 @@ typedef struct MmsEnvelope {
Octstr *mdata; /* Generic string data used by any interface. */ Octstr *mdata; /* Generic string data used by any interface. */
Octstr *fromproxy; /* Which proxy sent us this message.*/ Octstr *fromproxy; /* Which proxy sent us this message.*/
Octstr *viaproxy; /* Which proxy must we send this message through. */ 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 name[QFNAMEMAX]; /* Name of the file. */
char dir[QFNAMEMAX]; /* Directory in which file is .*/ char dir[QFNAMEMAX]; /* Directory in which file is .*/
char subdir[64]; /* and the sub-directory. */ char subdir[64]; /* and the sub-directory. */

View File

@ -81,6 +81,7 @@ MmsBoxSettings *mms_load_mmsbox_settings(Cfg *cfg)
MmsBoxSettings *m = gw_malloc(sizeof *m); MmsBoxSettings *m = gw_malloc(sizeof *m);
long port = -1; long port = -1;
Octstr *user, *pass, *from; Octstr *user, *pass, *from;
Octstr *qdir = NULL;
int i, n; int i, n;
memset(m, 0, sizeof *m); 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->sendmail = cfg_getx(grp, octstr_imm("send-mail-prog"));
m->global_queuedir = cfg_getx(grp, octstr_imm("send-queue-directory")); qdir = cfg_getx(grp, octstr_imm("storage-directory"));
m->mm1_queuedir = cfg_getx(grp, octstr_imm("mm1-queue-directory"));
m->mm4_queuedir = cfg_getx(grp, octstr_imm("mm4-queue-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) 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) else if (mms_init_queuedir(m->global_queuedir) < 0)
panic(0, "Failed to initialise global queue directory: %s - %s!", panic(0, "Failed to initialise global queue directory: %s - %s!",
octstr_get_cstr(m->global_queuedir), strerror(errno)); 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 = octstr_format("%S/mmbox", qdir);
m->mmbox_rootdir = cfg_getx(grp, octstr_imm("mmbox-root-directory"));
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) if (cfg_get_integer(&m->maxsendattempts, grp, octstr_imm("maximum-send-attempts")) == -1)
m->maxsendattempts = MAXQTRIES; m->maxsendattempts = MAXQTRIES;
@ -177,9 +200,7 @@ MmsBoxSettings *mms_load_mmsbox_settings(Cfg *cfg)
m->email2mmsrelay_prefixes = cfg_getx(grp, m->email2mmsrelay_prefixes = cfg_getx(grp,
octstr_imm("email2mms-relay-prefixes")); 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 = cfg_getx(grp,octstr_imm("prov-server-notify-script"));
m->prov_notify_arg = cfg_getx(grp,octstr_imm("prov-server-notify-script-arg")); 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; m->allow_ip_type = 1;
cfg_get_bool(&m->optimize_notification_size, grp, octstr_imm("optimize-notification-size")); cfg_get_bool(&m->optimize_notification_size, grp, octstr_imm("optimize-notification-size"));
if (mmbox_root_init(octstr_get_cstr(m->mmbox_rootdir)) != 0) if (qdir)
warning(0, "Failed to initialise mmbox root directory, error: %s!", octstr_destroy(qdir);
strerror(errno));
/* Now load the VASP list. */ /* Now load the VASP list. */
l = cfg_get_multi_group(cfg, octstr_imm("mms-vasp")); l = cfg_get_multi_group(cfg, octstr_imm("mms-vasp"));