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: 19
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
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20018
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: 345
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: 19
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
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20018
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: 345
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: 19
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: 345
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: 19
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: 345
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: 19
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
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20018
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: 19
Joined: Mon Jul 11, 2016 9:04 am

Re: Mail Setup

Postby williamconley » Mon Dec 17, 2018 3:06 pm

maybe you have a problem with your repositories and that's your underlying problem. I have plenty of cyrus-sasl options in yast software
Code: Select all
│cyrus-sasl                     │Implementation of Cyrus SASL API                         │2.1.│
│cyrus-sasl-32bit               │Implementation of Cyrus SASL API                         │2.1.│
│cyrus-sasl-crammd5             │Plugin for the CRAMMD5 SASL mechanism                    │2.1.│
│cyrus-sasl-crammd5-32bit       │Plugin for the CRAMMD5 SASL mechanism                    │2.1.│
│cyrus-sasl-devel               │Cyrus SASL API Implementation, Libraries and Header Files│2.1.│
│cyrus-sasl-devel-32bit         │Cyrus SASL API Implementation, Libraries and Header Files│2.1.│
│cyrus-sasl-digestmd5           │Plugin for the DIGESTMD5 SASL mechanism                  │2.1.│
│cyrus-sasl-digestmd5-32bit     │Plugin for the DIGESTMD5 SASL mechanism                  │2.1.│
│cyrus-sasl-gs2                 │Plugin for the GS2 SASL mechanism                        │2.1.│
│cyrus-sasl-gssapi              │Plugin for the GSSAPI SASL mechanism                     │2.1.│
│cyrus-sasl-gssapi-32bit        │Plugin for the GSSAPI SASL mechanism                     │2.1.│
│cyrus-sasl-ldap-auxprop        │The cyrus-sasl LDAP auxprop plugin                       │2.1.│
│cyrus-sasl-ldap-auxprop-32bit  │The cyrus-sasl LDAP auxprop plugin                       │2.1.┴
│cyrus-sasl-ntlm                │Plugin for the NTLM SASL mechanism                       │2.1.│
│cyrus-sasl-otp                 │Plugin for the OTP SASL mechanism                        │2.1.│
│cyrus-sasl-otp-32bit           │Plugin for the OTP SASL mechanism                        │2.1.│
│cyrus-sasl-plain               │Plugin for the PLAIN SASL mechanism                      │2.1.│
│cyrus-sasl-plain-32bit         │Plugin for the PLAIN SASL mechanism                      │2.1.│
│cyrus-sasl-saslauthd           │The SASL Authentication Server                           │2.1.│
│cyrus-sasl-scram               │Plugin for the SCRAM SASL mechanism                      │2.1.│


Additionally, libsasl2 is already installed by the stock installer
Code: Select all
││  i  │libsasl2-3      │Simple Authentication and Security Layer (SASL) library│2.1.26      │2.1.26  │
││     │libsasl2-3-32bit│Simple Authentication and Security Layer (SASL) library│2.1.26      │        │
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20018
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Mail Setup

Postby Mequetref43 » Tue Dec 18, 2018 7:57 am

Ok. and how do i check the repositories? from YAST-Software - Software repositories.....?
Could i install from YAST Software? How?

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

Re: Mail Setup

Postby williamconley » Tue Dec 18, 2018 12:55 pm

Mequetref43 wrote:Ok. and how do i check the repositories? from YAST-Software - Software repositories.....?
Could i install from YAST Software? How?

Thanks in advance


yast
software
software repositories
Code: Select all
  │ 99 (Default)│   x   │     x     │openSUSE-Leap-42.3-ViciDial-Ast13 │       │http://download.opensuse.org/repositories/home:vicidial:asterisk-13/openSUSE_Leap_42.3/          │
  │ 99 (Default)│   x   │     x     │openSUSE-Leap-42.3-Server-Database│       │http://download.opensuse.org/repositories/server:database/openSUSE_Leap_42.3/                    │
  │ 99 (Default)│   x   │     x     │openSUSE-Leap-42.3-Apache         │       │http://download.opensuse.org/repositories/Apache/openSUSE_Leap_42.3/                             │
  │ 99 (Default)│   x   │     x     │openSUSE-Leap-42.3-Update         │       │http://download.opensuse.org/update/leap/42.3/oss/                                               │
  │ 99 (Default)│   x   │     x     │openSUSE-Leap-42.3-PERL           │       │http://download.opensuse.org/repositories/devel:/languages:/perl/openSUSE_Leap_42.3/             │
  │ 99 (Default)│   x   │     x     │openSUSE-Leap-42.3-ViciDial       │       │http://download.opensuse.org/repositories/home:vicidial/openSUSE_Leap_42.3/                      │
  │ 99 (Default)│   x   │     x     │openSUSE-Leap-42.3-Oss            │       │http://download.opensuse.org/repositories/openSUSE:/Leap:/42.3/standard/                         │
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20018
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Mail Setup

Postby dspaan » Thu Feb 04, 2021 2:32 pm

Hey Phase,

Thanks for your gmail SMTP guide, i tried to set it up.

followed all the setsp without errors except that there was a relayhost in /etc/postfix/main.cf so i commented that one out at line 719.

I tried sending an email with:
mail -s "Testmail" ******@gmail.com

At first i had the wrong password and could see the error so used the correct password but after this i did not see any error but also no email going out through postfix.

journalctl -f -u postfix.service

-- Logs begin at Thu 2021-02-04 19:30:20 CET. --
Feb 04 20:17:01 toni postfix/pickup[9920]: 63F5B24B0E: uid=0 from=<root>
Feb 04 20:17:01 toni postfix/cleanup[10030]: 63F5B24B0E: message-id=<20210204191701.63F5B24B0E@toni.******>
Feb 04 20:17:01 toni postfix/qmgr[9921]: 63F5B24B0E: from=<root@toni.*****>, size=1009, nrcpt=1 (queue active)
Feb 04 20:17:01 toni postfix/local[10037]: 63F5B24B0E: to=<root@toni.******>, orig_to=<root>, relay=local, delay=0.06, delays=0.05/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Feb 04 20:17:01 toni postfix/qmgr[9921]: 63F5B24B0E: removed

I would expect something from gmail showing up here but nothing to see.
Regards, Dennis

Vicibox 9.0.1
Version: 2.14b0.5
SVN Version: 3199
DB Schema Version: 1588
Build: 200310-1801
dspaan
 
Posts: 1374
Joined: Fri Aug 21, 2009 1:40 pm
Location: The Netherlands

Re: Mail Setup

Postby dspaan » Thu Feb 04, 2021 6:06 pm

Nevermind, it's working fine. I didn't receive the test emails but i can see them in the gmail sent box so it's working. Once i tested with an actual voicemail box i did get the emails.
Regards, Dennis

Vicibox 9.0.1
Version: 2.14b0.5
SVN Version: 3199
DB Schema Version: 1588
Build: 200310-1801
dspaan
 
Posts: 1374
Joined: Fri Aug 21, 2009 1:40 pm
Location: The Netherlands


Return to Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 68 guests