[Dovecot] LDA postfix + deliver, problem lookup, accepting email for everyone
Hi,
I'm setting up dovecot pop3 deamon for a small set of mailbox.
I want to be able to set a small set of mailbox simply, so I've used "passdb passwd-file" + virtual mailboxes with "userdb static". My problem is that it seems that postfix accept and create mailbox for every address I post. It is configured to use local delivery through dovecot's deliver.
How do I force deliver to retrun an error if the destination is not defined in the passwd-file? The doc said that "userdb static" should do a lookup automatically. But no luke for me. Is it really a deliver problem, or a postfix configuration problem?
Any, hint?
Regards, Sylvain.
dovecot --version 1.0.rc15
# dovecot -n # /etc/dovecot/dovecot.conf base_dir: /var/run/dovecot/ log_path: /var/log/dovecot/dovecot.log info_log_path: /var/log/dovecot/dovecot-info.log log_timestamp: %Y-%m-%d %H:%M:%S protocols: pop3 ssl_disable: yes disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable: /usr/lib/dovecot/pop3-login first_valid_uid: 8 last_valid_uid: 8 first_valid_gid: 8 last_valid_gid: 8 mail_extra_groups: mail mail_location: maildir:/var/mail/%u mail_executable: /usr/lib/dovecot/pop3 mail_plugin_dir: /usr/lib/dovecot/modules/pop3 pop3_uidl_format: %08Xu%08Xv auth default: verbose: yes debug: yes passdb: driver: passwd-file args: /etc/dovecot/passwd.dovecot userdb: driver: static args: uid=mail gid=mail home=/var/mail/%u allow_all_users=no socket: type: listen client: master: path: /var/run/dovecot/auth-master mode: 432 user: mail group: mail
Also in postfix :
dovecot_destination_recipient_limit = 1 virtual_mailbox_domains = my.domain.com virtual_transport = dovecot # UID/GID mail virtual_uid_maps = static:8 virtual_gid_maps = static:8
- master.cf
pop3 deliver dovecot
dovecot unix - n n - - pipe flags=DRhu user=mail:mail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient}
On Wed, 2008-02-06 at 11:58 +0100, Sylvain Viart wrote:
Hi,
I'm setting up dovecot pop3 deamon for a small set of mailbox.
I want to be able to set a small set of mailbox simply, so I've used "passdb passwd-file" + virtual mailboxes with "userdb static". My problem is that it seems that postfix accept and create mailbox for every address I post. It is configured to use local delivery through dovecot's deliver.
How do I force deliver to retrun an error if the destination is not defined in the passwd-file? The doc said that "userdb static" should do a lookup automatically. But no luke for me. Is it really a deliver problem, or a postfix configuration problem?
You might be able to work around this by configuring Postfix, but this is anyway fixed in a newer Dovecot version. You can get newer debs from backports.org.
Timo Sirainen a écrit :
On Wed, 2008-02-06 at 11:58 +0100, Sylvain Viart wrote:
I'm setting up dovecot pop3 deamon for a small set of mailbox.
I want to be able to set a small set of mailbox simply, so I've used "passdb passwd-file" + virtual mailboxes with "userdb static". My problem is that it seems that postfix accept and create mailbox for every address I post. It is configured to use local delivery through dovecot's deliver.
How do I force deliver to retrun an error if the destination is not defined in the passwd-file? The doc said that "userdb static" should do a lookup automatically. But no luke for me. Is it really a deliver problem, or a postfix configuration problem?
You might be able to work around this by configuring Postfix, but this is anyway fixed in a newer Dovecot version. You can get newer debs from backports.org.
Ok done. form backports.org.
dovecot --version 1.0.10
Still the same behavior. What should I look at more in detail now?
Does it depend of the dovecot.conf or passwd-file content?
I've followed documentation at http://wiki.dovecot.org/HowTo/SimpleVirtualInstall + LDA http://wiki.dovecot.org/LDA/Postfix
Regards, Sylvain.
Hi,
I'm setting up dovecot pop3 deamon for a small set of mailbox.
I want to be able to set a small set of mailbox simply, so I've used "passdb passwd-file" + virtual mailboxes with "userdb static". My problem is that it seems that postfix accept and create mailbox for every address I post. It is configured to use local delivery through dovecot's deliver. .
dovecot --version 1.0.10
I've followed documentation at http://wiki.dovecot.org/HowTo/SimpleVirtualInstall + LDA http://wiki.dovecot.org/LDA/Postfix I've restarted all from scratch follow the link above, it works! I don't know exactly where is was buggy...
I've:
dovecot.conf # Remove pop3 things if you don't want them protocols = pop3
# It's nice to have separate log files for Dovecot. You could do this # by changing syslog configuration also, but this is easier. log_path = /var/log/dovecot/dovecot.log info_log_path = /var/log/dovecot/dovecot-info.log
# Disable SSL for now. ssl_disable = yes disable_plaintext_auth = no
# We're using Maildir format mail_location = maildir:~/Maildir
# If you're using POP3, you'll need this: pop3_uidl_format = %08Xu%08Xv
# Optimizations: dotlock_use_excl=yes maildir_copy_with_hardlinks=yes
# Authentication configuration: auth_verbose = yes
auth default { mechanisms = plain passdb passwd-file { args = /etc/dovecot/passwd } userdb static { args = uid=vmail gid=vmail home=/var/vmail/%u } socket listen { # Note that we're setting a master socket. SMTP AUTH for Postfix and Exim uses client sockets. master { path = /var/run/dovecot/auth-master # Auth master socket can be used to look up userdb information for # given usernames. This probably isn't very sensitive information # for most systems, but still try to restrict the socket access if possible. mode = 0600 user = vmail # User running deliver #group = mail # Or alternatively mode 0660 + deliver user in this group } } } # needed or deliver will fail with : #Feb 6 16:06:31 postfix/pipe[21394]: 50D7B130069: to=jane@elsewhere.org, relay=dovecot, delay=0.13, delays=0.08/0/0/0.04, dsn=5.3.5, status=bounced (local configuration error)
protocol lda { postmaster_address = postmaster@example.com }
part of the /etc/postfix/main.cf
dovecot_destination_recipient_limit = 1 virtual_mailbox_domains = example.com, elsewhere.org virtual_transport = dovecot # uid=1003(vmail) gid=1003(vmail) groups=1003(vmail) virtual_uid_maps = static:1003 virtual_gid_maps = static:1003
log file : /var/log/dovecot# ls -l total 8 -rw-rw---- 1 vmail vmail 317 2008-02-06 16:12 dovecot-info.log -rw-rw---- 1 vmail vmail 1 2008-02-06 16:11 dovecot.log
/var/vmail# ls -l total 8 drwx------ 3 vmail vmail 4096 2008-02-06 16:12 dave@example.com drwx------ 3 vmail vmail 4096 2008-02-06 16:10 jane@elsewhere.org
/etc/dovecot# cat passwd timo@example.com:{PLAIN}hello123 dave@example.com:{PLAIN}world234 joe@elsewhere.org:{PLAIN}whee jane@elsewhere.org:{PLAIN}mypass
a bounce :
If you do so, please include this problem report. You can delete your own text from the attached returned message.
The mail system
dave2@example.com: user unknown
Also in the log: /etc/dovecot# less /var/log/dovecot/dovecot-info.log
dovecot: Feb 06 16:11:30 Info: auth(default): passwd-file(smutrz@example.com): unknown user deliver(dave@example.com): Feb 06 16:12:05 Info: msgid=<20080206151205.8FC1D130069>: saved mail to INB OX dovecot: Feb 06 16:12:09 Info: auth(default): passwd-file(dave2@example.com): unknown user
On 2/6/2008, Sylvain Viart (sylvain.viart@easyrencontre.com) wrote:
I've:
dovecot.conf
Always use output of dovecot -n - this shows only settings changed from defaults, and minus all comments...
--
Best regards,
Charles
participants (3)
-
Charles Marcus
-
Sylvain Viart
-
Timo Sirainen