Email problem

Hi.

I do steep by steep in asterisk.

Now I have configured some features, and want that email of voicemail messages will send to the email extension user.

The configuration seems ok, because I view in the mail over webmin that mesage was created, but no send well becouse past 4 hour retry the mail with Mail Delivery Subsystem.

What I need to email send work well ?

Any idea ?

I use TRIXBOX.

Thanks.

no idea of what can I do to solve the problem ?

no idea on trixbox but a few ideas…

first check your * box’s root mail queue. Often it bounces there.

In voicemail.conf check the from addresses (make sure they at least look valid, not like root@localhost), also for the mailcmd make it like /path/to/sendmail -tf a.real@email.address.com.

Also make sure that you can send mail out on port 25- many ISP’s block this. If so configure sendmail to use a smart relay host, and use your ISP’s mailserver for that.

[quote=“IronHelix”]no idea on trixbox but a few ideas…

first check your * box’s root mail queue. Often it bounces there.

In voicemail.conf check the from addresses (make sure they at least look valid, not like root@localhost), also for the mailcmd make it like /path/to/sendmail -tf a.real@email.address.com.

Also make sure that you can send mail out on port 25- many ISP’s block this. If so configure sendmail to use a smart relay host, and use your ISP’s mailserver for that.[/quote]

I see in the queue and put me root@asterisk.local
Where I change this ?

In the User mailboxes (admin) have the messages:
Mail Delivery Subsystem 03/11/2006 17:07 3 kB
Returned mail: see transcript for details

The original message was received at Fri, 3 Nov 2006 17:07:53 +0100
from root@localhost

----- The following addresses had permanent fatal errors -----
pepe@pepe.es
(reason: 550 5.1.1 pepe@pepe.es… User unknown)
(expanded from: pepe@pepe.es)

----- Transcript of session follows -----
… while talking to [127.0.0.1]:

DATA
<<< 550 5.1.1 pepe@pepe.es… User unknown
550 5.1.1 pepe@pepe.es… User unknown
<<< 503 5.0.0 Need RCPT (recipient)

Also, if I put in console mode of linux, --mail pepe@pepe.es– don?t work too.

Can you help me ?

A lot of thanks.

I have this in the configuration file

; 1st listed format gets emailed
format=wav49|wav

attach=yes
pbxskip=yes ; Don’t put [PBX]: in the subject line
serveremail=pepe@pepe.es ; Who the e-mail notification should appear to come from
fromstring=Voicemail System ; Real name of email sender
maxmessage=180 ; max length of vm message
minmessage=3 ; Minimum length of a voicemail message in seconds
maxsilence=5 ; Wait for 5 silent seconds and end the voicemail
silencethreshold=128 ; What do we consider to be silence
skipms=3000 ; How many miliseconds to skip forward/back when rew/ff in message playback
review=yes ; Allow sender to review/rerecord their message before saving it
operator=yes ; Allow caller to press 0
nextaftercmd=yes

Also if I send in comand of linux, mail pepe@pepe.es, don?t work too.
Not recibe the mail.

any help ?

To get the email address to report as coming from a real machine name instead of localhost, you will need to edit the hosts file. (/etc/hosts on most Linux machines) The first line of this file (after the comments) should be something like this:

127.0.0.1 machinename.domain.name machinename localhost.localdomain localhost

If that is correct your outgoing email should come from "username@machinename.domain.name"

Hi

If it does come out like this many ISPs will reject it as its not a address that can be reolved via DNS. it needs to be sent as “username@domain.name” to be sure of delivery and the “.domain.name” needs to be valid

Yes DNS is going to be an issue. But formatting the email as username@domain.name will most likely cause it to be rejected as well because the reverse DNS (rDNS) will not match. The asterisk machine that will be sending email NEEDS to have a DNS and rDNS entry.

Hi

Based on experiance of deployed systems, emails sent from asterisk@domain.com does work, It obvious that it has to be a vaild domain(and your own). But I have had no issues when email as sent this way.

Ian

You might want to see if sendmail is configuered properly.

Check the maillog files in /var/log to see if anything is up.

