Tom Lobato
2007-Jun-13 21:33 UTC
[Dovecot] postfix+dovecot delivering to wrong (/var/mail/%u) place
(Dovecot 1.0.rc15)
Hello I'm tring to configure postfix+dovecot on debian etch.
In dovecot I use passdb pam and userdb passwd-file. I can connect pop3
clients and reveice mails
and connect smtp clients and send mails, but it is delivered to
/var/mail/%u instead the configured
mailboxes in /var/local/dovecot/%u.
I`ve configured postfix as say http://wiki.dovecot.org/LDA/Postfix.
/etc/postfix/main.cf:
-----------------------------------
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
myhostname = coan
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = coan.com.br
myorigin = /etc/mailname
relayhost mynetworks = 121.120.0.0/16
mailbox_size_limit = 0
inet_interfaces = all
smtpd_recipient_restrictions = reject_unauth_destination
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
-----------------------------------
belong master.cf.
Below the syslog when I send mail via smtp...
/var/log/syslog:
--------------------------------
postfix/smtpd[16656]: connect from
201-95-99-135.dsl.telesp.net.br[201.95.99.135]
postfix/smtpd[16656]: C76F948E3D7:
client=201-95-99-135.dsl.telesp.net.br[201.95.99.135]
postfix/cleanup[16660]: C76F948E3D7:
message-id=<1181769218.7844.6.camel at mobile>
postfix/qmgr[16653]: C76F948E3D7: from=<tom at coan.com.br>, size=457,
nrcpt=1 (queue active)
postfix/local[16661]: C76F948E3D7: to=<tom at coan.com.br>, relay=local,
delay=0.52, delays=0.45/0.01/0/0.07, dsn=2.0.0, status=sent (delivered
to mailbox)
postfix/qmgr[16653]: C76F948E3D7: removed
postfix/smtpd[16656]: disconnect from
201-95-99-135.dsl.telesp.net.br[201.95.99.135]
-------------------------------
If I change 'virtual_transport = dovecot' to 'local_transport =
dovecot', syslog output changes relay-local to relay=dovecot, but
bounces the mail saying 'passwd-file(tom at coan.com.br): unknown user'.
However I'm sure that the user is in the passwd-file and dovecot has
permissions to read it.
Can you give some hints about what can be happening?
Dovecot conf:
-----------------------
# /etc/dovecot/dovecot.conf
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: pop3
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable: /usr/lib/dovecot/pop3-login
mail_extra_groups: mail mailboxes
mail_location: maildir:/var/local/dovecot/%u
mail_executable: /usr/lib/dovecot/pop3
mail_plugin_dir: /usr/lib/dovecot/modules/pop3
pop3_uidl_format: %v.%u
auth default:
verbose: yes
debug: yes
debug_passwords: yes
passdb:
driver: pam
userdb:
driver: passwd-file
args: /etc/mailsystem/userdb
socket:
type: listen
client:
master:
path: /var/run/dovecot/auth-master
mode: 438
-----------------------
Thank you
Tom Lobato
Tom Lobato
2007-Jun-14 15:53 UTC
[Dovecot] postfix+dovecot delivering to wrong (/var/mail/%u) place
Solved!
after 1000 tries and errors, It works. Below the the configuration made
(beyond the exposed in first mail):
1) 'local_transport = dovecot' instead 'virtual_transport =
dovecot' in
/etc/postfix/main.cf.
2) '-d ${user}' instead '-d ${recipient}' in
/etc/postfix/master.cf.
Without this, postfix was delivering mails to /var/mail/$username (where
$username is a mbox file per user) instead /usr/local/dovecot/%user
(where %user is a dir named as mail user, onde dir per user). Also, if
using '${recipient}' instead '${user}', it was searching user at
domain in
userdb/passdb dovecot database, and not the right, only 'user'.
Tom Lobato
Tom Lobato escreveu:>
> (Dovecot 1.0.rc15)
>
> Hello I'm tring to configure postfix+dovecot on debian etch.
> In dovecot I use passdb pam and userdb passwd-file. I can connect pop3
> clients and reveice mails
> and connect smtp clients and send mails, but it is delivered to
> /var/mail/%u instead the configured
> mailboxes in /var/local/dovecot/%u.
> I`ve configured postfix as say http://wiki.dovecot.org/LDA/Postfix.
>
> /etc/postfix/main.cf:
> -----------------------------------
> smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
> biff = no
> append_dot_mydomain = no
> myhostname = coan
> alias_maps = hash:/etc/aliases
> alias_database = hash:/etc/aliases
> mydestination = coan.com.br
> myorigin = /etc/mailname
> relayhost > mynetworks = 121.120.0.0/16
> mailbox_size_limit = 0
> inet_interfaces = all
> smtpd_recipient_restrictions = reject_unauth_destination
> virtual_transport = dovecot
> dovecot_destination_recipient_limit = 1
> -----------------------------------
> belong master.cf.
>
>
> Below the syslog when I send mail via smtp...
>
> /var/log/syslog:
> --------------------------------
> postfix/smtpd[16656]: connect from
> 201-95-99-135.dsl.telesp.net.br[201.95.99.135]
> postfix/smtpd[16656]: C76F948E3D7:
> client=201-95-99-135.dsl.telesp.net.br[201.95.99.135]
> postfix/cleanup[16660]: C76F948E3D7:
> message-id=<1181769218.7844.6.camel at mobile>
> postfix/qmgr[16653]: C76F948E3D7: from=<tom at coan.com.br>,
size=457,
> nrcpt=1 (queue active)
> postfix/local[16661]: C76F948E3D7: to=<tom at coan.com.br>,
relay=local,
> delay=0.52, delays=0.45/0.01/0/0.07, dsn=2.0.0, status=sent (delivered
> to mailbox)
> postfix/qmgr[16653]: C76F948E3D7: removed
> postfix/smtpd[16656]: disconnect from
> 201-95-99-135.dsl.telesp.net.br[201.95.99.135]
> -------------------------------
>
> If I change 'virtual_transport = dovecot' to 'local_transport =
> dovecot', syslog output changes relay-local to relay=dovecot, but
> bounces the mail saying 'passwd-file(tom at coan.com.br): unknown
user'.
> However I'm sure that the user is in the passwd-file and dovecot has
> permissions to read it.
>
> Can you give some hints about what can be happening?
>
> Dovecot conf:
> -----------------------
> # /etc/dovecot/dovecot.conf
> log_timestamp: %Y-%m-%d %H:%M:%S
> protocols: pop3
> disable_plaintext_auth: no
> login_dir: /var/run/dovecot/login
> login_executable: /usr/lib/dovecot/pop3-login
> mail_extra_groups: mail mailboxes
> mail_location: maildir:/var/local/dovecot/%u
> mail_executable: /usr/lib/dovecot/pop3
> mail_plugin_dir: /usr/lib/dovecot/modules/pop3
> pop3_uidl_format: %v.%u
> auth default:
> verbose: yes
> debug: yes
> debug_passwords: yes
> passdb:
> driver: pam
> userdb:
> driver: passwd-file
> args: /etc/mailsystem/userdb
> socket:
> type: listen
> client:
> master:
> path: /var/run/dovecot/auth-master
> mode: 438
> -----------------------
>
>
> Thank you
> Tom Lobato
>