Juan Asensio Sánchez
2008-May-02 12:55 UTC
[Dovecot] Fatal: Running as root isn't permitted
Hi
I am running Dovecot 1.1RC4, built from the source packages at the
debian repositories (http://xi.rename-it.nl/debian/). When a message
is delivered through the LDA, i get this error:
deliver(******@*****): May 02 14:43:28 Fatal: Running as root isn't
permitted
These are my config files:
master.cf:
======================================# Dovecot
dovecot unix - n n - - pipe
flags=DRhu user=dovecot:mail argv=/usr/lib/dovecot/deliver -d $recipient
======================================
dovecot.conf
======================================protocols = imap pop3
listen = 0.0.0.0
login_greeting = Servidor de correo para preparado.
disable_plaintext_auth = no
log_path = /var/log/dovecot.log
info_log_path = /var/log/dovecot-info.log
mail_uid = mailuser
mail_gid = mailgroup
# IMAP configuration
protocol imap {
mail_plugins = quota imap_quota
}
# POP3 configuration
protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
mail_plugins = quota
}
# LDA configuration
protocol lda {
log_path = /var/log/dovecot-lda.log
postmaster_address = postmaster
auth_socket_path = /var/run/dovecot/auth-master
mail_plugins = quota cmusieve
global_script_path = /home/vmail/globalsievesrc
}
# LDAP authentication
auth default {
mechanisms = plain login
passdb ldap {
args = /etc/dovecot/dovecot-ldap.conf
}
userdb ldap {
args = /etc/dovecot/dovecot-ldap.conf
}
socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0660
user = dovecot
group = mail
}
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
}
======================================
dovecot-ldap.conf
======================================hosts = 127.0.0.1
auth_bind = yes
ldap_version = 3
base = dc=*******,dc=local
scope = subtree
user_attrs =
=home=/var/vmail/%d/%n,mailuserquota=quota=maildir:storage,=mail=maildir:/var/vmail/%d/%n/Maildir
user_filter = (&(objectClass=mailAccount)(mail=%u)(mailenable=OK))
pass_attrs = mail=user,userPassword=password
pass_filter = (&(objectClass=mailAccount)(mail=%u)(mailenable=OK))
default_pass_scheme = CRYPT
======================================
The folder /var/vmail has these permissions:
pdc-server:~# ls -la /var/vmail/
total 16
drwxrwx--- 3 mailuser mailgroup 4096 2008-05-02 14:34 .
drwxr-xr-x 16 root root 4096 2008-05-02 14:14 ..
Any idea? Thanks in advance.
Juan Asensio Sánchez
2008-May-03 21:13 UTC
[Dovecot] Fatal: Running as root isn't permitted
Well I solved it. Altough "mail_uid = mailuser" is defined in dovecot.conf, i must also return an "uid" from the ldap query. Changing: user_attrs = =home=/var/vmail/%d/%n,mailuserquota=quota=maildir:storage,=mail=maildir:/var/vmail/%d/%n/Maildir To: user_attrs = =home=/var/vmail/%d/%n,=uid=mailuser,mailuserquota=quota=maildir:storage,=mail=maildir:/var/vmail/%d/%n/Maildir u solved the problem. Hope this could be helpful for someone. 2008/5/2 Juan Asensio S?nchez <okelet at gmail.com>:> Hi > > I am running Dovecot 1.1RC4, built from the source packages at the > debian repositories (http://xi.rename-it.nl/debian/). When a message > is delivered through the LDA, i get this error: > > deliver(******@*****): May 02 14:43:28 Fatal: Running as root isn't permitted > > These are my config files: > > master.cf: > > ======================================> # Dovecot > dovecot unix - n n - - pipe > flags=DRhu user=dovecot:mail argv=/usr/lib/dovecot/deliver -d $recipient > ======================================> > dovecot.conf > > ======================================> protocols = imap pop3 > listen = 0.0.0.0 > login_greeting = Servidor de correo para preparado. > disable_plaintext_auth = no > log_path = /var/log/dovecot.log > info_log_path = /var/log/dovecot-info.log > mail_uid = mailuser > mail_gid = mailgroup > > # IMAP configuration > protocol imap { > mail_plugins = quota imap_quota > } > > # POP3 configuration > protocol pop3 { > pop3_uidl_format = %08Xu%08Xv > mail_plugins = quota > } > > # LDA configuration > protocol lda { > log_path = /var/log/dovecot-lda.log > postmaster_address = postmaster > auth_socket_path = /var/run/dovecot/auth-master > mail_plugins = quota cmusieve > global_script_path = /home/vmail/globalsievesrc > } > > > # LDAP authentication > > auth default { > > mechanisms = plain login > > passdb ldap { > args = /etc/dovecot/dovecot-ldap.conf > } > > userdb ldap { > args = /etc/dovecot/dovecot-ldap.conf > } > socket listen { > master { > path = /var/run/dovecot/auth-master > mode = 0660 > user = dovecot > group = mail > } > > client { > path = /var/spool/postfix/private/auth > mode = 0660 > user = postfix > group = postfix > } > } > } > ======================================> > dovecot-ldap.conf > > ======================================> hosts = 127.0.0.1 > auth_bind = yes > ldap_version = 3 > base = dc=*******,dc=local > scope = subtree > user_attrs = =home=/var/vmail/%d/%n,mailuserquota=quota=maildir:storage,=mail=maildir:/var/vmail/%d/%n/Maildir > user_filter = (&(objectClass=mailAccount)(mail=%u)(mailenable=OK)) > pass_attrs = mail=user,userPassword=password > pass_filter = (&(objectClass=mailAccount)(mail=%u)(mailenable=OK)) > default_pass_scheme = CRYPT > ======================================> > The folder /var/vmail has these permissions: > > pdc-server:~# ls -la /var/vmail/ > total 16 > drwxrwx--- 3 mailuser mailgroup 4096 2008-05-02 14:34 . > drwxr-xr-x 16 root root 4096 2008-05-02 14:14 .. > > Any idea? Thanks in advance. >
Juan Asensio Sánchez
2008-May-04 14:43 UTC
[Dovecot] Fatal: Running as root isn't permitted
Hi! It compiles perfect now and works fine without returning the uid in the ldap query. What about the inclusion of the antispam and autocreate plugins in the (source) debian package? Thank you very much. 2008/5/4 Timo Sirainen <tss at iki.fi>:> On Sun, 2008-05-04 at 15:19 +0200, Juan Asensio S?nchez wrote:> > mech-gssapi.o: In function `gssapi_krb5_userok': > > /root/tmp/dovecot-1.1.rc4/src/auth/mech-gssapi.c:325: undefined > > reference to `krb5_get_error_message' > > This fixes it: http://hg.dovecot.org/dovecot-1.1/rev/ad0f32abda6d > >