VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
flojose at gmail.com Guest
|
Posted: Wed May 14, 2008 11:01 pm Post subject: [asterisk-users] voicemail not sending emails |
|
|
That's right.
msmtp behave different depending on the user that invokes de command.
I suppose you are running asterisk like root or asterisk user so the config
file must be /root/.msmtprc or /home/asterisk/.msmtprc.
Also, as david notice, in the voicemail.conf line
Quote: | mailcmd=/opt/local/bin/msmtp -t ; --from blah
| all that comes after ; are ignored when parsed by asterisk.
I suggest you to configure a default account on your "System configuration
file" for msmtp, you can found the path to the file if you make "msmtp
--version" from command line.
This is how my configuration file looks like:
#Config file for msmpt
#Default values for all accounts
defaults
logfile /var/log/msmtp.log
# Main Account
account aspinet
host mail.megamailservers.com
from someone at mail.com
auth MD5
user someone at mail.com
password mostseecretpassword
# Set a default account
account default : aspinet
Adn in voicemail.conf
add
mailcmd=/usr/bin/msmtp -t
Also you can try to configure sendmail for smtp relay with your ISP
This doc was very useful when I try it.
http://cri.ch/linux/docs/sk0009.html
Regards
2008/5/14 Tilghman Lesher <tilghman at mail.jeffandtilghman.com>:
Quote: | On Wednesday 14 May 2008 17:19:09 Roberto Milani wrote:
Quote: | I do have a mail transport agent configured
It is msmtp and it is working just fine I tested it on the command
line and I receive the test email
I have a link from sendmail pointing to msmtp.
but it never get called.
|
I've noted that the times that you've tested this, you've used
msmtp on the command line. Some commands behave differently
if you call them with a different name. For example, if sh is linked to
bash and you call it, bash drops some of its features to more closely
match sh. Could it be that msmtp acts the same way, and you need
to test that behavior (calling it as sendmail)?
--
Tilghman
_______________________________________________
-- 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
|
--
Jose Flores Galicia
<<FloJoSe at gmail.com>>
BriefCode && Code Based Training
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080514/253cd171/attachment.htm |
|
Back to top |
|
|
roberto.milani at sbcg... Guest
|
Posted: Wed May 14, 2008 11:14 pm Post subject: [asterisk-users] voicemail not sending emails |
|
|
does the /tmp directory need to have some specific kind of mode/
ownership?
mine is linked to /private/tmp and is lrwxr-xr-x root admin
Ciao
Roberto
On May 14, 2008, at 8:34 PM, Roberto Milani wrote:
Quote: | That's what I thought,
and my voicemail.conf is:
[general]
format=wav
attach=yes
serveremail= roberto.milani at sbcglobal.net
emailsubject=New message from ${VM_CALLERID}
emailbody=Hi, ${VM_NAME}!\n\nYou have a new message from $
{VM_CALLERID} in mailbox ${VM_MAILBOX}.
fromstring=My Telephone System
;max and min length of a message
maxmessage = 180
maxlogins = 3
[default]
100 => 4711,Front Desk,roberto.milani at sbcglobal.net,,attach=yes
the voicemail works, I get also the MWI working perfectly
but no email
Roberto
On May 14, 2008, at 6:37 PM, Tilghman Lesher wrote:
Quote: | On Wednesday 14 May 2008 19:45:13 Roberto Milani wrote:
Quote: | Good hint but I tested that too
I sent the command line to the link called sendmail and I got my
mail
just right
is there any other configuration in asterisk that might prevent it
to
send mails?
|
The only reason why it wouldn't send an email is if an email address
is
not configured (third field in voicemail.conf, "email" column in
realtime):
123 => 456,Firstname Lastname,email at address.com,pager at address.com
The exact command that is run is:
sh -c "( /usr/sbin/sendmail -t < /tmp/astmail-123456 ;
rm -f /tmp/astmail-123456 ) &"
Or whatever you've substituted for "/usr/sbin/sendmail -t".
--
Tilghman
_______________________________________________
-- 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
|
_______________________________________________
-- 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 |
|
|
Back to top |
|
|
roberto.milani at sbcg... Guest
|
Posted: Wed May 14, 2008 11:43 pm Post subject: [asterisk-users] voicemail not sending emails |
|
|
First of all thanks to everybody
I feel the need to clarify the configuration.
from the command line msmtp works, this means that ~.msmtrc is
configured properly
I removed the mailcmd line from voicemail.conf , renamed sendmail to
sendmail.orig and created a link to msmtp called sendmail in /usr/sbin/
lrwxr-xr-x 1 root wheel 20 May 14 07:28 sendmail -
Quote: | /opt/local/bin/msmtp
|
the command:
echo "hello." | sendmail --debug --account=sbcglobal --from=myaddress at sbcglobal.net
roberto.milani at sbcglobal.net
sends the email
I do have voicemail configured in voicemail.conf with valid email
addresses, voicemails work fine
this is the my tmp
lrwxr-xr-x@ 1 root admin 11 Nov 15 06:54 tmp -> private/tmp
and I have no emails
no error messages, no logs, nothing
any idea on how to debug this?
On May 14, 2008, at 9:01 PM, Jose Flores Galicia wrote:
Quote: | That's right.
msmtp behave different depending on the user that invokes de command.
I suppose you are running asterisk like root or asterisk user so the
config file must be /root/.msmtprc or /home/asterisk/.msmtprc.
Also, as david notice, in the voicemail.conf line
Quote: | mailcmd=/opt/local/bin/msmtp -t ; --from blah
| all that comes after ; are ignored when parsed by asterisk.
I suggest you to configure a default account on your "System
configuration file" for msmtp, you can found the path to the file if
you make "msmtp --version" from command line.
This is how my configuration file looks like:
#Config file for msmpt
#Default values for all accounts
defaults
logfile /var/log/msmtp.log
# Main Account
account aspinet
host mail.megamailservers.com
from someone at mail.com
auth MD5
user someone at mail.com
password mostseecretpassword
# Set a default account
account default : aspinet
Adn in voicemail.conf
add
mailcmd=/usr/bin/msmtp -t
Also you can try to configure sendmail for smtp relay with your ISP
This doc was very useful when I try it.
http://cri.ch/linux/docs/sk0009.html
Regards
2008/5/14 Tilghman Lesher <tilghman at mail.jeffandtilghman.com>:
On Wednesday 14 May 2008 17:19:09 Roberto Milani wrote:
Quote: | I do have a mail transport agent configured
It is msmtp and it is working just fine I tested it on the command
line and I receive the test email
I have a link from sendmail pointing to msmtp.
but it never get called.
|
I've noted that the times that you've tested this, you've used
msmtp on the command line. Some commands behave differently
if you call them with a different name. For example, if sh is
linked to
bash and you call it, bash drops some of its features to more closely
match sh. Could it be that msmtp acts the same way, and you need
to test that behavior (calling it as sendmail)?
--
Tilghman
_______________________________________________
-- 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
--
Jose Flores Galicia
<<FloJoSe at gmail.com>>
BriefCode && Code Based Training
_______________________________________________
-- 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/20080514/384d8523/attachment.htm |
|
Back to top |
|
|
gres.rasmy at gmail.com Guest
|
Posted: Thu May 15, 2008 2:54 am Post subject: [asterisk-users] voicemail not sending emails |
|
|
i think you have to have a mail transport agent like sendmail or postfix
installed and configured on your asterisk box , however if you forward the
mails to say hotmail or yahoo or gamil those servers will reject the mail
transfere
----- Original Message -----
From: "david" <david at linuxcrazy.com>
To: "Asterisk Users Mailing List - Non-Commercial Discussion"
<asterisk-users at lists.digium.com>
Sent: Wednesday, May 14, 2008 1:00 PM
Subject: Re: [asterisk-users] voicemail not sending emails
Quote: | Roberto Milani wrote:
Quote: | Quote: |
Roberto - I noticed in your original email you had the lines
| something like
Quote: |
mailcmd=/opt/local/bin/msmtp -t ; --from blah
AND
serveremail=from=blah
In mailcmd everything after the ; will be ignored as a comment
In serveremail - well - it should throw an error...
I would probably test by adding the --debug to the mailcmd and watch
the logs. I also don't know mstmp but does it have a '-t' option?
Brett
| Hi Brett
msmtp is a stand-in for sendmail (using another SMTP server) so it has
a -t option
the real problem is that it never get called.
even if I use the test mode:
mailcmd=cat \> /tmp/astvm-mail
to send the output to a file.
Ciao
Roberto
_______________________________________________
-- 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
| Are you relaying the mail through your isp?
Are you using a system wide /etc/msmtprc
or for user asterisk
~.msmtprc
--
Powered by Gentoo GNU/Linux
http://linuxcrazy.com
_______________________________________________
-- 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
|
|
|
Back to top |
|
|
tzafrir.cohen at xorco... Guest
|
Posted: Thu May 15, 2008 3:29 am Post subject: [asterisk-users] voicemail not sending emails |
|
|
On Wed, May 14, 2008 at 09:14:44PM -0700, Roberto Milani wrote:
Quote: | does the /tmp directory need to have some specific kind of mode/
ownership?
mine is linked to /private/tmp and is lrwxr-xr-x root admin
|
Yes, It is normally 1777 (all readable/writable/executable, but with the
sticy bit, which means htat only the user who has created a
file/directory in the directory may delete it.
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir |
|
Back to top |
|
|
roberto.milani at sbcg... Guest
|
Posted: Thu May 15, 2008 1:46 pm Post subject: [asterisk-users] voicemail not sending emails |
|
|
did that and still no email
is asterisk logging something somewhere about errors in saving files
or so?
nothing shows up in the /tmp directory anyway
I have verbose and debug set to 100 in the CLI but I see no error
messages
HELP!
Roberto
On May 15, 2008, at 1:29 AM, Tzafrir Cohen wrote:
Quote: | On Wed, May 14, 2008 at 09:14:44PM -0700, Roberto Milani wrote:
Quote: | does the /tmp directory need to have some specific kind of mode/
ownership?
mine is linked to /private/tmp and is lrwxr-xr-x root admin
|
Yes, It is normally 1777 (all readable/writable/executable, but with
the
sticy bit, which means htat only the user who has created a
file/directory in the directory may delete it.
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
_______________________________________________
-- 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 |
|
|
Back to top |
|
|
roberto.milani at sbcg... Guest
|
Posted: Sun May 18, 2008 10:26 pm Post subject: [asterisk-users] voicemail not sending emails |
|
|
Problem solved!
msmtp from the command line was using the config file ~/.msmtprc (the
one I configured) when called from asterisk msmtp uses /opt/local/etc/
msmtprc
so I copied the config in there and voila the emails worked as a champ.
Ciao
Roberto
On May 14, 2008, at 9:14 PM, Roberto Milani wrote:
Quote: | does the /tmp directory need to have some specific kind of mode/
ownership?
mine is linked to /private/tmp and is lrwxr-xr-x root admin
Ciao
Roberto
On May 14, 2008, at 8:34 PM, Roberto Milani wrote:
Quote: | That's what I thought,
and my voicemail.conf is:
[general]
format=wav
attach=yes
serveremail= roberto.milani at sbcglobal.net
emailsubject=New message from ${VM_CALLERID}
emailbody=Hi, ${VM_NAME}!\n\nYou have a new message from $
{VM_CALLERID} in mailbox ${VM_MAILBOX}.
fromstring=My Telephone System
;max and min length of a message
maxmessage = 180
maxlogins = 3
[default]
100 => 4711,Front Desk,roberto.milani at sbcglobal.net,,attach=yes
the voicemail works, I get also the MWI working perfectly
but no email
Roberto
On May 14, 2008, at 6:37 PM, Tilghman Lesher wrote:
Quote: | On Wednesday 14 May 2008 19:45:13 Roberto Milani wrote:
Quote: | Good hint but I tested that too
I sent the command line to the link called sendmail and I got my
mail
just right
is there any other configuration in asterisk that might prevent it
to
send mails?
|
The only reason why it wouldn't send an email is if an email address
is
not configured (third field in voicemail.conf, "email" column in
realtime):
123 => 456,Firstname Lastname,email at address.com,pager at address.com
The exact command that is run is:
sh -c "( /usr/sbin/sendmail -t < /tmp/astmail-123456 ;
rm -f /tmp/astmail-123456 ) &"
Or whatever you've substituted for "/usr/sbin/sendmail -t".
--
Tilghman
_______________________________________________
-- 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
|
_______________________________________________
-- 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
|
_______________________________________________
-- 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 |
|
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|