Email doesn't work with authentication errors

mahmoodmoradian

Verified User
Joined
Sep 1, 2019
Messages
7
Hi,
After I installed DirectAdmin Any email account that I have created didn't work at all.
I tried anything, reset the MySQL da_admin password, reset the MySQL da_roundcube password and its config file, update and build exim and exim_conf.

In database da_roundcube.users table is empty.

Both roundcube and squirrelmail didn't loggin with authentication failed message and also i cant login with Email clients (Outlook, Thunderbird, Gmail Accounts).

I will be appreciated if you help me.
Regards.
 
Did you drop & rebuild roundcube, too?
If the db contains no data, try this:
Code:
DROP DATABASE da_roundcube;
Now, re-run the "./build roundcube" command to re-install Roundcube.
Also, check to see if /etc/virtual/$domain/passwd file exists & contains an entry for the user you are trying to login as. If not, you can rewrite the passwd files via dataskq.
This task.queue option exists to add the username if it's missing:
Code:
echo "action=rewrite&value=email_passwd" >> /usr/local/directadmin/data/task.queue; /usr/local/directadmin/dataskq d2000
or:
Code:
echo "action=rewrite&value=email_passwd&user=fred" >> /usr/local/directadmin/data/task.queue; /usr/local/directadmin/dataskq d2000
 
Last edited:
Did you drop & rebuild roundcube, too?
If the db contains no data, try this:
Code:
DROP DATABASE da_roundcube;
Now, re-run the "./build roundcube" command to re-install Roundcube.
Also, check to see if /etc/virtual/$domain/passwd file exists & contains an entry for the user you are trying to login as. If not, you can rewrite the passwd files via dataskq.
This task.queue option exists to add the username if it's missing:
Code:
echo "action=rewrite&value=email_passwd" >> /usr/local/directadmin/data/task.queue; /usr/local/directadmin/dataskq d2000
or:
Code:
echo "action=rewrite&value=email_passwd&user=fred" >> /usr/local/directadmin/data/task.queue; /usr/local/directadmin/dataskq d2000
Hello
Thanks for your help.
I have dropped the "da_roundcube" database and rebuilt Roundcube again. The new version of Roundcube has been installed with the new fancy UI.
After that, I removed all email accounts and create a new one. but da_roundcube.users is still empty and login action returns "Login failed!" message.
I checked the /etc/virtual/$domain/passwd file and there is an entry that contains my new email account username and a hashed password.

Also, I tried again to add the new email account to the "Evolution Mail" (Manjaro Linux Default Email Client). I successfully sent an email to my Gmail account but the email client couldn't login to the "pop" or "imap" incoming server.
 
The /var/www/html/roundcube/logs/errors is empty.
I re-imported Roundcube backup and it didn't work.

I think there is something wrong with the email service (Exim etc.). Because it doesn't work on the email clients.

I manually added a user in the da_roundcube.users table and tried to login Roundcube. It still fails to login but the "failed_login" column of the user will update!
 
Please check /var/log/maillog and /var/log/exim/mainlog.
Here is the /var/log/maillog content:

Code:
Nov 23 15:17:56 server dovecot[1999]: auth: Error: plain([email protected],127.0.0.1,<qSz8GQKYhKt/AAAB>): user not found from any userdbs
Nov 23 15:17:56 server dovecot[1999]: imap: Error: auth-master: login: request [2787639297]: Login auth request failed: Authenticated user not found from userdb, auth lookup id=2787639297 (auth connected 11 msecs ago, request took 11 msecs, client-pid=17538 client-id=1)
Nov 23 15:17:56 server dovecot[1999]: imap-login: Internal login failure (pid=17538 id=1): user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=18414, secured, session=<qSz8GQKYhKt/AAAB>

and this is exim/mainlog content.

