[Asterisk-Users] Help with shell script for externnotify

Tzafrir Cohen tzafrir at cohens.org.il
Fri Nov 18 07:15:19 MST 2005


On Thu, Nov 17, 2005 at 09:32:37PM -0500, Tom Rymes wrote:
> Hi folks,
> 
> I am working on a shell script that I can use with the externnotify  
> command in voicemail.conf. All is well and seems ready to rock,  
> except I can't figure out how to tell the script what e-mail address  
> to send the mail messages to. I warn you ahead of time that I am no  
> scripting guru.
> 
> Basically, I have 14 after-hours mailboxes that all have different e- 
> mail addresses. I want this script to parse the mailbox number from  
> the original command ($2), and then somehow look that up mailbox's  
> address and send an e-mail. 

This is a mail routing issue. Why not configure the mail server
properly?

in voicemail.conf configure each extension's email to be
'<NUM>@localhost . Handle the forwarding using the mail server's aliases
file. This is typically /etc/aliases , but there are variations
depending on the specific MTA (postfix? sendmail? exim? qmail?) and on
the installation.

Run two daily cron jobs that change the contents of the aliases file.
Spefically with postfix you can give it a number of aliases files, and
thus the cron job can edit one file, run 'newaliases' and be done with
it.

-- 
Tzafrir Cohen         | tzafrir at jbr.cohens.org.il | VIM is
http://tzafrir.org.il |                           | a Mutt's  
tzafrir at cohens.org.il |                           |  best
ICQ# 16849755         |                           | friend



More information about the asterisk-users mailing list