TRY THIS Configuring SendMail with Incredible PBX 16-15

jrglass

Guru
Joined
Oct 18, 2007
Messages
293
Reaction score
19
I am running Incredible PBX 16-15 on HostFlyte. When I type the comand "makemap -r hash genericstable.db < genericstable" I get the "bash: makemap: command not found"
Anyone have an idea why.

TIA

Jeff
 

jrglass

Guru
Joined
Oct 18, 2007
Messages
293
Reaction score
19
I used instructions that I found on


Configuring SendMail with Incredible PBX 16-15


In order to receive voicemails by email delivery, outbound mail functionality from your server obviously is required. If you’ve deployed your server in your home, your Internet Service Provider probably blocks downstream mail servers such as Incredible PBX from sending mail. This is done to reduce SPAM. In this case, you will need to configure SendMail using either your ISP or Gmail as an SMTP Relay Host. Here are the steps using a Gmail account:

cd /etc/mail
yum -y install sendmail-cf
 

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
1,008
Reaction score
207
I did a fresh install of IncrediblePBX 16-15 on CentOS 7 on the cloud just yesterday. I followed the instructions and they worked for me. You might want to remove sendmail from your system (rm -r /etc/mail) then reinstall (yum -y install sendmail sendmail-cf m4) and start over again.

I used these commands from the Nerdvittles article to install Gmail as the SMTP host for the PBX: I prefer to run each command separately and create the client-info file prior to chmod 600 client-info command. That way I can see if each step is working instead of just running a script. Make sure the hostname -f command gives you a fully qualified domain name like: yourserver.dyndns.org. Your system must have a valid FQDN for this to work.

To use Gmail, you must access your gmail account, enable 2-Step Verification, and create a less secure app password. Otherwise, Gmail will not accept email from the PBX. I created a separate gmail account just for sending out voicemail so there is little danger in allowing a less secure login from the PBX.

Code:
cd /etc/mail
yum -y install sendmail-cf
hostname -f > genericsdomain
touch genericstable
makemap -r hash genericstable.db < genericstable
mv sendmail.mc sendmail.mc.original
wget http://incrediblepbx.com/sendmail.mc.gmail
cp sendmail.mc.gmail sendmail.mc
mkdir -p auth
chmod 700 auth
cd auth
echo AuthInfo:smtp.gmail.com \"U:smmsp\" \"I:user_id\" \"P:password\" \"M:PLAIN\" > client-info
echo AuthInfo:smtp.gmail.com:587 \"U:smmsp\" \"I:user_id\" \"P:password\" \"M:PLAIN\" >> client-info
echo AuthInfo:smtp.gmail.com:465 \"U:smmsp\" \"I:user_id\" \"P:password\" \"M:PLAIN\" >> client-info
# Stop here and edit client-info (nano -w client-info) in all three lines.
# Replace  user_id with your gMail account name without @gmail.com
# Replace password with your real gMail password
# Be sure to replace the double-quotes shown above if they don't appear in the file!!!
# Save your changes (Ctrl-X, Y, then Enter)
chmod 600 client-info
makemap -r hash client-info.db < client-info
cd ..
make
systemctl restart sendmail
 
  • Like
Reactions: wardmundy

jrglass

Guru
Joined
Oct 18, 2007
Messages
293
Reaction score
19
Thanks,
One question, Does the make command go with the last
line "systemctl restart sendmail"
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,231
Reaction score
2,666
separate commands:
make
systemctl restart sendmail
 

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
615
Reaction score
83
On my new Centos7 install, I get a makemap error:

makemap -r hash genericstable.db < genericstable
-bash: makemap: command not found

I have killed /etc/mail and reinstalled everything via yum, but to no avail. Makemap isn't an installable program.

So, I did a forced uninstall of sendmail sendmail-cf m4 and then a reinstall of each.
now, i get an error that "-r" is an illegal option in makemap.

makemap: illegal option -- r
usage: makemap [-U] [-d dbtype] [-o dbfile] [-t type] file



Help?

Andrew
 
Last edited:

sortons

