vServer postfix/dovecot problem

vServer2010

New Member
hi,

habe einen vServer mit debian Lenny und syscp.
Habe postfix und dovecot eingerichtet.
Wenn ich nun mit syscp ein neues e-mail konto erstelle wird jedoch keine maildir erstellt (unter var/customers/mail/username/).

statdessen steht in den logs:

Code:
Oct 17 15:30:10 vxxxxxxxxxxxxx deliver(www-data): mbox: Can't create root mail directory /var/www/mail: Permission denied
Oct 17 15:30:10 vxxxxxxxxxxxxxx deliver(www-data): Failed to create storage for 'www-data' with mail ''

jedoch ist soweit ich es verstehe, das schon falsch da ich die mails ja nach var/customers/mail/username/e-mailadresse haben möchte.

die configs sehen so aus:

main.cf

Code:
# Postfix programs paths settings
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
program_directory = /usr/lib/postfix
sendmail_path = /usr/sbin/sendmail

## General Postfix configuration
# should be the default domain from your provider eg. "server100.provider.tld"
mydomain = vxxxxxxxxxxxxxxx.yourvserver.net

# should be different from $mydomain eg. "mail.$mydomain"
myhostname = vxxxxxxxxxxxxxxx.yourvserver.net

mydestination = $myhostname,
	$mydomain,
	127.0.0.1.$myhostname,
	127.0.0.1.$mydomain,
	127.0.0.1
mynetworks = 127.0.0.0/8
inet_interfaces = all
append_dot_mydomain = no
biff = no

# Postfix performance settings
default_destination_concurrency_limit = 20
local_destination_concurrency_limit = 2

# SMTPD Settings
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_helo_required = yes
smtpd_recipient_restrictions = permit_mynetworks,
	permit_sasl_authenticated,
	reject_unauth_destination,
	reject_unauth_pipelining,
	reject_non_fqdn_recipient
smtpd_sender_restrictions = permit_mynetworks,
	permit_sasl_authenticated, 
	reject_unknown_hostname, 
	reject_unknown_recipient_domain, 
	reject_unknown_sender_domain
smtpd_client_restrictions = permit_mynetworks,
	permit_sasl_authenticated,
	reject_unknown_client
# Maximum size of Message in bytes (50MB)
message_size_limit = 40000000

## SASL Auth Settings
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
## Dovecot Settings for deliver, SASL Auth and virtual transport
## uncomment those line to use Dovecot
mailbox_command = /usr/lib/dovecot/deliver
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1

# Virtual delivery settings
virtual_mailbox_base = /var/customers/mail/
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf
virtual_uid_maps = static:2000
virtual_gid_maps = static:2000

# Local delivery settings
local_transport = local
alias_database = hash:/etc/aliases
alias_maps = $alias_database

# Default Mailbox size, is set to 0 which means unlimited!
mailbox_size_limit = 0

### TLS settings
###
## TLS for outgoing mails from the server to another server
#smtp_use_tls = yes
#smtp_tls_note_starttls_offer = yes
## TLS for email client
#smtpd_tls_cert_file = /etc/ssl/server/vxxxxxxxxxxxxx.pem
#smtpd_tls_key_file = /etc/ssl/server/vxxxxxxxxxxxxxx.pem
#smtpd_tls_CAfile = /etc/ssl/cacert.class3.crt  # Just an example for CACert.org
#smtpd_tls_auth_only = no
#smtpd_tls_loglevel = 1
#smtpd_tls_received_header = yes
#smtpd_tls_session_cache_timeout = 3600s
#tls_random_source = dev:/dev/urandom

debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         ddd $daemon_directory/$process_name $process_id & sleep 5

und die dovecot.conf:

Code:
base_dir = /var/run/dovecot
protocols = imap pop3 imaps pop3s
listen = *
mail_access_groups = vmail
mail_debug = no
## Uncomment this line to allow Plaintext Logins from foreign IP if the Connection doesn't use TLS
disable_plaintext_auth = no

### SSL Settings
### After setting this options, set disable_plaintext_auth to yes (see above)
### and add imaps pop3s to the protocols
#ssl_cert_file = /etc/ssl/server/vxxxxxxxxxxxxxxxxxxxxx.pem
#ssl_key_file = /etc/ssl/server/vxxxxxxxxxxxxxxxxxxxxxx.key
## This is an example with CACerts class3 cert!
#ssl_ca_file = /path/to/cacert.class3.crt
#ssl_cipher_list = ALL:!LOW:!SSLv2

