1

I have the problem, that dovecot doesn't deliver the E-Mails to my Inbox (roundcube).

my dovecot.conf

base_dir = /var/run/dovecot
# Ich habe nur IMAP(S) in Verwendung, für POP3 einfach noch pop3 bzw. pop3s hinzufügen
protocols = imap imaps managesieve
# IMAP Konfiguration
protocol imap {
   listen = *:143
   # Quota Einstellungen
   mail_plugins = quota imap_quota
}

# einkommentieren, falls POP3 benötigt
#protocol pop3 {
#   listen = *:110
#   # ssl_listen = *:995
#   mail_plugins = quota
#}

# managesieve Dienst zum Verwalten der Sieve-Skripte
protocol managesieve {
   listen = *:2000
   login_executable = /usr/lib/dovecot/managesieve-login
   mail_executable = /usr/lib/dovecot/managesieve
   managesieve_max_line_length = 65536
   managesieve_logout_format = bytes=%i/%o
   managesieve_implementation_string = dovecot
}
listen = *
# erzwinge AUTH mit STARTTLS
disable_plaintext_auth = yes

# logging Optionen
log_path = /var/log/dovecot.log
info_log_path = /var/log/dovecot.log
log_timestamp = "%Y-%m-%d %H:%M:%S "
syslog_facility = mail

# mailbox Einstellungen
mail_location = maildir:/var/vmail/%d/%u
#mail_location = maildir:/var/spool/mail/%u
mail_privileged_group = mail
mail_debug = no

# gültig ist nur unser vmail-Besitzer
first_valid_uid = 150
last_valid_uid = 150

maildir_copy_with_hardlinks = yes

# IMAP Optionen
protocol imap {
  login_executable = /usr/lib/dovecot/imap-login
  mail_executable = /usr/lib/dovecot/imap
  imap_max_line_length = 65536
  mail_plugin_dir = /usr/lib/dovecot/modules/imap
}

#protocol pop3 {
#  pop3_uidl_format = %08Xu%08Xv
#}

# managesieve aktivieren
protocol managesieve {
}

# deliver aktivieren
protocol lda {
  postmaster_address = postmaster@lars-dev.de
  mail_plugins = quota sieve
  mail_plugin_dir = /usr/lib/dovecot/modules/lda
  deliver_log_format = msgid=%m: %$
  sendmail_path = /usr/lib/sendmail
  auth_socket_path = /var/run/dovecot/auth-master
}

auth_verbose = no
auth_debug = no

# Authentifizierungs-Info aus Datenbank
auth default {
  mechanisms = plain login

  passdb sql {
    args = /etc/dovecot/dovecot-sql.conf
  }

  # steigert Performance mit Datenbank
  userdb prefetch {
  }

  userdb sql {
    args = /etc/dovecot/dovecot-sql.conf
  }

  user = nobody

  socket listen {
    master {
      path = /var/run/dovecot/auth-master
      mode = 0660

      user = postfix
      group = mail
    }
    client {
      path = /var/spool/postfix/private/auth
      mode = 0660
      user = postfix
      group = postfix
    }
  }
}

# Quota-Info wird in Datenbank gespeichert
dict {
  quotadict = mysql:/etc/dovecot/dovecot-dict-sql.conf
  mail_debug = yes
}

# Quota & Sieve Konfiguration
plugin {
  quota = dict:user::proxy::quotadict
  quota_rule = *:storage=500MB
  sieve=~/dovecot.sieve
  sieve_dir=~/sieve
}

# SSL/TLS Konfig
ssl = yes
ssl_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
ssl_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
ssl_cipher_list = ALL:!LOW:!SSLv2
verbose_ssl = yes

mail.log

