Mail Setup

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Mail Setup

Postby Mequetref43 » Wed Nov 14, 2018 5:28 am

Good morning everyone,

i ´ve just installled Vicidial 8 wit Opensuse leap 42.3

Everything works ok as other vidials installed but i have problems setting the mail server with postfix.

I understand that the voicemail to email function used by asterisk is reached via postfix in Opensuse , is that´s right?

Trying to use postfix i found that no update is posible via zypper up. but i need libssl libraries to work.

So the questions are:

1- the mail used normally for this features is postfix in OPensuse?
2- Is possible to find right repositories to update system and install libssl trough zypper? is there other way?
3- Is normal to not to have postfix already installed with the right libraries or is some failure on installation?

THanks in advance


VERSION: 2.14-694a
BUILD: 181005-1738
Mequetref43
 
Posts: 18
Joined: Mon Jul 11, 2016 9:04 am

Re: Mail Setup

Postby williamconley » Wed Nov 14, 2018 1:01 pm

Please post the VERSION of the installer. Eight is merely the generation. It'll be 8.X.X for the full version.

You've posted some vague "help me" information without stating the problem. No error log. No "this happened" or "this didn't happen". Often this scenario turns out to be the result of an IT Professional with too much time on his hands trying to micromanage his Vicidial sever in a way that would make his old Microsoft Teachers proud.

That being said: I'll assume you actually have a problem of some sort and merely neglected to post any of the direct details. I'd hate to think you were one of "those other guys". 8-)

And to be clear: Email outbound, as a rule, works out of the box in a Vicidial server BUT that doesn't mean your ISP will allow port 25 access outbound nor does it mean your mail server will accept a connection from your IP address with your Unknown Entity vicidial server's attempt at outbound.

So ... mail logs?
Vicidial Installation and Repair, plus Hosting and Colocation
SugarCRM integration - Customization and Add-ons - We Bring It All Together.
http://www.PoundTeam.com # 352-269-0000 # +44 (203) 769-2294 # +506 4001-8914
williamconley
 
Posts: 17721
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Mail Setup

Postby thephaseusa » Wed Nov 14, 2018 8:58 pm

So I’m assuming that you have set up at least 1 voicemail account with an email address to send the voicemails to, and your problem is you aren’t receive the voicemails in your email box. Try leaving a message on your voicemail, and have open a terminal running journalctl -f on the box that your voicemail is configured to be on. Post back what message journal shows when it tries to send the email.

Like William said, postfix works out of the box, you dont have to update it))

JM
thephaseusa
 
Posts: 307
Joined: Tue May 16, 2017 2:23 pm

Re: Mail Setup

Postby Mequetref43 » Tue Nov 20, 2018 6:30 am

Thank you for your comments

Vicidial version 8.1.2

The mail logs are:

