Easy Hosting Control Panel (EHCP) :: Force Edition

EHCP Force Support => Technical Help => Topic started by: colifato on May 09, 2016, 08:27:06 am

Title: Email Issue - 454 4.7.1 Relay access denied AND 111 Can't open SMTP stream
Post by: colifato on May 09, 2016, 08:27:06 am
After the upgrade ultiuma FORCE EHCP I have the problem that emails are not going away.
Moreover, when given in error, and puts as blocked by fail2ban .
What are the steps to resolve this problem?

I get this error when trying to send email:

Quote
454 4.7.1 Relay access denied

Then, I got this error too:

Quote
111 Can't open SMTP stream.

::EDIT::

Fix is here:   http://ehcpforce.tk/forums/index.php?topic=60.msg256#msg256
Title: Re: Problem after update
Post by: earnolmartin on May 12, 2016, 08:40:59 pm
Please post logs.  Is PolicyD / SpamAssassin / AmavisD installed?
Title: Re: Problem after update
Post by: colifato on May 13, 2016, 07:49:02 am
The error is SASL LOGIN authentication failed: authentication failure
Title: Re: Problem after update
Post by: earnolmartin on May 14, 2016, 12:15:59 am
Is the courier-authdaemon service running?  When are you getting that error?  Any relevant entries in /var/log/auth.log?

Please list the steps you're performing to trigger this error.  Are you trying to send email from SquirrelMail or are you having issues accessing an email account via POP3?  I need more information.  There could be an issue somewhere in a scenario I haven't thought of since Ubuntu 16.04 required changes to SASL authentication since libpam-mysql no longer works.

Also, are you running Ubuntu 16.04?

Please let me know.
Title: Re: Problem after update
Post by: colifato on May 14, 2016, 07:53:17 am
I'm using Ubuntu Server 14.04 LTS.
When i try to send using Squirrelmail i see this error:
May 14 10:46:05 server1 postfix/smtpd[22144]: connect from localhost[::1]
May 14 10:46:05 server1 postfix/smtpd[22144]: NOQUEUE: reject: RCPT from localhost[::1]: 454 4.7.1 <xxxx@gmail.com>: Relay access denied; from=<xxxx@xxxxxx.com.ar> to=<xxxxx@gmail.com> proto=ESMTP helo=<webmail.xxxxx.com.ar>
May 14 10:46:05 server1 postfix/smtpd[22144]: lost connection after RCPT from localhost[::1]
May 14 10:46:05 server1 postfix/smtpd[22144]: disconnect from localhost[::1]

And /var/log/auth.log show:
May 14 10:50:02 server1 postfix/smtpd[2913]: sql_select option missing
May 14 10:50:02 server1 postfix/smtpd[2913]: auxpropfunc error no mechanism available
May 14 10:50:02 server1 postfix/smtpd[2913]: _sasl_plugin_load failed on sasl_auxprop_plug_init for plugin: sql

Via pop3 or using webmail i have error.

I need update to Ubuntu Server 16.04 lts?

Greets
Title: Re: Problem after update
Post by: earnolmartin on May 14, 2016, 03:04:44 pm
No, you don't need to upgrade to Ubuntu 16.04.