We had moved recently and sendmail was failing to resolve the DNS names of various servers.

Granted this looks like an invalid username id type thing…but sometimes sendmail can give a clue as to whats up.

you might wana give sendmail your email account information…as its only sending email.

We gave an email account to our asterisk server to just transmit on and it started working like a charm.

:slight_smile: hope this helps…if not…sorry…im a noob too : O P

I change /etc/hosts


hosts

Do not remove the following line, or various programs

that require network functionality will fail.

127.0.0.1 localhost
127.0.0.1 midominio.es 111.111.111.111 asterisk1.local

111.111.111.111 = change by my public IP (80.28…)

but don?t work.

What more I need to work ?


/var/log/maillog

[root@asterisk1 conf]# vi /var/log/maillog
Nov 6 09:12:07 asterisk1 sendmail[3093]: alias database /etc/aliases rebuilt by root
Nov 6 09:12:07 asterisk1 sendmail[3093]: /etc/aliases: 79 aliases, longest 10 bytes, 811 bytes total
Nov 6 09:12:08 asterisk1 sendmail[3098]: starting daemon (8.13.1): SMTP+queueing@01:00:00
Nov 6 09:12:08 asterisk1 sm-msp-queue[3106]: starting daemon (8.13.1): queueing@01:00:00
Nov 6 10:33:44 asterisk1 sendmail[8834]: kA69XhAG008834: from=root, size=69, class=0, nrcpts=1, msgid=200611060933.kA69XhAG008834@midominio.es, relay=root@localhost
Nov 6 10:33:44 asterisk1 sendmail[8836]: kA69XidP008836: from=root@midominio.es, size=345, class=0, nrcpts=1, msgid=200611060933.kA69XhAG008834@midominio.es, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Nov 6 10:33:44 asterisk1 sendmail[8834]: kA69XhAG008834: to=benjamin@midominio.es, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30069, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (kA69XidP008836 Message accepted for delivery)
Nov 6 10:33:44 asterisk1 sendmail[8838]: kA69XidP008836: SYSERR(root): midominio.es. config error: mail loops back to me (MX problem?)
Nov 6 10:33:44 asterisk1 sendmail[8838]: kA69XidP008836: to=benjamin@midominio.es, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120345, relay=midominio.es. [127.0.0.1], dsn=5.3.5, stat=Local configuration error
Nov 6 10:33:44 asterisk1 sendmail[8839]: kA69Xi63008839: localhost [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA
Nov 6 10:33:44 asterisk1 sendmail[8838]: kA69XidP008836: kA69XidP008838: DSN: Local configuration error
Nov 6 10:33:45 asterisk1 sendmail[8838]: kA69XidP008838: to=root@midominio.es, delay=00:00:01, xdelay=00:00:00, mailer=esmtp, pri=61558, relay=midominio.es., dsn=5.3.5, stat=Local configuration error
Nov 6 10:33:45 asterisk1 sendmail[8838]: kA69XidP008838: to=admin, delay=00:00:01, xdelay=00:00:00, mailer=local, pri=61558, dsn=2.0.0, stat=Sent
Nov 6 10:33:45 asterisk1 sendmail[8838]: kA69XidP008838: kA69XidQ008838: return to sender: Local configuration error
Nov 6 10:33:45 asterisk1 sendmail[8838]: kA69XidQ008838: to=admin, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32582, dsn=2.0.0, stat=Sent

A lot of thanks.

you have it setup so that the SMTP daemon is using itself as a relay, resulting in a loop. that’s never going to work. i haven’t read right through the thread, but is the message destined for this machine, or is it supposed to be routed elsewhere ?

also, you can’t use your hosts file like that. it’s used to turn names into ip addresses.

[quote=“baconbuttie”]you have it setup so that the SMTP daemon is using itself as a relay, resulting in a loop. that’s never going to work. i haven’t read right through the thread, but is the message destined for this machine, or is it supposed to be routed elsewhere ?

also, you can’t use your hosts file like that. it’s used to turn names into ip addresses.[/quote]

Then, How must it config ?

like this ?

Do not remove the following line, or various programs

that require network functionality will fail.

127.0.0.1 localhost
111.111.111.111 midominio.es asterisk1.local

111.111.111.111 is my IP public like this (80.28…)

is your Asterisk box behind a NAT ? is 80.28.xxx.xxx (whatever it is !) an address assigned to a NIC on the machine, or to the external interface of a NAT provider ?

where are the mailboxes that you’re trying to send to homed ? on the Asterisk box or elsewhere ? if on the Asterisk box then you shouldn’t need to do anything else. if elsewhere, and not on your network, then set the SMTP daemon to route all mail to your ISPs smarthost. if on your network, then set the SMTP daemon to route all mail to that server.

[quote=“baconbuttie”]is your Asterisk box behind a NAT ? is 80.28.xxx.xxx (whatever it is !) an address assigned to a NIC on the machine, or to the external interface of a NAT provider ?

where are the mailboxes that you’re trying to send to homed ? on the Asterisk box or elsewhere ? if on the Asterisk box then you shouldn’t need to do anything else. if elsewhere, and not on your network, then set the SMTP daemon to route all mail to your ISPs smarthost. if on your network, then set the SMTP daemon to route all mail to that server.[/quote]

My asterisk is connect to Internet by Router.
We must open the ports SMTP and POP to the IP of my asterisk pc ?

80.28.xxx.xxx is the public IP, 10.0.0.5 is the IP of the asterisk pc.

Thanks a lot baconbuttie for answer so fastly.

you need to answer the second part of my question first … where are the mailboxes homed ?

The mailbox that I want to recibe the mail is home in one ISP on internet, not in local !

your question’s been answered then. configure the SMTP daemon to route non-homed email to the SMTP relay/smarthost provided by your ISP (most do).

Typically sendmail by itself should be able to send email without those settings… the problem with ours was a lack of propper DNS routing.

Your hosts file btw is a local DNS "address book"
You have to be careful when you start messing with that file.

There’s no need to mod the host file…

127.0.0.1 is all it needs to know : O )

