[Dovecot] Dovecot and user's quota
Hi, We are planning to use Dovecot-2.0.5 (Maildir format) as IMAP server. Currently, we are using Postfix+UW-Imap (mbox format) with the following configuration: - Postfix: Sends new messages to /var/mail/user - UW-IMAP: Reads mails from /var/mail/user and moves them to ~/nsmail/mbox Using that configuration, when a user overtakes his HOME’s quota, the MTA is still able to send new messages to the user, although he cannot read it until he frees HOME space. Can we configure Dovecot to work in the same way? I mean… 1)Postfix must use /var/mail partition for new mails. 2)Dovecot must move these mails to user’s HOME. 3)User’s HOME must be in Maildir format. If that is not possible, how can we achieve an equivalent solution? Thanks in advance. Oriol.
Re: [Dovecot] Problem with dovecot delivery (version 2.0.7)
Maxime Longuepee wrote on 11/10/2010: Here is the postconf -n: smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticatedpermit_tls_clientcerts reject_unauth_destinationreject_invalid_helo_hostname reject_non_fqdn_senderreject_non_fqdn_recipient reject_rbl_client cbl.abuseat.orgreject_rbl_client list.dsbl.orgreject_rbl_client opm.blitzed.org reject_rbl_client sbl.spamhaus.orgreject_rbl_client bl.spamcop.netreject_rbl_client dnsbl.sorbs.net=127.0.0.2 reject_rbl_client dnsbl.sorbs.net=127.0.0.3reject_rbl_client dnsbl.sorbs.net=127.0.0.4reject_rbl_client dnsbl.sorbs.net=127.0.0.5reject_rbl_client dnsbl.sorbs.net=127.0.0.7reject_rbl_client dnsbl.sorbs.net=127.0.0.9reject_rbl_client dnsbl.sorbs.net=127.0.0.11reject_rbl_client dnsbl.sorbs.net=127.0.0.12 these DNSBL's are dead: opm.blitzed.org list.dsbl.org -- Daniel
[Dovecot] dovecot2.0+ldap auth problems
I'm using a config from dovecot 1.2 adapted to 2.0 After update config, and restart dovecot service: If I do a doveadm user user1 then it is found correctly. If I do a doveadm auth user1 then it is ask for the password user, and it's running correctly. But if I tray to login by telnet using IMAP then I get: . login user1 pass1 Connection closed by foreign host. I can see at logs a Info line with: Internal login failre with auth failed It's very odd that with doveadm runs ok and but not with IMAP.
Re: [Dovecot] Problem with dovecot delivery (version 2.0.7)
Maxime Longuepee wrote on 11/10/2010: Here is the dovecot entry from master.cf: dovecot unix - n n - - pipe flags=DRhu user=dovecot:dovecot argv=/usr/local/libexec/dovecot/deliver -d ${recipient} Maybe the problem is that you run deliver as user dovecot. You should use another user/group for deliver. Also you should make sure that this user/group has correct permissions on /usr/vmail. (See also: http://wiki2.dovecot.org/UserIds) -- Daniel
Re: [Dovecot] Problem with dovecot delivery (version 2.0.7)
On Wed, 2010-11-10 at 00:01 -0500, Maxime Longuepee wrote: Nov 09 23:35:51 lda(EMAIL REMOVED FOR PRIVACY): Fatal: setresgid(6(mail),6(mail),6(mail)) failed with euid=143(dovecot): Operation not permitted Herein lies the answer, check the permissions and ownership signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Help! LDAP/AD Problem with dovecot
maybe could you try to use: hosts= server:port instead uris # LDAP URIs to use. You can use this instead of hosts list. Note that this # setting isn't supported by all LDAP libraries. bye! 2010/11/9 Christian Fischer m...@computerdichter.de Hey Folks, i am trying to get Dovecot LDA to work with Active Directory dovecot --version 1.2.9 While using Postfix to deliver mail, dovecot does only imap-Services, passdb is auth bind and userdb is static. NOW i want to use Sieve Scripts. So LDA of dovecot is required. So userdb lookup is required. With use of virtual Mailboxes i have a working postfix setup, which needs to be transferred to dovecot. dovecot-ldap-userdb.conf uris = ldap://192.168.0.42 auth_bind = yes dn = myldapu...@mydomain dnpass = mypass #ldap_version = 3 base = DC=base,DC=com deref = never scope = subtree user_attrs = sAMAccountName=mail=maildir:/home/vmail/%$/.EMAIL, =uidNumer=5000, =gidNumber=5000 user_filter = ((objectClass=user)(|(sAMAccountName=%u)(mail=%u)(othermailbox=%u))) pass_attrs = sAMAaccountName=user,userPassword=password pass_filter = ((objectClass=person)(sAMAaccountName=%u)) My errors are: - While logging in with IMAP 2010-11-10 00:32:30 imap-login: Error: Timeout waiting for handshake from auth server. my pid=16293, input bytes=0 - manual execution of deliver -d myu...@domain.tld: 010-11-10 00:34:16 deliver(myu...@domain.tld): Error: userdb lookup(...): Connecting timed out As i said - postfix works! Thankx for any help! -- *Salu2 ;)*
Re: [Dovecot] dovecot2.0+ldap auth problems
Well, I have discover the problem. It's related with tunin settings, I comment out all of this (max process, max ram, max clients, and similar) and it's is running now. 2010/11/10 Antonio Perez-Aranda aperezara...@yaco.es I'm using a config from dovecot 1.2 adapted to 2.0 After update config, and restart dovecot service: If I do a doveadm user user1 then it is found correctly. If I do a doveadm auth user1 then it is ask for the password user, and it's running correctly. But if I tray to login by telnet using IMAP then I get: . login user1 pass1 Connection closed by foreign host. I can see at logs a Info line with: Internal login failre with auth failed It's very odd that with doveadm runs ok and but not with IMAP.
Re: [Dovecot] Filter from Outlook fails after migration
I try with Dovecot 2.0.6 and I have got the same problems 2010/11/3 Antonio Perez-Aranda aperezara...@yaco.es I did a list and lsub in the two servers with the same account and the only difference that we could watch is HasChildren/HasNoChildren in INBOX and fully differente in LSUB The namespace is the same, with INBOX prefix. We compare real folder names in Maildir in couriersubscribed and suscriptions files. It's very strange. Maybe Outlook has a incorrect charset. All the subscribed folder are visible at Outlook. 2010/11/3 Timo Sirainen t...@iki.fi: On Wed, 2010-11-03 at 19:18 +0100, Antonio Perez-Aranda wrote: We have some users which use Outlook 2003. After migration de Maildir from Courier to Dovecot, this user have some errors on their accounts because Outlook filters don't run. Some of this folders name contain chars like '-' but another folder with only letters fails too. The only thing I can think of is that the folder names somehow changed. You preserved the INBOX. namespace prefix, right? Can you still look at the names in Courier? You could check if there's a difference of what Courier vs Dovecot replies to: a LIST * (the ordering of results isn't important)
Re: [Dovecot] Filter from Outlook fails after migration
Well, If I put all capabalities in the prelogin message, filters are running correctly I hate Outlook ... 2010/11/10 Antonio Perez-Aranda aperezara...@yaco.es I try with Dovecot 2.0.6 and I have got the same problems 2010/11/3 Antonio Perez-Aranda aperezara...@yaco.es I did a list and lsub in the two servers with the same account and the only difference that we could watch is HasChildren/HasNoChildren in INBOX and fully differente in LSUB The namespace is the same, with INBOX prefix. We compare real folder names in Maildir in couriersubscribed and suscriptions files. It's very strange. Maybe Outlook has a incorrect charset. All the subscribed folder are visible at Outlook. 2010/11/3 Timo Sirainen t...@iki.fi: On Wed, 2010-11-03 at 19:18 +0100, Antonio Perez-Aranda wrote: We have some users which use Outlook 2003. After migration de Maildir from Courier to Dovecot, this user have some errors on their accounts because Outlook filters don't run. Some of this folders name contain chars like '-' but another folder with only letters fails too. The only thing I can think of is that the folder names somehow changed. You preserved the INBOX. namespace prefix, right? Can you still look at the names in Courier? You could check if there's a difference of what Courier vs Dovecot replies to: a LIST * (the ordering of results isn't important)
Re: [Dovecot] Filter from Outlook fails after migration
On Wed, 2010-11-10 at 17:32 +0100, Antonio Perez-Aranda wrote: Well, If I put all capabalities in the prelogin message, filters are running correctly I hate Outlook ... Can you check which capability specifically it wants, or is it all of them? I can't really think of how any capabilities would affect filters.
[Dovecot] Sieve problem with managesieve
I have a problem with a sieve script.. my config is dovecot 1.2.15 with managesieve, and roundcube. Now i have this script WORKING: -- require [fileinto]; # rule:[TracSvil] if anyof (header :contains From x...@example.com) { fileinto INBOX.Trac Svil; stop; } -- And this script NOT working: require [fileinto]; # rule:[TracSvil] if anyof (header :is From t...@ardeek.com) { fileinto INBOX.Trac Svil; stop; } Can someone explain me the difference between these script? there is any error in the second script? Greetings! -- Simone Caruso IT Consultant p.iva: 03045250838
Re: [Dovecot] sieve fileinto public shared mbox?
On 11/04/2010 06:51 PM, Timo Sirainen wrote: On 5.11.2010, at 1.35, RParr wrote: Could someone verify if 1) sieve can fileinto shared public mbox? I don't see any reason why it wouldn't. 2) if it can, what I might be doing wrong? Set mail_debug=yes and post logs. Also full dovecot -n output would be nice (and don't leave out the version number). I didn't see anything obviously wrong in your setup. I have posted the dovecot -n output and log output with mail_debug=yes. Are there additional log/config output needed to further discussion of this problem? Thanks R.Parr, RHCE, Temporal Arts
Re: [Dovecot] v2.0.7 released
Just installed it and getting this warning: doveconf: Warning: service anvil { client_limit=1000 } is lower than required under max. load (1603) Not sure what this means.
[Dovecot] Occasional fchown errors?
Hi: I get the occasional error below. Is there something I don't have configured correctly? Or should I just ignore this? It is not always this file, sometimes it is the cache.lock file or the log.newlock file. I have a mail client running on my computer and my phone at the same time, could that have something to do with it? Nov 10 08:32:59 rabbitbrush dovecot: IMAP(bob): fchown(/home/bob/mail/.imap/INBOX/dovecot.index.tmp, -1, 8(mail)) failed: Operation not permitted (egid=1000(bob), group based on /var/mail/bob) From dovecot -n # 1.2.9: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-25-generic i686 Ubuntu 10.04.1 LTS log_timestamp: %Y-%m-%d %H:%M:%S protocols: imaps ssl_cert_file: /etc/ssl/certs/ssl-cert-snakeoil.pem ssl_key_file: /etc/ssl/private/ssl-cert-snakeoil.key login_dir: /var/run/dovecot/login login_executable: /usr/lib/dovecot/imap-login mail_privileged_group: mail mail_location: mbox:~/mail:INBOX=/var/mail/%u mbox_write_locks: fcntl dotlock auth default: passdb: driver: pam userdb: driver: passwd Thanks very much, -- Knute Johnson
Re: [Dovecot] Occasional fchown errors?
Use this patch, it fixes dovecot's ownership inheritance assumptions. Colt ~ # cat /usr/local/portage/net-mail/dovecot/files/dovecot-2.0.5-bad-permissions-inheritance.patch --- src/lib-storage/mailbox-list.c.orig 2010-09-14 11:03:18.0 -0400 +++ src/lib-storage/mailbox-list.c 2010-10-14 15:20:15.0 -0400 @@ -25,6 +25,9 @@ #include unistd.h #include dirent.h #include sys/stat.h +#include stdlib.h +#include grp.h +#include pwd.h /* 20 * (200+1) 4096 which is the standard PATH_MAX. Having these settings prevents malicious user from creating eg. a/a/a/.../a mailbox name and @@ -450,7 +453,7 @@ } if (S_ISDIR(st.st_mode) (st.st_mode S_ISGID) != 0) { - /* directory's GID is used automatically for new + /* directory is sgid, so GID is used automatically for new files */ *gid_r = (gid_t)-1; } else if ((st.st_mode 0070) 3 == (st.st_mode 0007)) { @@ -460,8 +463,39 @@ } else if (getegid() == st.st_gid) { /* using our own gid, no need to change it */ *gid_r = (gid_t)-1; - } else { - *gid_r = st.st_gid; + } + + else { + /* test for unusable inheritance. logic sets fgid_me to st.gid + for unlikely case of lookup failure and we just fall through */ + int j, ngroups = 999; + gid_t *groups; + gid_t fgid_me = st.st_gid; + + groups = malloc(ngroups * sizeof (gid_t)); + if (groups != NULL) { + uid_t egid = getegid(); + struct passwd *pw = getpwuid(geteuid()); + if (pw != NULL) { + /* get pw entry for test using my current effective uid */ + if (getgrouplist(pw-pw_name, egid, groups, ngroups) != -1) { + /* get list of group IDs my euid belongs to, ngroups + will be set to the number of groups I belong to */ + fgid_me = egid; + for (j = 0; j ngroups; j++) { + /* enumerate list, test to see if i belong + to gid of parent directory */ + if (st.st_gid == groups[j]) { + /* if so, switch to parent gid */ + fgid_me = st.st_gid; + } + } + } + } + free(groups); + } + + *gid_r = fgid_me; } } On 11/10/2010 01:34 PM, Knute Johnson wrote: Hi: I get the occasional error below. Is there something I don't have configured correctly? Or should I just ignore this? It is not always this file, sometimes it is the cache.lock file or the log.newlock file. I have a mail client running on my computer and my phone at the same time, could that have something to do with it? Nov 10 08:32:59 rabbitbrush dovecot: IMAP(bob): fchown(/home/bob/mail/.imap/INBOX/dovecot.index.tmp, -1, 8(mail)) failed: Operation not permitted (egid=1000(bob), group based on /var/mail/bob) From dovecot -n # 1.2.9: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-25-generic i686 Ubuntu 10.04.1 LTS log_timestamp: %Y-%m-%d %H:%M:%S protocols: imaps ssl_cert_file: /etc/ssl/certs/ssl-cert-snakeoil.pem ssl_key_file: /etc/ssl/private/ssl-cert-snakeoil.key login_dir: /var/run/dovecot/login login_executable: /usr/lib/dovecot/imap-login mail_privileged_group: mail mail_location: mbox:~/mail:INBOX=/var/mail/%u mbox_write_locks: fcntl dotlock auth default: passdb: driver: pam userdb: driver: passwd Thanks very much,
Re: [Dovecot] v2.0.7 released
On Wed, 2010-11-10 at 10:32 -0800, Marc Perkel wrote: Just installed it and getting this warning: doveconf: Warning: service anvil { client_limit=1000 } is lower than required under max. load (1603) Not sure what this means. You should set: service anvil { client_limit = 2000 # or something }
Re: [Dovecot] Occasional fchown errors?
On Wed, 2010-11-10 at 10:34 -0800, Knute Johnson wrote: Nov 10 08:32:59 rabbitbrush dovecot: IMAP(bob): fchown(/home/bob/mail/.imap/INBOX/dovecot.index.tmp, -1, 8(mail)) failed: Operation not permitted (egid=1000(bob), group based on /var/mail/bob) chmod 0600 /var/mail/* Normal installations don't need them to be 0660.
Re: [Dovecot] Occasional fchown errors?
as a reminder if you didn't follow the thread. this only avoids inheritance assumption. if you have shared folders, they should be g+s to delegate (group) ownership. also, this is for 2.x -david On 11/10/2010 01:48 PM, David Ford wrote: Use this patch, it fixes dovecot's ownership inheritance assumptions. Colt ~ # cat /usr/local/portage/net-mail/dovecot/files/dovecot-2.0.5-bad-permissions-inheritance.patch --- src/lib-storage/mailbox-list.c.orig 2010-09-14 11:03:18.0 -0400 +++ src/lib-storage/mailbox-list.c 2010-10-14 15:20:15.0 -0400 @@ -25,6 +25,9 @@ #include unistd.h #include dirent.h #include sys/stat.h +#include stdlib.h +#include grp.h +#include pwd.h /* 20 * (200+1) 4096 which is the standard PATH_MAX. Having these settings prevents malicious user from creating eg. a/a/a/.../a mailbox name and @@ -450,7 +453,7 @@ } if (S_ISDIR(st.st_mode) (st.st_mode S_ISGID) != 0) { - /* directory's GID is used automatically for new + /* directory is sgid, so GID is used automatically for new files */ *gid_r = (gid_t)-1; } else if ((st.st_mode 0070) 3 == (st.st_mode 0007)) { @@ -460,8 +463,39 @@ } else if (getegid() == st.st_gid) { /* using our own gid, no need to change it */ *gid_r = (gid_t)-1; - } else { - *gid_r = st.st_gid; + } + + else { + /* test for unusable inheritance. logic sets fgid_me to st.gid + for unlikely case of lookup failure and we just fall through */ + int j, ngroups = 999; + gid_t *groups; + gid_t fgid_me = st.st_gid; + + groups = malloc(ngroups * sizeof (gid_t)); + if (groups != NULL) { + uid_t egid = getegid(); + struct passwd *pw = getpwuid(geteuid()); + if (pw != NULL) { + /* get pw entry for test using my current effective uid */ + if (getgrouplist(pw-pw_name, egid, groups, ngroups) != -1) { + /* get list of group IDs my euid belongs to, ngroups + will be set to the number of groups I belong to */ + fgid_me = egid; + for (j = 0; j ngroups; j++) { + /* enumerate list, test to see if i belong + to gid of parent directory */ + if (st.st_gid == groups[j]) { + /* if so, switch to parent gid */ + fgid_me = st.st_gid; + } + } + } + } + free(groups); + } + + *gid_r = fgid_me; } } On 11/10/2010 01:34 PM, Knute Johnson wrote: Hi: I get the occasional error below. Is there something I don't have configured correctly? Or should I just ignore this? It is not always this file, sometimes it is the cache.lock file or the log.newlock file. I have a mail client running on my computer and my phone at the same time, could that have something to do with it? Nov 10 08:32:59 rabbitbrush dovecot: IMAP(bob): fchown(/home/bob/mail/.imap/INBOX/dovecot.index.tmp, -1, 8(mail)) failed: Operation not permitted (egid=1000(bob), group based on /var/mail/bob) From dovecot -n # 1.2.9: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-25-generic i686 Ubuntu 10.04.1 LTS log_timestamp: %Y-%m-%d %H:%M:%S protocols: imaps ssl_cert_file: /etc/ssl/certs/ssl-cert-snakeoil.pem ssl_key_file: /etc/ssl/private/ssl-cert-snakeoil.key login_dir: /var/run/dovecot/login login_executable: /usr/lib/dovecot/imap-login mail_privileged_group: mail mail_location: mbox:~/mail:INBOX=/var/mail/%u mbox_write_locks: fcntl dotlock auth default: passdb: driver: pam userdb: driver: passwd Thanks very much,
Re: [Dovecot] Occasional fchown errors?
On 2010-11-10 13:48:13 -0500, David Ford wrote: Use this patch, it fixes dovecot's ownership inheritance assumptions. [snip] 1. he is using 1.2.9 and your patch is for 2.0, would your patch work for 1.2.9 aswell. 2. you want to attach the patch and not paste it inline. your mail client mangled the lines. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org
Re: [Dovecot] Occasional fchown errors?
hmm. yes, that might be sensible of me :} i haven't touched 1.x in so long, i have no idea if it's applicable. my understanding from Timo is that it's been this way for quite some time so it would likely be easy to massage into place. it's linked at http://stuph.org/dovecot-2.0.5-bad-permissions-inheritance.patch and attached. -d On 11/10/2010 01:54 PM, Marcus Rueckert wrote: On 2010-11-10 13:48:13 -0500, David Ford wrote: Use this patch, it fixes dovecot's ownership inheritance assumptions. [snip] 1. he is using 1.2.9 and your patch is for 2.0, would your patch work for 1.2.9 aswell. 2. you want to attach the patch and not paste it inline. your mail client mangled the lines. darix --- src/lib-storage/mailbox-list.c.orig 2010-09-14 11:03:18.0 -0400 +++ src/lib-storage/mailbox-list.c 2010-10-14 15:20:15.0 -0400 @@ -25,6 +25,9 @@ #include unistd.h #include dirent.h #include sys/stat.h +#include stdlib.h +#include grp.h +#include pwd.h /* 20 * (200+1) 4096 which is the standard PATH_MAX. Having these settings prevents malicious user from creating eg. a/a/a/.../a mailbox name and @@ -450,7 +453,7 @@ } if (S_ISDIR(st.st_mode) (st.st_mode S_ISGID) != 0) { - /* directory's GID is used automatically for new + /* directory is sgid, so GID is used automatically for new files */ *gid_r = (gid_t)-1; } else if ((st.st_mode 0070) 3 == (st.st_mode 0007)) { @@ -460,8 +463,39 @@ } else if (getegid() == st.st_gid) { /* using our own gid, no need to change it */ *gid_r = (gid_t)-1; - } else { - *gid_r = st.st_gid; + } + + else { + /* test for unusable inheritance. logic sets fgid_me to st.gid + for unlikely case of lookup failure and we just fall through */ + int j, ngroups = 999; + gid_t *groups; + gid_t fgid_me = st.st_gid; + + groups = malloc(ngroups * sizeof (gid_t)); + if (groups != NULL) { + uid_t egid = getegid(); + struct passwd *pw = getpwuid(geteuid()); + if (pw != NULL) { + /* get pw entry for test using my current effective uid */ + if (getgrouplist(pw-pw_name, egid, groups, ngroups) != -1) { + /* get list of group IDs my euid belongs to, ngroups + will be set to the number of groups I belong to */ + fgid_me = egid; + for (j = 0; j ngroups; j++) { + /* enumerate list, test to see if i belong + to gid of parent directory */ + if (st.st_gid == groups[j]) { + /* if so, switch to parent gid */ + fgid_me = st.st_gid; + } + } + } + } + free(groups); + } + + *gid_r = fgid_me; } }
Re: [Dovecot] Occasional fchown errors?
Timo, i'm stuck with no time for studying code at the moment. is there a quick/easy way to check if this is a personal or shared mailbox we are working under? i can then update my patch so it works for both cases. -david On 11/10/2010 01:58 PM, David Ford wrote: hmm. yes, that might be sensible of me :} i haven't touched 1.x in so long, i have no idea if it's applicable. my understanding from Timo is that it's been this way for quite some time so it would likely be easy to massage into place. it's linked at http://stuph.org/dovecot-2.0.5-bad-permissions-inheritance.patch and attached. -d On 11/10/2010 01:54 PM, Marcus Rueckert wrote: On 2010-11-10 13:48:13 -0500, David Ford wrote: Use this patch, it fixes dovecot's ownership inheritance assumptions. [snip] 1. he is using 1.2.9 and your patch is for 2.0, would your patch work for 1.2.9 aswell. 2. you want to attach the patch and not paste it inline. your mail client mangled the lines. darix
[Dovecot] Getting the Sender from a Email
Hi Timo I need to get the Sender from a Email. Using this mail_get_first_header(mail, From, header) , i get the email in this format Name u...@dom , in dovecot there is a way to get only the u...@dom ? Tks !
Re: [Dovecot] Occasional fchown errors?
On Wed, 2010-11-10 at 14:01 -0500, David Ford wrote: Timo, i'm stuck with no time for studying code at the moment. is there a quick/easy way to check if this is a personal or shared mailbox we are working under? i can then update my patch so it works for both cases. Well, you could check if list-ns-type is NAMESPACE_PRIVATE or something else. But then again, some people have created shared mailboxes by symlinking them into private namespace, and then it's pretty much impossible to know if it's shared or not.
Re: [Dovecot] Occasional fchown errors?
yes, my mind has been churning on path dereference resolution and efficiency since i made this version of the patch. thank you. -david On 11/10/2010 02:13 PM, Timo Sirainen wrote: On Wed, 2010-11-10 at 14:01 -0500, David Ford wrote: Timo, i'm stuck with no time for studying code at the moment. is there a quick/easy way to check if this is a personal or shared mailbox we are working under? i can then update my patch so it works for both cases. Well, you could check if list-ns-type is NAMESPACE_PRIVATE or something else. But then again, some people have created shared mailboxes by symlinking them into private namespace, and then it's pretty much impossible to know if it's shared or not.
Re: [Dovecot] Getting the Sender from a Email
On Wed, 2010-11-10 at 17:09 -0200, Alex Baule wrote: Using this mail_get_first_header(mail, From, header) , i get the email in this format Name u...@dom , in dovecot there is a way to get only the u...@dom ? Use lib-mail/message-address.h parser, something like: struct message_address *addr; addr = message_address_parse(pool_datastack_create(), header, strlen(header), 1, FALSE); if (addr != NULL) printf(%...@%s, addr-mailbox, addr-domain);
Re: [Dovecot] v2.0.7 released
On 11/10/2010 10:52 AM, Timo Sirainen wrote: service anvil { client_limit = 2000 # or something } OK - just curious - what is it for? What does this do?
Re: [Dovecot] Occasional fchown errors?
On 2010-11-10 1:48 PM, David Ford wrote: Use this patch, Better to update, no? 1.2.9 is a bit behind... or is this not fixed in the current stable 1.2.16? -- Best regards, Charles
[Dovecot] Phantom email message
Got sort of a strange problem on one email account. Everything works fine with Thunderbird/IMAP showing the correct unread message count. But on my DroidX smartphone one of my email accounts always shows one unread message, but I can't bring any unread messages up. It's like there's something there making it think there's a message when there isn't. The email client is K-9 mail Anyone have any ideas?
Re: [Dovecot] Sieve problem with managesieve
On Wed, 10 Nov 2010 19:01:02 +0100, Simone Caruso wrote: I have a problem with a sieve script.. my config is dovecot 1.2.15 with managesieve, and roundcube. if anyof (header :contains From x...@example.com) if anyof (header :is From t...@ardeek.com) :is is an absolute match, :contains is a substring match. http://tools.ietf.org/html/rfc5228#section-2.7.1 -- Aleksander 'A.L.E.C' Machniak http://alec.pl LAN Management System Developer http://lms.org.pl Roundcube Webmail Project Developer http://roundcube.net
Re: [Dovecot] Phantom email message
On 2010-11-10 2:59 PM, Marc Perkel wrote: Got sort of a strange problem on one email account. Everything works fine with Thunderbird/IMAP showing the correct unread message count. But on my DroidX smartphone one of my email accounts always shows one unread message, but I can't bring any unread messages up. It's like there's something there making it think there's a message when there isn't. The email client is K-9 mail Anyone have any ideas? If you're sure there aren't any unread messages, and TB correctly reports that fact, then it sounds like a K-9 bug... best to report it there... http://groups.google.com/group/k-9-mail -- Best regards, Charles
[Dovecot] Dovecot 2.0.7 Virtual plugin
Well, it seens the virtual plugins is not working correctly or i miss undertood how to configurate it. http://wiki2.dovecot.org/Plugins/Virtual as this wiki says, I should be possible to make an ndeamespace namespace { prefix = virtual/ separator = / location = virtual:~/Maildir/virtual } And in side of ~/Maildir/virtual create virtual folders and inside of those folders create dovecot-vitual. But it does not work. Right if i make this conf, on my imap client it shows a folder called virtual ( the prefix, or whtever i put in there ) and show nothing, only shows something if i create a dovecot-virtual inside of ~/Maildir/virtual/ i would appreciate if someone explain what i am doind wrong. Thanks! my dovecot -n # 2.0.7: /usr/local/etc/dovecot/dovecot.conf # OS: Linux 2.6.32-5-amd64 x86_64 Debian squeeze/sid mail_debug = yes mail_location = maildir:~/TesteEmail/Maildir mail_plugins = virtual namespace { inbox = yes location = prefix = separator = / } namespace virtual { location = virtual:~/TesteEmail/virtual/ prefix = virtual/ separator = / } passdb { driver = pam } ssl = no userdb { driver = passwd } protocol imap { mail_plugins = virtual virtual } []'sf.rique
Re: [Dovecot] Phantom email message
On 11/10/2010 12:15 PM, Charles Marcus wrote: On 2010-11-10 2:59 PM, Marc Perkel wrote: Got sort of a strange problem on one email account. Everything works fine with Thunderbird/IMAP showing the correct unread message count. But on my DroidX smartphone one of my email accounts always shows one unread message, but I can't bring any unread messages up. It's like there's something there making it think there's a message when there isn't. The email client is K-9 mail Anyone have any ideas? If you're sure there aren't any unread messages, and TB correctly reports that fact, then it sounds like a K-9 bug... best to report it there... http://groups.google.com/group/k-9-mail I have two email account - both on my server - and one works correctly and one doesn't. I'm using maildir format and I'm thinking that perhaps there might be some odd file there that is counted as a message but is not readable as a message? But - I don't know.
Re: [Dovecot] Phantom email message
On Wednesday 10 November 2010 20:59:40 Marc Perkel wrote: Got sort of a strange problem on one email account. Everything works fine with Thunderbird/IMAP showing the correct unread message count. But on my DroidX smartphone one of my email accounts always shows one unread message, but I can't bring any unread messages up. It's like there's something there making it think there's a message when there isn't. This is very long shot but I think I observed something similar some time ago with K9 when a message was starred, i.e. tagged as important. Maybe this is confusing things? Andreas signature.asc Description: This is a digitally signed message part.
[Dovecot] dovecot dictionary attacks
Hi, I been using dovecot for awhile and its been solid, however I been having some issues with dictionary attacks. I installed fail2ban and for the most part is working fine. However today I got another spammer relaying through my server. Looking at the logs I see the following dictonary attack from 94.242.206.37 Nov 10 03:04:38 pop dovecot: pop3-login: Disconnected: rip=94.242.206.37, lip=209.213.66.10 Nov 10 03:04:38 pop dovecot: auth(default): client in: AUTH 1 PLAIN service=POP3lip=209.213.66.10 rip=94.242.206.37 resp=hidden Nov 10 03:04:38 pop dovecot: auth(default): shadow(aarhus,94.242.206.37): lookup Nov 10 03:04:38 pop dovecot: auth(default): client in: AUTH 1 PLAIN service=POP3lip=209.213.66.10 rip=94.242.206.37 resp=hidden Nov 10 03:04:38 pop dovecot: auth(default): shadow(abaft,94.242.206.37): lookup Nov 10 03:04:38 pop dovecot: auth(default): shadow(abaft,94.242.206.37): unknown user Nov 10 03:04:38 pop dovecot: auth(default): client in: AUTH 1 PLAIN service=POP3lip=209.213.66.10 rip=94.242.206.37 resp=hidden Nov 10 03:04:38 pop dovecot: auth(default): shadow(aarhus,94.242.206.37): unknown user Nov 10 03:04:38 pop dovecot: auth(default): client in: AUTH 1 PLAIN service=POP3lip=209.213.66.10 rip=94.242.206.37 resp=hidden Nov 10 03:04:38 pop dovecot: auth(default): shadow(aaron,94.242.206.37): lookup Nov 10 03:04:38 pop dovecot: auth(default): shadow(aaron,94.242.206.37): unknown user Nov 10 03:04:38 pop dovecot: auth(default): client in: AUTH 1 PLAIN service=POP3lip=209.213.66.10 rip=94.242.206.37 resp=hidden Nov 10 03:04:38 pop dovecot: auth(default): shadow(ababa,94.242.206.37): lookup . And so on.. Then that ip gets banned by fail2ban [r...@pop ~]# grep 94.242.206.37 /var/log/fail2ban.log 2010-11-10 03:04:42,416 fail2ban.actions: WARNING [dovecot] Ban 94.242.206.37 However on my smtp mail server that ip is already sending out all sorts of spam with the sasl username of Paramus. This username Paramus never shows up on the dovevot dictionary attack, as a matter of fact the user Paramus is nowhere to be found on the dovecot log at all and I have logs going back months. Does anyone have any idea what could of happened here. I mean if the user/passwd was already harvested by 94.242.206.37 why would they bother to start another dict. attack. I'm just not sure how they guess the username/password as its not on any logs that goes back months and I don't have a dovecot record for that user. /var/log/maillog:Nov 10 02:46:16 mrelay3 postfix/smtpd[27776]: 3B64928015: client=unknown[94.242.206.37], sasl_method=LOGIN, sasl_username=paramus /var/log/maillog:Nov 10 02:47:54 mrelay3 postfix/smtpd[27776]: 247AB28016: client=unknown[94.242.206.37], sasl_method=LOGIN, sasl_username=paramus /var/log/maillog:Nov 10 02:48:00 mrelay3 postfix/smtpd[27785]: 87DE128016: client=unknown[94.242.206.37], sasl_method=LOGIN, sasl_username=paramus /var/log/maillog:Nov 10 02:56:00 mrelay3 postfix/smtpd[27792]: 9728628015: client=unknown[94.242.206.37], sasl_method=LOGIN, sasl_username=paramus /var/log/maillog:Nov 10 03:05:38 mrelay3 postfix/smtpd[27808]: D529F28015: client=unknown[94.242.206.37], sasl_method=LOGIN, sasl_username=paramus /var/log/maillog:Nov 10 03:06:00 mrelay3 postfix/smtpd[27808]: DDF7C2801B: client=unknown[94.242.206.37], sasl_method=LOGIN, sasl_username=Paramus Any help would be appreciated. paul
[Dovecot] dovecot dictionary attacks
Hi, I been using dovecot for awhile and its been solid, however I been having some issues with dictionary attacks. I installed fail2ban and for the most part is working fine. However today I got another spammer relaying through my server. Looking at the logs I see the following dictonary attack from 94.242.206.37 Nov 10 03:04:38 pop dovecot: pop3-login: Disconnected: rip=94.242.206.37, lip=209.213.66.10 Nov 10 03:04:38 pop dovecot: auth(default): client in: AUTH 1 PLAIN service=POP3lip=209.213.66.10 rip=94.242.206.37 resp=hidden Nov 10 03:04:38 pop dovecot: auth(default): shadow(aarhus,94.242.206.37): lookup Nov 10 03:04:38 pop dovecot: auth(default): client in: AUTH 1 PLAIN service=POP3lip=209.213.66.10 rip=94.242.206.37 resp=hidden Nov 10 03:04:38 pop dovecot: auth(default): shadow(abaft,94.242.206.37): lookup Nov 10 03:04:38 pop dovecot: auth(default): shadow(abaft,94.242.206.37): unknown user Nov 10 03:04:38 pop dovecot: auth(default): client in: AUTH 1 PLAIN service=POP3lip=209.213.66.10 rip=94.242.206.37 resp=hidden Nov 10 03:04:38 pop dovecot: auth(default): shadow(aarhus,94.242.206.37): unknown user Nov 10 03:04:38 pop dovecot: auth(default): client in: AUTH 1 PLAIN service=POP3lip=209.213.66.10 rip=94.242.206.37 resp=hidden Nov 10 03:04:38 pop dovecot: auth(default): shadow(aaron,94.242.206.37): lookup Nov 10 03:04:38 pop dovecot: auth(default): shadow(aaron,94.242.206.37): unknown user Nov 10 03:04:38 pop dovecot: auth(default): client in: AUTH 1 PLAIN service=POP3lip=209.213.66.10 rip=94.242.206.37 resp=hidden Nov 10 03:04:38 pop dovecot: auth(default): shadow(ababa,94.242.206.37): lookup . And so on.. Then that ip gets banned by fail2ban [r...@pop ~]# grep 94.242.206.37 /var/log/fail2ban.log 2010-11-10 03:04:42,416 fail2ban.actions: WARNING [dovecot] Ban 94.242.206.37 However on my smtp mail server that ip is already sending out all sorts of spam with the sasl username of Paramus. This username Paramus never shows up on the dovevot dictionary attack, as a matter of fact the user Paramus is nowhere to be found on the dovecot log at all and I have logs going back months. Does anyone have any idea what could of happened here. I mean if the user/passwd was already harvested by 94.242.206.37 why would they bother to start another dict. attack. I'm just not sure how they guess the username/password as its not on any logs that goes back months and I don't have a dovecot record for that user. /var/log/maillog:Nov 10 02:46:16 mrelay3 postfix/smtpd[27776]: 3B64928015: client=unknown[94.242.206.37], sasl_method=LOGIN, sasl_username=paramus /var/log/maillog:Nov 10 02:47:54 mrelay3 postfix/smtpd[27776]: 247AB28016: client=unknown[94.242.206.37], sasl_method=LOGIN, sasl_username=paramus /var/log/maillog:Nov 10 02:48:00 mrelay3 postfix/smtpd[27785]: 87DE128016: client=unknown[94.242.206.37], sasl_method=LOGIN, sasl_username=paramus /var/log/maillog:Nov 10 02:56:00 mrelay3 postfix/smtpd[27792]: 9728628015: client=unknown[94.242.206.37], sasl_method=LOGIN, sasl_username=paramus /var/log/maillog:Nov 10 03:05:38 mrelay3 postfix/smtpd[27808]: D529F28015: client=unknown[94.242.206.37], sasl_method=LOGIN, sasl_username=paramus /var/log/maillog:Nov 10 03:06:00 mrelay3 postfix/smtpd[27808]: DDF7C2801B: client=unknown[94.242.206.37], sasl_method=LOGIN, sasl_username=Paramus Any help would be appreciated. paul
Re: [Dovecot] Phantom email message
On Wed, 2010-11-10 at 11:59 -0800, Marc Perkel wrote: Anyone have any ideas? This happens from time to time for me in Evolution. Moving a message from some folder to the folder displaying the phantom message seems to force it to recalculate and always fixes it here. HTH, Andre
Re: [Dovecot] dovecot dictionary attacks
On 10.11.2010, at 23.03, PA wrote: However on my smtp mail server that ip is already sending out all sorts of spam with the sasl username of Paramus. This username Paramus never shows up on the dovevot dictionary attack, as a matter of fact the user Paramus is nowhere to be found on the dovecot log at all and I have logs going back months. I'm just not sure how they guess the username/password as its not on any logs that goes back months and I don't have a dovecot record for that user. Well, probably obvious, but since you didn't explicitly say: You have configured Postfix to use Dovecot for authentication, not Cyrus SASL, right?..
Re: [Dovecot] Dovecot 2.0.7 Virtual plugin
On 10.11.2010, at 21.25, Henrique Fernandes wrote: I should be possible to make an ndeamespace namespace { prefix = virtual/ separator = / location = virtual:~/Maildir/virtual } And in side of ~/Maildir/virtual create virtual folders and inside of those folders create dovecot-vitual. Except for the typo, yeah. But it does not work. Right if i make this conf, on my imap client it shows a folder called virtual ( the prefix, or whtever i put in there ) and show nothing, only shows something if i create a dovecot-virtual inside of ~/Maildir/virtual/ What does find ~/Maildir/virtual say? protocol imap { mail_plugins = virtual virtual } One virtual is enough.
Re: [Dovecot] sieve fileinto public shared mbox?
On 5.11.2010, at 19.34, RParr wrote: r...@n3:/etc/dovecot# dovecot -n # 1.2.9: /etc/dovecot/dovecot.conf .. 11/05/10 12:23:16 pmn3postfix/localCADCC60482: to=ta...@n3.temporalarts.com, relay=local, delay=0.01, delays=0/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to command: /usr/lib/dovecot/deliver -c /etc/dovecot/conf.d/01-dovecot-postfix.conf -n -m ${EXTENSION}) Is the problem that you have a different config file for deliver (the -c parameter) where you don't have the same settings as the rest of Dovecot?
Re: [Dovecot] v2.0.7 released
On 10.11.2010, at 19.50, Marc Perkel wrote: On 11/10/2010 10:52 AM, Timo Sirainen wrote: service anvil { client_limit = 2000 # or something } OK - just curious - what is it for? What does this do? Increases the number of connections that anvil process can handle before it stops accepting new ones. The default limit should be fine as long as you don't change other services' process_limits from defaults. Hmm. Actually the default 1000 limit should be high enough for pretty much all setups. What exactly have you changed to cause that warning? Show your doveconf -n output?
Re: [Dovecot] Dovecot 2.0.7 Virtual plugin
I guess, it has two virtual cause i put virtual plugin also in imap protocol. sfri...@hornet:~/TesteEmail$ find /home/sfrique/TesteEmail/virtual/ /home/sfrique/TesteEmail/virtual/ /home/sfrique/TesteEmail/virtual/dovecot.index /home/sfrique/TesteEmail/virtual/dovecot.index.log /home/sfrique/TesteEmail/virtual/dovecot-virtual /home/sfrique/TesteEmail/virtual/ABCD /home/sfrique/TesteEmail/virtual/ABCD/dovecot-virtual sfri...@hornet:~/TesteEmail$ cat /home/sfrique/TesteEmail/virtual/ABCD/dovecot-virtual # ~/TesteEmail/Maildir/virtual/ABCD/dovecot-virtual * all sfri...@hornet:~/TesteEmail$ cat /home/sfrique/TesteEmail/virtual/dovecot-virtual # ~/TesteEmail/Maildir/virtual/ABCD/dovecot-virtual * all []'sf.rique On Wed, Nov 10, 2010 at 11:28 PM, Timo Sirainen t...@iki.fi wrote: On 10.11.2010, at 21.25, Henrique Fernandes wrote: I should be possible to make an ndeamespace namespace { prefix = virtual/ separator = / location = virtual:~/Maildir/virtual } And in side of ~/Maildir/virtual create virtual folders and inside of those folders create dovecot-vitual. Except for the typo, yeah. But it does not work. Right if i make this conf, on my imap client it shows a folder called virtual ( the prefix, or whtever i put in there ) and show nothing, only shows something if i create a dovecot-virtual inside of ~/Maildir/virtual/ What does find ~/Maildir/virtual say? protocol imap { mail_plugins = virtual virtual } One virtual is enough.
Re: [Dovecot] Dovecot 2.0.7 Virtual plugin
On 11.11.2010, at 2.35, Henrique Fernandes wrote: sfri...@hornet:~/TesteEmail$ find /home/sfrique/TesteEmail/virtual/ /home/sfrique/TesteEmail/virtual/ /home/sfrique/TesteEmail/virtual/dovecot.index /home/sfrique/TesteEmail/virtual/dovecot.index.log /home/sfrique/TesteEmail/virtual/dovecot-virtual /home/sfrique/TesteEmail/virtual/ABCD /home/sfrique/TesteEmail/virtual/ABCD/dovecot-virtual Looks ok. sfri...@hornet:~/TesteEmail$ cat /home/sfrique/TesteEmail/virtual/ABCD/dovecot-virtual # ~/TesteEmail/Maildir/virtual/ABCD/dovecot-virtual * This shows as if there's an empty line as the file's first line? (shouldn't be) Anyway, all looks ok. ABCD should show up in list. Are you sure it's not a client/subscription problem? Try talking IMAP protocol directly and check what the LIST command shows: http://wiki2.dovecot.org/TestInstallation
Re: [Dovecot] Dovecot 2.0.7 Virtual plugin
As it turns out, i seens to be a client problem, and an miss understando problem. Using only one namespace this folder ABCD will be under folder virtual right ? I guess for each virtual folder i have to create an namespace so it does not apear under any folder righ ? i mean this. ABCD ad EFGH will be virtual so for achive this setup need to be 2 namespaces with prefix ABCD and EFGH right ? Inbox Spam ABCD EFGH Other wise would turns out like this: right ? if i use only one namespace with prefix vrtual and create both folder in it.. Inbox Spam virtual -ABCD -EFGH so, folders ABCD and EFGH will be inside folder virtual correct ? []'sf.rique On Thu, Nov 11, 2010 at 12:41 AM, Timo Sirainen t...@iki.fi wrote: On 11.11.2010, at 2.35, Henrique Fernandes wrote: sfri...@hornet:~/TesteEmail$ find /home/sfrique/TesteEmail/virtual/ /home/sfrique/TesteEmail/virtual/ /home/sfrique/TesteEmail/virtual/dovecot.index /home/sfrique/TesteEmail/virtual/dovecot.index.log /home/sfrique/TesteEmail/virtual/dovecot-virtual /home/sfrique/TesteEmail/virtual/ABCD /home/sfrique/TesteEmail/virtual/ABCD/dovecot-virtual Looks ok. sfri...@hornet:~/TesteEmail$ cat /home/sfrique/TesteEmail/virtual/ABCD/dovecot-virtual # ~/TesteEmail/Maildir/virtual/ABCD/dovecot-virtual * This shows as if there's an empty line as the file's first line? (shouldn't be) Anyway, all looks ok. ABCD should show up in list. Are you sure it's not a client/subscription problem? Try talking IMAP protocol directly and check what the LIST command shows: http://wiki2.dovecot.org/TestInstallation
Re: [Dovecot] Occasional fchown errors?
On 11/10/2010 10:53 AM, Timo Sirainen wrote: On Wed, 2010-11-10 at 10:34 -0800, Knute Johnson wrote: Nov 10 08:32:59 rabbitbrush dovecot: IMAP(bob): fchown(/home/bob/mail/.imap/INBOX/dovecot.index.tmp, -1, 8(mail)) failed: Operation not permitted (egid=1000(bob), group based on /var/mail/bob) chmod 0600 /var/mail/* Normal installations don't need them to be 0660. Thanks, I'll try that. knute...