[Asterisk-Users] Using Exchange to send voicemail message

Robert Hajime Lanning lanning+asterisk at monsoonwind.com
Sun Apr 25 21:27:45 MST 2004


Technicaly it can be done.  If you want to pick up a book, learn how to speak
MAPI (the protocol Exchange uses) and write a program/script that gets the
message via STDIN and the recipient from the "To:" header and talks MAPI to
your Exchange server.  Then all you have to do is use the mailcmd= command in
voicemail.conf.  You will have to store the MAPI hostname/username/password
in some configuration file.  Take care of queueing messages if the Exchange
server is down, retry delivery when it comes up, expire if undeliverable.
This is one thing you do not want built into Asterisk.  Asterisk is busy
enough with handling the calls, no need for email queue management.

Sendmail has all of this done already and has proven itself on the Internet.

Though, my question is, why do you need it generated this way?  Even if the
mailboxes are not on the Exchange server, you can configure sendmail to
relay everything through the Exchange server.  It is a one line change to
the sendmail.cf file.  And the "From:" line is settable via voicemail.cf.

Currently, Asterisk just fork()s, then exec()s, "/usr/sbin/sendmail -t",
passing the email message to sendmail's STDIN.  (done through the popen()
call.)  Sendmail tries to deliver, if it can't, it queues it.  You then
have a background process (/usr/sbin/sendmail -q15m) that runs through the
queue every 15 minutes and manages it. (delivery attempts, expiring...)

Remember, the only protocols the Asterisk speaks natively are VoIP protocols
and the Asterisk management protocol.

<quote who="Paul Tyreman">
> And of course, its SMTP that I need.
>
> I don't want sendmail to send mail to the exchange server, I want to use the
> exchange server to send the mail in the first place !
>
> What I want to do is forget about sendmail, and make an account on the
> exchange server for asterisk to send mail from.
>
> Can that be done ?
>
> Thanks, Paul.


-- 
END OF LINE
       -MCP



More information about the asterisk-users mailing list