[Dovecot] Telnet access creates new maildir folders
Hi, I am running Dovecot Version 1.0.15on a Debian server, with postfix and postfixadmin. My mailbox base is /var/mail/vmail
When I send an email to a user1@domain.com for the first time, the user "mail" creates a set of dovecot folders under /var/mail/vmail/ user1@domain.com/ and my new emails are found in /var/mail/vmail/ user1@domain.com/new When I test my server using telnet (telnet domain.com 110), I can log in fine as a user1, but when I type "LIST", it tells me there are no emails. And I realize a new set of dovecot folders were created under /var/mail/vmail/user1/ ! The folders are created by the user "user1". Obviously the folder "new" under that is empty, since my emails received are in /var/mail/vmail/user1@domain.com/new and not /var/mail/vmail/user1/new . Therefore, connecting with an email client via POP also shows an empty inbox.
I am lost as to what to do to fix this, and how to let the server know that pop access should be looking into /var/mail/vmail/user1@domain.com/ instead of /var/mail/vmail/user1/ .
Hopefully someone on this list will be able to save me from my misery :)
Cheers Sea
Seasoul,
Right from dovecot.conf:
# Location for users' mailboxes. This is the same as the old
default_mail_env
# setting. The default is empty, which means that Dovecot tries to find the
# mailboxes automatically. This won't work if the user doesn't have any mail
# yet, so you should explicitly tell Dovecot the full location.
#
# If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u)
# isn't enough. You'll also need to tell Dovecot where the other
mailboxes are
# kept. This is called the "root mail directory", and it must be the first
# path given in the mail_location setting.
#
# There are a few special variables you can use, eg.:
#
# %u - username
# %n - user part in user@domain, same as %u if there's no domain
# %d - domain part in user@domain, empty if there's no domain
# %h - home directory
#
# See /usr/share/doc/dovecot-common/wiki/Variables.txt for full list. Some
# examples:
#
# mail_location = maildir:~/Maildir
# mail_location = mbox:~/mail:INBOX=/var/mail/%u
# mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
#
#
In my case: mail_location = maildir:/var/virtual/%Ld/%Ln/Maildir
Just because I prefer this way.
In your case I believe that something like this would be good: mail_location = maildir:/var/mail/vmail/%Ln@%Ld
The "L" if for lowercase (I think). In e-mail RFC is specified that mail should be case sensitive, but it might give you some problems where people send e-mail to foo@domain.com and FOO@domain.com, as we are working with UNIX like OS, these are different folders and different mailboxes.
With best regards,
Fábio Catunda.
On 12/30/2010 12:40 AM, Seasoul wrote:
Hi, I am running Dovecot Version 1.0.15on a Debian server, with postfix and postfixadmin. My mailbox base is /var/mail/vmail
When I send an email to a user1@domain.com for the first time, the user "mail" creates a set of dovecot folders under /var/mail/vmail/ user1@domain.com/ and my new emails are found in /var/mail/vmail/ user1@domain.com/new When I test my server using telnet (telnet domain.com 110), I can log in fine as a user1, but when I type "LIST", it tells me there are no emails. And I realize a new set of dovecot folders were created under /var/mail/vmail/user1/ ! The folders are created by the user "user1". Obviously the folder "new" under that is empty, since my emails received are in /var/mail/vmail/user1@domain.com/new and not /var/mail/vmail/user1/new . Therefore, connecting with an email client via POP also shows an empty inbox.
I am lost as to what to do to fix this, and how to let the server know that pop access should be looking into /var/mail/vmail/user1@domain.com/ instead of /var/mail/vmail/user1/ .
Hopefully someone on this list will be able to save me from my misery :)
Cheers Sea
Hi Fabio,
Many thnaks for your prompt reply, I was typing the below :) So my path for mail_location is /var/mail/vmail/%d/%u but apparently that's not what happens..any idea why ?
My dovecot.conf:
# 1.0.15: /etc/dovecot/dovecot.conf
log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap imaps pop3 pop3s disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable(default): /usr/lib/dovecot/imap-login login_executable(imap): /usr/lib/dovecot/imap-login login_executable(pop3): /usr/lib/dovecot/pop3-login first_valid_gid: 0 last_valid_gid: 12000 mail_privileged_group: mail mail_location: maildir:/var/mail/vmail/%d/%u mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(pop3): /usr/lib/dovecot/pop3 mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3 pop3_uidl_format(default): pop3_uidl_format(imap): pop3_uidl_format(pop3): %08Xu%08Xv auth default: mechanisms: plain login passdb: driver: pam passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: passwd userdb: driver: sql args: /etc/dovecot/dovecot-sql.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix
My dovecot-sql.conf (although not sure this is relevant for my issue):
driver = mysql connect = dbname=postfix user=**** password=**** host=localhost default_pass_scheme = PLAIN-MD5 password_query = SELECT password FROM mailox WHERE local_part= '%u' user_query = SELECT home, uid, gid FROM users WHERE userid = '%u'
On Thu, Dec 30, 2010 at 10:52 AM, Fabio Catunda fcatunda@contactnet.com.brwrote:
Seasoul,
Right from dovecot.conf: # Location for users' mailboxes. This is the same as the old default_mail_env # setting. The default is empty, which means that Dovecot tries to find the # mailboxes automatically. This won't work if the user doesn't have any mail # yet, so you should explicitly tell Dovecot the full location. # # If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u) # isn't enough. You'll also need to tell Dovecot where the other mailboxes are # kept. This is called the "root mail directory", and it must be the first # path given in the mail_location setting. # # There are a few special variables you can use, eg.: # # %u - username # %n - user part in user@domain, same as %u if there's no domain # %d - domain part in user@domain, empty if there's no domain # %h - home directory # # See /usr/share/doc/dovecot-common/wiki/Variables.txt for full list. Some # examples: # # mail_location = maildir:~/Maildir # mail_location = mbox:~/mail:INBOX=/var/mail/%u # mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n # #
In my case: mail_location = maildir:/var/virtual/%Ld/%Ln/Maildir
Just because I prefer this way.
In your case I believe that something like this would be good: mail_location = maildir:/var/mail/vmail/%Ln@%Ld
The "L" if for lowercase (I think). In e-mail RFC is specified that mail should be case sensitive, but it might give you some problems where people send e-mail to foo@domain.com and FOO@domain.com, as we are working with UNIX like OS, these are different folders and different mailboxes.
With best regards,
Fábio Catunda.
On 12/30/2010 12:40 AM, Seasoul wrote:
Hi, I am running Dovecot Version 1.0.15on a Debian server, with postfix and postfixadmin. My mailbox base is /var/mail/vmail
When I send an email to a user1@domain.com for the first time, the user "mail" creates a set of dovecot folders under /var/mail/vmail/ user1@domain.com/ and my new emails are found in /var/mail/vmail/ user1@domain.com/new When I test my server using telnet (telnet domain.com 110), I can log in fine as a user1, but when I type "LIST", it tells me there are no emails. And I realize a new set of dovecot folders were created under /var/mail/vmail/user1/ ! The folders are created by the user "user1". Obviously the folder "new" under that is empty, since my emails received are in /var/mail/vmail/user1@domain.com/new and not /var/mail/vmail/user1/new . Therefore, connecting with an email client via POP also shows an empty inbox.
I am lost as to what to do to fix this, and how to let the server know that pop access should be looking into /var/mail/vmail/user1@domain.com/instead of /var/mail/vmail/user1/ .
Hopefully someone on this list will be able to save me from my misery :)
Cheers Sea
Mr. Seasoul,
What is your MDA?
Ok, maybe you don't have this answer right now, but it's pretty important. MDA is a Mail Delivery Agent, it's responsible for delivery an e-mail to the user e-mail folder. I tend to use maildrop, again, just because I like it.
Apparently there is a misunderstood between your MDA and Dovecot. Your MDA is delivering e-mail to a folder and Dovecot is trying to take e-mail from another folder, that's probably your problem.
There are two ways to fix it, or your MDA starts to deliver e-maiil to the correct folder or you reconfigure Dovecot to search for e-mail in the same folder that your MDA deliver it.
To know what MDA you are using you have to look in postfix files. And if you are using dovecot as your MDA I can't help you a lot since I don't use it as MDA. :-( Sorry.
Att,
Fábio Catunda.
On 12/30/2010 12:58 AM, Seasoul wrote:
Hi Fabio,
Many thnaks for your prompt reply, I was typing the below :) So my path for mail_location is /var/mail/vmail/%d/%u but apparently that's not what happens..any idea why ?
My dovecot.conf:
# 1.0.15: /etc/dovecot/dovecot.conf
log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap imaps pop3 pop3s disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable(default): /usr/lib/dovecot/imap-login login_executable(imap): /usr/lib/dovecot/imap-login login_executable(pop3): /usr/lib/dovecot/pop3-login first_valid_gid: 0 last_valid_gid: 12000 mail_privileged_group: mail mail_location: maildir:/var/mail/vmail/%d/%u mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(pop3): /usr/lib/dovecot/pop3 mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3 pop3_uidl_format(default): pop3_uidl_format(imap): pop3_uidl_format(pop3): %08Xu%08Xv auth default: mechanisms: plain login passdb: driver: pam passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: passwd userdb: driver: sql args: /etc/dovecot/dovecot-sql.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix
My dovecot-sql.conf (although not sure this is relevant for my issue):
driver = mysql connect = dbname=postfix user=**** password=**** host=localhost default_pass_scheme = PLAIN-MD5 password_query = SELECT password FROM mailox WHERE local_part= '%u' user_query = SELECT home, uid, gid FROM users WHERE userid = '%u'
On Thu, Dec 30, 2010 at 10:52 AM, Fabio Catunda fcatunda@contactnet.com.brwrote:
Seasoul,
Right from dovecot.conf: # Location for users' mailboxes. This is the same as the old default_mail_env # setting. The default is empty, which means that Dovecot tries to find the # mailboxes automatically. This won't work if the user doesn't have any mail # yet, so you should explicitly tell Dovecot the full location. # # If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u) # isn't enough. You'll also need to tell Dovecot where the other mailboxes are # kept. This is called the "root mail directory", and it must be the first # path given in the mail_location setting. # # There are a few special variables you can use, eg.: # # %u - username # %n - user part in user@domain, same as %u if there's no domain # %d - domain part in user@domain, empty if there's no domain # %h - home directory # # See /usr/share/doc/dovecot-common/wiki/Variables.txt for full list. Some # examples: # # mail_location = maildir:~/Maildir # mail_location = mbox:~/mail:INBOX=/var/mail/%u # mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n # #
In my case: mail_location = maildir:/var/virtual/%Ld/%Ln/Maildir
Just because I prefer this way.
In your case I believe that something like this would be good: mail_location = maildir:/var/mail/vmail/%Ln@%Ld
The "L" if for lowercase (I think). In e-mail RFC is specified that mail should be case sensitive, but it might give you some problems where people send e-mail to foo@domain.com and FOO@domain.com, as we are working with UNIX like OS, these are different folders and different mailboxes.
With best regards,
Fábio Catunda.
On 12/30/2010 12:40 AM, Seasoul wrote:
Hi, I am running Dovecot Version 1.0.15on a Debian server, with postfix and postfixadmin. My mailbox base is /var/mail/vmail
When I send an email to a user1@domain.com for the first time, the user "mail" creates a set of dovecot folders under /var/mail/vmail/ user1@domain.com/ and my new emails are found in /var/mail/vmail/ user1@domain.com/new When I test my server using telnet (telnet domain.com 110), I can log in fine as a user1, but when I type "LIST", it tells me there are no emails. And I realize a new set of dovecot folders were created under /var/mail/vmail/user1/ ! The folders are created by the user "user1". Obviously the folder "new" under that is empty, since my emails received are in /var/mail/vmail/user1@domain.com/new and not /var/mail/vmail/user1/new . Therefore, connecting with an email client via POP also shows an empty inbox.
I am lost as to what to do to fix this, and how to let the server know that pop access should be looking into /var/mail/vmail/user1@domain.com/instead of /var/mail/vmail/user1/ .
Hopefully someone on this list will be able to save me from my misery :)
Cheers Sea
Hi,
I'm a bit confused now, I though Dovecot was the MDA ? I'm only using Dovecot and Postfix so I think Dovecot is the MDA here. Thanks for the reply though, it tells me that something's wrong with either the email delivery or the email fetching (or both!). I just can't find in the different *.conf files what to change to fix this..
On Thu, Dec 30, 2010 at 11:16 AM, Fabio Catunda fcatunda@contactnet.com.brwrote:
Mr. Seasoul,
What is your MDA?
Ok, maybe you don't have this answer right now, but it's pretty important. MDA is a Mail Delivery Agent, it's responsible for delivery an e-mail to the user e-mail folder. I tend to use maildrop, again, just because I like it.
Apparently there is a misunderstood between your MDA and Dovecot. Your MDA is delivering e-mail to a folder and Dovecot is trying to take e-mail from another folder, that's probably your problem.
There are two ways to fix it, or your MDA starts to deliver e-maiil to the correct folder or you reconfigure Dovecot to search for e-mail in the same folder that your MDA deliver it.
To know what MDA you are using you have to look in postfix files. And if you are using dovecot as your MDA I can't help you a lot since I don't use it as MDA. :-( Sorry.
Att,
Fábio Catunda.
On 12/30/2010 12:58 AM, Seasoul wrote:
Hi Fabio,
Many thnaks for your prompt reply, I was typing the below :) So my path for mail_location is /var/mail/vmail/%d/%u but apparently that's not what happens..any idea why ?
My dovecot.conf:
# 1.0.15: /etc/dovecot/dovecot.conf
log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap imaps pop3 pop3s disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable(default): /usr/lib/dovecot/imap-login login_executable(imap): /usr/lib/dovecot/imap-login login_executable(pop3): /usr/lib/dovecot/pop3-login first_valid_gid: 0 last_valid_gid: 12000 mail_privileged_group: mail mail_location: maildir:/var/mail/vmail/%d/%u mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(pop3): /usr/lib/dovecot/pop3 mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3 pop3_uidl_format(default): pop3_uidl_format(imap): pop3_uidl_format(pop3): %08Xu%08Xv auth default: mechanisms: plain login passdb: driver: pam passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: passwd userdb: driver: sql args: /etc/dovecot/dovecot-sql.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix
My dovecot-sql.conf (although not sure this is relevant for my issue):
driver = mysql connect = dbname=postfix user=**** password=**** host=localhost default_pass_scheme = PLAIN-MD5 password_query = SELECT password FROM mailox WHERE local_part= '%u' user_query = SELECT home, uid, gid FROM users WHERE userid = '%u'
On Thu, Dec 30, 2010 at 10:52 AM, Fabio Catunda fcatunda@contactnet.com.brwrote:
Seasoul,
Right from dovecot.conf: # Location for users' mailboxes. This is the same as the old default_mail_env # setting. The default is empty, which means that Dovecot tries to find the # mailboxes automatically. This won't work if the user doesn't have any mail # yet, so you should explicitly tell Dovecot the full location. # # If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u) # isn't enough. You'll also need to tell Dovecot where the other mailboxes are # kept. This is called the "root mail directory", and it must be the first # path given in the mail_location setting. # # There are a few special variables you can use, eg.: # # %u - username # %n - user part in user@domain, same as %u if there's no domain # %d - domain part in user@domain, empty if there's no domain # %h - home directory # # See /usr/share/doc/dovecot-common/wiki/Variables.txt for full list. Some # examples: # # mail_location = maildir:~/Maildir # mail_location = mbox:~/mail:INBOX=/var/mail/%u # mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n # #
In my case: mail_location = maildir:/var/virtual/%Ld/%Ln/Maildir
Just because I prefer this way.
In your case I believe that something like this would be good: mail_location = maildir:/var/mail/vmail/%Ln@%Ld
The "L" if for lowercase (I think). In e-mail RFC is specified that mail should be case sensitive, but it might give you some problems where people send e-mail to foo@domain.com and FOO@domain.com, as we are working with UNIX like OS, these are different folders and different mailboxes.
With best regards,
Fábio Catunda.
On 12/30/2010 12:40 AM, Seasoul wrote:
Hi,
I am running Dovecot Version 1.0.15on a Debian server, with postfix and postfixadmin. My mailbox base is /var/mail/vmail
When I send an email to a user1@domain.com for the first time, the user "mail" creates a set of dovecot folders under /var/mail/vmail/ user1@domain.com/ and my new emails are found in /var/mail/vmail/ user1@domain.com/new When I test my server using telnet (telnet domain.com 110), I can log in fine as a user1, but when I type "LIST", it tells me there are no emails. And I realize a new set of dovecot folders were created under /var/mail/vmail/user1/ ! The folders are created by the user "user1". Obviously the folder "new" under that is empty, since my emails received are in /var/mail/vmail/user1@domain.com/new and not /var/mail/vmail/user1/new . Therefore, connecting with an email client via POP also shows an empty inbox.
I am lost as to what to do to fix this, and how to let the server know that pop access should be looking into /var/mail/vmail/ user1@domain.com/instead of /var/mail/vmail/user1/ .
Hopefully someone on this list will be able to save me from my misery :)
Cheers Sea
On Thu, 2010-12-30 at 12:20 +0800, Seasoul wrote:
Hi,
I'm a bit confused now, I though Dovecot was the MDA ?
Only if you've configured it that way: http://wiki.dovecot.org/LDA
mail_location: maildir:/var/mail/vmail/%d/%u
So Dovecot should see the domain.. Set mail_debug=yes to see where exactly it's looking for the mails.
mail_privileged_group: mail
You don't need this setting.
passdb: driver: pam
Do you really need pam here as well? If not, you should remove it and userdb passwd.
Hi,
When I try to get pop access via telnet, this is what the log records:
dovecot: pop3-login: Login: user=<user1>, method=PLAIN, rip=127.0.0.1,
lip=127.0.0.1, secured
dovecot: POP3(user1): Effective uid=***, gid=***
dovecot: POP3(user1): maildir: data=/var/mail/vmail//user1
dovecot: POP3(user1): maildir: root=/var/mail/vmail//user1,
index=/var/mail/vmail//user1, control=, inbox=
dovecot: POP3(user1): Disconnected: Logged out top=0/0, retr=0/0, del=0/0,
size=0
When I send an email to user1@domain.com from a gmail account, this is the
log record:
postfix/smtpd[2941]: connect from mail-qw0-f51.google.com[*.*.*.*]
postfix/smtpd[2941]: 4E2EA70324: client=mail-qw0-f51.google.com[*.*.*.*]
postfix/cleanup[2946]: 4E2EA70324: message-id=<
AANLkTin8PNUb-CnzyYtRX4jCecM11qzxQq2+DBgfWX-p@mail.gmail.com
postfix/qmgr[28610]: 4E2EA70324: from=
On Thu, 2010-12-30 at 12:20 +0800, Seasoul wrote:
Hi,
I'm a bit confused now, I though Dovecot was the MDA ?
Only if you've configured it that way: http://wiki.dovecot.org/LDA
mail_location: maildir:/var/mail/vmail/%d/%u
So Dovecot should see the domain.. Set mail_debug=yes to see where exactly it's looking for the mails.
mail_privileged_group: mail
You don't need this setting.
passdb: driver: pam
Do you really need pam here as well? If not, you should remove it and userdb passwd.
On Thu, 2010-12-30 at 20:14 +0800, Seasoul wrote:
When I try to get pop access via telnet, this is what the log records:
dovecot: pop3-login: Login: user=<user1>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
The auth_debug logs are missing above. They're the most important ones in figuring out this.
Do you mean the dovecot-auth errors ? the only one I have in the auth log is: dovecot-auth: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser=user1 rhost=127.0.0.1 user=user1 That was when i typed my password wrongly. Aside from that and a bunch of random attacks I'll deal with leater, nothing was logged for dovecot_auth.
I am now running Dovecot 2.0.8, looking at dovecot.conf to set it up properly.
On Thu, Dec 30, 2010 at 8:21 PM, Timo Sirainen tss@iki.fi wrote:
On Thu, 2010-12-30 at 20:14 +0800, Seasoul wrote:
When I try to get pop access via telnet, this is what the log records:
dovecot: pop3-login: Login: user=<user1>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
The auth_debug logs are missing above. They're the most important ones in figuring out this.
On Thu, 2010-12-30 at 20:53 +0800, Seasoul wrote:
Do you mean the dovecot-auth errors ?
I mean if you have auth_debug=yes enabled, and assuming you also use sql (it wasn't clear if you're using pam, sql or both since you had both enabled in dovecot.conf), you should see messages such as:
Dec 30 15:04:44 auth: Debug: client in: AUTH 1 PLAIN service=imap secured lip=127.0.0.1 rip=127.0.0.1 lport=143 rport=60878 resp=<hidden> Dec 30 15:04:44 auth: Debug: sql(tss,127.0.0.1): query: select password from users where username = 'tss' Dec 30 15:04:44 auth: Debug: client out: OK 1 user=tss Dec 30 15:04:44 auth: Debug: master in: REQUEST 1153302529 4136 1 fceb4e3382227525923b802a20ab913b Dec 30 15:04:44 auth: Debug: sql(tss,127.0.0.1): SELECT '/home/tss' as home, 1000 as uid, 1000 as gid FROM users WHERE username = 'tss' Dec 30 15:04:44 auth: Debug: master out: USER 1153302529 tss home=/home/tss uid=1000 gid=1000
Hi,
Now running Dovecot 2.0.8 and still having the same issue: Postfix sends emails to /var/mail/vmail/username (username is user@domain.com) but Dovecot looks for email in /var/mail/vmail/user How to alignt he two ?
Dovecot -n gives:
auth_debug = yes auth_verbose = yes first_valid_gid = 0 last_valid_gid = 12000 mail_debug = yes mail_location = maildir:/var/mail/vmail/%u/ managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date passdb { driver = pam } plugin { sieve = ~/.dovecot.sieve sieve_dir = ~/sieve } protocols = imap pop3 ssl_cert =
When I try to login to dovecot via telnet, here's what the log records:
dovecot: pop3-login: Login: user=<user>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=20333, secured dovecot: pop3(oren): Debug: Effective uid=1000, gid=0, home=/ dovecot: pop3(oren): Debug: maildir++: root=/var/mail/vmail/user, index=, control=, inbox=/var/mail/vmail/user dovecot: pop3(oren): Debug: Namespace : Permission lookup failed from /var/mail/vmail/user dovecot: pop3(oren): Debug: Namespace : Using permissions from /var/mail/vmail/user: mode=0700 gid=-1 dovecot: pop3(oren): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
But in Dovecot documentation, it says that the variable %u is the "full username (e.g. user@domain) ". So mail_location should indeed send Dovecot to /var/mail/vmail/user@domain.com, shouldn't it ? So why is Dovecot looking at /var/mail/vmail/user instead ?
I'm lost...
On 31.12.2010, at 6.55, Seasoul wrote:
auth_debug = yes auth_verbose = yes .. When I try to login to dovecot via telnet, here's what the log records:
dovecot: pop3-login: Login: user=<user>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=20333, secured
Do you really not get any auth debug logs before this message? If not, maybe your syslog is redirecting them elsewhere. Try setting:
log_path = /var/log/dovecot.log
There's no point in guessing what the problem is, because the auth debug logs would tell exactly what goes wrong.
Thanks Timo, set the dovecot log as suggested, and this is what a telnet session gives me now on dovecot.log:
ssl-params: Info: Generating SSL parameters ssl-params: Info: SSL parameters regeneration completed auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth Debug: auth client connected (pid=23352) Debug: client in: AUTH 1 PLAIN service=pop3 secured lip=*.*.*.* rip=*.*.*.* lport=110 rport=59691 resp=<hidden> auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth Debug: pam(user1,*.*.*.*): lookup service=dovecot Debug: pam(user1,*.*.*.*): #1/1 style=1 msg=Password: Debug: client out: OK 1 user=user1 Debug: master in: REQUEST 3611557889 23352 1 769f960369c716c7bd71072c0e Debug: passwd(user1,*.*.*.*): lookup Debug: master out: USER 3611557889 user1 system_groups_user=user1 uid=1000 gid=0 home=/ pop3-login: Info: Login: user=<user1>, method=PLAIN, rip=*.*.*.*, lip=*.*.*.*, mpid=23355, secured pop3(user1): Debug: Effective uid=1000, gid=0, home=/ pop3(user1): Debug: maildir++: root=/var/mail/vmail/user1, index=, control=, inbox=/var/mail/vmail/user1 pop3(user1): Info: Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
When I send an email, Postfix still stores the email in /var/mail/vmail/ user1@domain.com , and Dovecot still looks for that email in /var/mail/vmail/user1
Seriously, what am I not seeing here ? Feels like it's a very simple thing I'm missing.. Could it be that for Postfix the "user" is the whole "user1@domain.com" while for Dovecot it's just "user1" ? Don't they both work on the same variables ? Could this be related to the fact that I have a system user called user1, and I have to tell Dovecot to not look for that one but for user1@domain/com ?
On Fri, Dec 31, 2010 at 3:49 PM, Timo Sirainen tss@iki.fi wrote:
On 31.12.2010, at 6.55, Seasoul wrote:
auth_debug = yes auth_verbose = yes .. When I try to login to dovecot via telnet, here's what the log records:
dovecot: pop3-login: Login: user=<user>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=20333, secured
Do you really not get any auth debug logs before this message? If not, maybe your syslog is redirecting them elsewhere. Try setting:
log_path = /var/log/dovecot.log
There's no point in guessing what the problem is, because the auth debug logs would tell exactly what goes wrong.
Thinking I should look into PAM , this is my config:
in /etc/pam.d/dovecot:
#%PAM-1.0
@include common-auth @include common-account @include common-session
in common-auth:
auth required pam_unix.so nullok_secure
in common-account
account required pam_unix.so
in common-session
session required pam_unix.so
-> All looks good to me, yeah ?
Now, when I try to log to Dovecot via telnet using "user1@domain.com" as username, authentication fails and Dovecot log shows:
auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth auth: Debug: auth client connected (pid=23604) auth: Debug: client in: AUTH 1 PLAIN service=pop3 secured lip=*.*.*.* rip=*.*.*.* lport=110 rport=38812 resp=<hidden> auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth auth: Debug: pam(user1@domain.com,*.*.*.*): lookup service=dovecot auth: Debug: pam(user1@domain.com,*.*.*.*): #1/1 style=1 msg=Password: auth: Info: pam(user1@domain.com,*.*.*.*): unknown user auth: Debug: client out: FAIL 1 user=user1@domain.com pop3-login: Info: Aborted login (auth failed, 1 attempts): user=< user1@domain.com>, method=PLAIN, rip=*.*.*.*, lip=*.*.*.*, secured
Which makes sense because I don't have a "user1@domain.com" set up as a user on my server. Only "user1" Should I have one ? I'm confused, I thought creating just the user par of user@domain.com would be enough, is it not ?
On Sun, Jan 2, 2011 at 8:13 PM, Seasoul seasoul@gmail.com wrote:
Thanks Timo, set the dovecot log as suggested, and this is what a telnet session gives me now on dovecot.log:
ssl-params: Info: Generating SSL parameters ssl-params: Info: SSL parameters regeneration completed auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth Debug: auth client connected (pid=23352) Debug: client in: AUTH 1 PLAIN service=pop3 secured lip=*.*.*.* rip=*.*.*.* lport=110 rport=59691 resp=<hidden> auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth Debug: pam(user1,*.*.*.*): lookup service=dovecot Debug: pam(user1,*.*.*.*): #1/1 style=1 msg=Password: Debug: client out: OK 1 user=user1 Debug: master in: REQUEST 3611557889 23352 1 769f960369c716c7bd71072c0e Debug: passwd(user1,*.*.*.*): lookup Debug: master out: USER 3611557889 user1 system_groups_user=user1 uid=1000 gid=0 home=/ pop3-login: Info: Login: user=<user1>, method=PLAIN, rip=*.*.*.*, lip=*.*.*.*, mpid=23355, secured pop3(user1): Debug: Effective uid=1000, gid=0, home=/ pop3(user1): Debug: maildir++: root=/var/mail/vmail/user1, index=, control=, inbox=/var/mail/vmail/user1 pop3(user1): Info: Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
When I send an email, Postfix still stores the email in /var/mail/vmail/ user1@domain.com , and Dovecot still looks for that email in /var/mail/vmail/user1
Seriously, what am I not seeing here ? Feels like it's a very simple thing I'm missing.. Could it be that for Postfix the "user" is the whole "user1@domain.com" while for Dovecot it's just "user1" ? Don't they both work on the same variables ? Could this be related to the fact that I have a system user called user1, and I have to tell Dovecot to not look for that one but for user1@domain/com ?
On Fri, Dec 31, 2010 at 3:49 PM, Timo Sirainen tss@iki.fi wrote:
On 31.12.2010, at 6.55, Seasoul wrote:
auth_debug = yes auth_verbose = yes .. When I try to login to dovecot via telnet, here's what the log records:
dovecot: pop3-login: Login: user=<user>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=20333, secured
Do you really not get any auth debug logs before this message? If not, maybe your syslog is redirecting them elsewhere. Try setting:
log_path = /var/log/dovecot.log
There's no point in guessing what the problem is, because the auth debug logs would tell exactly what goes wrong.
Sorry for all the consecutive emails, but thought I'd mention I'm using PostfixAdmin to create my users and mailboxes on virtual domains. Should I leave PAM authentication for another type of authentication, maybe SQL based ?
On Sun, Jan 2, 2011 at 8:40 PM, Seasoul seasoul@gmail.com wrote:
Thinking I should look into PAM , this is my config:
in /etc/pam.d/dovecot:
#%PAM-1.0
@include common-auth @include common-account @include common-session
in common-auth:
auth required pam_unix.so nullok_secure
in common-account
account required pam_unix.so
in common-session
session required pam_unix.so
-> All looks good to me, yeah ?
Now, when I try to log to Dovecot via telnet using "user1@domain.com" as username, authentication fails and Dovecot log shows:
auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth auth: Debug: auth client connected (pid=23604) auth: Debug: client in: AUTH 1 PLAIN service=pop3 secured lip=*.*.*.* rip=*.*.*.* lport=110 rport=38812 resp=<hidden>
auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth auth: Debug: pam(user1@domain.com,*.*.*.*): lookup service=dovecot auth: Debug: pam(user1@domain.com,*.*.*.*): #1/1 style=1 msg=Password: auth: Info: pam(user1@domain.com,*.*.*.*): unknown user auth: Debug: client out: FAIL 1 user=user1@domain.com pop3-login: Info: Aborted login (auth failed, 1 attempts): user=< user1@domain.com>, method=PLAIN, rip=*.*.*.*, lip=*.*.*.*, secured
Which makes sense because I don't have a "user1@domain.com" set up as a user on my server. Only "user1" Should I have one ? I'm confused, I thought creating just the user par of user@domain.com would be enough, is it not ?
On Sun, Jan 2, 2011 at 8:13 PM, Seasoul seasoul@gmail.com wrote:
Thanks Timo, set the dovecot log as suggested, and this is what a telnet session gives me now on dovecot.log:
ssl-params: Info: Generating SSL parameters ssl-params: Info: SSL parameters regeneration completed auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth Debug: auth client connected (pid=23352) Debug: client in: AUTH 1 PLAIN service=pop3 secured lip=*.*.*.* rip=*.*.*.* lport=110 rport=59691 resp=<hidden> auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth Debug: pam(user1,*.*.*.*): lookup service=dovecot Debug: pam(user1,*.*.*.*): #1/1 style=1 msg=Password: Debug: client out: OK 1 user=user1 Debug: master in: REQUEST 3611557889 23352 1 769f960369c716c7bd71072c0e Debug: passwd(user1,*.*.*.*): lookup Debug: master out: USER 3611557889 user1 system_groups_user=user1 uid=1000 gid=0 home=/ pop3-login: Info: Login: user=<user1>, method=PLAIN, rip=*.*.*.*, lip=*.*.*.*, mpid=23355, secured pop3(user1): Debug: Effective uid=1000, gid=0, home=/ pop3(user1): Debug: maildir++: root=/var/mail/vmail/user1, index=, control=, inbox=/var/mail/vmail/user1 pop3(user1): Info: Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
When I send an email, Postfix still stores the email in /var/mail/vmail/ user1@domain.com , and Dovecot still looks for that email in /var/mail/vmail/user1
Seriously, what am I not seeing here ? Feels like it's a very simple thing I'm missing.. Could it be that for Postfix the "user" is the whole "user1@domain.com" while for Dovecot it's just "user1" ? Don't they both work on the same variables ? Could this be related to the fact that I have a system user called user1, and I have to tell Dovecot to not look for that one but for user1@domain/com ?
On Fri, Dec 31, 2010 at 3:49 PM, Timo Sirainen tss@iki.fi wrote:
On 31.12.2010, at 6.55, Seasoul wrote:
auth_debug = yes auth_verbose = yes .. When I try to login to dovecot via telnet, here's what the log records:
dovecot: pop3-login: Login: user=<user>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=20333, secured
Do you really not get any auth debug logs before this message? If not, maybe your syslog is redirecting them elsewhere. Try setting:
log_path = /var/log/dovecot.log
There's no point in guessing what the problem is, because the auth debug logs would tell exactly what goes wrong.
On 02/01/2011 12:40, Seasoul wrote:
Thinking I should look into PAM , this is my config:
..
Now, when I try to log to Dovecot via telnet using "user1@domain.com" as username, authentication fails and Dovecot log shows:
..
Which makes sense because I don't have a "user1@domain.com" set up as a user on my server. Only "user1" Should I have one ? I'm confused, I thought creating just the user par of user@domain.com would be enough, is it not ?
I didn't read the entire chain completely, but your problem sounds like an issue with either two authentication options (PAM and sql) or a normalisation issue with usernames
From your latest email I sense that you might be creating users in an SQL database AND as local users?
Previously the issue seemed to be that you wanted to auth as "user1", but then have dovecot treat the user as "user1@abcd.com"? This can be done, but you need some way to add the default domain, and that will require extra configuration?
My best guess is that you have two authentication sources at present though? From what you describe you should probably be switching to using the Dovecot sql user/passwd auth config?
Good luck
Ed W
On 12/30/2010 4:14 AM, Seasoul wrote:
When I send an email to user1@domain.com from a gmail account, this is the log record:
postfix/qmgr[28610]: 4E2EA70324: from=test@gmail.com, size=5119, nrcpt=1 (queue active) postfix/virtual[2947]: 4E2EA70324: to=user1@domain.com, relay=virtual, delay=0.51, delays=0.44/0.02/0/0.05, dsn=2.0.0, status=sent (delivered to maildir) postfix/qmgr[28610]: 4E2EA70324: removed postfix/smtpd[2941]: disconnect from mail-qw0-f51.google.com[*.*.*.*]
That postfix/virtual entry means you haven't changed postfix's standard configuration. Postfix's "virtual" delivery agent is being used - not dovecot's "deliver" or "dovecot-lda". Which means whatever paths you are defining for delivery in dovecot configuration files are unknown to Postfix. You need to configure Postfix properly.
You were previously referred to http://wiki.dovecot.org/LDA/Postfix - you need to read that and follow the instructions.
Daniel
Many thanks Daniel for your comment, I'll have another look at the Postfix wiki !
On Tue, Jan 4, 2011 at 12:46 AM, Daniel L. Miller dmiller@amfes.com wrote:
On 12/30/2010 4:14 AM, Seasoul wrote:
When I send an email to user1@domain.com from a gmail account, this is the log record:
postfix/qmgr[28610]: 4E2EA70324: from=test@gmail.com, size=5119, nrcpt=1 (queue active) postfix/virtual[2947]: 4E2EA70324: to=user1@domain.com, relay=virtual, delay=0.51, delays=0.44/0.02/0/0.05, dsn=2.0.0, status=sent (delivered to maildir) postfix/qmgr[28610]: 4E2EA70324: removed postfix/smtpd[2941]: disconnect from mail-qw0-f51.google.com[*.*.*.*]
That postfix/virtual entry means you haven't changed postfix's standard configuration. Postfix's "virtual" delivery agent is being used - not dovecot's "deliver" or "dovecot-lda". Which means whatever paths you are defining for delivery in dovecot configuration files are unknown to Postfix. You need to configure Postfix properly.
You were previously referred to http://wiki.dovecot.org/LDA/Postfix - you need to read that and follow the instructions.
Daniel
On 12/29/2010 9:52 PM, Fabio Catunda wrote:
Seasoul,
Right from dovecot.conf:
The "L" if for lowercase (I think). In e-mail RFC is specified that mail should be case sensitive, but it might give you some problems where people send e-mail to foo@domain.com and FOO@domain.com, as we are working with UNIX like OS, these are different folders and different mailboxes.
This has nothing to do with dovecot anyway. Dovecot is not an SMTPD; postfix DOES accept mail to the same user for foo@domain.com and FOO@domain.com and it always gives it to dovecot as foo@domain.com
Jerrale G. SC Senior Admin
On 2010-12-29 9:40 PM, Seasoul wrote:
Hi, I am running Dovecot Version 1.0.15on a Debian server, with postfix and postfixadmin.
The very first thinmg you should do is upgrade... 1.0.15 is very old...
I'm sure there are other issues involved, but you will get much more meaningful help if you are using a recent/stable version... 2.0.8+ is getting very good, but if you are conservative, stick with the latest 1.2 (currently 1.2.16)...
--
Best regards,
Charles
Thanks Charles for the advice, it "came" with Webmin like that so didn't try to change it. But you're right, maybe installing a more recent version will help..
On Thu, Dec 30, 2010 at 8:21 PM, Charles Marcus CMarcus@media-brokers.comwrote:
On 2010-12-29 9:40 PM, Seasoul wrote:
Hi, I am running Dovecot Version 1.0.15on a Debian server, with postfix and postfixadmin.
The very first thinmg you should do is upgrade... 1.0.15 is very old...
I'm sure there are other issues involved, but you will get much more meaningful help if you are using a recent/stable version... 2.0.8+ is getting very good, but if you are conservative, stick with the latest 1.2 (currently 1.2.16)...
--
Best regards,
Charles
participants (7)
-
Charles Marcus
-
Daniel L. Miller
-
Ed W
-
Fabio Catunda
-
Jerrale G
-
Seasoul
-
Timo Sirainen