"Nov 20 11:48:47 vicibox81 postfix/pickup[4271]: 600C71962A07: uid=0 from=<root>
Nov 20 11:48:47 vicibox81 postfix/cleanup[4465]: 600C71962A07: message-id=<20181120104847.600C71962A07@vicibox81.localdomain>
Nov 20 11:48:47 vicibox81 postfix/qmgr[4272]: 600C71962A07: from=<root@vicibox81.localdomain>, size=753, nrcpt=1 (queue active)
Nov 20 11:48:47 vicibox81 postfix/smtp[4467]: looking for plugins in '/usr/lib64/sasl2', failed to open directory, error: No such file or directory
Nov 20 11:48:47 vicibox81 postfix/smtp[4467]: warning: SASL authentication failure: No worthy mechs found
Nov 20 11:48:47 vicibox81 postfix/smtp[4467]: 600C71962A07: SASL authentication failed; cannot authenticate to server smtp.gmail.com[64.233.167.108]: no mechanism avail
Nov 20 11:48:48 vicibox81 postfix/smtp[4467]: warning: SASL authentication failure: No worthy mechs found
Nov 20 11:48:48 vicibox81 postfix/smtp[4467]: 600C71962A07: SASL authentication failed; cannot authenticate to server smtp.gmail.com[64.233.167.109]: no mechanism avail
Nov 20 11:48:48 vicibox81 postfix/smtp[4467]: connect to smtp.gmail.com[2a00:1450:400c:c0a::6d]:587: Network is unreachable
Nov 20 11:48:48 vicibox81 postfix/smtp[4467]: 600C71962A07: to=<oalvarez@coratec.net>, relay=none, delay=0.83, delays=0.17/0.06/0.6/0, dsn=4.4.1, status=deferred (conne
Nov 20 11:49:01 vicibox81 cron[4492]: pam_unix(crond:session): session opened for user root by (uid=0)"

SO, "no worthy mechs founds" means something about sasl?

Thanks in advance
Mequetref43
 
Posts: 18
Joined: Mon Jul 11, 2016 9:04 am

Re: Mail Setup

Postby williamconley » Tue Nov 20, 2018 2:23 pm

quick test try sending to a non-gmail account and see if you succeed.

Also: Have you already tried some sort of authentication configuration with gmail instead of "public send"?

Have you googled that error to see if there's a simple fix?
Vicidial Installation and Repair, plus Hosting and Colocation
SugarCRM integration - Customization and Add-ons - We Bring It All Together.
http://www.PoundTeam.com # 352-269-0000 # +44 (203) 769-2294 # +506 4001-8914
williamconley
 
Posts: 17721
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Mail Setup

Postby thephaseusa » Tue Nov 20, 2018 10:26 pm

I dealt with gmail relay a while back. There are several threads in this forum you can find by searching ‘gmail relay’. This post I wrote back then may help you:

Here is a guide for configuring gmail relaying so the dispo_send_email.php will work with gmail addresses on Vicidial:

Required Software

zypper update && zypper install postfix mailx cyrus-sasl
or with a standard vicibox install you should be able to just run:
zypper install cyrus-sasl

Configure Gmail Authentication
vi /etc/postfix/sasl_passwd
Add the line:
[smtp.gmail.com]:587 username@gmail.com:password
Save and close the file. Your Gmail password is stored as plaintext, so make the file accessible only by root:
# chmod 600 /etc/postfix/sasl_passwd

Configure Postfix
Edit the main Postfix configuration file:
vi /etc/postfix/main.cf
Add or modify the following values:
relayhost = [smtp.gmail.com]:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_security_options =
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_CAfile = /etc/ssl/ca-bundle.pem
Save and close the file.

OpenSUSE also requires that the Postfix master process configuration file master.cf be modified. Open it for editing:
vi /etc/postfix/master.cf
Locate the line which reads:
#tlsmgr unix - - n 1000? 1 tlsmg
Uncomment it, so it reads:
tlsmgr unix - - n 1000? 1 tlsmg
Save and close the file.

Process Password File
postmap /etc/postfix/sasl_passwd

Restart Postfix
systemctl restart postfix.service

Enable "Less Secure Apps" In Gmail
By default, only the most secure sign-ins, such as logging in to Gmail on the web, are allowed for your Gmail account. To permit relay requests, log in to your Gmail account and turn on Allow less secure apps.

Send A Test Email
Test your new configuration by sending an email using the mail command. Run:
mail -s "Test subject" recipient@domain.com
You will be presented with a blank line (or a CC: field, which you can bypass by pressing Enter). Type the body of your message, pressing Enter for new lines. When you are finished composing the email, type CTRL-D to send it. To cancel the email, press CTRL-C twice.

Troubleshooting
journalctl

I use journalctl -f to watch the process when the dispo send email is triggered. It will show you if it found the gmail server, and if the email was sent, or if there is a permission or password or other error.

For those of you not running OpenSUSE here is the full guide, which has instructions for other OS's also:
https://www.howtoforge.com/tutorial/con ... ail-relay/
thephaseusa
 
Posts: 307
Joined: Tue May 16, 2017 2:23 pm

Re: Mail Setup

Postby Mequetref43 » Wed Nov 21, 2018 5:01 am

Thank you very much thephaseusa.

I´ve been "googleling" (if accepted) about postfix configurations also with the howtoforge tutorial for about 3 weeks.

No results still.

The problem is abut this logs:

looking for plugins in '/usr/lib64/sasl2', failed to open directory, error: No such file or directory
Nov 20 11:48:47 vicibox81 postfix/smtp[4467]: warning: SASL authentication failure: No worthy mechs found
Nov 20 11:48:47 vicibox81 postfix/smtp[4467]: 600C71962A07: SASL authentication failed; cannot authenticate to server smtp.gmail.com[64.233.167.108]: no mechanism avail"

First of all i don´t have /usr/lib64/sasl2 directory, so must be installation problem with libsasl2 or sasl2.

SO if i don´t have the right installation i must make an update. But how?

Try zipper up but results are wrong. A lot of time resolving and finnaly no updates found.

Try zipper install libsasl2 , or zypper install libsasl* but no results also.

If i make ping works and also ping to domain name works, so no dns problem.

So the repositories could be wrong.

In that case wich are the right repositories? where could i find them? how to change? via YAST?
Mequetref43
 
Posts: 18
Joined: Mon Jul 11, 2016 9:04 am

Re: Mail Setup

Postby thephaseusa » Wed Nov 21, 2018 8:07 am

Okay in vicibox 8.1.2 i dont have /usr/lib64/sasl2. The plugins are in /usr/lib64
But, in vicibox 7.0.4 i do have /usr/lib64/sasl2

Did you force zypper to install or update something you should not have?
thephaseusa
 
Posts: 307
Joined: Tue May 16, 2017 2:23 pm

Re: Mail Setup

Postby Mequetref43 » Wed Nov 21, 2018 12:19 pm

Well i did "zypper install libsasl2-modules" but no no results.

SO Zypper isn´t available.

How i could modify the directory to find libsasl2?
Mequetref43
 
Posts: 18
Joined: Mon Jul 11, 2016 9:04 am

Re: Mail Setup

Postby thephaseusa » Thu Nov 22, 2018 12:26 pm

What i meant was you shouldn’t be getting the error
Failed to open directory /usr/lib64/sasl2

That directory is in vicibox 7.0.4 but not in 8.1.2

Do you have cyrus-sasl installed?
thephaseusa
 
Posts: 307
Joined: Tue May 16, 2017 2:23 pm

Re: Mail Setup

Postby Mequetref43 » Wed Dec 05, 2018 11:15 am

root:/etc/postfix/ssl # postconf -A
cyrus
root:/etc/postfix/ssl # postconf -a
cyrus
dovecot
root:/etc/postfix/ssl # rpm -q cyrus-sasl
package cyrus-sasl is not installed
root:/etc/postfix/ssl # rpm -q cyrus
package cyrus is not installed

I think isn´t installed, but if i do rpm to install is also impossible.

Any suggestions?
Mequetref43
 
Posts: 18
Joined: Mon Jul 11, 2016 9:04 am

Re: Mail Setup

Postby williamconley » Wed Dec 05, 2018 3:45 pm

Mequetref43 wrote:I think isn´t installed, but if i do rpm to install is also impossible.

Any suggestions?


Why would you use rpm to install instead of yast software or zypper?
Vicidial Installation and Repair, plus Hosting and Colocation
SugarCRM integration - Customization and Add-ons - We Bring It All Together.
http://www.PoundTeam.com # 352-269-0000 # +44 (203) 769-2294 # +506 4001-8914
williamconley
 
Posts: 17721
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Mail Setup

Postby Mequetref43 » Mon Dec 17, 2018 1:37 pm

Because i just can´t install with zypper. No result

Wich are the istructions to install via yast or yast2?
Mequetref43
 
Posts: 18
Joined: Mon Jul 11, 2016 9:04 am


Return to Support

Who is online

Users browsing this forum: Majestic-12 [Bot] and 30 guests