Every time a user logs into Dovcot's IMAP service PAM closes the session
immediately after it opens. I would like a user to have a session open long
enough to read some emails.
dictator at drakeclasher:~$ sudo dovecot -n
# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.14-0.bpo.1-amd64 x86_64 Debian 7.8
mail_location = maildir:~/Maildir
namespace inbox {
inbox = yes
location =
mailbox Drafts {
special_use = \Drafts
}
mailbox Junk {
special_use = \Junk
}
mailbox Sent {
special_use = \Sent
}
mailbox "Sent Messages" {
special_use = \Sent
}
mailbox Trash {
special_use = \Trash
}
prefix =
}
passdb {
driver = pam
}
passdb {
args = failure_show_msg=yes %s
driver = pam
}
plugin {
sieve = ~/.dovecot.sieve
sieve_dir = ~/sieve
}
protocols = " imap lmtp"
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
userdb {
driver = passwd
}
userdb {
args = mail
driver = pam
}
Apr 6 21:57:29 drakeclasher su[2346]: pam_unix(su:session): session
opened for user mailtest by dictator(uid=0)
Apr 6 21:59:55 drakeclasher su[2346]: pam_unix(su:session): session
closed for user mailtest
dictator at drakeclasher:~$ groups mailtest
mailtest : Domain Users mail users
On 07/04/2015 05:59, John Lewis wrote:> Every time a user logs into Dovcot's IMAP service PAM closes the session immediately after it opens. I would like a user to have a session open long enough to read some emails.I don't know if it is still the case for no super user login to imap servers ?> Apr 6 21:57:29 drakeclasher su[2346]: pam_unix(su:session): session > opened for user mailtest by dictator(uid=0)But according to this old thread it would seem that dovecot is hard coded to not allow login as root (uid=0) to the imap server. http://www.dovecot.org/list/dovecot/2011-September/078467.html Can't say for the current version, as the wiki2 doesn't currently have the config files <shrug>. I would be suprised if it had changed though... The doc page : http://wiki.dovecot.org/MainConfig Search for : first_valid_uid -- Tel: + 33 6 50 14 39 34 email: david.myers.24j74 at gmail.com Addres: 22 Rue de L'Eglise 77700 Coupvray. 77700 France
dictator at drakeclasher:~$ sudo dovecot
-n [9/39]
# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.14-0.bpo.1-amd64 x86_64 Debian 7.8
first_valid_gid = 0
mail_location = maildir:~/Maildir
namespace inbox {
inbox = yes
location mailbox Drafts {
special_use = \Drafts
}
mailbox Junk {
special_use = \Junk
}
mailbox Sent {
special_use = \Sent
}
mailbox "Sent Messages" {
special_use = \Sent
}
mailbox Trash {
special_use = \Trash
}
prefix }
passdb {
driver = pam
}
passdb {
args = failure_show_msg=yes %s
driver = pam
}
plugin {
sieve = ~/.dovecot.sieve
sieve_dir = ~/sieve
}
protocols = " imap lmtp"
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
userdb {
driver = passwd
}
userdb {
driver = passwd
}
The wiki was confusing. I managed to create a valid configuration that
works for my environment.
On 04/06/2015 11:59 PM, John Lewis wrote:> Every time a user logs into Dovcot's IMAP service PAM closes the
session immediately after it opens. I would like a user to have a session open
long enough to read some emails.
>
> dictator at drakeclasher:~$ sudo dovecot -n
> # 2.1.7: /etc/dovecot/dovecot.conf
> # OS: Linux 3.14-0.bpo.1-amd64 x86_64 Debian 7.8
> mail_location = maildir:~/Maildir
> namespace inbox {
> inbox = yes
> location =
> mailbox Drafts {
> special_use = \Drafts
> }
> mailbox Junk {
> special_use = \Junk
> }
> mailbox Sent {
> special_use = \Sent
> }
> mailbox "Sent Messages" {
> special_use = \Sent
> }
> mailbox Trash {
> special_use = \Trash
> }
> prefix =
> }
> passdb {
> driver = pam
> }
> passdb {
> args = failure_show_msg=yes %s
> driver = pam
> }
> plugin {
> sieve = ~/.dovecot.sieve
> sieve_dir = ~/sieve
> }
> protocols = " imap lmtp"
> ssl_cert = </etc/dovecot/dovecot.pem
> ssl_key = </etc/dovecot/private/dovecot.pem
> userdb {
> driver = passwd
> }
> userdb {
> args = mail
> driver = pam
> }
>
> Apr 6 21:57:29 drakeclasher su[2346]: pam_unix(su:session): session
> opened for user mailtest by dictator(uid=0)
> Apr 6 21:59:55 drakeclasher su[2346]: pam_unix(su:session): session
> closed for user mailtest
>
> dictator at drakeclasher:~$ groups mailtest
> mailtest : Domain Users mail users
>
>
>