*** empty log message ***
This commit is contained in:
parent
abb7b6d2d1
commit
5000597c67
|
@ -1,3 +1,5 @@
|
||||||
|
2009-03-03 P. A. Bagyenda <bagyenda@dsmagic.com>
|
||||||
|
* Added -n flag to prevent stripping of host/domain part from sender address on email2mms interface
|
||||||
2009-03-01 P. A. Bagyenda <bagyenda@dsmagic.com>
|
2009-03-01 P. A. Bagyenda <bagyenda@dsmagic.com>
|
||||||
* pgsql-queue module fix: Connection pool should return only valid (active) connections
|
* pgsql-queue module fix: Connection pool should return only valid (active) connections
|
||||||
2009-02-25 P. A. Bagyenda <bagyenda@dsmagic.com>
|
2009-02-25 P. A. Bagyenda <bagyenda@dsmagic.com>
|
||||||
|
|
|
@ -4103,10 +4103,13 @@ This interface should be invoked from your MTA as follows:<br><br>
|
||||||
<tt>
|
<tt>
|
||||||
|
|
||||||
mmsfromemail -f <i>from_address</i> -t <i>recipient_address</i>
|
mmsfromemail -f <i>from_address</i> -t <i>recipient_address</i>
|
||||||
-s <i>sender_mmsc_hostname</i> <i>conf_file</i>
|
-s <i>sender_mmsc_hostname</i> <i>[-n]</i><i>conf_file</i>
|
||||||
</tt>
|
</tt>
|
||||||
<br/>
|
<br/>
|
||||||
<br>
|
<br>
|
||||||
|
The <i>-n</i> flag may be used to prevent stripping of the host/domain
|
||||||
|
part from the sender address.
|
||||||
|
<br>
|
||||||
Note that no IP-based security is provided at this
|
Note that no IP-based security is provided at this
|
||||||
interface. It is expected that security measures (e.g. firewalls, etc)
|
interface. It is expected that security measures (e.g. firewalls, etc)
|
||||||
will have been setup to ensure that messages can only reach the MTA
|
will have been setup to ensure that messages can only reach the MTA
|
||||||
|
|
|
@ -88,7 +88,7 @@ int mms_load_core_settings(mCfg *cfg, mCfgGrp *cgrp)
|
||||||
|
|
||||||
if (http_proxy_port > 0)
|
if (http_proxy_port > 0)
|
||||||
http_use_proxy(http_proxy_host, http_proxy_port, 0,
|
http_use_proxy(http_proxy_host, http_proxy_port, 0,
|
||||||
exceptions, username, password, except_regex);
|
exceptions, username, password, except_regex);
|
||||||
octstr_destroy(http_proxy_host);
|
octstr_destroy(http_proxy_host);
|
||||||
octstr_destroy(username);
|
octstr_destroy(username);
|
||||||
octstr_destroy(password);
|
octstr_destroy(password);
|
||||||
|
|
|
@ -51,7 +51,7 @@ static void send_mm4_res(int mtype, Octstr *to, Octstr *sender, Octstr *transid,
|
||||||
static void strip_quotes(Octstr *s);
|
static void strip_quotes(Octstr *s);
|
||||||
|
|
||||||
static List *proxyrelays;
|
static List *proxyrelays;
|
||||||
|
static int no_strip = 0;
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
@ -214,8 +214,16 @@ int main(int argc, char *argv[])
|
||||||
x = mms_message_type_to_cstr(mm1_type);
|
x = mms_message_type_to_cstr(mm1_type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (x)
|
|
||||||
|
if (x) {
|
||||||
http_header_add(headers, "X-Mms-Message-Type", (char *)x);
|
http_header_add(headers, "X-Mms-Message-Type", (char *)x);
|
||||||
|
if (orig_sys == NULL) /* Make it up! */
|
||||||
|
orig_sys = octstr_format("system-user@%S",
|
||||||
|
xproxy ? xproxy : octstr_imm("unknown"));
|
||||||
|
} else {
|
||||||
|
octstr_destroy(mm4_type);
|
||||||
|
mm4_type = NULL; /* So that we assume normal message below. */
|
||||||
|
}
|
||||||
|
|
||||||
if ((y = http_header_value(headers, octstr_imm("X-Mms-MM-Status-Code"))) != NULL) {
|
if ((y = http_header_value(headers, octstr_imm("X-Mms-MM-Status-Code"))) != NULL) {
|
||||||
/* This field is different on MM1. */
|
/* This field is different on MM1. */
|
||||||
|
@ -223,9 +231,9 @@ int main(int argc, char *argv[])
|
||||||
http_header_add(headers, "X-Mms-Status", octstr_get_cstr(y));
|
http_header_add(headers, "X-Mms-Status", octstr_get_cstr(y));
|
||||||
octstr_destroy(y);
|
octstr_destroy(y);
|
||||||
}
|
}
|
||||||
if (orig_sys == NULL) /* Make it up! */
|
}
|
||||||
orig_sys = octstr_format("system-user@%S", xproxy ? xproxy : octstr_imm("unknown"));
|
|
||||||
} else { /* else assume a normal send message. */
|
if (mm4_type == NULL) { /* else assume a normal send message. */
|
||||||
http_header_add(headers, "X-Mms-Message-Type", "m-send-req");
|
http_header_add(headers, "X-Mms-Message-Type", "m-send-req");
|
||||||
mm1_type = MMS_MSGTYPE_SEND_REQ;
|
mm1_type = MMS_MSGTYPE_SEND_REQ;
|
||||||
mtype = MM4_FORWARD_REQ;
|
mtype = MM4_FORWARD_REQ;
|
||||||
|
@ -522,7 +530,10 @@ static int find_own(int i, int argc, char *argv[])
|
||||||
return 1;
|
return 1;
|
||||||
} else
|
} else
|
||||||
return -1;
|
return -1;
|
||||||
else
|
else if (argv[i][1] == 'n') {
|
||||||
|
no_strip = 1;
|
||||||
|
return 0;
|
||||||
|
} else
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -568,7 +579,7 @@ static void fixup_recipient(Octstr **host)
|
||||||
|
|
||||||
static void fixup_sender(void)
|
static void fixup_sender(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i, isphone = 1;
|
||||||
|
|
||||||
/* Find the TYPE=xxx element. If it is there, it is a number. Strip the @ */
|
/* Find the TYPE=xxx element. If it is there, it is a number. Strip the @ */
|
||||||
|
|
||||||
|
@ -590,11 +601,15 @@ static void fixup_sender(void)
|
||||||
octstr_format_append(xfrom, "@unknown");
|
octstr_format_append(xfrom, "@unknown");
|
||||||
else if (xproxy == NULL)
|
else if (xproxy == NULL)
|
||||||
xproxy = octstr_copy(xfrom, i+1, octstr_len(xfrom));
|
xproxy = octstr_copy(xfrom, i+1, octstr_len(xfrom));
|
||||||
|
isphone = 0;
|
||||||
}
|
}
|
||||||
/* clean the number. */
|
/* clean the number. */
|
||||||
_mms_fixup_address(&xfrom,
|
_mms_fixup_address(&xfrom,
|
||||||
octstr_get_cstr(settings->unified_prefix),
|
octstr_get_cstr(settings->unified_prefix),
|
||||||
settings->strip_prefixes, 1);
|
settings->strip_prefixes, 1);
|
||||||
|
|
||||||
|
if (no_strip && isphone && xproxy)
|
||||||
|
octstr_format_append(xfrom, "@%S", xproxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void fixup_address_type(List *headers, char *hdr)
|
static void fixup_address_type(List *headers, char *hdr)
|
||||||
|
|
Loading…
Reference in New Issue