May 23 08:17:17 evolutio postfix/smtpd[21372]: connect from mout.gmx.net[212.227.17.20]
May 23 08:17:17 evolutio postfix/smtpd[21372]: A138C6020038: client=mout.gmx.net[212.227.17.20]
May 23 08:17:17 evolutio postfix/cleanup[21376]: A138C6020038: message-id=<trinity-b504aea3-1a03-4aa1-8326-4c352fc77086-1369289842779@3capp-gmx-bs54>
May 23 08:17:17 evolutio postfix/qmgr[1130]: A138C6020038: from=<evolutio1994@gmx.de>, size=1301, nrcpt=1 (queue active)
May 23 08:17:17 evolutio postfix/smtpd[21372]: disconnect from mout.gmx.net[212.227.17.20]
May 23 08:17:17 evolutio postfix/local[21377]: A138C6020038: to=<evolutio@lars-dev.de>, relay=local, delay=0.27, delays=0.17/0.01/0/0.09, dsn=2.0.0, status=sent (delivered to mailbox)
May 23 08:17:17 evolutio postfix/qmgr[1130]: A138C6020038: removed
Evolutio
  • 207
  • 1
  • 3
  • 10
  • 1
    Your Maillocation is /var/vmail/ take a look in this directory and you should find youre mail there. If yes your delivery works and roundcube mail has some problem, if no your local delivery dosent work. – kockiren May 23 '13 at 07:11
  • Yes, there are the emails. – Evolutio May 23 '13 at 07:28
  • 1
    can you login to imap with Thunderbird and see your Mails? – kockiren May 23 '13 at 07:29
  • No I can't see any Mail in my Inbox with Thunderbird. Only the "sent" E-Mails. I found a little Problem in /var/mail. http://pastebin.com/hWMYgvny "Diagnostic-Code: X-Postfix; unknown user: "web"" – Evolutio May 23 '13 at 07:32
  • I think it is a problem in your virtual mailbox config. Can you simplify your postfix? In your postfix config there is a section with virtual alias over mysql, so it is possible that this is false. If you comment out the virtual alias maps then your postfix should send the mail to the right user. – kockiren May 23 '13 at 07:41
  • Nope, I don't get any mail. – Evolutio May 23 '13 at 07:48
  • post your current postfix config, please. – kockiren May 23 '13 at 07:50
  • Here: http://pastebin.com/pP6k76sv – Evolutio May 23 '13 at 07:53
  • try to comment out the whole virtual mailbox section – kockiren May 23 '13 at 07:57
  • Aren't work. I have commented this lines out: http://pastebin.com/E7zAE6Ca – Evolutio May 23 '13 at 08:04
  • What says your log after comment it out and restart postfix? – kockiren May 23 '13 at 08:06
  • logs: http://pastebin.com/tqJicZRi – Evolutio May 23 '13 at 08:11
  • and when you send a mail this mail is deliverd to localuser web, too? – kockiren May 23 '13 at 08:13
  • you mean from @gmail to web@lars-dev.de or from evolutio@lars-dev.de? – Evolutio May 23 '13 at 08:13
  • I get this error: "An error occurred while sending mail. The mail server responded: 5.1.1 : Recipient address rejected: User unknown in local recipient table. Please check the message recipient web@lars-dev.de and try again." – Evolutio May 23 '13 at 08:16
  • Is there a IMAP User called web or evolution? – kockiren May 23 '13 at 08:24
  • I have 4 email user's evolutio,web,test,lars @lars-dev.de and I can connect to IMAP with all the user. – Evolutio May 23 '13 at 08:25
  • 1
    You can try to set a virtual alias config. Add a file named virtual-domains an write lars-dev.de into, then make a file named virtual an set "web@lars-dev.de web" and set following lines to your postfix config: virtual_alias_domains = /etc/postfix/virtual-domains virtual_alias_maps = hash:/etc/postfix/virtual – kockiren May 23 '13 at 08:35
  • 1
    type "postconf virtual" on shell in the postfix folder and restart postfix – kockiren May 23 '13 at 08:35
  • can run the command. root@evolutio:/var/log# cd /etc/postfix root@evolutio:/etc/postfix# postconf virtual postconf: warning: virtual: unknown parameter – Evolutio May 23 '13 at 08:42

1 Answers1

1

Your config for the local delivery is wrong. Start with a simple Postfix config for delivery the local mail. There are a few Tutorials for example:

http://rimuhosting.com/support/settingupemail.jsp?mta=postfix

In your case you can start with simple Postfix config, your dovecot Config seems to be okay. You can start with this simple postfix config.

main.cf

config_directory = /etc/postfix
mailbox_transport = dovecot
virtual_alias_domains = /etc/postfix/virtual-domains
virtual_alias_maps = hash:/etc/postfix/virtual
myhostname = lars-dev.de
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
message_size_limit = 0
mailbox_size_limit = 0
virtual_mailbox_limit = 0
recipient_delimiter = +
inet_interfaces = all
smtpd_banner = postfix mailserver

smtpd_recipient_restrictions =
                                permit_mynetworks,
                                permit_sasl_authenticated,
                                reject_unauth_destination                                   

/etc/postfix/virtual-domains

lars-dev.de

/etc/postfix/virtual

web@lars-dev.de  web
userxy@lars-dev.de userxy

run postmap /etc/postfix/virtual and restart postfix, this simple config should work for you. If this works you can add some stuff for virtual user over mysql

kockiren
  • 886
  • 2
  • 14
  • 35