Ansicht:   

#73914 deliver von dovecot - Probleme mit gid (web.server)

verfaßt von glitzi, 31.07.2008, 22:08:48

Hallo zusammen,

ich bin seit Tagen dabei meinen ersten Mailserver aufzusetzen. Klappt bloß nicht alles wie ich mir das vorstelle, war ja auch zu erwarten.

OS ist Debian Etch 4.0, MTA ist Postfix, LDA ist dovecot, jeweils in der aktuellsten Fassung. Benutzer werden von dovecot über MySQL authentifiziert.
Das Problem besteht momentan im Übergang Postfix -> deliver.

master.cf (Auszug):


smtp      inet  n       -       n       -       -       smtpd
dovecot unix - n n - - pipe
 flags=DRhu user=vmail:nogroup argv=/opt/dovecot/libexec/dovecot/deliver -d $(recipient)~



main.cf

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
unknown_local_recipient_reject_code = 550
smtpd_banner = $myhostname ESMTP Mailserver
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = vmail
html_directory = /home/postfix/html
manpage_directory = /usr/local/man
sample_directory = /etc/postfix
readme_directory = /home/postfix/readme

myhostname = mail.example.org
mydestination = mail.example.org, localhost, localhost.localdomain
mynetworks = 127.0.0.0/8
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtp_sasl_auth_enable = no
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_use_tls = no
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
prox_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks
inet_interface = all
dovecot_destination_recipient_limit = 1
virtual_transport = dovecot
mailbox_transport = dovecot



dovecot.conf (Auszug):


base_dir = /var/run/dovecot/
mail_location = mbox:/home/vmail/%d/%u
login_user = dovecot
first_valid_uid = 5000
last_valid_uid = 5000
maildir_copy_with_hardlinks = yes
protocol lda {
  postmaster_address = postmaster@example.org
  sendmail_path = /usr/sbin/sendmail
  auth_socket_path = /var/run/dovecot/auth-master
  log_path = /var/log/dovecot-deliver.log
}
auth default {
  mechanisms = plain
  passdb sql {
    args = /opt/dovecot/etc/dovecot-sql.conf
  }
  userdb sql {
    args = /opt/dovecot/etc/dovecot-sql.conf
  }
  user = nobody
  socket listen {
    master {
      path = /var/run/dovecot/auth-master
      mode = 0660
      user = vmail
      group = vmail
    }
    client {
      path = /var/spool/postfix/private/auth
      mode = 0660
      user = postfix
      group = postfix
    }
  }
}



Den großteil der master.cf hab ich weggelassen, weil ich da nix geändert hab. In der dovecot.conf hab ich die ganze POP3 umd IMAP Geschichte weggelassen, da sie ja hier nicht relevant ist.

Es existieren die Benutzer vmail(5000), dovecot(5001) und postfix(5002), jeweils in der gleichnamigen Gruppe mit gleicher gid. Mails sollen im mbox-Format unter /home/vmail/domain/user gespeichert werden. Der Ordner /home/vmail und alle Unterordner sind gehören vmail:vmail.

Soviel zur Umgebung. Hier die Fehlermeldung aus dovecot-deliver.log

deliver(admin@example.org): \"2008-07-31 21:41:04\" Fatal: setgid(5000) failed with euid=5000, gid=65534, egid=65534: Operation not permitted



Hab den halben Tag bei google verbracht und jetzt raucht mir der Kopf  :-(

Um Tipps bittender glitzi

 

gesamter Thread:

Ansicht:   
Auf unserer Web-Seite werden Cookies eingesetzt, um diverse Funktionalitäten zu gewährleisten. Hier erfährst du alles zum Datenschutz