Author Topic: Roundcube Troubleshooting  (Read 4483 times)

Offline rfanch3r

  • Jr. Member
  • **
  • Posts: 13
Roundcube Troubleshooting
« on: October 06, 2018, 11:00:39 PM »
Hi,

I set up Roundcube+Postfix+Dovecot but I am not able to login and I cant figure out what the issue is. I have tried 2-3 setup how to's and none seem to get past what I am experiencing. I will not use iRedMail setup as this breaks my current website.

I can send and receive email using UserMin so I know Postfix is working.

dovecot.conf
Code: [Select]
passdb {
  driver = shadow
}

I get the following error message in the error log:
Code: [Select]
Oct 06 19:53:30 auth-worker(32022): Info: shadow(someuser@example.com,::1): unknown user
Oct 06 19:53:32 auth-worker(32022): Info: pam(someuser@example.com,::1): unknown user
Oct 06 19:53:34 imap-login: Info: Disconnected (auth failed, 1 attempts in 4 secs): user=<someuser@example.com>, method=PLAIN, rip=::1, lip=::1, secured, session=<KxsXnJp3erQAAAAAAAAAAAAAAAAAAAAB>

If I change the following in dovecot.conf I get:
Code: [Select]
passdb {
  driver = pam
  args = session=yes dovecot
}

Oct 06 19:57:08 auth-worker(951): Info: pam(someuser@example.com,::1): unknown user
Oct 06 19:57:11 auth-worker(951): Info: pam(someuser@example.com,::1): unknown user
Oct 06 19:57:13 imap-login: Info: Disconnected (auth failed, 1 attempts in 7 secs): user=<someuser@example.com>, method=PLAIN, rip=::1, lip=::1, secured, session=<2BfyqJp3RIAAAAAAAAAAAAAAAAAAAAAB>


Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: Roundcube Troubleshooting
« Reply #1 on: October 07, 2018, 01:29:09 AM »
There isn't "someuser@example.com" account on the system and so the login is failing, the logs are rather clear on that.

Offline rfanch3r

  • Jr. Member
  • **
  • Posts: 13
Re: Roundcube Troubleshooting
« Reply #2 on: October 07, 2018, 02:30:24 AM »
Well that's what I am trying to troubleshoot and the problem I am running into, there is in fact a real user that I am using but it cant seem to find that user, which is me.

doveadm user user does display the user but when I search for user@example.com it does not.

I am populating the user field with just the user, is there some conf change I need to make to not append example.com?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: Roundcube Troubleshooting
« Reply #3 on: October 07, 2018, 02:44:03 AM »
Its trying to get the system user "user@example.com" not just "user" you would need to configure Dovecot to strip the domain if you want to find the system user "user". Maybe this article will help https://utcc.utoronto.ca/~cks/space/blog/sysadmin/DovecotIgnoreDomainOnAuth

Offline rfanch3r

  • Jr. Member
  • **
  • Posts: 13
Re: Roundcube Troubleshooting
« Reply #4 on: October 07, 2018, 04:37:04 AM »
OK, I worked out several issues thanks to your suggestion. I changed roundcube.conf file to not send the domain

//$config['username_domain'] = 'example.com'; <-- I had this one activated previously
$config['username_domain'] = '';

Changed dovecot to
auth_username_format = %Lu

Updated saslauthd to point to the chroot dir as one was not present

Also had to update the Edit the identity to reflect my proper host. Everything is working now. Thank you.

Offline rfanch3r

  • Jr. Member
  • **
  • Posts: 13
Re: Roundcube Troubleshooting
« Reply #5 on: October 07, 2018, 04:56:41 AM »
Ahh spoke too soon.

During the troubleshooting I got an error message sent back to me, I see it in my inbox and while I can delete it and it does move to the Trash, it comes back. Further troubleshooting it seems to effect all emails currently in the Inbox. I do get mail has been successfully moved to the Trash message in the lower right.

Any suggestions?
« Last Edit: October 07, 2018, 08:50:38 AM by rfanch3r »

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Re: Roundcube Troubleshooting
« Reply #6 on: October 07, 2018, 01:12:19 PM »
Quote
During the troubleshooting I got an error message sent back to me...
Whats the error?
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline rfanch3r

  • Jr. Member
  • **
  • Posts: 13
Re: Roundcube Troubleshooting
« Reply #7 on: October 07, 2018, 08:10:16 PM »
I resolved the error but its the emails that I cannot delete. Was wondering if anyone had any idea's on how to fix?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: Roundcube Troubleshooting
« Reply #8 on: October 08, 2018, 10:55:02 AM »
It sounds like a permissions problem. The mail server user needs to be able to write to the folder where the mail is stored and I'm guessing it can't and thats why the mail is stuck in the same place.

Offline rfanch3r

  • Jr. Member
  • **
  • Posts: 13
Re: Roundcube Troubleshooting
« Reply #9 on: October 08, 2018, 09:19:48 PM »
I don't see an error in any of my logs where can I look?

Does other need to be rw as well even though I am logging into the users account?
-rw-rw----  1 user mail     15673 Oct  7 18:06 user

I see those messages that I delete moved into the trash, so far I see 8 of them for the 8 attempts. So it copies them from the Inbox to Trash but never deletes them from the Inbox.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: Roundcube Troubleshooting
« Reply #10 on: October 09, 2018, 12:40:41 AM »
Try reading though the steps in the "[Dovecot] cannot delete emails in inbox" thread here: https://www.dovecot.org/list/dovecot/2009-January/thread.html#36126 the mail server needs to be able to read and write the emails in the users account and can't for some reason that most likely what is happening.

Offline rfanch3r

  • Jr. Member
  • **
  • Posts: 13
Re: Roundcube Troubleshooting
« Reply #11 on: October 09, 2018, 12:53:49 AM »
Sweet thank you. I didn't even know where to look and most of my searches never came across this. I actually resolved this by doing the following:

chmod a+rwxt /var/mail