[Dovecot] LMTP Setup/Design Help Request
Hi again, Thank you for your first hints. I have now set up a dedicated test instance of postfix and dovecot to be able to recreate the problems in detail. Even after using your inputs, they do not seem to work with my setup I already mentioned above. I get errors like postfix/lmtp[10994]: C2DF4C000DF: to=us...@mydomain.org, relay=mail.mydomain.org[private/dovecot-lmtp], delay=0.1, delays=0.05/0/0/0.04, dsn=5.1.1, status=bounced (host mail.mydomain.org[private/dovecot-lmtp] said: 550 5.1.1 us...@mydomain.org User doesn't exist: us...@mydomain.org (in reply to RCPT TO command)) As stated before, my setup is as follows: I only have virtual users and have set mail_uid = dovemail mail_gid = dovemail For authentication, I simply use (for now) a flat file: passdb { driver = passwd-file args = scheme=PLAIN username_format=%u /etc/dovecot/mypasswd.file } # cat /etc/dovecot/mypasswd.file user1:{PLAIN}userpw1 user2:{PLAIN}userpw2 user3:{PLAIN}userpw3 And everything works fine with IMAP. I am completely domain-agnostic here. I do not know how to strip the domain when the username is handed over from postfix to dovecot, and what would be the sane solution. I hope, you can give me a hint to that. Thank you, again, and greetings, Matthias Hofer
Re: [Dovecot] LMTP Setup/Design Help Request
Matthias Hofer schrieb: postfix/lmtp[10994]: C2DF4C000DF: to=us...@mydomain.org, relay=mail.mydomain.org[private/dovecot-lmtp], delay=0.1, delays=0.05/0/0/0.04, dsn=5.1.1, status=bounced (host mail.mydomain.org[private/dovecot-lmtp] said: 550 5.1.1 us...@mydomain.org User doesn't exist: us...@mydomain.org (in reply to RCPT TO command)) # cat /etc/dovecot/mypasswd.file user1:{PLAIN}userpw1 user2:{PLAIN}userpw2 user3:{PLAIN}userpw3 You have to use full usernames like: us...@mydomain.org us...@mydomain.org us...@mydomain.org user1 != us...@mydomain.org Patrick
Re: [Dovecot] LMTP Setup/Design Help Request
[...] postfix/lmtp[10994]: C2DF4C000DF: to=us...@mydomain.org, relay=mail.mydomain.org[private/dovecot-lmtp], delay=0.1, delays=0.05/0/0/0.04, dsn=5.1.1, status=bounced (host mail.mydomain.org[private/dovecot-lmtp] said: 550 5.1.1 us...@mydomain.org User doesn't exist: us...@mydomain.org (in reply to RCPT TO command)) # cat /etc/dovecot/mypasswd.file user1:{PLAIN}userpw1 user2:{PLAIN}userpw2 user3:{PLAIN}userpw3 You have to use full usernames like: us...@mydomain.org us...@mydomain.org us...@mydomain.org user1 != us...@mydomain.org I understand that technical issue, but what I wanted was a possible solution based on plain usernames. This is because I want to make the transition from dbmail to dovecot completely transparent to users and clients, and dbmail just uses plain login names, indepentend of what e-Mail alias would then in dbmail be mapped to which login name. The plain solution above now works completely transparent for IMAP with dovecot, and it is also documented in the wiki that dovecot is domain agnostic. That is great news for my setup. Where I am very flexible is delivering mail: I could use dovecot-lda or dovecot-lmtpd, or postfix doing the work itself or whatever. It is just that I did not find any solution, and this is why I was asking for help here. So, is there a way for dovecot-{lda/lmtpd} to accept us...@mydomain.org but checks for user1 in the user DB? If there is some other idea, I would be happy to hear about it. Thank you, again, Matthias Hofer
Re: [Dovecot] LMTP Setup/Design Help Request
Matthias Hofer schrieb: So, is there a way for dovecot-{lda/lmtpd} to accept us...@mydomain.org but checks for user1 in the user DB? Try username_format=%n so dovecot uses the username only: http://wiki2.dovecot.org/Variables passdb { driver = passwd-file args = scheme=PLAIN username_format=%n /etc/dovecot/mypasswd.file }
Re: [Dovecot] LMTP Setup/Design Help Request
So, is there a way for dovecot-{lda/lmtpd} to accept us...@mydomain.org but checks for user1 in the user DB? Try username_format=%n so dovecot uses the username only: http://wiki2.dovecot.org/Variables passdb { driver = passwd-file args = scheme=PLAIN username_format=%n /etc/dovecot/mypasswd.file } Great! I did not think about that, but this solved this issue :D Thank you a lot. And I was now able to solve also my further issues. So I am prepared to try again to switch :) Have great day! Matthias Hofer
Re: [Dovecot] LMTP Setup/Design Help Request
At first, everyone should use Reply to List, it's much easier to understand if you see every ones answers. :) I see that you solved the problem, another things that could help in future: dovecot logging verbosity http://wiki1.dovecot.org/Logging#Logging_verbosity This is a great help if something doesn't work. Have a nice weekend. :) Greetings, Jan
Re: [Dovecot] LMTP Setup/Design Help Request
(forgot to send to list) Hi Matthias, Here a litte bit of code snipplets how I configured dovecot authentication via relay domains. No user-handling in postfix exept relay domains and virtual alias map, user-handling over dovecot SASL/LMTP. This is no complete configuration, no warranty that this works for you! Greetings, Jan # /etc/dovecot/conf.d/10-master.conf # service auth { unix_listener auth-userdb { mode = 0600 user = dovemail group = dovemail } unix_listener /var/spool/postfix/private/auth { mode = 0660 # Assuming the default Postfix user and group user = postfix group = postfix } ### Also possible: # inet_listener { #port = 12345 # } } service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { mode = 0660 user = postfix group = postfix } ### Also possible: # inet_listener lmtp { #address = 192.168.0.123 127.0.0.1 ::1 #port = 24 # } } # /etc/postfix/lmtp_domains yourdomain.invalid lmtp:unix:private/dovecot-lmtp # /etc/postfix/main.cf transport_maps = btree:/etc/postfix/lmtp_domains,[...] relay_domains = btree:/etc/postfix/lmtp_domains,[...] unverified_recipient_reject_code = 577 smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_recipient_restrictions = # no dirty mails reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_sender_domain, reject_unknown_recipient_domain, # Authorized mailers permit_sasl_authenticated, permit_mynetworks, # Policyd-Weight check_policy_service inet:127.0.0.1:12525, # Dynamic check of relay-recipients reject_unverified_recipient, # permit_mx_backup, reject_unauth_destination, permit
[Dovecot] LMTP Setup/Design Help Request
Hi altogether, I am switching from dbmail 2.2 to dovecot 2.1.7, and I was able to do a successful transition of IMAP. But I had a very hard time with receiving mail, and in the end -- after loads of reading and debugging -- I broke down and failed. This is why I am asking you for your kind help. I only have virtual users and have set mail_uid = dovemail mail_gid = dovemail For authentication, I simply use (for now) a flat file: passdb { driver = passwd-file args = scheme=PLAIN username_format=%u /etc/dovecot/mypasswd.file } # cat /etc/dovecot/mypasswd.file user1:{PLAIN}userpw1 user2:{PLAIN}userpw2 user3:{PLAIN}userpw3 And everything works fine with IMAP. I am completely domain-agnostic here. But I was not able to use this fine setup to receive mails with my postfix. I tried about 13 different configurations, some with considerable changes dovecot-config, the passwd-file or postfix, but I could not find a single variant working. In this situation, I would be very happy if somebody could give me a hint, which would be the prudent way to configure dovecot, LDA/LMTP and postfix based on the setup above. Thank you very much in advance, and have a great time, Matthias Hofer
Re: [Dovecot] LMTP Setup/Design Help Request
On 08-04-2013 22:39, Matthias Hofer wrote: Hi altogether, I am switching from dbmail 2.2 to dovecot 2.1.7, and I was able to do a successful transition of IMAP. But I had a very hard time with receiving mail, and in the end -- after loads of reading and debugging -- I broke down and failed. This is why I am asking you for your kind help. I only have virtual users and have set mail_uid = dovemail mail_gid = dovemail For authentication, I simply use (for now) a flat file: passdb { driver = passwd-file args = scheme=PLAIN username_format=%u /etc/dovecot/mypasswd.file } # cat /etc/dovecot/mypasswd.file user1:{PLAIN}userpw1 user2:{PLAIN}userpw2 user3:{PLAIN}userpw3 And everything works fine with IMAP. I am completely domain-agnostic here. But I was not able to use this fine setup to receive mails with my postfix. I tried about 13 different configurations, some with considerable changes dovecot-config, the passwd-file or postfix, but I could not find a single variant working. In this situation, I would be very happy if somebody could give me a hint, which would be the prudent way to configure dovecot, LDA/LMTP and postfix based on the setup above. Thank you very much in advance, and have a great time, Matthias Hofer I suppose your postfix is in working state. Note that you do not need dovecot to deliver mail with postfix. But it is a good idea. To deliver using dovecot-lda my postfix main.cf contains mail_spool_directory = /Mail/ mailbox_command = /usr/local/libexec/dovecot/dovecot-lda -f $SENDER -a $RECIPIENT