[asterisk-users] sendmail

meetmecall info at meetmecall.nl
Sun Dec 20 11:38:54 CST 2009


I used msmtp for delivering mail and this is the procedure I  
documented once, based on info I found on the internet. I hope it is  
of help.


Erik

Step 1  Installing needed packages/libs on your system

install this packages (I'm not sure if all the packages are needed but  
with this packages it works)

  apt-get install libwww-perl
  apt-get install openssl
  apt-get install libcrypt-ssleay
  apt-get install libnet-ssleay-perl
  apt-get install libcrypt-ssleay-perl


Step 2  download msmtp

download msmtp van sourceforge (http://sourceforge.net/projects/ 
msmtp/) to /usr/src/

Step 3

bunzip2 msmtp.tar.bz2

tar -xvf msmtp.tar
cd  /usr/src/msmtp[tab]

Step 4

built msmtp

./configure
make
make install


Step 5

check if msmtp is on the system and if the output looks like below.

# msmtp --version

msmtp version 1.4.9
TLS/SSL library: GnuTLS
Authentication library: GNU SASL
Supported authentication methods:
plain cram-md5 digest-md5 gssapi external login
IDN support: enabled
NLS: enabled, LOCALEDIR is /usr/share/locale
System configuration file name: /etc/msmtprc
User configuration file name: /root/.msmtprc

Copyright (C) 2006 Martin Lambers and others.
This is free software.  You may redistribute copies of it under the  
terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

Step 6
Make a symlink from /usr/local/bin/msmtp to /usr/sbin/sendmail  (the  
name of the symlink is sendmail)

#  ln -s /usr/local/bin/msmtp /usr/sbin/sendmail

Step 7
Add /root/.msmtprc (be aware of the dot) to the system with only owner  
read and write permissions and with this lines (adjust to your xxxx at gmail.com 
  account).  This way it works for a gmail account


defaults
logfile /var/log/msmtp.log

account default
from <xxxxxx>@gmail.com
protocol smtp
host smtp.gmail.com
port 587
user <xxxxxxx>@gmail.com
password <password>
auth on
tls on
tls_certcheck on
tls_trust_file /root/cert.pem



Step 8  certificate file

copy the certificate file to the root directory
/root/cert.pem copied on system  (see attachement)


Step 9 configuration of /etc/asterisk/voicemail.conf

Add this to /etc/asterisk/voicemail.conf as a replacement of the  
"mailcmd =" line
mailcmd=/usr/sbin/sendmail -v -t -f <your_gemail_name>@gmail.com

and uncomment  "attach = yes

Add a vociemailbox to the system in [default] of voicemail.conf

[default]
; Define maximum number of messages per folder for a particular context.
;maxmsg=50

500 => 1234,<name>,<e-mail adress>

step 10 adding a test extension to the system

Add an extension to /etc/asterisk/extension.conf to test de setup

something like

exten => 888,1,Answer()
exten => 888,n,Voicemail(500)

If you call 888 with in internal phone you enter the voicemail routine  
and a recording will be made. After finishing you will receive an e- 
mail with the recording as an attachement.


And you are done

On 20 dec 2009, at 11:51, James Stocks wrote:

> On 19 Dec 2009, at 16:20, Thomas Perron wrote:
>
>> Anyone have a cookbook on configuring sendmail to work with Asterisk?
>> Or,a few config examples.
>
> Postfix is a drop-in replacement for sendmail.  I find it to be far,  
> far simpler to administer.
>
> Take a look at http://www.postfix.org/documentation.html
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20091220/eba6360b/attachment.htm 


More information about the asterisk-users mailing list