[Dovecot] Dovecot-lda and Postfix virtual

D F dovecot at ggl.ledeuns.net
Sun Jul 11 16:29:19 EEST 2010


Hello,

I'm currently testing Dovecot 2.0RC2 and I have a problem migrating my
current configuration.

Current configuration is :
- Dovecot as IMAP server
- Postfix as SMTP/LDA with virtual users.

main.cf is :
#-----------------------------------------------------------
#
inet_protocols = all
myhostname = mail.domain.tld
mydomain = domain.tld
myorigin = $mydomain
inet_interfaces = all
mydestination = localhost
local_transport = virtual
local_recipient_maps = hash:/etc/postfix/domain.tld
virtual_mailbox_base = /home/mail
virtual_mailbox_maps = hash:/etc/postfix/domain.tld
virtual_mailbox_domains = domain.tld
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
unknown_local_recipient_reject_code = 550
mynetworks = 127.0.0.0/8, [::1]/128
smtpd_banner = $myhostname ESMTP
mailbox_size_limit = 0
message_size_limit = 0
virtual_mailbox_limit = 0
smtpd_helo_required = yes
#
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated, reject_unauth_destination
smtpd_helo_restrictions = permit_mynetworks,
permit_sasl_authenticated, reject_unknown_helo_hostname,
reject_invalid_helo_hostname
#
debug_peer_level = 1
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/local/man
sample_directory = /etc/postfix
readme_directory = no
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
alternate_config_directories = /etc/postfix
#-----------------------------------------------------------

/etc/postfix/domain.tld looks like :
#-----------------------------------------------------------
# User
denis at domain.tld       /domain.tld/denis/
# Admin
root at domain.tld        /domain.tld/denis/.system/
dnsowner at domain.tld    /domain.tld/denis/.system/
abuse at domain.tld       /domain.tld/denis/.system/
postmaster at domain.tld  /domain.tld/denis/.system/
#-----------------------------------------------------------

Currently, I can send mails to denis at domain.tld or root at domain.tld and
they are all accepted and placed in the right IMAP folder/subfolder.

Now I'd like to use Dovecot as a LDA (I want to use Sieve).

I first add "mailbox_command = /usr/local/libexec/dovecot/dovecot-lda"
and "virtual_transport = dovecot" to postfix.conf. Then I add "dovecot
  unix  -       n       n       -       -       pipe  flags=DRhu
user=nobody:nobody argv=/usr/local/libexec/dovecot/dovecot-lda -f
${sender} -d ${recipient}" to master.cf
Here is my Dovecot config :
#-----------------------------------------------------------
listen = *, ::
protocols = imap
base_dir = /var/run/dovecot/
login_greeting = domain.tld IMAP ready.
disable_plaintext_auth = no
auth_mechanisms = plain
auth_failure_delay = 2 secs
mail_location = dbox:/home/mail/%d/%n

default_login_user = dovenull
default_internal_user = dovecot

service imap-login {
  inet_listener imap {
    port = 143
  }
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}

service auth {
  # Postfix smtp-auth
  unix_listener /var/spool/postfix/private/auth {
    mode = 0666
    user = postfix
    group = postfix
  }
  unix_listener auth-userdb {
    mode = 0666
    user = nobody
    group = nobody
  }

}

passdb {
  driver = passwd-file
  args = /usr/local/etc/dovecot/users.db
}
userdb {
  driver = passwd-file
  args = /usr/local/etc/dovecot/users.db
}

ssl = no
#-----------------------------------------------------------

/usr/local/etc/dovecot/users.db looks like :
#-----------------------------------------------------------
denis at domain.tld:password:5000:5000::/home/mail/domain.tld/denis
#-----------------------------------------------------------

If I send a mail to denis at domain.tld it works great, if I send a mail
to root at domain.tld, it tells the user is non-existent.
	
Is it possible to work the way it used to and benefit from dovecot-lda ?

I read http://wiki2.dovecot.org/LDA/Postfix but it seems none of the
case looks like mine.

Thank you in advance,
Denis


More information about the dovecot mailing list