Philipp Hunold
2009-Oct-16 19:03 UTC
[Dovecot] Sendmail and Dovecot Delivery to Virtual Users
I'm new to dovecot and sendmail and my server doesn't forward mails to 'dovecot deliver' at all. I was reading http://wiki.dovecot.org/LDA/Sendmail and this http://www.dovecot.org/list/dovecot/2009-June/040353.html from the mailling list but I could figure it out myself. I someone could point me into the right direction. I'm confused with the config for LDA. Basically what I want is every message coming in go to 'deliver' except if there's no dovecot user of course. I'm using 'local_procmail' feature right now, but I tried to comile the dovecot Mailer also. Anyway the dovecot 'deliver' itself works fine. But I cannot receiving emails or messages don't go anywhere. All the debugging I do with telnet right now. first I got 'User Unknown' errors in the maillog so I thought I just missing an alias/virtuser entry. So I create one and forward those to procmail. But now the messages don't go anywhere and the status is sent and I don't seem them in the /var/log/dovecot-deliver.log either, so they are stuck in the middle somewhere. Oct 16 14:26:26 sendmail[29939]: n9GIQQAh029939: to=|/usr/bin/procmail, ctladdr=<mail.address> (8/0), delay=00:00:00, xdelay=00:00:00, mailer=prog, pri=31420, dsn=2.0.0, stat=Sent I don't seem to understand how the message get to dovecot's 'deliver' from sendmail. Some questions I have which may help to solve the problem myself: - how can I tell the LDA to lookup dovecot users too? to it would accept it? - do I need aliases therefore for each dovecot users? - What would the alias look like or is this the wrong way to do it? "test.user: |/usr/bin/procmail" ? - what's the procmail recipe which would work for maildir:/home/vmail/%u mail_location? My Sendmail configuration files: $ grep -v "^dnl" sendmail.mc divert(-1)dnl include(`/usr/share/sendmail-cf/m4/cf.m4')dnl VERSIONID(`setup for linux')dnl OSTYPE(`linux')dnl define(`confDEF_USER_ID', ``8:12'')dnl define(`confTO_CONNECT', `1m')dnl define(`confTRY_NULL_MX_LIST', `True')dnl define(`confDONT_PROBE_INTERFACES', `True')dnl define(`ALIAS_FILE', `/etc/aliases')dnl define(`STATUS_FILE', `/var/log/mail/statistics')dnl define(`UUCP_MAILER_MAX', `2000000')dnl define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl define(`confPRIVACY_FLAGS', `goaway,noetrn')dnl define(`confDOUBLE_BOUNCE_ADDRESS', `')dnl define(`confCOPY_ERRORS_TO', `')dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl define(`confTO_IDENT', `0')dnl FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db')dnl FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dnl FEATURE(always_add_domain)dnl FEATURE(use_cw_file)dnl FEATURE(use_ct_file)dnl FEATURE(`local_procmail', `/usr/libexec/dovecot/deliver', `deliver -f $g -d $u', `SPhnu9')dnl FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl FEATURE(`blacklist_recipients')dnl EXPOSED_USER(`root')dnl DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl FEATURE(`accept_unresolvable_domains')dnl LOCAL_DOMAIN(`mydomain.com')dnl MODIFY_MAILER_FLAGS(`LOCAL', `-f') MAILER(procmail)dnl # 1.2.4: /etc/dovecot.conf # OS: Linux 2.6.30.5-43.fc11.i586 i686 Fedora release 11 (Leonidas) ext4 log_path: /var/log/dovecot.log info_log_path: /var/log/dovecot-info.log protocols: imap imaps listen: localhost login_dir: /var/run/dovecot/login login_executable: /usr/libexec/dovecot/imap-login login_greeting: Ciao. mail_uid: 501 mail_gid: 502 mail_location: Maildir:/home/vmail/maildir/%n mail_debug: yes lda: postmaster_address: postmaster at mydomain.com hostname: server.mydomain.com log_path: /var/log/dovecot-deliver-errors.log info_log_path: /var/log/dovecot-deliver.log auth default: user: dovecot-login verbose: yes debug: yes passdb: driver: passwd-file args: username_format=%n /etc/dovecot/passwd userdb: driver: static args: uid=vmail gid=vmail socket: type: listen master: path: /var/run/dovecot/auth-master mode: 384 user: vmail please tell me if you need more info. any help, hints and suggestions are welcome. regards. Philipp