[Users] Re: mmsfromemail crashes if the mail has any CC or multipleto address

2007-03-11 Thread Saju John

Dear Vincent,

I tried to use quotes. i.e mmsfromemail -f from_address -t recipient_address
-p sender_mmsc_hostname conf_file 

But this doesn't work.

Meanwhile I found a fix.

Basically mmsfromemail expects only one 'TO address' at a time. I will satisfy
that requirement in the following way

changed /etc/postfix/master.cf to -

mbuniunix  -   n   n   -   10  pipe
 flags=Rq user=mbuni argv=/usr/local/bin/content-filter -f ${sender} -t 
${recipient}

Then changed the /usr/local/bin/content-filter to-
##
#!/bin/sh
INSPECT_DIR=/var/spool/mbuni

# Exit codes from sysexits.h
EX_TEMPFAIL=75
EX_UNAVAILABLE=69

# Clean up when done or when aborting.
trap rm -f in.$$ 0 1 2 3 15

# Start processing.
cd $INSPECT_DIR || {
echo $INSPECT_DIR does not exist; exit $EX_TEMPFAIL; }

cat in.$$ || {
echo Cannot save mail to file; exit $EX_TEMPFAIL; }

totalargs=$#
from=$2
for i in `seq 4 $totalargs`
 do
to=$i
eval to=\$$to
/usr/local/bin/mmsfromemail -f $2 -t $to /etc/mmsc.conf in.$$
|| {
echo Message content rejected; exit $EX_TEMPFAIL; }
done

#

If there is any better way ?. I would like to hear form you.

Thanks for your valuable suggestions.

Thank You,
Saju John






___
Users mailing list
Users@mbuni.org
http://lists.mbuni.org/mailman/listinfo/users


[Users] Re: mmsfromemail crashes if the mail has any CC or multiple to address

2007-03-07 Thread Saju John

Vincent CHAVANIS vincent at telemaque.fr writes:

 
 Could you try it with the current CVS version ?
 
 regards
 
 Vincent.
 
 - Original Message - 
 From: Saju John saju8 at rediffmail.com
 To: users at mbuni.org
 Sent: Tuesday, March 06, 2007 11:12 AM
 Subject: [Users] mmsfromemail crashes if the mail has any CC or multiple 
 toaddress
 
  Dear All,
 
  Mbuni version :mbuni-1.2.0
  kannel : Kannel CVS (2006-11-23) source
 
  mmsfromemail crashes if the mail has any CC or multiple to address
 
 
  This is the crash details (obtained by running the command mailq)
 
  (temporary failure. Command output: 2007-03-03 13:20:53 [30698] [0] INFO:
  Debug_lvl = -1, log_file = none, log_lvl = 0 2007-03-03 13:20:53 [30698] 
  [0]
  ERROR: fopen failed: couldn't open `MSISDN at domainname' 
2007-03-03 13:20:53
  [30698] [0] ERROR: System error 2: No such file or directory 2007-03-03 
  13:20:53
  [30698] [0] ERROR: failed to read config from `MSISDN at domainname' 
  2007-03-03
  13:20:53 [30698] [0] ERROR: System error 2: No such file or directory 
  2007-03-03
  13:20:53 [30698] [0] PANIC: Couldn't read configuration  from
  'MSISDN at domainname'. 2007-03-03 13:20:53 [30698] [0] PANIC:
  /usr/local/bin/mmsfromemail(gw_panic+0xfd) [0x807cc95] 2007-03-03 13:20:53
  [30698] [0] PANIC: /usr/local/bin/mmsfromemail(main+0xbf5) [0x80538d1]
  2007-03-03 13:20:53 [30698] [0] PANIC:
  /lib/tls/libc.so.6(__libc_start_main+0xda) [0xe3a78a] 2007-03-03 13:20:53
  [30698] [0] PANIC: /usr/local/bin/mmsfromemail(dlopen+0x41) [0x8052c51] 
  Message
  content rejected )
 MSISDN at doaminname
 MSISDN at doaminname
 
 
  ___
  Users mailing list
  Users at mbuni.org
  http://lists.mbuni.org/mailman/listinfo/users
  
 



Dear Vincent,

thanks for the advice.

But there is no difference in mmsfromemail.c code between mbuni-1.2.0 and
current CVS.

Basically mmsfromemail usage is like 

mmsfromemail -f from_address -t recipient_address -p 
sender_mmsc_hostname conf_file

It is expecting the forth parameter as the configuration file.
Here is the problem. If the mail is to multiple address then
the forth parameter will be another email address.mmsfromemail 
tries to read the configuration file,which is an email address
and complains that can not open ERROR: fopen failed:
couldn't open [EMAIL PROTECTED].

This is a bug and needs to be fixed.

Thank you,
Saju John

___
Users mailing list
Users@mbuni.org
http://lists.mbuni.org/mailman/listinfo/users


[Users] mmsfromemail crashes if the mail has any CC or multiple to address

2007-03-06 Thread Saju John
Dear All,

Mbuni version :mbuni-1.2.0
kannel : Kannel CVS (2006-11-23) source

mmsfromemail crashes if the mail has any CC or multiple to address


This is the crash details (obtained by running the command mailq)

(temporary failure. Command output: 2007-03-03 13:20:53 [30698] [0] INFO:
Debug_lvl = -1, log_file = none, log_lvl = 0 2007-03-03 13:20:53 [30698] [0]
ERROR: fopen failed: couldn't open [EMAIL PROTECTED]' 2007-03-03 13:20:53
[30698] [0] ERROR: System error 2: No such file or directory 2007-03-03 13:20:53
[30698] [0] ERROR: failed to read config from [EMAIL PROTECTED]' 2007-03-03
13:20:53 [30698] [0] ERROR: System error 2: No such file or directory 2007-03-03
13:20:53 [30698] [0] PANIC: Couldn't read configuration  from
'[EMAIL PROTECTED]'. 2007-03-03 13:20:53 [30698] [0] PANIC:
/usr/local/bin/mmsfromemail(gw_panic+0xfd) [0x807cc95] 2007-03-03 13:20:53
[30698] [0] PANIC: /usr/local/bin/mmsfromemail(main+0xbf5) [0x80538d1]
2007-03-03 13:20:53 [30698] [0] PANIC:
/lib/tls/libc.so.6(__libc_start_main+0xda) [0xe3a78a] 2007-03-03 13:20:53
[30698] [0] PANIC: /usr/local/bin/mmsfromemail(dlopen+0x41) [0x8052c51] Message
content rejected )
[EMAIL PROTECTED]
[EMAIL PROTECTED]


___
Users mailing list
Users@mbuni.org
http://lists.mbuni.org/mailman/listinfo/users