Antoine Souques
2011-Mar-14 12:33 UTC
[Dovecot] LDA, postfix and multiple virtual users : postfix is still the MDA
Hi,
I have some trouble to use dovecot as MDA. I followed the instructions
in http://wiki.dovecot.org/LDA and http://wiki.dovecot.org/LDA/Postfix
I have multiple virtual users, stored in a LDAP server, and it look like
postfix is still delivering the mails directly to the maildirs.
Dovecot version : 1.2.15 (using the 1:1.2.15-4 squeeze packets)
postfix version : 2.7.1 (using the 2.7.1-1 squeeze packet)
dovecot configuration (dovecot -n):
# OS: Linux 2.6.32-5-amd64 x86_64 Debian 6.0 ext3
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap imaps pop3 pop3s
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
login_process_per_connection: no
login_processes_count: 4
login_max_processes_count: 512
login_max_connections: 1024
mail_privileged_group: mail
mail_location: maildir:/var/mail/%u
mail_debug: yes
mbox_write_locks: fcntl dotlock
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
imap_capability(default): IMAP4rev1 SASL-IR SORT THREAD=REFERENCES
MULTIAPPEND UNSELECT LITERAL+ CHILDREN NAMESPACE LOGIN-REFERRAL
imap_capability(imap): IMAP4rev1 SASL-IR SORT THREAD=REFERENCES
MULTIAPPEND UNSELECT LITERAL+ CHILDREN NAMESPACE LOGIN-REFERRAL
imap_capability(pop3):
lda:
postmaster_address: postmaster at test.ecp.fr
hostname: squeeze.test.ecp.fr
sendmail_path: /usr/lib/sendmail
auth_socket_path: /var/run/dovecot/auth-master
auth default:
passdb:
driver: pam
args: dovecot
userdb:
driver: passwd
socket:
type: listen
master:
path: /var/run/dovecot/auth-master
mode: 384
user: mail
postfix configuration (postconf -n)
append_dot_mydomain = no
biff = no
bounce_queue_lifetime = 1d
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
mail_spool_directory = /var/mail/
message_size_limit = 10240000
myhostname = squeeze.test.ecp.fr
mynetworks = 138.195.32.0/23, 127.0.0.1
recipient_delimiter = +
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_client_restrictions = permit_mynetworks, reject
smtpd_helo_required = yes
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
smtpd_sender_restrictions = reject_unknown_sender_domain, permit
virtual_alias_maps = ldap:ldapxforward,ldap:ldapforward,ldap:ldapvalias
virtual_mailbox_domains = test.ecp.fr
virtual_mailbox_maps = ldap:ldapcanonical
virtual_transport = dovecot
/etc/postfix/master.cf
dovecot unix - n n - - pipe
flags=DRhu user=mail:mail argv=/usr/lib/dovecot/deliver -d ${recipient}
Sample from the logs
Mar 14 13:22:59 squeeze postfix/pickup[17376]: A93DE49A55: uid=0
from=<root>
Mar 14 13:22:59 squeeze postfix/cleanup[17543]: A93DE49A55:
message-id=<20110314122259.A93DE49A55 at squeeze.test.ecp.fr>
Mar 14 13:22:59 squeeze postfix/qmgr[16038]: A93DE49A55:
from=<root at squeeze.test.ecp.fr>, size=381, nrcpt=1 (queue active)
Mar 14 13:22:59 squeeze postfix/local[17547]: A93DE49A55:
to=<etutest at squeeze.test.ecp.fr>, orig_to=<etudiant.test at
test.ecp.fr>,
relay=local, delay=0.07, delays=0.04/0.01/0/0.02, dsn=2.0.0, status=sent
(delivered to maildir)
Mar 14 13:22:59 squeeze postfix/qmgr[16038]: A93DE49A55: removed
During the mail delivery, I doesn't have any log from dovecot, and i
didn't have set the bit_suid/sudo, so the deliver process can't deliver
the mail to the maildir.
Have someone any idea about what i did wrong ?
--
Antoine SOouques
Tom Hendrikx
2011-Mar-14 13:08 UTC
[Dovecot] LDA, postfix and multiple virtual users : postfix is still the MDA
On 14/03/11 13:33, Antoine Souques wrote:> Hi, > > I have some trouble to use dovecot as MDA. I followed the instructions > in http://wiki.dovecot.org/LDA and http://wiki.dovecot.org/LDA/Postfix > > I have multiple virtual users, stored in a LDAP server, and it look like > postfix is still delivering the mails directly to the maildirs. > > Dovecot version : 1.2.15 (using the 1:1.2.15-4 squeeze packets) > postfix version : 2.7.1 (using the 2.7.1-1 squeeze packet) > > dovecot configuration (dovecot -n): > # OS: Linux 2.6.32-5-amd64 x86_64 Debian 6.0 ext3 > log_timestamp: %Y-%m-%d %H:%M:%S > protocols: imap imaps pop3 pop3s > disable_plaintext_auth: no > login_dir: /var/run/dovecot/login > login_executable(default): /usr/lib/dovecot/imap-login > login_executable(imap): /usr/lib/dovecot/imap-login > login_executable(pop3): /usr/lib/dovecot/pop3-login > login_process_per_connection: no > login_processes_count: 4 > login_max_processes_count: 512 > login_max_connections: 1024 > mail_privileged_group: mail > mail_location: maildir:/var/mail/%u > mail_debug: yes > mbox_write_locks: fcntl dotlock > mail_executable(default): /usr/lib/dovecot/imap > mail_executable(imap): /usr/lib/dovecot/imap > mail_executable(pop3): /usr/lib/dovecot/pop3 > mail_plugin_dir(default): /usr/lib/dovecot/modules/imap > mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap > mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3 > imap_capability(default): IMAP4rev1 SASL-IR SORT THREAD=REFERENCES > MULTIAPPEND UNSELECT LITERAL+ CHILDREN NAMESPACE LOGIN-REFERRAL > imap_capability(imap): IMAP4rev1 SASL-IR SORT THREAD=REFERENCES > MULTIAPPEND UNSELECT LITERAL+ CHILDREN NAMESPACE LOGIN-REFERRAL > imap_capability(pop3): > lda: > postmaster_address: postmaster at test.ecp.fr > hostname: squeeze.test.ecp.fr > sendmail_path: /usr/lib/sendmail > auth_socket_path: /var/run/dovecot/auth-master > auth default: > passdb: > driver: pam > args: dovecot > userdb: > driver: passwd > socket: > type: listen > master: > path: /var/run/dovecot/auth-master > mode: 384 > user: mail > > postfix configuration (postconf -n) > > append_dot_mydomain = no > biff = no > bounce_queue_lifetime = 1d > command_directory = /usr/sbin > config_directory = /etc/postfix > daemon_directory = /usr/lib/postfix > mail_spool_directory = /var/mail/ > message_size_limit = 10240000 > myhostname = squeeze.test.ecp.fr > mynetworks = 138.195.32.0/23, 127.0.0.1 > recipient_delimiter = + > setgid_group = postdrop > smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) > smtpd_client_restrictions = permit_mynetworks, reject > smtpd_helo_required = yes > smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination > smtpd_sender_restrictions = reject_unknown_sender_domain, permit > virtual_alias_maps = ldap:ldapxforward,ldap:ldapforward,ldap:ldapvalias > virtual_mailbox_domains = test.ecp.fr > virtual_mailbox_maps = ldap:ldapcanonical > virtual_transport = dovecot > > /etc/postfix/master.cf > > dovecot unix - n n - - pipe > flags=DRhu user=mail:mail argv=/usr/lib/dovecot/deliver -d ${recipient} > > > Sample from the logs > > Mar 14 13:22:59 squeeze postfix/pickup[17376]: A93DE49A55: uid=0 > from=<root> > Mar 14 13:22:59 squeeze postfix/cleanup[17543]: A93DE49A55: > message-id=<20110314122259.A93DE49A55 at squeeze.test.ecp.fr> > Mar 14 13:22:59 squeeze postfix/qmgr[16038]: A93DE49A55: > from=<root at squeeze.test.ecp.fr>, size=381, nrcpt=1 (queue active) > Mar 14 13:22:59 squeeze postfix/local[17547]: A93DE49A55: > to=<etutest at squeeze.test.ecp.fr>, orig_to=<etudiant.test at test.ecp.fr>, > relay=local, delay=0.07, delays=0.04/0.01/0/0.02, dsn=2.0.0, status=sent > (delivered to maildir) > Mar 14 13:22:59 squeeze postfix/qmgr[16038]: A93DE49A55: removed > > > > During the mail delivery, I doesn't have any log from dovecot, and i > didn't have set the bit_suid/sudo, so the deliver process can't deliver > the mail to the maildir. > > Have someone any idea about what i did wrong ? >Mar 14 13:22:59 squeeze postfix/local[17547]: A93DE49A55: to=<etutest at squeeze.test.ecp.fr>, orig_to=<etudiant.test at test.ecp.fr>, relay=local, delay=0.07, delays=0.04/0.01/0/0.02, dsn=2.0.0, status=sent (delivered to maildir) Your postfix rewites the recipient domain to "squeeze.test.ecp.fr", which is no virtual domain (it is $myhostname). You enabled dovecot only for virtual domains. You probably don't want to rewrite the domain. Note that this is a postfix config issue, not a dovecot issue. -- Regards, Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 262 bytes Desc: OpenPGP digital signature URL: <http://dovecot.org/pipermail/dovecot/attachments/20110314/c1e7b60f/attachment-0002.bin>
Charles Marcus
2011-Mar-14 13:13 UTC
[Dovecot] LDA, postfix and multiple virtual users : postfix is still the MDA
On 2011-03-14 8:33 AM, Antoine Souques wrote:> Mar 14 13:22:59 squeeze postfix/pickup[17376]: A93DE49A55: uid=0 > from=<root>Never test things by injecting an email directly from root like this... Use an smtp client and try again... -- Best regards, Charles
Jerry
2011-Mar-14 15:34 UTC
[Dovecot] LDA, postfix and multiple virtual users : postfix is still the MDA
On Mon, 14 Mar 2011 14:08:06 +0100 Tom Hendrikx <tom at whyscream.net> articulated:> Your postfix rewites the recipient domain to "squeeze.test.ecp.fr", > which is no virtual domain (it is $myhostname). You enabled dovecot > only for virtual domains. You probably don't want to rewrite the > domain. > > Note that this is a postfix config issue, not a dovecot issue.Please review: <http://www.postfix.com/VIRTUAL_README.html>. You have your configuration all wrong. Also, posting on the Postfix forum would probably prove more advantageous. Be sure to review <http://www.postfix.com/DEBUG_README.html>, specifically: Reporting problems to postfix-users at postfix.org Output from "postconf -n". Please do not send your main.cf file, or 500+ lines of postconf output. Better, provide output from the postfinger tool. This can be found at http://ftp.wl0.org/SOURCES/postfinger. If the problem is SASL related, consider including the output from the saslfinger tool. This can be found at http://postfix.state-of-mind.de/patrick.koetter/saslfinger/. -- 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. __________________________________________________________________
Charles Marcus
2011-Mar-14 16:12 UTC
[Dovecot] LDA, postfix and multiple virtual users : postfix is still the MDA
On 2011-03-14 8:33 AM, Antoine Souques wrote:> I have some trouble to use dovecot as MDA. I followed the instructions > in http://wiki.dovecot.org/LDA and http://wiki.dovecot.org/LDA/Postfix > > I have multiple virtual users, stored in a LDAP server, and it look like > postfix is still delivering the mails directly to the maildirs.Wrong testing method invalidates your assumption. See below.> mynetworks = 138.195.32.0/23, 127.0.0.1Really? you own all IP addresses in 138.195.32.0?> smtpd_client_restrictions = permit_mynetworks, rejectThis means that you will reject ALL mail from *anywhere* other than clients in mynetworks... Is this machine intended to receive email from the internet? If so, fix this.> Mar 14 13:22:59 squeeze postfix/pickup[17376]: A93DE49A55: uid=0 > from=<root>postfix/pickup means this message was injected LOCALLY rather than submitted via the smtp protocol. YOu need to test using the smtp protocol.> Have someone any idea about what i did wrong ?Rtfm? -- Best regards, Charles