From 49c8d9a178b9bfd5b962fda65959999b1e7e99ec Mon Sep 17 00:00:00 2001 From: gernot Date: Thu, 10 Apr 2003 20:54:44 +0000 Subject: [PATCH] - allow multiple mail addresses to be set as fax_email or voice_email git-svn-id: https://svn.ibp.de/svn/capisuite/trunk/capisuite@86 4ebea2bb-67d4-0310-8558-a5799e421b66 --- NEWS | 5 ++++- docs/manual.docbook | 15 +++++++-------- scripts/answering_machine.confin | 13 ++++++------- scripts/cs_helpers.pyin | 9 ++++++--- scripts/fax.confin | 13 ++++++------- 5 files changed, 29 insertions(+), 26 deletions(-) diff --git a/NEWS b/NEWS index 1530243..c8e63c0 100644 --- a/NEWS +++ b/NEWS @@ -3,7 +3,10 @@ * scripts: fixed a bug in idle.py which caused a fax send delay of one hour when daylight saving time is in effect - * scripts: attachments to sent e-mails now get a valid filename + * scripts: attachments to sent e-mails now get a valid filename + + * scripts: the *_email settings from fax.conf and answering_machine.conf + now allow to set multiple addresses to send the mails to 0.4.1a (tag CAPISUITE_041a): ============================ diff --git a/docs/manual.docbook b/docs/manual.docbook index 6c829ef..855f4ab 100644 --- a/docs/manual.docbook +++ b/docs/manual.docbook @@ -760,10 +760,10 @@ make install - If given, this string indicates an email-address where the received faxes and - voice calls will be sent to. If it is empty, they will be sent to the user account on the - system &cs; is running on. The address is also used to send status reports - for sent fax jobs to. If you don't want emails to be sent at all, use the + If given, this string indicates email-addresses where the received faxes will + be sent to. More addresses are separated by commas. If it is empty, they will be sent + to the user account on the system &cs; is running on. The address is also used to send + status reports for sent fax jobs to. If you don't want emails to be sent at all, use the action option (see ). This option is optional. If not given, the mail is sent to the system account. @@ -906,11 +906,10 @@ make install - If given, this string indicates an email-address where the received faxes and + If given, this string indicates email-addresses where the received faxes and voice calls will be sent to. If it is empty, they will be sent to the user account on the - system &cs; is running on. The address is also used to send status reports - for sent fax jobs to. If you don't want emails to be sent at all, use the - action option (see ). + system &cs; is running on. More addresses are separated by commas. If you don't want emails + to be sent at all, use the action option (see ). This option is optional. If not set, the calls are mailed to the system account. diff --git a/scripts/answering_machine.confin b/scripts/answering_machine.confin index b970832..8d964b5 100644 --- a/scripts/answering_machine.confin +++ b/scripts/answering_machine.confin @@ -1,4 +1,4 @@ -# $Id: answering_machine.confin,v 1.3 2003/03/20 08:56:21 gernot Exp $ +# $Id: answering_machine.confin,v 1.4 2003/04/10 20:54:44 gernot Exp $ # # This is the configuration file for the answering machine scripts distributed # with CapiSuite @@ -93,19 +93,18 @@ record_silence_timeout="5" # # Additionally, the following options are possible: # -# voice_numbers="," (optional, if not set this user can't receive) +# voice_numbers=",,..." (optional, if not set this user can't receive) # # This list contains the numbers on which this user wants to receive incoming # voice calls. The values are separated by commas. You can also use the special # entry "*" which stands for accepting ALL incoming calls (use with care!). # -# voice_email="name@domain.de" (optional, defaults to empty string) +# voice_email=",,..." (optional, defaults to empty string) # -# If given, this string indicates an email-address where the received faxes +# If given, this string indicates email-addresses where the received faxes # and voice calls will be sent to. If it is empty, the recorded calls and -# faxes will be sent to the user on the current system. It's also used to -# send status reports for sent fax jobs to. If you don't want to get emails, -# see the "action" option below +# faxes will be sent to the user on the current system. If you don't want to +# get emails, see the "action" option below # # pin="" (optional, defaults to empty) # diff --git a/scripts/cs_helpers.pyin b/scripts/cs_helpers.pyin index bbba9f6..ec9cf4c 100644 --- a/scripts/cs_helpers.pyin +++ b/scripts/cs_helpers.pyin @@ -2,7 +2,7 @@ # ----------------------------------------------------------- # copyright : (C) 2002 by Gernot Hillier # email : gernot@hillier.de -# version : $Revision: 1.4 $ +# version : $Revision: 1.5 $ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -197,7 +197,7 @@ def sendMIMEMail(mail_from,mail_to,mail_subject,mail_type,text,attachment): textpart = email.MIMEText.MIMEText(text) msg.attach(textpart) - sendmail = popen2.Popen3("sendmail -f "+mail_from+" "+mail_to) + sendmail = popen2.Popen3("sendmail -t -f "+mail_from) if (sendmail.poll()!=-1): capisuite.error("Error while calling sendmail. Not installed?\n") return @@ -228,7 +228,7 @@ def sendSimpleMail(mail_from,mail_to,mail_subject,text): msg['From'] = mail_from msg['To'] = mail_to - sendmail = popen2.Popen3("sendmail -f "+mail_from+" "+mail_to) + sendmail = popen2.Popen3("sendmail -t -f "+mail_from) if (sendmail.poll()!=-1): capisuite.error("Error while calling sendmail. Not installed?\n") return @@ -309,6 +309,9 @@ def sayNumber(call,number,curr_user,config): capisuite.audio_send(call,getAudio(config,curr_user,i+".la"),1) # $Log: cs_helpers.pyin,v $ +# Revision 1.5 2003/04/10 20:54:44 gernot +# - allow multiple mail addresses to be set as fax_email or voice_email +# # Revision 1.4 2003/04/08 07:59:56 gernot # - replace some wrong space indentations by tabs... # diff --git a/scripts/fax.confin b/scripts/fax.confin index 211966b..8f1ab54 100644 --- a/scripts/fax.confin +++ b/scripts/fax.confin @@ -1,4 +1,4 @@ -# $Id: fax.confin,v 1.4 2003/03/20 09:12:42 gernot Exp $ +# $Id: fax.confin,v 1.5 2003/04/10 20:54:44 gernot Exp $ # # This is the fax configuration file for the scripts distributed with CapiSuite # @@ -128,12 +128,11 @@ fax_headline="Sent by CapiSuite (www.CapiSuite.de)" # You can also use the special entry "*" which stands for accepting ALL # incoming calls as fax (use with care!) # -# fax_email="name@domain.de" (optional, defaults to empty string) -# If given, this string indicates an email-address where the received faxes -# and voice calls will be sent to. If it is empty, the recorded calls and -# faxes will be sent to the user on the current system. It's also used to -# send status reports for sent fax jobs to. If you don't want to get emails, -# see the "action" option below +# fax_email=",,..." (optional, defaults to empty string) +# If given, this string indicates email-addresses where the received faxes +# will be sent to. If it is empty, they will be sent to the user on the current +# system. They're also used to send status reports for sent fax jobs to. If you +# don't want to get emails, see the "action" option below # # fax_action="" (MANDATORY) # Here you can define what action will be taken when a fax is received.