1

I've been at this for several days and, in spite of countless searches, haven't been able to find a solution.

I host several domains in a vps and have all email forwarded to gmail addresses, which works, but I'd like to set up my own email, so I don't have to rely on gmail anymore.

Postfix and Dovecot were installed according to the instructions here: Email with Postfix, Dovecot and MariaDB on CentOS 7

Figuring that since Squirrelmail is the most basic email client out there, I decided to start with that. It took me a few days trying to get it to receive and send email (I had to disable https access to at least have the page load - will deal with this later, and TLS is also disabled - there's no need for this if it runs in the same server as everything else).

Displaying the page correctly, though, seems a whole 'nother story. On the left panel, where the folders list is supposed to appear, I get "ERROR: Could not complete request. Query: CREATE "Sent" Reason Given: Client tried to access nonexistent namespace. (Mailbox name should probably be prefixed with: INBOX.)". Based on everything I've read (and it's been a lot), I believe that the problem is dovecot, but I might be wrong.

If someone can point out what is wrong with my configuration, I would be more than grateful.

Below are all the config files I could think of: (confidential information replaced by ####'s)

/etc/dovecot/dovecot.conf:

protocols = imap pop3 log_timestamp = "%Y-%m-%d %H:%M:%S " mail_location = maildir:/home/vmail/%d/%n/Maildir

ssl_cert = </etc/pki/dovecot/certs/dovecot.pem ssl_key = </etc/pki/dovecot/private/dovecot.pem

namespace {
    type = private
    separator = .
    prefix = INBOX.
    inbox = yes }

service auth {
    unix_listener auth-master {
        mode = 0600
        user = vmail
    }

    unix_listener /var/spool/postfix/private/auth {
        mode = 0666
        user = postfix
        group = postfix
    }

user = root }

service auth-worker {
    user = root }

protocol lda {
    log_path = /home/vmail/dovecot-deliver.log
    auth_socket_path = /var/run/dovecot/auth-master
    postmaster_address = postmaster@##########.com }

protocol pop3 { pop3_uidl_format = %08Xu%08Xv }

passdb {
    driver = sql
    args = /etc/dovecot/dovecot-sql.conf.ext }

userdb {
    driver = static
    args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes }

/etc/dovecot/conf.d/10-mail.conf: (comments removed for simplicity)

namespace inbox {
  inbox = yes
  list = yes
}

EDIT - As per Jens' request, here's the output from "doveconf -n:"

After removing the namespace declaration from dovecote.conf, Squirrelmail is working.

# 2.2.10: /etc/dovecot/dovecot.conf
# OS: Linux 4.5.0-x86_64-linode65 x86_64 CentOS Linux release 7.4.1708 (Core)  ext4
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/home/vmail/%d/%n/Maildir
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
protocols = imap pop3
service auth-worker {
  user = root
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0666
    user = postfix
  }
  unix_listener auth-master {
    mode = 0600
    user = vmail
  }
  user = root
}
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_key = </etc/pki/dovecot/private/dovecot.pem
userdb {
  args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes
  driver = static
}
protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  log_path = /home/vmail/dovecot-deliver.log
  postmaster_address = postmaster@#######.com
}
protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv
}
  • Please post the output of doveconf -n instead of the config files, as this provides the result after parsing and applying the configuration. If you notice any surprises, consider them a good starting point for digging deeper. – Jens Erat Nov 4 '17 at 20:49
  • Thanks Jens, As I hit "post" above, I found it odd that there were namespace declarations in both files, and tried commenting out the one in dovecot.conf. After doing that, Squirrelmail started working as it's supposed to. Having worked with computers for most of my life, I'm not certain that that's the end of my problems, so I don't dare to mark the question as solved, so I'll post the output of doveconf -n anyway, just in case. – alex wieder Nov 4 '17 at 21:39
  • Did you try running doveconf -n with the (seemingly) duplicate namespace declaration in effect? The tool does some validity checking and might print warning messages when there are issues. Anyway, if you resolved your own question: you're welcome writing up your own answer (and also selecting it as accepted), you might well help others having similar issues in future (and people usually just scan for answers, don't really bother reading the comments). – Jens Erat Nov 4 '17 at 22:19
0

Thanks for your help, Jens!

After removing the duplicate namespace definition (once in /etc/dovecot/dovecot.conf and then again in /etc/dovecot/conf.d/10-mail.conf) and leaving only the one from 10-mail.conf, Squirrelmail works normally.

When namespace is declared in both files, "dovecot -n" returns the same as shown in my first post (above), except that the namespace section looks like this:

namespace {
  inbox = yes
  location = 
  prefix = INBOX.
  separator = .
  type = private
}

With the namespace declaration in both config files, Thunderbird and Squirrelmail complain with the same error message. Roundcube, however, is perfectly happy.

"dovecot -n" doesn't report an issue either way.

Alex

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.