Are you using a relay?  For some reason, it is denying you access.  Try disabling ipv6 as well in postfix?
Title: Re: Problem after update
Post by: colifato on May 14, 2016, 03:23:57 pm
Another error:
May 14 18:18:44 server1 saslauthd[2450]: pam_mysql - MySQL error (Can't connect to MySQL server on '127.0.0.1' (111))
May 14 18:18:44 server1 saslauthd[2450]: DEBUG: auth_pam: pam_authenticate failed: Authentication service cannot retrieve authentication info
May 14 18:18:44 server1 saslauthd[2450]: do_auth         : auth failure: [user=martin@xxxxx.com.ar] [service=smtp] [realm=xxxxx.com.ar] [mech=pam] [reason=PAM auth error]
May 14 18:18:46 server1 saslauthd[2452]: pam_mysql - MySQL error (Can't connect to MySQL server on '127.0.0.1' (111))
May 14 18:18:46 server1 saslauthd[2452]: DEBUG: auth_pam: pam_authenticate failed: Authentication service cannot retrieve authentication info
May 14 18:18:46 server1 saslauthd[2452]: do_auth         : auth failure: [user=martin@www.xxxxx.com.ar] [service=smtp] [realm=www.xxxxx.com.ar] [mech=pam] [reason=PAM auth error]


I'm not using relay
Title: Re: Problem after update
Post by: earnolmartin on May 14, 2016, 10:14:59 pm
Ok, so it looks like your MySQL server is down.  Check its status and logs?  Can you connect to any MySQL database?  Are you using MariaDB or MySQL?
Title: Re: Problem after update
Post by: colifato on May 15, 2016, 07:59:05 am
MMMMMMM... in the update, ask me if i want change to MariaDB
:(
I say yes :D
Title: Re: Problem after update
Post by: earnolmartin on May 15, 2016, 03:07:48 pm
Can you connect to any databases via PHPMyAdmin?

Have you restarted the server after applying the update?

Have you checked to see that the mysql service is running?  Have you checked mysql logs?  MariaDB is a direct drop-in, so it should have just worked.

Let me know.
Title: Re: Problem after update
Post by: colifato on May 15, 2016, 06:54:24 pm
Mysql is running:
mysql     5679  3.3  8.0 566724 248296 ?       Ssl  may14  67:52 /usr/sbin/mysqld
root     24163  0.0  0.0  14320   936 pts/0    D+   21:43   0:00 grep --color=auto mysql

I can connect with the user ehcp and with the other users that i have.. all ok
I have restarted the server 5 or 6 times

I continue receiving this message when i try send a test mail:
warning: mail-yw0-f169.google.com[209.85.161.169]: SASL PLAIN authentication failed: authentication failure

Title: Re: Problem after update
Post by: earnolmartin on May 15, 2016, 11:08:05 pm
Did you make sure your server's IP network is included in the postfix configuration under the mynetworks section?

I have no idea what's going on with your server nor if the upgrade script is at fault.

Can you give me SSH access so that I can take a look? 
Title: Re: Problem after update
Post by: colifato on May 16, 2016, 04:16:09 am
Check your private message
Title: Re: Problem after update
Post by: colifato on May 16, 2016, 02:19:37 pm
Have you read my PM ?
Title: Re: Problem after update
Post by: earnolmartin on May 16, 2016, 10:17:41 pm
Yes, I just fixed your problem.  I may edit the update / upgrade script in the future, but this problem happens only occasionally.  I have run into it before (doesn't usually happen), and only on a few servers running EHCP.

If you run into a problem like this, the first thing to do is disable ipv6 support in postfix like so:

Code: [Select]
sudo cp /etc/postfix/main.cf /etc/postfix/main.cf.bkup
sudo nano /etc/postfix/main.cf


Find:

Code: [Select]
inet_interfaces = (ANY_SETTING)

Replace with:

Code: [Select]
inet_interfaces = ipv4

Save and exit.

Then, run the Squirrel Mail configuration utility.

Code: [Select]
/var/www/new/ehcp/webmail/config/conf.pl

Enter 2 to edit the server settings.

Enter 3 and change the setting to Sendmail.

Enter 1 to change your domain name for the server.

Enter S to save changes.

Enter Q to quit.

I tested sending an email from RoundCube and SquirrelMail.  Doing the above fixed your issue.
Title: Re: Email Issue - 454 4.7.1 Relay access denied AND 111 Can't open SMTP stream
Post by: colifato on May 16, 2016, 11:07:31 pm
I make some tests, like add my account to Gmail and i have these errors:

May 17 02:02:16 server1 postfix/smtpd[15270]: connect from mail-yw0-f174.google.com[209.85.161.174]
May 17 02:02:17 server1 postfix/smtpd[15270]: Anonymous TLS connection established from mail-yw0-f174.google.com[209.85.161.174]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
May 17 02:02:17 server1 postfix/smtpd[15270]: warning: SASL authentication failure: Password verification failed
May 17 02:02:17 server1 postfix/smtpd[15270]: warning: mail-yw0-f174.google.com[209.85.161.174]: SASL PLAIN authentication failed: authentication failure
May 17 02:02:18 server1 postfix/smtpd[15270]: lost connection after AUTH from mail-yw0-f174.google.com[209.85.161.174]
May 17 02:02:18 server1 postfix/smtpd[15270]: disconnect from mail-yw0-f174.google.com[209.85.161.174]
May 17 02:02:32 server1 postfix/smtpd[15274]: connect from mail-yw0-f171.google.com[209.85.161.171]
May 17 02:02:32 server1 imapd: Connection, ip=[::1]
May 17 02:02:33 server1 postfix/smtpd[15274]: Anonymous TLS connection established from mail-yw0-f171.google.com[209.85.161.171]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
May 17 02:02:33 server1 postfix/smtpd[15274]: warning: SASL authentication failure: Password verification failed
May 17 02:02:33 server1 postfix/smtpd[15274]: warning: mail-yw0-f171.google.com[209.85.161.171]: SASL PLAIN authentication failed: authentication failure
May 17 02:02:33 server1 postfix/smtpd[15274]: lost connection after AUTH from mail-yw0-f171.google.com[209.85.161.171]
May 17 02:02:33 server1 postfix/smtpd[15274]: disconnect from mail-yw0-f171.google.com[209.85.161.171]
May 17 02:02:43 server1 postfix/smtpd[15274]: connect from mail-yw0-f177.google.com[209.85.161.177]
May 17 02:02:43 server1 postfix/smtpd[15274]: Anonymous TLS connection established from mail-yw0-f177.google.com[209.85.161.177]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
May 17 02:02:44 server1 postfix/smtpd[15274]: warning: SASL authentication failure: Password verification failed
May 17 02:02:44 server1 postfix/smtpd[15274]: warning: mail-yw0-f177.google.com[209.85.161.177]: SASL PLAIN authentication failed: authentication failure
May 17 02:02:44 server1 postfix/smtpd[15274]: lost connection after AUTH from mail-yw0-f177.google.com[209.85.161.177]
May 17 02:02:44 server1 postfix/smtpd[15274]: disconnect from mail-yw0-f177.google.com[209.85.161.177]
May 17 02:03:04 server1 imapd: Connection, ip=[::1]
May 17 02:03:11 server1 postfix/smtpd[15270]: connect from mail-yw0-f170.google.com[209.85.161.170]
May 17 02:03:11 server1 postfix/smtpd[15270]: lost connection after UNKNOWN from mail-yw0-f170.google.com[209.85.161.170]
May 17 02:03:11 server1 postfix/smtpd[15270]: disconnect from mail-yw0-f170.google.com[209.85.161.170]
May 17 02:03:32 server1 imapd: Connection, ip=[::1]

I have test the port 587 and TLS, with SSL and insecure connection.. same error all the times..
I don't know whats happen..
Title: Re: Email Issue - 454 4.7.1 Relay access denied AND 111 Can't open SMTP stream
Post by: earnolmartin on May 16, 2016, 11:17:04 pm
I have Gmail setup to download my email.  It works fine.  Make sure you provide your login as fulluser@domain.com and provide the correct password in that exact format.  Use default ports (non-ssl).  It should work.
Title: Re: Email Issue - 454 4.7.1 Relay access denied AND 111 Can't open SMTP stream
Post by: colifato on May 17, 2016, 06:53:03 am
Check the settings and I was auditioning and still gives the same error ..
Just tell me where review and will try to fix it.
I think that is the part of the outgoing mail authorization which is not working.
Because from receipt Gmail emails that sent me to that account .. but I can not configure outgoing mail from that account in Gmail pulling me the error.
Title: Re: Email Issue - 454 4.7.1 Relay access denied AND 111 Can't open SMTP stream
Post by: colifato on May 17, 2016, 10:57:07 pm
After formatting the server and upgraded it to Ubuntu Server 16.04 LTS and having taken the opportunity to change the hard disk, install EHCP Force from scratch I find that I still have the same problem I had before with the previous version of Ubuntu.
When I want to configure my pop3 account server in my Gmail account to send from there I get the following:

Authentication failed. Check your username and password.
[Server response: DNS Error: 37182721 DNS type 'yyyy' lookup of mail.brsistemas.com.ar Responded with code 37182721 SERVFAIL DNS type 'a' lookup of mail.brsistemas.com.ar Responded with code SERVFAIL code (0) ]



Another mistake that I find is when an email arrives, for example:

May 18 1:53:07 server1 postfix / smtpd [9223]: connect from mta045.tripolis.com [194.88.231.45]
May 18 1:53:09 server1 postfix / smtpd [9223]: Anonymous TLS connection established from mta045.tripolis.com [194.88.231.45]: With TLSv1.2 cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits )
May 18 1:53:09 server1 postfix / smtpd [9223]: D7C1A921855: client = mta045.tripolis.com [194.88.231.45]
May 18 1:53:10 server1 postfix / cleanup [9231]: D7C1A921855: message-id = <0.0.55.7C2.1D1B097CCBCADA8.0@mta045.tripolis.com>
May 18 1:53:11 server1 postfix / smtpd [9223]: warning: connect to 127.0.0.1:10031: Connection refused
May 18 1:53:11 server1 postfix / smtpd [9223]: warning: problem 127.0.0.1:10031 talking to server: Connection refused
May 18 1:53:12 server1 postfix / smtpd [9223]: warning: connect to 127.0.0.1:10031: Connection refused
May 18 1:53:12 server1 postfix / smtpd [9223]: warning: problem 127.0.0.1:10031 talking to server: Connection refused
May 18 1:53:12 server1 postfix / smtpd [9223]: D7C1A921855: reject: END-OF-MESSAGE from mta045.tripolis.com [194.88.231.45]: 451 4.3.5 <END-OF-MESSAGE>: End- of-data rejected: Server configuration problem; from = <bounce.j.c@td51.tripolis.com> to = <xxxx@xxxxx.com.ar> proto = ESMTP helo = <mta045.tripolis.com>
May 18 1:53:13 server1 postfix / smtpd [9223]: disconnect from mta045.tripolis.com [194.88.231.45] starttls ehlo = 2 = 1 = 1 mail rcpt = 1 data = 0/1 = 1 quit commands = 6 / 7


The truth no longer find a solution.
If you want to enter, they are the same login credentials.
Title: Re: Email Issue - 454 4.7.1 Relay access denied AND 111 Can't open SMTP stream
Post by: earnolmartin on May 18, 2016, 07:09:33 am
You need to fix your issues before performing upgrades.  Your DNS isn't resolving.  Fix that problem first.  190.94.178.10 is down, the IP you gave me.

When configuring GMAIL to send messages, use settings similar to these.

For Pop3:

(http://s32.postimg.org/4uspr0e0x/config_pop3_email.jpg) (http://postimg.org/image/4uspr0e0x/)

For sending email as that account via Gmail:


(http://s32.postimg.org/dw8l37e9t/config_email_ehcp.jpg) (http://postimg.org/image/dw8l37e9t/)

The username is always the full email address!

Don't rush into upgrading.  It probably won't magically fix your issues for you.  These issues don't appear to be EHCP related at the moment since it works fine on my servers.  Research your errors.