TRY THIS Configuring SendMail with Incredible PBX 16-15

jrglass

Guru
Joined
Oct 18, 2007
Messages
302
Reaction score
20
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
302
Reaction score
20
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

Well-Known Member
Joined
Dec 16, 2007
Messages
3,764
Reaction score
2,173
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
 

jrglass

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

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
separate commands:
make
systemctl restart sendmail
 

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
772
Reaction score
124
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
60
Reaction score
10
@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

Well-Known Member
Joined
Dec 16, 2007
Messages
3,764
Reaction score
2,173
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.
 

sortons

Member
Joined
Aug 9, 2018
Messages
60
Reaction score
10
...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
60
Reaction score
10
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)

root@vultr:/etc/mail $ hostname -f > genericsdomain
WARNING: Always run Incredible PBX behind a secure firewall.
root@vultr:/etc/mail $ touch genericstable
WARNING: Always run Incredible PBX behind a secure firewall.
root@vultr:/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

Well-Known Member
Joined
Dec 16, 2007
Messages
3,764
Reaction score
2,173
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:

sortons

Member
Joined
Aug 9, 2018
Messages
60
Reaction score
10
No further comments on this or any related forums - thank you!
 

AndyInNYC

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

Andrew
 

badwolf

Member
Joined
Feb 17, 2008
Messages
44
Reaction score
2
I am still getting
makemap -r hash genericstable.db < genericstable
-bash: makemap: command not found
etc when trying to follow along on my vultur instance
thanks in advance


makemap -r hash genericstable.db < genericstable
makemap: illegal option -- r
usage: makemap [-U] [-d dbtype] [-o dbfile] [-t type] file
WARNING: Always run Incredible PBX behind a secure firewall.

progress

cannot create temporary file /var/spool/smtpd/offline/1573071079.XXXXygHTaO: No such file or directory

I dont know, think didnt reinstall from root....
 
Last edited:

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
772
Reaction score
124
I'm on a local machine, but try this:

cd /usr/bin
rm makemap
ln -s ../sbin/makemap.sendmail makemap

then go back to /etc/mail and continue the commands
 

Members online

No members online now.

Forum statistics

Threads
25,779
Messages
167,505
Members
19,199
Latest member
leocipriano
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top