Code:
2019-11-23 15:17:01 cwd=/usr/local/directadmin 4 args: send-mail -i -- [email protected]
2019-11-23 15:17:01 1iYTsT-0004lz-Bn <= [email protected] U=root P=local S=726 T="server:  blocked 89.165.4.194 for 165 failed attempts" from <[email protected]> for [email protected]
2019-11-23 15:17:01 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1iYTsT-0004lz-Bn
2019-11-23 15:17:01 1iYTsT-0004lz-Bn ** [email protected] F=<[email protected]>: Unrouteable address
2019-11-23 15:17:01 cwd=/var/spool/exim 7 args: /usr/sbin/exim -t -oem -oi -f <> -E1iYTsT-0004lz-Bn
2019-11-23 15:17:01 1iYTsT-0004mM-HM <= <> R=1iYTsT-0004lz-Bn U=mail P=local S=1975 T="Mail delivery failed: returning message to sender" from <> for [email protected]
2019-11-23 15:17:01 1iYTsT-0004lz-Bn Completed
2019-11-23 15:17:01 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1iYTsT-0004mM-HM
2019-11-23 15:17:01 1iYTsT-0004mM-HM User 0 set for local_delivery transport is on the never_users list
2019-11-23 15:17:01 1iYTsT-0004mM-HM == [email protected] R=localuser T=local_delivery defer (-29): User 0 set for local_delivery transport is on the never_users list
2019-11-23 15:17:01 1iYTsT-0004mM-HM ** [email protected]: retry timeout exceeded
2019-11-23 15:17:01 1iYTsT-0004mM-HM [email protected]: error ignored
2019-11-23 15:17:01 1iYTsT-0004mM-HM Completed
2019-11-23 15:17:01 cwd=/usr/local/directadmin 2 args: /usr/sbin/sendmail -t
2019-11-23 15:17:01 1iYTsT-0004mQ-IC <= [email protected] U=diradmin P=local S=899 T="New Message: Brute-Force Attack detected in service log from IP(s) 89.165.4.194" from <[email protected]> for [email protected]
2019-11-23 15:17:01 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1iYTsT-0004mQ-IC
2019-11-23 15:17:01 1iYTsT-0004mQ-IC => admin <[email protected]> F=<[email protected]> R=localuser T=local_delivery S=1021
2019-11-23 15:17:01 1iYTsT-0004mQ-IC Completed

I replaced my domain with domain.com
 
Is that your IP being blocked by BFM? If you search your IP in those logs, is anything returned?

Also, had you tried rebuilding dovecot yet?
 
Is that your IP being blocked by BFM? If you search your IP in those logs, is anything returned?

Also, had you tried rebuilding dovecot yet?
Thank you so much.
No the server's main IP address isn't listed in this log.
But rebuilding dovecot worked for me!

Now I can login to Roundcube and send emails. And emails are working well in the email clients. But the incoming emails didn't receive into my inbox. The first problem solved and for this issue, I think I should check my hostname, firewall, etc.

Thanks a lot to all of you guys.
 
:D yay!

Which emails weren't received? If you are referring to those from the server (via root@hostname), then you just need to add an alias/forwarder for the root user because the root user is in the 'never users' list. I'm referring to these:


2019-11-23 15:17:01 1iYTsT-0004mM-HM <= <> R=1iYTsT-0004lz-Bn U=mail P=local S=1975 T="Mail delivery failed: returning message to sender" from <> for [email protected]
2019-11-23 15:17:01 1iYTsT-0004lz-Bn Completed
2019-11-23 15:17:01 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1iYTsT-0004mM-HM
2019-11-23 15:17:01 1iYTsT-0004mM-HM User 0 set for local_delivery transport is on the never_users list
2019-11-23 15:17:01 1iYTsT-0004mM-HM == [email protected] R=localuser T=local_delivery defer (-29): User 0 set for local_delivery transport is on the never_users list
2019-11-23 15:17:01 1iYTsT-0004mM-HM ** [email protected]: retry timeout exceeded
2019-11-23 15:17:01 1iYTsT-0004mM-HM [email protected]: error ignored
2019-11-23 15:17:01 1iYTsT-0004mM-HM Completed

Now these:

2019-11-23 15:17:01 1iYTsT-0004lz-Bn ** [email protected] F=<[email protected]>: Unrouteable address

Check the MX record of the domain:

dig mx +short domain.com

Is anything returned? If yes, then, check the A record of that:

dig a +short domain.com

OR just:

dig a +short $(dig mx +short domain.com)
 
Back
Top