Frequently Asked Question
PBX Uitgaande SMTP configureren voor gebruik van Google SMTP
Last Updated 10 years ago
PBX: Uitgaande SMTP server wijzigen naar SMTP server van google.
hostname=voicemail@your-domain-name.com
root=voicemail@your-domain-name.com
AuthUser=voicemail@your-domain-name.com
AuthPass=Enter-Password
UseSTARTTLS=yes
UseTLS=yes
FromLineOverride=yes
5. Next you will need to add an entry for the root user to the revaliases file.
# /etc/ssmtp/revaliases
6. Now you can test sending a message from the command line.
[root@phone-call /]# ssmtp email.address@jonathanmanning.com
To: email.address@jonathanmanning.com
From: voicemail@your-domain-name.com
Subject: Test Mail Connection
The mail was sent from my Linux server
[use CTRL + d to send email]
7. Asterisk needs to be configured to use ssmtp to email voicemails, to do this we are going to edit voicemail.conf in the asterisk directory.
; /etc/asterisk/voicemail.conf
; configure asterisk voicemail to use ssmtp to use a gmail account
[general]
format = wav
attach = yes
delete = yes
maxmsg = 1000
envelope = yes
skipms = 3000
maxsilence = 10
silencethreshold = 128
maxlogins = 3
emaildateformat = %A, %B %d, %Y at %r
mailcmd=/usr/sbin/ssmtp -t
fromstring=Phone Greetings VM
pagerfromstring=Phone Greetings VM
[default]
4400 => 123456,4400,myemailaddress@jonathanmanning.com,emailaddress2@gmail.com,attach=yes|delete=1
4401 => 123456,4401,myemailaddress@jonathanmanning.com,emailaddress2@gmail.com,,attach=yes
8. Just reload the voicemail config or restart asterisk and it will now email any new voicemail’s.
[root@phone-call /]# asterisk -r
Asterisk 1.4.41.1, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.4.41.1 currently running on phone-call (pid = 10713)
phone-call*CLI> module reload app_voicemail.so
phone-call*CLI> exit
[root@phone-call /]#
- Uninstall sendmail and postfix if they are installed.
yum remove postfix
Loaded plugins: fastestmirror, presto
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package postfix.x86_64 2:2.7.4-1.fc14 set to be erased
---> Package sendmail.x86_64 8.14.4-10.fc14 set to be erased
--> Finished Dependency Resolution - Install ssmtp on the server.
yum -y install ssmtp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ssmtp.x86_64 0:2.61-15.fc14 set to be installed
--> Finished Dependency Resolution - Backup the default ssmtp.conf file so we can create a new one with our gmail account.
cd /etc/ssmtp
mv ssmtp.conf ssmtp.conf.org
touch ssmtp.conf - Create a new config for ssmtp and add the gmail account to it by pasting in the below config and modify the email address and password.
# /etc/ssmtp/ssmtp.conf
ssmtp config for gmail or google apps account
mailhub=smtp.gmail.com:587hostname=voicemail@your-domain-name.com
root=voicemail@your-domain-name.com
AuthUser=voicemail@your-domain-name.com
AuthPass=Enter-Password
UseSTARTTLS=yes
UseTLS=yes
FromLineOverride=yes
5. Next you will need to add an entry for the root user to the revaliases file.
# /etc/ssmtp/revaliases
config for asterisk to email voicemail messages
root:voicemail@your-domain-name.com:smtp.gmail.com:5876. Now you can test sending a message from the command line.
[root@phone-call /]# ssmtp email.address@jonathanmanning.com
To: email.address@jonathanmanning.com
From: voicemail@your-domain-name.com
Subject: Test Mail Connection
The mail was sent from my Linux server
[use CTRL + d to send email]
7. Asterisk needs to be configured to use ssmtp to email voicemails, to do this we are going to edit voicemail.conf in the asterisk directory.
; /etc/asterisk/voicemail.conf
; configure asterisk voicemail to use ssmtp to use a gmail account
[general]
format = wav
attach = yes
delete = yes
maxmsg = 1000
envelope = yes
skipms = 3000
maxsilence = 10
silencethreshold = 128
maxlogins = 3
emaildateformat = %A, %B %d, %Y at %r
mailcmd=/usr/sbin/ssmtp -t
fromstring=Phone Greetings VM
pagerfromstring=Phone Greetings VM
[default]
4400 => 123456,4400,myemailaddress@jonathanmanning.com,emailaddress2@gmail.com,attach=yes|delete=1
4401 => 123456,4401,myemailaddress@jonathanmanning.com,emailaddress2@gmail.com,,attach=yes
8. Just reload the voicemail config or restart asterisk and it will now email any new voicemail’s.
[root@phone-call /]# asterisk -r
Asterisk 1.4.41.1, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.4.41.1 currently running on phone-call (pid = 10713)
phone-call*CLI> module reload app_voicemail.so
phone-call*CLI> exit
[root@phone-call /]#