Of course if your wanting to reach your asterisk server by name then you can do just that…

Your send mail log is also indicating that its failing to send mail due to a local configuraiton error…make sure its configured correctly.

You should be able to find some Google’d pages on STMP settings…thats all it needs…pop isn’t nesscary as it will never be recieve mail…just sending.

I try to solve but I dont know how to do.

I try to see what happend with this

[root@asterisk1 ~]# sendmail -v benjamin@pepe.es
asdasd
asdasd
.
benjamin@pepe.es… Connecting to [127.0.0.1] via relay…
220 pepe.es ESMTP Sendmail 8.13.1/8.13.1; Tue, 7 Nov 2006 09:27:48 +0100

EHLO pepe.es
250-pepe.es Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
MAIL From:root@pepe.es SIZE=14 AUTH=root@pepe.es
250 2.1.0 root@pepe.es… Sender ok
RCPT To:benjamin@pepe.es
DATA
550 5.1.1 benjamin@pepe.es… User unknown
503 5.0.0 Need RCPT (recipient)
RSET
250 2.0.0 Reset state
RSET
250 2.0.0 Reset state
root… Using cached ESMTP connection to [127.0.0.1] via relay…
MAIL From:<> SIZE=1038
250 2.1.0 <>… Sender ok
RCPT To:root@pepe.es
DATA
250 2.1.5 root@pepe.es… Recipient ok
354 Enter mail, end with “.” on a line by itself
.
250 2.0.0 kA78Rmfu022043 Message accepted for delivery
root… Sent (kA78Rmfu022043 Message accepted for delivery)
Closing connection to [127.0.0.1]
QUIT
221 2.0.0 pepe.es closing connection
[root@asterisk1 ~]# sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter
$=w
pepe.es
localhost.localdomain
localhost
asterisk1.local
[127.0.0.1]
212.183.201.79

Firstly, not touch nothing, when I install trixbox, but dont work.
Then I touch some things in resolf.conf and host.conf, but still the same.

Someone can help me what must to change to solve the problem ?

Sorry, but Im a dummie.

1000000 thanks.