protocol imap {
	mail_plugins = quota imap_quota
}

protocol pop3 {
    # Uncomment this line if you are migrating from Courier also see Migration from Courier
    pop3_uidl_format = UID%u-%v
    mail_plugins = quota
    
}
protocol lda {
	# postmaster is the one in charge of the mail system. MUST be set to a vailid address!
    postmaster_address = <postmaster_address>
    auth_socket_path = /var/run/dovecot/auth-master
    mail_plugins = quota
    sendmail_path = /usr/sbin/sendmail
}

auth default {
    mechanisms = plain login
    passdb sql {
        args = /etc/dovecot/dovecot-sql.conf
    }
    
    userdb prefetch {
    }
    
    userdb sql {
        args = /etc/dovecot/dovecot-sql.conf
    }
    
    user = vmail
    socket listen {
    	# Postfix uses the client socket for SMTP Auth
        client {
            # Assuming the default Postfix $queue_directory setting
            path = /var/spool/postfix/private/auth
            mode = 0660
            # Assuming the default Postfix user and group
            user = postfix
            group = postfix
        }
        # Note that we're setting a master socket. SMTP AUTH for Postfix and Exim uses client sockets.
        master {
			path = /var/run/dovecot/auth-master
			mode = 0660
			user = vmail
			group = vmail
    }
        
    }
}
plugin {
	quota = maildir
}

falls ihr sonst noch infos braucht ich gebe sie euch gerne.
 
an sich würde ich dass machen allerdings existiert das verzeichniss nicht da es dort auch ertsgarnich hin soll

habs mal gemacht mail.err sieht so aus:
Code:
Oct 17 16:52:28 v220100453823001 deliver(www-data): open(/var/www/mail/inbox, O_CREAT) failed: Permission denied
Oct 17 16:52:28 v220100453823001 deliver(www-data): mkdir_parents(/var/www/mail/.imap/INBOX) failed: Permission denied
Oct 17 16:52:28 v220100453823001 deliver(www-data): open(/var/www/mail/.imap//maildirsize) failed: Permission denied

desshalb da soll es nich hin

wollte postfix gerate neu installieren allerdings gibt es diesen error aus:

Paket libsasl2 hat keinen Installationskandidaten
 
Last edited by a moderator:
Paket libsasl2 hat keinen Installationskandidaten

Das Paket heisst schon lange libsasl2-2 .

Dein Auth läuft gegen mySQL. Was steht in /etc/dovecot/dovecot-sql.conf und gibt es die Benutzer und warum nutzen vermutlich alle deiner Benutzer das Verzeichnis /var/www/mail ?

Zudem kommt fehlen vermutlich irgendwo bei /var/www/mail der Group vmail die entsprechenden Rechte.
 
in der dovecot-sql.conf steht das:

Code:
driver = mysql
connect = host=127.0.0.1 dbname=syscp user=syscp password=xxxxxxxxxx
default_pass_scheme = CRYPT
password_query = "SELECT username AS user, password_enc AS password, homedir AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', maildir) AS userdb_mail, CONCAT('maildir:storage=', (quota*1024)) as quota FROM mail_users WHERE username = '%u' OR email = '%u'"
user_query = "SELECT homedir AS home, CONCAT('maildir:', maildir) AS mail, uid, gid, CONCAT('maildir:storage=', (quota*1024)) as quota FROM mail_users WHERE username = '%u' OR email = '%u'"

dies user vamil und die gruppe sind erstellt aber mist hab tatsächlich vergessen das mysql pw zu ändern

bleibt jedoch das problem das er ins verzeichniss var/www/mail will das jedoch nicht existiert habe alle confs durchgesehen und nirgendwo wird auf dieses verzeichniss verwiesen meine kunden kommen alle in var/customers/mail also irgendwo is ein fehler

Nun scheint jedoch eine datei für dovecot zu fehlen. Kann man die sich irgendwo downloaden?
Code:
Oct 18 07:30:42 v220100453823001 deliver(support@viking-war.de): Can't connect to auth server at /var/run/dovecot/auth-master: No such file or directory
es fehlt nur die auth-master auth-worker existiert
 
Last edited by a moderator:
Back
Top