1
0
Fork 0

*** empty log message ***

This commit is contained in:
bagyenda 2008-06-24 10:50:23 +00:00
parent 371438118b
commit 82d5a85805
6 changed files with 24 additions and 16 deletions

View File

@ -1,5 +1,6 @@
2008-06-24 P. A. Bagyenda <bagyenda@dsmagic.com> 2008-06-24 P. A. Bagyenda <bagyenda@dsmagic.com>
* Improved queue information: Included source interface * Improved queue information: Included source interface
* Extra identifying headers on MMS2Email interface
2008-06-18 P. A. Bagyenda <bagyenda@dsmagic.com> 2008-06-18 P. A. Bagyenda <bagyenda@dsmagic.com>
* added qcelp file extension to mime type mapping * added qcelp file extension to mime type mapping
2008-05-30 P. A. Bagyenda <bagyenda@dsmagic.com> 2008-05-30 P. A. Bagyenda <bagyenda@dsmagic.com>

View File

@ -673,7 +673,8 @@ int mms_sendtoemail(Octstr *from, Octstr *to,
int trans_msg, int trans_msg,
int trans_smil, char *txt, char *html, int trans_smil, char *txt, char *html,
int mm4, int mm4,
char *transid) char *transid,
List *extra_headers)
{ {
MIMEEntity *m = NULL; MIMEEntity *m = NULL;
@ -701,6 +702,9 @@ int mms_sendtoemail(Octstr *from, Octstr *to,
base64_mimeparts(m,0); /* make sure parts are base64 formatted. */ base64_mimeparts(m,0); /* make sure parts are base64 formatted. */
if (extra_headers) /* add any other headers into the mix. */
http_header_combine(newhdrs, extra_headers);
headers = mime_entity_headers(m); headers = mime_entity_headers(m);
/* Before we send it, we insert some email friendly headers if they are missing. */ /* Before we send it, we insert some email friendly headers if they are missing. */

View File

@ -106,13 +106,13 @@ int mms_sendtoemail(Octstr *from, Octstr *to,
char *sendmail_cmd, Octstr *myhostname, char *sendmail_cmd, Octstr *myhostname,
int trans_msg, int trans_msg,
int trans_smil, char *txt, char *html, int mm4, int trans_smil, char *txt, char *html, int mm4,
char *transid); char *transid, List *extra_headers);
/* Send directly to email. */ /* Send directly to email. */
int mm_send_to_email(Octstr *to, Octstr *from, Octstr *subject, int mm_send_to_email(Octstr *to, Octstr *from, Octstr *subject,
Octstr *msgid, Octstr *msgid,
MIMEEntity *m, int append_hostname, Octstr **error, MIMEEntity *m, int append_hostname, Octstr **error,
char *sendmail_cmd, Octstr *myhostname); char *sendmail_cmd, Octstr *myhostname);
/* log to access log. */ /* log to access log. */
void mms_log(char *logmsg, Octstr *from, List *to, void mms_log(char *logmsg, Octstr *from, List *to,

View File

@ -46,7 +46,7 @@ static int mms_sendtoproxy(Octstr *from, Octstr *to,
Octstr *subject, Octstr *proxy, Octstr *subject, Octstr *proxy,
char *transid, char *transid,
Octstr *msgid, time_t expires, MmsMsg *msg, Octstr *msgid, time_t expires, MmsMsg *msg,
int dlr, Octstr *proxy_sendmail_cmd, Octstr **error); int dlr, Octstr *proxy_sendmail_cmd, List *extra_headers, Octstr **error);
static int mms_sendtovasp(MmsVasp *vasp, Octstr *from, Octstr *to, Octstr *msgId, static int mms_sendtovasp(MmsVasp *vasp, Octstr *from, Octstr *to, Octstr *msgId,
List *qh, List *qh,
@ -180,7 +180,8 @@ static int sendMsg(MmsEnvelope *e)
e->msgId, msg, 0, &err, sendmail_cmd, e->msgId, msg, 0, &err, sendmail_cmd,
settings->hostname, 1, 1, settings->hostname, 1, 1,
octstr_get_cstr(settings->mms_email_txt), octstr_get_cstr(settings->mms_email_txt),
octstr_get_cstr(settings->mms_email_html), 0, e->xqfname); octstr_get_cstr(settings->mms_email_html), 0, e->xqfname,
e->hdrs);
if (res == MMS_SEND_QUEUED) if (res == MMS_SEND_QUEUED)
res = MMS_SEND_OK; /* queued to email treated same as sent. res = MMS_SEND_OK; /* queued to email treated same as sent.
* XXX - this means DLR requests for emailed messages not supported! * XXX - this means DLR requests for emailed messages not supported!
@ -306,7 +307,7 @@ static int sendMsg(MmsEnvelope *e)
e->subject, mp->host, e->subject, mp->host,
octstr_get_cstr(xtransid), octstr_get_cstr(xtransid),
e->msgId, e->expiryt, msg, e->msgId, e->expiryt, msg,
mp->confirmed_mm4, mp->sendmail, &err); mp->confirmed_mm4, mp->sendmail, e->hdrs, &err);
sent = 1; sent = 1;
octstr_destroy(xtransid); octstr_destroy(xtransid);
octstr_destroy(xfrom); octstr_destroy(xfrom);
@ -532,7 +533,7 @@ static int mms_sendtoproxy(Octstr *from, Octstr *to,
Octstr *subject, Octstr *proxy, Octstr *subject, Octstr *proxy,
char *transid, char *transid,
Octstr *msgid, time_t expires, MmsMsg *msg, Octstr *msgid, time_t expires, MmsMsg *msg,
int dlr, Octstr *proxy_sendmail_cmd, Octstr **error) int dlr, Octstr *proxy_sendmail_cmd, List *extra_headers, Octstr **error)
{ {
Octstr *pto, *pfrom; Octstr *pto, *pfrom;
@ -561,7 +562,7 @@ static int mms_sendtoproxy(Octstr *from, Octstr *to,
subject ? subject : settings->mms_email_subject, subject ? subject : settings->mms_email_subject,
msgid, msg, dlr, msgid, msg, dlr,
error, proxy_sendmail_cmd ? octstr_get_cstr(proxy_sendmail_cmd) : sendmail_cmd, error, proxy_sendmail_cmd ? octstr_get_cstr(proxy_sendmail_cmd) : sendmail_cmd,
settings->hostname, 0, 0,NULL,NULL,1, octstr_get_cstr(xtransid)); settings->hostname, 0, 0,NULL,NULL,1, octstr_get_cstr(xtransid), extra_headers);
octstr_destroy(xtransid); octstr_destroy(xtransid);
if (x == MMS_SEND_QUEUED && !dlr) /* No confirmed sending, and message was queued successfully... */ if (x == MMS_SEND_QUEUED && !dlr) /* No confirmed sending, and message was queued successfully... */

View File

@ -515,8 +515,10 @@ static void sendmms_proxy(MmsHTTPClientInfo *h)
goto done; goto done;
} }
m = mms_frombinary_ex(h->body, h->client_addr ? h->client_addr : octstr_imm("anon@anon"), m = mms_frombinary_ex(h->body,
octstr_get_cstr(settings->unified_prefix), settings->strip_prefixes); h->client_addr ? h->client_addr : octstr_imm("anon@anon"),
octstr_get_cstr(settings->unified_prefix),
settings->strip_prefixes);
if (!m) { if (!m) {
http_header_add(rh, "Content-Type", "text/plain"); http_header_add(rh, "Content-Type", "text/plain");

View File

@ -149,11 +149,11 @@ int main(int argc, char *argv[])
if (!m) if (!m)
panic(0, "No Message supplied, or failed to decode binary data!"); panic(0, "No Message supplied, or failed to decode binary data!");
#if DEBUG
h = http_create_empty_headers(); h = http_create_empty_headers();
http_header_add(h, "X-Mms-Tool", "mmssend"); http_header_add(h, "X-Mbuni-Tool", "mmssend");
http_header_add(h, "X-Mms-CalledFrom", "Terminal"); http_header_add(h, "X-Mbuni-CalledFrom", "Terminal");
#endif
s = settings->qfs->mms_queue_add(from, to, NULL, NULL, NULL, time(NULL), s = settings->qfs->mms_queue_add(from, to, NULL, NULL, NULL, time(NULL),
time(NULL) + settings->default_msgexpiry, m, time(NULL) + settings->default_msgexpiry, m,
NULL, NULL,