Member
Joined
Aug 9, 2018
Messages
50
Reaction score
7
@AndyInNYC - I have not been able to have sendmail work properly (i.e. configured as per the provided script) so far. I raised the issue a number of times in this forum, as some other users had the same issue (search this thread for makemap.) Just run makemap.sendmail instead and it will work.
The short version of it, is that perfect is nothing. I have it working - on 13-13.10 there is no mail entry on the Dashboard so you wouldn't know how the system feels about that, but I get emails. On 16-15* you have the mail entry on the dashboard and it looks unhappy (i.e. up in flames) but it works (I get emails from the system.)
@ward mentioned a number of times (even in this thread) that the email issue is resolved by now. Well, it looks like it's not.
However, that should be least of our issues right now, considering that what works is working well and what doesn't is out of our hands... Good luck!
 

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
1,008
Reaction score
207
On 16-15, to get rid of the flames for sendmail, go to a Linux prompt and type chmod 777 /var/spool/mqueue. Problem solved.

I will note on 16-15 on Vultr, that is not a problem. On 16-15 on Hosting73, the flames appear until you change permissions on the mqueue directory. We're pretty sure there are some current issues with Solus VM environments and Centos 7.
 
  • Like
Reactions: wardmundy

sortons

Member
Joined
Aug 9, 2018
Messages
50
Reaction score
7
...and how about the '-bash: makemap: command not found' encountered by so many other folks? That was the initial question to start with...
 

sortons

Member
Joined
Aug 9, 2018
Messages
50
Reaction score
7
During the back-and-forth of the last hour or so I just started a new Vultr install. It all worked as expected - I then started the sendmail configuration. Here is the outcome (the instance runs on Vultr in Toronto)

[email protected]:/etc/mail $ hostname -f > genericsdomain
WARNING: Always run Incredible PBX behind a secure firewall.
[email protected]:/etc/mail $ touch genericstable
WARNING: Always run Incredible PBX behind a secure firewall.
[email protected]:/etc/mail $ makemap -r hash genericstable.db < genericstable
-bash: makemap: command not found
WARNING: Always run Incredible PBX behind a secure firewall.

Comments welcome... I will keep that instance running for now - @kenn10, @ward I can provide credentials if you send an email to me.
 

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
1,008
Reaction score
207
I spun up a Vultr instance yesterday and did the IncrediblePBX 16-15.2 install exactly by the Nerd Vittles article. For email, following this from the Nerd Vittles article, I get no error on any of my installs. I'm on a Vultr Atlanta instance.
Code:
cd /etc/mail
yum -y install sendmail-cf
hostname -f > genericsdomain
touch genericstable
makemap -r hash genericstable.db < genericstable
mv sendmail.mc sendmail.mc.original
wget http://incrediblepbx.com/sendmail.mc.gmail
cp sendmail.mc.gmail sendmail.mc
mkdir -p auth
chmod 700 auth
cd auth
echo AuthInfo:smtp.gmail.com \"U:smmsp\" \"I:user_id\" \"P:password\" \"M:PLAIN\" > client-info
echo AuthInfo:smtp.gmail.com:587 \"U:smmsp\" \"I:user_id\" \"P:password\" \"M:PLAIN\" >> client-info
echo AuthInfo:smtp.gmail.com:465 \"U:smmsp\" \"I:user_id\" \"P:password\" \"M:PLAIN\" >> client-info
# Stop here and edit client-info (nano -w client-info) in all three lines.
# Replace  user_id with your gMail account name without @gmail.com
# Replace password with your real gMail password
# Be sure to replace the double-quotes shown above if they don't appear in the file!!!
# Save your changes (Ctrl-X, Y, then Enter)
chmod 600 client-info
makemap -r hash client-info.db < client-info
cd ..
make
systemctl restart sendmail
 
Last edited:

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
615
Reaction score
83
On my local machine (not a VM), the command chmod 777 /var/spool/mqueue fixed the problem. Test mail comes through just fine.

Andrew
 

Members online

PIAF 5 - Powered by 3CX

Forum statistics

Threads
22,446
Messages
137,997
Members
14,613
Latest member
roshan2019