[Asterisk-Users] sendmail invocation in voicemail and voicemail2 applications

Simon J Mudd sjmudd at pobox.com
Fri Jun 6 02:08:18 MST 2003


The voicemail and voicemail2 applications both invoke sendmail as
/usr/sbin/sendmail -t.  However sendmail is invoked using popen(3), the
input being terminated when the pipe is closed and not when a . is entered
on a new line.

While it looks like the code at the moment can't generate a single line
with a '.', it might be prudent to apply the following patch which tells
sendmail to ignore a line with a single dot on it (thus messages
will terminate only when the pipe is closed).

--- apps/app_voicemail.c.orig        2003-06-06 10:57:06.000000000 +0200
+++ apps/app_voicemail.c     2003-06-06 11:01:33.000000000 +0200
@@ -43,7 +43,7 @@
 #define VOICEMAIL_CONFIG "voicemail.conf"
 #define ASTERISK_USERNAME "asterisk"

-#define SENDMAIL "/usr/sbin/sendmail -t"
+#define SENDMAIL "/usr/sbin/sendmail -oi -t"

 #define INTRO "vm-intro"

--- apps/app_voicemail2.c.orig       2003-06-06 10:57:14.000000000 +0200
+++ apps/app_voicemail2.c    2003-06-06 11:01:53.000000000 +0200
@@ -46,7 +46,7 @@
 #define VOICEMAIL_CONFIG "voicemail.conf"
 #define ASTERISK_USERNAME "asterisk"

-#define SENDMAIL "/usr/sbin/sendmail -t"
+#define SENDMAIL "/usr/sbin/sendmail -oi -t"

 #define INTRO "vm-intro"


Simon
-- 
Simon J Mudd, Postfix RPM Packager, Amsterdam, The Netherlands.
email: sjmudd at pobox.com, Tel: +31-627-592 627, http://postfix.WL0.org




More information about the asterisk-users mailing list