Sending Email from CLI


I am studying the FreePBX Wiki and trying Sending Email from CLI.

There is an existing FreePBX that is working in the building on a separate NAT IP address. This system has lost the capability to forward .wavs in an email. I have set up a second server for learning how to implement FreePBX.
I have known issues that I am behind a firewall and unable to get my SIP to register on the second server. I am able to get it to register on an external LAN

From the second server I am able to ping external adresses… but cannot register SIP

Should the Wiki instruction below work? It doesn’t seem to be.

Sending Email from CLI
sudo -u asterisk mail -s test1 [email protected] (hit enter)
replace [email protected] with email address to send test email to
(Type body of message and hit enter)
Ctrl D and hit enter

Thanks if you can help… I about as green at this that person can be.


If it’s running on another IP it’s most likely not the other FreePBX which is causing you problems…

Is that new FreePBX box in a DMZ and was it configured to be very restrictive as to what the server is allowed to do?

The command give in the wiki works from the actual Linux command line (or directly from Asterisk CLI if you remove everything before the mail and replace it with “!” (exclamation mark) but at lest with FreePBX 13 it doesn’t work with the Asterisk CLI provided in the web interface for me…

Good luck and have a nice day!