Frank van Amsterdam
2010-Jul-18 17:37 UTC
[Dovecot] Unable to get Dovecot LDA/deliver working
I want to setup Dovecot LDA, but I don't understand what I'm doing
anymore.
I have to note that I'm a Linux beginner. I've been trying now for
several
months and I'm about to give up. Till so far I'm having no result. :-(
My current setup is done as described at http://www.linuxmail.info. We use
Postfix 2.3.3 (with Postgrey, Spamassassin and ClamAV), Dovecot 1.2.11 and
OpenLDAP 2.4.1 on CentOS 5.5. All incoming e-mail are delivered by Postfix
in the users' maildir. We use this as a base for SOGo, our groupware
solution and it runs smoothly.
I have to setup a new mailserver, because we're standardising on Debian. My
employer wants to have new functions like out-of-office-replies and
forwarding. I want to make use of sieve. Unfortunately I don't know anyone
who can help me.
My problem is that I don't understand how the delivery process is working.
I've read much documentation from Postfix and Dovecot, but I find it too
difficult to understand.
What do I understand? I know that I have to make changes in /etc/dovecot,
/etc/postfix/main.cf and /etc/postfix/master.cf as described at
http://wiki.dovecot.org/LDA.
/etc/dovecot.conf
# OS: Linux 2.6.18-028stab064.7 i686 CentOS release 5.5 (Final) reiserfs
base_dir: /var/run/dovecot/
protocols: imap imaps pop3 pop3s managesieve
ssl: no
version_ignore: yes
login_dir: /var/run/dovecot/login
login_executable(default): /usr/local/libexec/dovecot/imap-login
login_executable(imap): /usr/local/libexec/dovecot/imap-login
login_executable(pop3): /usr/local/libexec/dovecot/pop3-login
login_executable(managesieve): /usr/libexec/dovecot/managesieve-login
mail_location: maildir:/home/vmail/%u/Maildir
mail_executable(default): /usr/local/libexec/dovecot/imap
mail_executable(imap): /usr/local/libexec/dovecot/imap
mail_executable(pop3): /usr/local/libexec/dovecot/pop3
mail_executable(managesieve): /usr/libexec/dovecot/managesieve
mail_plugin_dir(default): /usr/local/lib/dovecot/imap
mail_plugin_dir(imap): /usr/local/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3
mail_plugin_dir(managesieve): /usr/local/lib/dovecot/managesieve
imap_client_workarounds(default): delay-newmail outlook-idle netscape-eoh
imap_client_workarounds(imap): delay-newmail outlook-idle netscape-eoh
imap_client_workarounds(pop3):
imap_client_workarounds(managesieve):
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
pop3_client_workarounds(managesieve):
managesieve_logout_format(default): bytes=%i/%o
managesieve_logout_format(imap): bytes=%i/%o
managesieve_logout_format(pop3): bytes=%i/%o
managesieve_logout_format(managesieve): bytes ( in=%i : out=%o )
lda:
postmaster_address: postmaster at domain.nl
mail_plugins: cmusieve
mail_plugin_dir: /usr/lib/dovecot/lda
deliver_log_format: msgid=%m: %$ -- FROM=%f SUBJECT=%s
log_path: /var/log/dovecot-deliver.log
info_log_path: /var/log/dovecot-deliver.log
syslog_facility: mail
sendmail_path: /usr/lib/sendmail
rejection_subject: Rejected: %s
rejection_reason: Your message to <%t> was automatically rejected:%n%r
auth_socket_path: /usr/local/var/run/dovecot-auth-master
auth default:
mechanisms: plain login
username_format: %Lu
passdb:
driver: ldap
args: /etc/dovecot-ldap.conf
userdb:
driver: static
args: uid=500 gid=500 home=/home/vmail/%u
socket:
type: listen
client:
path: /var/spool/postfix/private/auth
mode: 432
user: postfix
group: postfix
master:
path: /var/run/dovecot/auth-master
mode: 384
user: vmail
group: vmail
plugin:
sieve: /var/sieve-scripts/%u.sieve
sieve_dir: %h/sieve
sieve_global_dir: /var/lib/dovecot/sieve/global/
/etc/postfix/main.cf
virtual_mailbox_domains = /etc/postfix/domains ## Plain text file with the
domains
virtual_mailbox_base = /home/vmail
virtual_mailbox_maps = ldap:/etc/postfix/ldap-users.cf
virtual_alias_maps = ldap:/etc/postfix/ldap-groups.cf
virtual_uid_maps = static:500
virtual_gid_maps = static:500
dovecot_destination_recipient_limit = 1
#virtual_transport = dovecot ## Commented out to deliver by Postfix
/etc/postfix/ldap-users.cf
server_host = localhost
search_base = dc=domain,dc=com
version = 3
query_filter = (&(objectclass=mailUser)(mail=%s))
result_attribute = uid
result_format = %s/Maildir/
/etc/postfix/ldap-groups.cf
server_host = localhost
search_base = dc=domain,dc=com
version = 3
query_filter = (&(objectclass=mailGroup)(mail=%s))
leaf_result_attribute = mail
special_result_attribute = member
/etc/postfix/master.cf
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -d
<username>
I hope someone can help me, because many people on the internet say that it
is easy. If anyone needs more information or anyone can help me, please
contact me.
Best, Frank
---
LS: I know that I'm using Hotmail, but I want to post this anonymously.
On Sun, 18 Jul 2010 19:37:01 +0200
Frank van Amsterdam <frank122595 at hotmail.com> articulated:
{snip}
Next time, post the output of:
postconf -n
dovecot -n
Please include log entries to show what your problem is.
BTW, your version of Postfix is seriously deprecated. Would it be
possible to update to the latest stable version before continuing with
this venture?
--
Jerry ?
Dovecot.user at seibercom.net
Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__________________________________________________________________
Daniel Luttermann
2010-Jul-18 18:55 UTC
[Dovecot] Unable to get Dovecot LDA/deliver working
Frank van Amsterdam wrote on 18.07.2010:> I want to setup Dovecot LDA, but I don't understand what I'm doing anymore. > I have to note that I'm a Linux beginner. I've been trying now for several > months and I'm about to give up. Till so far I'm having no result. :-(> My current setup is done as described at http://www.linuxmail.info. We use > Postfix 2.3.3 (with Postgrey, Spamassassin and ClamAV), Dovecot 1.2.11 and > OpenLDAP 2.4.1 on CentOS 5.5. All incoming e-mail are delivered by Postfix > in the users' maildir. We use this as a base for SOGo, our groupware > solution and it runs smoothly.> I have to setup a new mailserver, because we're standardising on Debian. My > employer wants to have new functions like out-of-office-replies and > forwarding. I want to make use of sieve. Unfortunately I don't know anyone > who can help me.If you would like to use Sieve you should use the Dovecot LDA instead of the Postfix LDA "virtual". You can also use the ManageSieve service so that users can create their own Sieve scripts. Some clients supports it like Horde Ingo, Thunderbird with plugin... When you use Debian (Lenny) you should use Dovecot from backports (current: 1.2.11) instead of the stable repository. The Postfix version that comes with Debian Lenny (2.5.5) is OK so it's not needed to update. I think the easiest way to implement the Dovecot LDA is to use virtual_transport or transport_maps if you use "virtual" users or within mailbox_command for system users - but this depends on your environment/configuration.> My problem is that I don't understand how the delivery process is working. > I've read much documentation from Postfix and Dovecot, but I find it too > difficult to understand.Hmm, there's not much to say about that... If you use virtual_tranport or transport_maps then Postfix sends the mail to the Dovecot LDA. The Dovecot LDA handles further delivery of the mail.> What do I understand? I know that I have to make changes in /etc/dovecot, > /etc/postfix/main.cf and /etc/postfix/master.cf as described at > http://wiki.dovecot.org/LDA.For Postfix all relevant informations are here: http://wiki.dovecot.org/LDA/Postfix -- Daniel