TIPS CentOS 7 with incrediblePBX fails to send emails

Fribse

Member
Joined
Jul 25, 2020
Messages
40
Reaction score
2
I've followed the guide in how to modify to use google as smarthost, but I need to use my own mail provider instead, so I modified the sendmail.mc and the client-info to reflect the correct host.

Code:
AuthInfo:send.one.com "U:smmsp" "I:voicemail.domain.dk" "P:5k" "M:PLAIN"
AuthInfo:send.one.com:587 "U:smmsp" "I:[email protected]" "P:5k" "M:PLAIN"
AuthInfo:send.one.com:465 "U:smmsp" "I:[email protected]" "P:5k" "M:PLAIN"

In the sendmail.mc I modified the smarthost line to
Code:
define(`SMART_HOST', `send.one.com')dnl

I can also see in sendmail.cf:
Code:
# "Smart" relay host (may be null)
DSsend.one.com

But when I try to send a mail I see this in the logfile:
Code:
Oct  2 17:52:22 noreply sendmail[18234]: 092FqM9w018234: from=root, size=219, class=0, nrcpts=1, msgid=<[email protected]>, relay=root@localhost
Oct  2 17:52:22 noreply sendmail[18235]: 092FqMHA018235: from=<[email protected]>, size=490, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA, relay=pbx [127.0.0.1]
Oct  2 17:52:22 noreply sendmail[18234]: 092FqM9w018234: [email protected], ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30219, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (092FqMHA018235 Message accepted for delivery)
Oct  2 17:52:22 noreply sendmail[18237]: STARTTLS=client, relay=send.one.com., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-AES256-GCM-SHA384, bits=256/256
Oct  2 17:52:22 noreply sendmail[18237]: 092FqMHA018235: to=<[email protected]>, ctladdr=<[email protected]> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120490, relay=send.one.com. [46.30.211.141], dsn=5.0.0, stat=Service unavailable
Oct  2 17:52:22 noreply sendmail[18237]: 092FqMHA018235: 092FqMHA018237: DSN: Service unavailable

I checked that the send.one.com could resolve on the host. I also checked that could telnet to port 25 from the host to the smarthost.
I also tested that I could connect with starttls using openssl.
 
I'm not using 'sendmail' anymore.
Check out
This one for Comcast on sendmail
To quote @wardmundy same applies to any provider.
BUT
the address for the sendmail.mc.comcast file is not working - tried
Code:
wget http://pbxinaflash.com/source/sendmail/sendmail.mc.comcast
but the file saved is some html scripting or something??
The gmail version you have would probably work.


one.com help pages

but you can also use the following settings:
  • Outgoing server name: mailout.one.com
  • Port and encryption:
    - 587 with STARTTLS (recommended)
    - 465 with TLS
    - 25 with STARTTLS or none
  • Authentication: your email address and password
( https://help.one.com/hc/en-us/articles/115005594605-Setting-up-Windows-Live-Mail )
server: sends.one.com Port 465
enable SSL
auth required

When trying to re-do the encrypted files such as I think
in /etc/mail/genericstable.db
or mayb the files in /etc/mail/auth/
I had difficulty with permissions trying to delete that/those files to start again. I got around that one by piping the correct contents to it using a > pipe.
 
Last edited:
Try redoing it with a google email first - to make sure its working, then retrace your steps...

I spend two days on a new install and could not get sendmail to work. kept getting connection refused. I tried all different gmail accounts, nothing. I finally did another clean install, and before I did anything(trunks, extensions, etc...) followed the nervittles article and it worked fine. You could have borked the server and has nothing to do with sendmail...

just my two cents, YMMV...
Brian
 
@ostridge Thankyou for the edit of the reply with the link, but I can't get it working, I just get a HTML page
 
I just get a HTML page
Yes me too. just use the gmail version and edit the SMART_HOST to suit

version=TLSv1/SSLv3, verify=FAIL
verify=FAIL seems to say it all.

What is [email protected] = is that just a substitute for [email protected] or something else?
what is 5k is that a placeholder for your-secret-email-password ?

DO NOT edit sendmail.cf -you could easily f**k it up.

What did you do with the "double-quotes" in /etc/mail/auth/client-info. The file needs editing with
Code:
nano /etc/mail/auth/client-info
just delete all the double-quotes and type them in again in a linux editor so you get the utf-8 coding. For the user_id part (it may work with just the part before the '@' ; or else needs full email address ) I know that google works with just the 1st part.

Did you try the server mailout.one.com instead of sends.one.com
It may be that 'sends' is not doing the other ports??

as I said I have not got a sendmail as using exim4 on the Raspbian so good luck
 
Last edited:
You are seeing the same problem I had for all the times I tried sendmail. It is trying to send out the email with the "From" address as a local account on your PBX.


That is not a valid email account with your host so it will fail. When I had that issue I could see the response from the server side logs. I would always get an "Unknown account"

To get the right email address to go out you have to convert on the service name sending out the email to the actual email address you want to go out.

Edit the /etc/mail/genericstable file and add
Code:
root{space | tab some kind of white space}{Real Email address}

Then you need to hash the genericstable file to create the database file.

Code:
makemap -r hash genericstable.db < genericstable

Send a test mail again. Hopefully you see the proper email address go out to your provider. If your correct email shows in the log but the mail is never received. You have the same Auth problem I have. I don't know how to fix that issue yet and don't have time to work on it.


Hopefully that works for you but if it does you will have to add more entries to the genericstable file. The voicemail system will try to send out the mail notification as "asterisk@{PBXhostname}" and fax will try to send it out as another account name. Each of those will have to be individual entries.
 
You may need to also make a change to your authinfo file. The message is going out as root so you may have to add this to the file.

Code:
AuthInfo:send.one.com "U:root" "I:voicemail.domain.dk" "P:5k" "M:PLAIN"
AuthInfo:send.one.com:587 "U:root" "I:[email protected]" "P:5k" "M:PLAIN"
AuthInfo:send.one.com:465 "U:root" "I:[email protected]" "P:5k" "M:PLAIN"
 
also make a change to your authinfo file
smmsp is the default user for sendmail
see linux - user smmsp found in repeatedly in auth.log ...

I don't think that is going to authenticate if sendmail is being run as the smmsp user? I don't use sendmail any more but @wardmundy method used to work for me.

The messages also go out as asterisk root postmaster or anything else added to the appropriate file ( I think /etc/aliases file or something??).
More at Configure Sendmail to Work with Gmail SMTP Relay on CentOS 7
BUT @wardmundy already done the heavy lifting by providing the file sendmail.mc.comcast or sendmail.mc.gmail which shouldnt need much to tweek for your provider; so if @ward's recipe aint broke don't fix it. Setting up sendmail is a bugger if you are making it up as you go along.
 
Last edited:
I don't think that is going to authenticate if sendmail is being run as the smmsp user? I don't use sendmail any more but @wardmundy method used to work for me.

I can tell you sendmail with these instructions is not authenticating but I have to ask why create the client-info file and hash it if the authentication is never going to be used? I am going to investigate that statement thought because that might be the reason my install will not authenticate to my server. Thank you for that bit of incite.

The messages also go out as asterisk root postmaster or anything else added to the appropriate file ( I think /etc/aliases file or something??).

Wrong it is the genericstable file that converts user names such as root or asterisk to an email address. This only applies to outbound emails.

The aliases file converts incoming mail from one address to another.


More at Configure Sendmail to Work with Gmail SMTP Relay on CentOS 7
BUT @wardmundy already done the heavy lifting by providing the file sendmail.mc.comcast or sendmail.mc.gmail which shouldnt need much to tweek for your provider; so if @ward's recipe aint broke don't fix it. Setting up sendmail is a bugger if you are making it up as you go along.

@ostridge
If it were only that simple. From Fribse post we can see the instructions Provided by Ward were followed. In the thread I started
https://www.voip-info.org/forum/threads/sendmail-auth-smtp-problems.24934/

I also followed the instructions from Ward. Neither thread we opened has answered the issues at the root cause of why it doesn't work, so technically it is broke which means to use Sendmail it needs fixed. We are also working outside of Wards scope he worked out the issues with Gmail and Comcast those instructions do not work for Fribse provider or my server.

I offered what I found to resolve the issue with the system sending the wrong email address in the "From:" field which I know works and depending on Fribse provider might be all he needs to fix the issue but I doubt it. I think the authentication issue will be the next issue.

I am a little put off that you would simply though out the if it ain't broke don't fix it comment when clearly it is. We started with Wards instructions and now we have to step outside of Wards instructions to solve the riddle of why it doesn't work. Figureing out how to make it work will help all of the other members who have had similar Sendmail headaches.
 
I don't disagree with you that a fix may be necessary, but... we don't have an account to play with so it's a bit like throwing darts at a dart board while blindfolded. As has been mentioned, SendMail is a can of worms. We have solutions that work, and anybody can sign up for a Gmail account even if it's only to send outbound mail from their PBX. With limited resources, we just aren't in a position to diagnose and solve every wrinkle for everybody that wants to do something differently. We're all for addressing any issues that are found AND resolved.
 
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.
Back
Top