Re: [Dovecot] Problem with dovecot configuration + mysql (I think)
Joss Red wrote: But now i'm facing another one, I couldn't connect to my account by using Outlook ! Thunderbird 3 works great but Outlook 2007 don't connect to imap or smtp ! I used secure imap and secure smtp with TLS/SSL support ! PS: I used imap_client_workarounds = outlook-idle but it dosn't work Any clue? For notice here is the log i get : Nov 30 23:27:03 machine-name postfix/smtpd[5668]: connect from client_host[client_ip] Nov 30 23:30:41 machine-name dovecot: imap-login: Disconnected: rip=client_ip, lip=my_ip, TLS handshake Nov 30 23:30:41 machine-name postfix/smtpd[5679]: connect from client_host[client_ip] Nov 30 23:31:56 machine-name postfix/smtpd[5679]: SSL_accept error from client_host[client_ip]: -1 Nov 30 23:31:56 machine-name postfix/smtpd[5679]: lost connection after CONNECT from client_host[client_ip] Nov 30 23:31:56 machine-name postfix/smtpd[5679]: disconnect from client_host[client_ip] Nov 30 23:32:02 machine-name postfix/smtpd[5668]: SSL_accept error from client_host[client_ip]: -1 Nov 30 23:32:02 machine-name postfix/smtpd[5668]: lost connection after CONNECT from client_host[client_ip] Nov 30 23:32:02 machine-name postfix/smtpd[5668]: disconnect from client_host[client_ip] Your logfile contains mostly postfix/smtpd daemon entries, and the disconnect from the IMAP. Do you see a successfully IMAP connection in your log? Do you have a signed certificate or self-signed? When you connect, do you get the certificate pop-up? Maybe Outlook has some hidden feature to disable invalid certificates. But I refuse to install Outlook to see how it works in my environment :) Maybe you can filter the postfix entries out your log. Postfix is only used for the smtp feature, while dovecot does your pop3/imap. With the following entries in dovecot, you can log their entries in a different logfile than postfix: log_path = /var/log/dovecot.log info_log_path = /var/log/dovecot-info.log - Rene
Re: [Dovecot] Problem with dovecot configuration + mysql (I think)
- Nov 28 20:08:27 myhost postfix/smtpd[5087]: connect from smtp5-g21.toto.com [1.2.3.4] Nov 28 20:08:27 myhost postfix/smtpd[5087]: NOQUEUE: reject: RCPT from smtp5-g21.toto.com [1.2.3.4]: 554 5.7.1 mym...@test.com: Relay access denied; from=outside-m...@toto.com to=mym...@test.com proto=ESMTP helo=smtp5-g21.toto.com Nov 28 20:08:28 myhost postfix/smtpd[5087]: disconnect from smtp5-g21.toto.com [1.2.3.4] -- What do you think is the problem ? The problem is not in your dovecot configuration, but in your postfix configuration. Relay access denied means that the server is not relaying for you. Either the domain is not in the relay list or you are not allowed to send e-mail through your server to other servers (being an open-relay) which is a good thing! - Rene
[Dovecot] Vacation message with Sieve
Hello all, I am trying to get my vacation messages to work correctly. In general it works like how I want, and replies when a message is arived to for example i...@domain.com, but I have some problems to get my vacation message to work on catch-all boxes. Is there an option to for example auto-reply on every mail that is sendto @domain.com? I am using Ubuntu 9.10 default packages, which are the following versions: dovecot -n # 1.1.11: /etc/dovecot/dovecot.conf # OS: Linux 2.6.31-14-server x86_64 Ubuntu 9.10 ext4 mail_plugins = cmusieve My example file of the vacation message I use is: require [vacation]; vacation # Reply at most once a day to a same sender :days [vacationmessage_delay_days] :subject Autorespond: [vacationmessage_subject] # List of recipient addresses which are included in the auto replying. # If a mail's recipient is not on this list, no vacation reply is sent for it. :addresses [[userna...@[domain]] [vacationmessage_message]; I tried changing [userna...@[domain] into @[domain] or *...@[domain], but that is giving me errors. Anyone has any pointers how to achieve this (if its possible at all)... Regards, Rene
Re: [Dovecot] Vacation message with Sieve
Thanks for all the response. I understand the desire to have a catch-all address, I used to do it myself a few years ago. But the aggravation eventually caused me to reevaluate whether it was worth all of the dictionary attack spam. So I setup aliases in postfix for all of the addresses that I was truly interested in monitoring and simply 5xx unknown user the rest of them. I don't like catch-all addresses either, and I have almost never used them myself. But our customers seems to like them sometimes, so I can't ignore their wishes. But if they are doing a dirctionary attack, wouldn't it just sent 1 time a vacation message, and next time see it already sent one today - so than ignoring it, unless they change their from address ofcourse. Or are the vacation message linked to 'from' and 'to' - so if I sent an e-mail to r...@domain.com I get vacation message reply, but if I sent another mail (same from) to rene.bak...@domain.com I get another vacation message since it are 2 different to-addresses - even though they are linked to the same mailbox? The reason I was searching for this option, is because I am migrating from Courier/Maildrop to Dovecot/Sieve. In maildrop I think the default configuration of the vacation messages are active for any address that was received to the mailbox, you don't specify the 'to' address. And since some of the customers are liking the catch-all boxes I was searching to be any help for them so that the migration don't cause much problems on their side. But if its not possible, its not possible! It would explain why there is not much information to find about the subject :) Thanks again - Rene
[Dovecot] file_dotlock_create(~/.dovecot.lda-dupes) failed: No such file or directory
Hi, I am having some problems with my vacation messages using dovecot. The mail is send without problems, and the auto-respond is working as well. But its always auto-responding, because the lda-dupes file can't be created. See mail log below: Nov 16 13:43:03 mail003 postfix/smtpd[6501]: connect from mail-bw0-f211.google.com[209.85.218.211] Nov 16 13:43:03 mail003 postfix/smtpd[6501]: D6FE6F64F: client=mail-bw0-f211.google.com[209.85.218.211] Nov 16 13:43:03 mail003 postfix/cleanup[6505]: D6FE6F64F: message-id=4b014929.1000...@gmail.com Nov 16 13:43:03 mail003 postfix/qmgr[27330]: D6FE6F64F: from=[my.gmail.account], size=1946, nrcpt=1 (queue active) Nov 16 13:43:03 mail003 deliver([my.test.account]): file_dotlock_create(~/.dovecot.lda-dupes) failed: No such file or directory Nov 16 13:43:03 mail003 postfix/pickup[5934]: F202DF690: uid=5000 from= Nov 16 13:43:03 mail003 deliver([my.test.account]): msgid=4b014929.1000...@gmail.com: sent vacation response to [my.gmail.account] Nov 16 13:43:03 mail003 postfix/cleanup[6505]: F202DF690: message-id=dovecot-1258375383-94762...@mail003 Nov 16 13:43:04 mail003 postfix/qmgr[27330]: F202DF690: from=, size=570, nrcpt=1 (queue active) Nov 16 13:43:04 mail003 deliver([my.test.account]): msgid=4b014929.1000...@gmail.com: saved mail to INBOX Nov 16 13:43:04 mail003 postfix/pipe[6506]: D6FE6F64F: to=[my.test.account], relay=dovecot, delay=0.21, delays=0.08/0.01/0/0.12, dsn=2.0.0, status=sent (delivered via dovecot service) Nov 16 13:43:04 mail003 postfix/qmgr[27330]: D6FE6F64F: removed Nov 16 13:43:05 mail003 postfix/smtp[6510]: F202DF690: to=[my.gmail.account], relay=gmail-smtp-in.l.google.com[74.125.93.114]:25, delay=1.6, delays=0.07/0.01/0.32/1.2, dsn=2.0.0, status=sent (250 2.0.0 OK 1258375453 7si18156568qwb.35) Nov 16 13:43:05 mail003 postfix/qmgr[27330]: F202DF690: removed I manually created the file, but its keeping getting the message: r...@mail003:/home/vmail/mydomain.com/info/.Maildir# ls -la drwx-- 6 vmail vmail 4096 2009-11-16 14:04 . drwx-- 3 vmail vmail 4096 2009-11-16 12:37 .. drwx-- 2 vmail vmail 4096 2009-11-16 14:04 cur -rw--- 1 vmail vmail 340 2009-11-16 13:49 dovecot.index -rw--- 1 vmail vmail 22528 2009-11-16 14:04 dovecot.index.cache -rw--- 1 vmail vmail 7000 2009-11-16 14:04 dovecot.index.log -rwx-- 1 vmail vmail 0 2009-11-16 14:03 .dovecot.lda-dupes -rwx-- 1 vmail vmail 485 2009-11-16 12:33 .dovecot.sieve -rw--- 1 vmail vmail 208 2009-11-16 12:56 .dovecot.sievec -rw--- 1 vmail vmail 522 2009-11-16 14:04 dovecot-uidlist -rw--- 1 vmail vmail 8 2009-11-11 14:31 dovecot-uidvalidity -rw--- 1 vmail vmail 0 2009-11-11 14:31 dovecot-uidvalidity.4afabcaa drwx-- 2 vmail vmail 4096 2009-11-16 14:04 new -rw--- 1 vmail vmail 6 2009-11-11 14:45 subscriptions drwx-- 2 vmail vmail 4096 2009-11-16 14:04 tmp drwx-- 5 vmail vmail 4096 2009-11-11 14:45 .Trash Is the ~/.dovecot.lda-dupes linking to another path, and how can I adjust this so it searches for /home/vmail/%d/%n/.Maildir/ ? Thanks, - Rene
Re: [Dovecot] file_dotlock_create(~/.dovecot.lda-dupes) failed: No such file or directory
Pascal Volk wrote: Mildir != ~ Why are you storing the sieve files in the Maildir? Let your userdb return /home/vmail/%d/%n as home, and ~/.Maildir as mail. If the permissions on the directories are set correctly, everything should work fine. Thanks I got it working now! Too be honest... I have no idea why I stored them in the Maildir. I just configured it like that. Changed it to /home/vmail/%d/%n/ now. :) For feature reference, the following change I made to get it working... I configured my server that it gets the information from the database. I have the following set in /etc/dovecot/dovecot.conf: mail_location = maildir:/home/vmail/%d/%n/.Maildir # SQL database doc/wiki/AuthDatabase.SQL.txt userdb sql { # Path for SQL configuration file args = /etc/dovecot/dovecot-sql.conf } In /etc/dovecot/dovecot-sql.conf I had it standing on: user_query = \ SELECT uid, gid \ FROM users WHERE username = '%u' I changed this to: user_query = \ SELECT home, uid, gid \ FROM users WHERE username = '%u' this made it working. Basically looking back, I can't believe why I removed the check for 'home'. As it clearly was stated in the example as needed. Should RTFM more often I guess! - Rene
Re: [Dovecot] Postfix and Dovecot SASL
The problem is solved it was as something easy I missed. Because of the line: smtpd_tls_auth_only = yes the sasl isn't working on plain logins, so using a telnet session to port 25, doesn't allow you to use the smtp authenticate. Uncommenting this (or changing yes to no) will make the plain login work for sasl. Thanks for the help! - Rene
[Dovecot] Postfix and Dovecot SASL
Hello all, I am struggeling to get my Dovecot SASL to work within postfix. I have used the configuration example listed on the main-site of dovecot and it basically isn't giving me any success at all. I am probably missing something easy, but after spending a few days testing and walking through everything I could think about I thought figured it was better to ask :) Hope someone can point me to the right direction. My setup is that I have installed Ubuntu 9.04 (64bit), postfix and dovecot linked to a MySQL database. The services are using maildirs which are stored locally (no NFS). Postfix is using the LDA from dovecot to deliver the mail and dovecot is used for IMAP and POP3. This is working and no problems at all so far. The problem starts when I just want to enable the SASL authentication from Dovecot. I used the 'guide' posted on http://wiki.dovecot.org/HowTo/PostfixAndDovecotSASL When I try to telnet to port 25 (smtp) than I doesn't looks like the SASL is working... 220 mail003 ESMTP Postfix (Ubuntu) ehlo localhost 250-mail003 250-PIPELINING 250-SIZE 1024 250-VRFY 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN Anything I missed in my configuration from either postfix/dovecot? r...@mail003:/etc/postfix# dovecot --version 1.1.11 r...@mail003:~# dpkg-query -l postfix +++-==-==- ii postfix2.5.5-1.1 High-performance mail transport agent Here are my configurations of both: r...@mail003:/etc/postfix# dovecot -n # 1.1.11: /etc/dovecot/dovecot.conf # OS: Linux 2.6.28-16-server x86_64 Ubuntu 9.04 ext4 log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap pop3 imaps pop3s managesieve ssl_cert_file: /etc/ssl/certs/ssl-mail.pem ssl_key_file: /etc/ssl/private/ssl-mail.key ssl_cipher_list: ALL:!LOW:!SSLv2:ALL:!aNULL:!ADH:!eNULL:!EXP:RC4+RSA:+HIGH:+MEDIUM 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_executable(managesieve): /usr/lib/dovecot/managesieve-login login_greeting_capability(default): yes login_greeting_capability(imap): yes login_greeting_capability(pop3): no login_greeting_capability(managesieve): no mail_max_userip_connections(default): 10 mail_max_userip_connections(imap): 10 mail_max_userip_connections(pop3): 3 mail_max_userip_connections(managesieve): 10 mail_privileged_group: mail mail_uid: 5000 mail_gid: 5000 mail_location: maildir:/home/vmail/%d/%n/.Maildir mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(pop3): /usr/lib/dovecot/pop3 mail_executable(managesieve): /usr/lib/dovecot/managesieve 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 mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve imap_client_workarounds(default): outlook-idle delay-newmail imap_client_workarounds(imap): outlook-idle delay-newmail imap_client_workarounds(pop3): imap_client_workarounds(managesieve): pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh pop3_client_workarounds(managesieve): sieve_storage(default): sieve_storage(imap): sieve_storage(pop3): sieve_storage(managesieve): ~/sieve sieve(default): sieve(imap): sieve(pop3): sieve(managesieve): ~/.dovecot.sieve auth default: mechanisms: plain login passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: sql args: /etc/dovecot/dovecot-sql.conf socket: type: listen client: path: /var/spool/postfix/private/dovecot-auth mode: 432 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 384 user: vmail group: vmail r...@mail003:/etc/postfix# postconf | grep sasl broken_sasl_auth_clients = yes cyrus_sasl_config_path = lmtp_sasl_auth_cache_name = lmtp_sasl_auth_cache_time = 90d lmtp_sasl_auth_enable = no lmtp_sasl_auth_soft_bounce = yes lmtp_sasl_mechanism_filter = lmtp_sasl_password_maps = lmtp_sasl_path = lmtp_sasl_security_options = noplaintext, noanonymous lmtp_sasl_tls_security_options = $lmtp_sasl_security_options lmtp_sasl_tls_verified_security_options = $lmtp_sasl_tls_security_options lmtp_sasl_type = cyrus proxy_write_maps = $smtp_sasl_auth_cache_name $lmtp_sasl_auth_cache_name send_cyrus_sasl_authzid = no smtp_sasl_auth_cache_name = smtp_sasl_auth_cache_time = 90d smtp_sasl_auth_enable = no smtp_sasl_auth_soft_bounce = yes smtp_sasl_mechanism_filter = smtp_sasl_password_maps = smtp_sasl_path = smtp_sasl_security_options = noplaintext, noanonymous smtp_sasl_tls_security_options = $smtp_sasl_security_options smtp_sasl_tls_verified_security_options = $smtp_sasl_tls_security_options smtp_sasl_type = cyrus smtpd_recipient_restrictions =
Re: [Dovecot] Postfix and Dovecot SASL
Hi Jerry, My bad, I thought I did postconf -n. I was already wondering why I had so many garbage in my output :) Hereby the right postfix config: r...@mail003:/etc/dovecot# postconf -n alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no broken_sasl_auth_clients = yes config_directory = /etc/postfix home_mailbox = Maildir/ inet_interfaces = all mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/dovecot-postfix.conf -n -m ${EXTENSION} mailbox_size_limit = 0 mydestination = mail003.mydomain.nl, localhost.mydomain.nl, , localhost myhostname = mail003.mydomain.nl mynetworks = 127.0.0.0/8 [:::127.0.0.0]/104 [::1]/128 myorigin = /etc/mailname readme_directory = no recipient_delimiter = + relayhost = smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtp_use_tls = yes smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination smtpd_sasl_auth_enable = yes smtpd_sasl_authenticated_header = yes smtpd_sasl_local_domain = $myhostname smtpd_sasl_path = private/dovecot-auth smtpd_sasl_security_options = noanonymous smtpd_sasl_type = dovecot smtpd_sender_restrictions = reject_unknown_sender_domain smtpd_tls_auth_only = yes smtpd_tls_cert_file = /etc/ssl/certs/ssl-mail.pem smtpd_tls_key_file = /etc/ssl/private/ssl-mail.key smtpd_tls_mandatory_ciphers = medium, high smtpd_tls_mandatory_protocols = SSLv3, TLSv1 smtpd_tls_received_header = yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_use_tls = yes tls_random_source = dev:/dev/urandom virtual_alias_maps = mysql:/etc/postfix/mysql_alias.cf virtual_gid_maps = mysql:/etc/postfix/mysql_gid.cf virtual_mailbox_base = / virtual_mailbox_domains = mysql:/etc/postfix/mysql_domains.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql_mailbox.cf virtual_minimum_uid = 5000 virtual_transport = dovecot: virtual_uid_maps = mysql:/etc/postfix/mysql_uid.cf It's pretty much a default ubuntu install, only added the virtual stuff myself. Thanks for the help. - Rene On Wed, Nov 11, 2009 at 4:41 PM, Jerry ges...@yahoo.com wrote: On Wed, 11 Nov 2009 15:45:33 +0100 Rene Bakkum rene.bak...@gmail.com replied: Hello all, I am struggeling to get my Dovecot SASL to work within postfix. I have used the configuration example listed on the main-site of dovecot and it basically isn't giving me any success at all. I am probably missing something easy, but after spending a few days testing and walking through everything I could think about I thought figured it was better to ask :) Hope someone can point me to the right direction. My setup is that I have installed Ubuntu 9.04 (64bit), postfix and dovecot linked to a MySQL database. The services are using maildirs which are stored locally (no NFS). Postfix is using the LDA from dovecot to deliver the mail and dovecot is used for IMAP and POP3. This is working and no problems at all so far. The problem starts when I just want to enable the SASL authentication from Dovecot. I used the 'guide' posted on http://wiki.dovecot.org/HowTo/PostfixAndDovecotSASL When I try to telnet to port 25 (smtp) than I doesn't looks like the SASL is working... 220 mail003 ESMTP Postfix (Ubuntu) ehlo localhost 250-mail003 250-PIPELINING 250-SIZE 1024 250-VRFY 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN Anything I missed in my configuration from either postfix/dovecot? r...@mail003:/etc/postfix# dovecot --version 1.1.11 r...@mail003:~# dpkg-query -l postfix +++-==-==- ii postfix2.5.5-1.1 High-performance mail transport agent Here are my configurations of both: r...@mail003:/etc/postfix# dovecot -n # 1.1.11: /etc/dovecot/dovecot.conf # OS: Linux 2.6.28-16-server x86_64 Ubuntu 9.04 ext4 log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap pop3 imaps pop3s managesieve ssl_cert_file: /etc/ssl/certs/ssl-mail.pem ssl_key_file: /etc/ssl/private/ssl-mail.key ssl_cipher_list: ALL:!LOW:!SSLv2:ALL:!aNULL:!ADH:!eNULL:!EXP:RC4+RSA:+HIGH:+MEDIUM 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_executable(managesieve): /usr/lib/dovecot/managesieve-login login_greeting_capability(default): yes login_greeting_capability(imap): yes login_greeting_capability(pop3): no login_greeting_capability(managesieve): no mail_max_userip_connections(default): 10 mail_max_userip_connections(imap): 10 mail_max_userip_connections(pop3): 3 mail_max_userip_connections(managesieve): 10 mail_privileged_group: mail mail_uid: 5000