Re: How to grant user access to his .dovecot.sieve.log?
No, it won't work. "sieve_after" require user script to explicitly "keep" the message. If the script fails, the default action stores the message into INBOX, thus finishing executions of sieve scripts. So, in most wanted case the "sieve_after" which suppose to notify user about problems with his script will not be called. These logs contain messages about syntax errors which depend on the exact environment (say, the list of enabled Sieve extensions). Also they have reports about runtime problems like absent folder referenced in the script. It is a bad situation if user can not read these logs. I see a couple workarounds. First: a separate FilterSet which user can activate to get .dovecot.sieve.log when he wants. It can be something like === $ cat /srv/dovecot/seriv/.dovecot.sieve require ["vnd.dovecot.execute"]; # rule:[dovecot.sieve.log] if header :contains "subject" "dovecot.sieve.log" { execute "log_content.sh"; } === with === $ cat /usr/lib64/dovecot/sieve-extprograms/log_content.sh #!/bin/bash if test -s $HOME/.dovecot.sieve.log; then /usr/bin/mailx -s "sieve.log" $recipient < $HOME/.dovecot.sieve.log /usr/bin/echo -n '' > $HOME/.dovecot.sieve.log fi Second: a separate user, say "givemel...@imap.example.org" on my IMAP server. When user sends to this address a request, it replies with content of users .dovecot.sieve.log emptying it afterwards. It should have access to the "SENDER" external variable. If needed there should be 2 step authentication against forged "SENDER", sending cryptographically strong token and asking user to reply with the same token to authorize request and emptying log. But isn't it too much complexity for such thing as looking at the log? Even another way, with proposed httpd access, can be set up to work with apache of the version 2.4.8+, using "LocationMatch" and environment variable set to matched regex in "Require User" statement, like: === $ cat /etc/httpd/conf.d/userdir.conf UserDir /srv/dovecot Loglevel debug [^/]+)"> AllowOverride None AuthType Basic AuthName 'private logs' AuthBasicProvider file AuthUserFile /etc/httpd/users Require user %{env:MATCH_WHICHUSER} SSLRequireSSL DirectoryIndex .dovecot.sieve.log === Sure for this to work in production I will put "AuthBasicProvider ldap" and authenticate against the same LDAP server as dovecot uses. And I think I should place these sieve files into separate from mail directory like '/srv/sieve/', so that apache won't get access to mail. -- Regards, Sergey On Thu, Feb 8, 2018 at 3:43 AM, LuKreme wrote: > On Feb 6, 2018, at 19:53, Sergey Ivanov wrote: > > Answering myself (not yet implemented, but I hope it will work): > > Using sieve extprograms extension and global "after" script, I can read > .dovecot.sieve.log into a sieve variable 'log_content' if this log is not > empty. I hope this log will be written before "after" script is called, but > will check if it is true. > > Then using sieve "notify" action with mailto:${user_mailaddress}? > body=${log_content}" > > Did that work? > > -- > This is my signature. There are many like it, but this one is mine. > > > > >
Re: How to grant user access to his .dovecot.sieve.log?
Answering myself (not yet implemented, but I hope it will work): Using sieve extprograms extension and global "after" script, I can read .dovecot.sieve.log into a sieve variable 'log_content' if this log is not empty. I hope this log will be written before "after" script is called, but will check if it is true. Then using sieve "notify" action with mailto: ${user_mailaddress}?body=${log_content}" -- Sergey. On Thu, Feb 1, 2018 at 5:01 PM, Sergey Ivanov wrote: > Hi, > What are the recommended ways to give access to their .dovecot.sieve.log > messages to the users? > I am thinking about placing this file into users Maildir/new, or piping to > dovecot-lda. > > -- > Regards, > Sergey Ivanov >
Re: How to grant user access to his .dovecot.sieve.log?
Andreas, can you explain "magic folder"? The only thing I tried was creating named FIFO .dovecot.sieve.log, and starting mailx u...@my.domain.com < .dovecot.sieve.log which need to be done for each user of my domain, and better wrapped in some script which will make it started after each sievec run. -- Regards, Sergey. On Fri, Feb 2, 2018 at 7:23 PM, A. Schulze wrote: > > > Am 01.02.2018 um 18:01 schrieb Sergey Ivanov: > > Hi, > > What are the recommended ways to give access to their .dovecot.sieve.log > messages to the users? > > I am thinking about placing this file into users Maildir/new, or piping > to dovecot-lda. > > or serve the log as "magic folder". If the user delete the message it > deletes also the log ... > just an idea... > > Andreas >
Re: How to grant user access to his .dovecot.sieve.log?
Hi Gabriel, I'm trying to implement what you suggested using apache mod_userdir with === UserDir /srv/dovecot [^/]+)"> Require user %{env:MATCH_WHICHUSER} DirectoryIndex .dovecot.sieve.log ... === I still need to find how to set up right permissions for these logs without too much brute force. It looks like this way I can get what I want, but I really hoped to find some better way: my Roundcube installation is on the load-balanced web farm and there is no and should not be a file access to these logs. I think such a feature as Sieve compiler must have some standard way to say what is wrong to the author of the Sieve script. -- Sergey. On Fri, Feb 2, 2018 at 2:29 PM, Gabriel Kaufmann wrote: > Alternatively use a web-interface with read-only access to the log? > > best regards > > Gabriel Kaufmann > >
How to grant user access to his .dovecot.sieve.log?
Hi, What are the recommended ways to give access to their .dovecot.sieve.log messages to the users? I am thinking about placing this file into users Maildir/new, or piping to dovecot-lda. -- Regards, Sergey Ivanov signature.asc Description: OpenPGP digital signature
Re: [Dovecot] First release (v0.1.0) of the new Sieve implementation for Dovecot v1.2
Hi Stephan, I've tried dovecot-sieve cmusieve with at the same place. As I can see, both problems I've though to be in libsieve, actually are that of dovecot. Both plugins do not expand variables like %n, %h, %u. But just filename works, - if I've set --- sieve = sievescript --- then both have used ~/sievescript file, like: --- deliver(seriv): Oct 29 20:14:08 Info: sieve: using sieve path: /home/seriv/sievescript deliver(seriv): Oct 29 20:14:08 Info: sieve: opening script /home/seriv/sievescript deliver(seriv): Oct 29 20:14:08 Info: sieve: executing compiled script /home/seriv/sievescript --- Buth implementations don't work wihth slashes. I took a piece of sieve script from working installation of dovecot-1.1.2 with Maildirs, and here on dovecot-1.2-alpha3 I have default mail location with inbox as mbox in /var/spool/log/mail/ and Maildir in /home//Maildir. I should test cmusieve before reporting these as libsieve bugs, I'm sorry.
Re: [Dovecot] First release (v0.1.0) of the new Sieve implementation for Dovecot v1.2
Hi Stephan, I've tried dovecot-sieve cmusieve with at the same place. As I can see, both problems I've though to be in libsieve, actually are that of dovecot. Both plugins do not expand variables like %n, %h, %u. But just filename works, - if I've set --- sieve = sievescript --- then both have used ~/sievescript file, like: --- deliver(seriv): Oct 29 20:14:08 Info: sieve: using sieve path: /home/seriv/sievescript deliver(seriv): Oct 29 20:14:08 Info: sieve: opening script /home/seriv/sievescript deliver(seriv): Oct 29 20:14:08 Info: sieve: executing compiled script /home/seriv/sievescript --- Buth implementations don't work wihth slashes. I took a piece of sieve script from working installation of dovecot-1.1.2 with Maildirs, and here on dovecot-1.2-alpha3 I have default mail location with inbox as mbox in /var/spool/log/mail/ and Maildir in /home//Maildir. I should test cmusieve before reporting these as libsieve bugs, I'm sorry. -- WBR, Sergey. On Wed, Oct 29, 2008 at 3:31 PM, Stephan Bosch <[EMAIL PROTECTED]> wrote: > sergey ivanov schreef: >> >> Hi Stephan, >> Thank you for quick fix. I've built it (from changeset >> 646:747107b816dc) and it looks like working with dovecot-1.2. >> I'm doing some testing before put it into Sisyphus repository >> (http://en.altlinux.org). >> What I saw - it does not recognize lines like: >> --- >> sieve = /var/sievescripts/%n/sieve >> --- >> as cmusieve did. But it works ok with default .dovecot.sieve files in >> user home directories > > Hmm, I'll look into that. This is not intended and would be a bug. > >> Then, it reports >> --- >> error: failed to store into mailbox 'Inbox/R/Commits': Invalid mailbox >> name. >> --- >> where cmusieve did >> --- >> fileinto fileinto "Inbox/R/Commits"; >> --- >> this new plugin require changing slashes to dots: >> --- >> fileinto fileinto "Inbox.R.Commits"; > > This doesn't look like something that has changed for the Sieve > implementation specifically. Did you try dovecot-sieve-1.1 with dovecot 1.2 > to verify? I'll ask Timo about this. What is the configuration of your mail > store. Did you perhaps migrate from mbox to maildir? > >> I think this changes should be described somewhere. May be, it's >> already needed to create wiki page for libsieve at wiki.dovecot.org? > > Well, first one is probably a bug. The second one I am not sure about yet. > I'll get back to you when I do.
Re: [Dovecot] Problem: delivery with mode 600 into shared folder
Timo Sirainen wrote: Did you create dovecot-shared file to the maildir as http://wiki.dovecot.org/SharedMailboxes specifies? But one strange thing remains: I can tag messages (lime "Important", "Work", "Personal" and so on in Thunderbird) and tags are preserved at Thunderbird restart, but after restart all messages in shared folder appear as new. Even without restart, when go to another folder and then return to one where I've marked messages as "Read" before, they are new! Dovecot configs are in my previous message, I think I should not post them once more. -- Sergey Ivanov.
Re: [Dovecot] "select NULL as password..." failing after upgrade to dovecot-1.1
Timo Sirainen wrote: On Jul 2, 2008, at 12:26 AM, Sergey Ivanov wrote: Hi, I've upgraded mail server to dovecot-1.1, on solaris-10 with mysql user database. I used sql query "SELECT NULL as password, login as user, concat('/mail/var/dovecot/',login) AS userdb_home, 501 AS userdb_uid, 501 AS userdb_gid FROM users WHERE login='%n' AND password=old_password('%w')" with dovecot-1.0.15 and it worked perfectly. But since upgrade the server can not authenticate any users, complaining in info_log: "Empty password returned without no_password". How to set up such things in dovecot-1.1? Is it possible? Like it says, return no_password field also. For example: select 'Y' as no_password, ... Thank you, Timo, it worked but without underscore, that is, "select 'Y' as nopassword...". But after that I have another problem: --- dovecot: Jul 01 17:38:50 Error: IMAP(seriv): Corrupted transaction log file /mail/var/dovecot/seriv/.Trash/dovecot.index.log: hdr.size too large (67108864) dovecot: Jul 01 17:38:50 Warning: IMAP(seriv): fscking index file /mail/var/dovecot/seriv/.Trash/dovecot.index dovecot: Jul 01 17:38:52 Error: child 29586 (imap) killed with signal 11 ... --- (imap child killed many many times). I stopped dovecot, deleted dovecot.index files, and this problem was gone. But tags also were gone. Is there a way to upgrade preserving tags and other flags? -- WBR, Sergey Ivanov.
[Dovecot] "select NULL as password..." failing after upgrade to dovecot-1.1
Hi, I've upgraded mail server to dovecot-1.1, on solaris-10 with mysql user database. I used sql query "SELECT NULL as password, login as user, concat('/mail/var/dovecot/',login) AS userdb_home, 501 AS userdb_uid, 501 AS userdb_gid FROM users WHERE login='%n' AND password=old_password('%w')" with dovecot-1.0.15 and it worked perfectly. But since upgrade the server can not authenticate any users, complaining in info_log: "Empty password returned without no_password". How to set up such things in dovecot-1.1? Is it possible? -- Sergey Ivanov.
Re: [Dovecot] FETCH for mailbox INBOX UID 39641 got too little data: 4823 vs 4825
Timo Sirainen wrote: With these changes I can't break it anymore: http://hg.dovecot.org/dovecot-1.0/rev/0713de760c5f http://hg.dovecot.org/dovecot-1.0/rev/fc5f6bbbf4c0 http://hg.dovecot.org/dovecot-1.0/rev/0a4f86976f50 Yes, thanks Timo, it seems to be fixed! -- Sergey Ivanov.
Re: [Dovecot] FETCH for mailbox INBOX UID 39641 got too little data: 4823 vs 4825
Mark Adams wrote: > Have you tried to clear your index and cache files for this mailbox? > (dovecot. Files) > > Mark. > > > On 17 Dec 2007, at 21:24, Mikhail Teterin <[EMAIL PROTECTED]> > wrote: > >> Whenever I try to access an e-mail in the middle (rather than at the >> end) of >> the mailbox, my mail-client (KMail) gets an error a message like this is >> logged in the maillog: >> >> IMAP(mi): FETCH for mailbox INBOX UID 39641 got too little data: 4823 >> vs 4825 >> IMAP(mi): Disconnected: Disconnected >> >> The actual numbers vary, but it is always X vs X+2 >> >> The problem started when I upgraded to 1.0.8. Unfortunately, it is >> still here >> with 1.0.9. The mailbox in question is the standard Unix mbox >> (/var/mail/mi >> in my case). >> >> The server runs FreeBSD/amd64. Please, advise. Thanks! >> >> -mi I have dovecot-1.0.9, with recent patches up to hg changeset 5498:fc5f6bbbf4c0. Dovecot configuration is the following: --- # dovecot -n # 1.0.9: /etc/dovecot/dovecot.conf protocols: imap imaps pop3 pop3s ssl_cert_file: /var/lib/ssl/certs/dovecot.pem ssl_key_file: /var/lib/ssl/private/dovecot.pem login_dir: /var/run/dovecot/login login_executable(default): /usr/libexec/dovecot/imap-login login_executable(imap): /usr/libexec/dovecot/imap-login login_executable(pop3): /usr/libexec/dovecot/pop3-login mail_extra_groups: mail mbox_write_locks: fcntl mail_executable(default): /usr/libexec/dovecot/imap mail_executable(imap): /usr/libexec/dovecot/imap mail_executable(pop3): /usr/libexec/dovecot/pop3 mail_plugin_dir(default): /usr/lib64/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib64/dovecot/modules/imap mail_plugin_dir(pop3): /usr/lib64/dovecot/modules/pop3 pop3_uidl_format(default): pop3_uidl_format(imap): pop3_uidl_format(pop3): %08Xu%08Xv auth default: passdb: driver: pam userdb: driver: passwd socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 384 --- And I have the same problem with 'got too little data' in logs, and mail client ([EMAIL PROTECTED]) can not fetch messages. I have tried to remove all dovecot.index* files in .imap directory, seems it helped to open first messages, but then the problem reappears. snippet from the log: --- Dec 27 23:05:17 dovecot dovecot: IMAP(seriv): FETCH for mailbox xen-discuss-opensolaris-org UID 3 got too little data: 4427 vs 4430 Dec 27 23:05:17 dovecot dovecot: IMAP(seriv): Disconnected: DisconnectedDec 27 23:05:17 dovecot dovecot: imap-login: Login: user=, method=PLAIN, rip=192.168.10.10, lip=192.168.10.110, TLS --- This does not happen for INBOX. These 3 lines appears repeating about 5-10 times in a second in the log. About the numbers: --- grep 'got too litt' /var/log/maillog | sed 's/.*got too little data: //' | sort -u -n 1688 vs 1693 4427 vs 4430 4552 vs 4558 5119 vs 5120 8567 vs 8570 9527 vs 9543 54605 vs 54608 --- -- Sergey Ivanov.
Re: [Dovecot] Zimbra benchmarking
Hi, for me zimbra swapped a lot on 1G of RAM even while serving mailboxes for 3 users. But on 2G it runs such that I can't feel it's slower than previously worked there dovecot. -- Sergey. Timo Sirainen wrote: > Now that I have a working kvm setup, I thought I'd finally try how > Zimbra works. This is mainly some microbenchmarking, so it may not have > much to do with actual performance in real life. > > Setup: > > - 1GB memory given to kvm (from host's 2GB) > - Intel Core 2 6600 (kvm uses only one CPU) > - CentOS 5 > - 15GB qcow2 image on XFS filesystem > - Zimbra 5.0 RC2 RHEL5 x86_64 > - Dovecot latest hg, dbox format > > Both Zimbra and Dovecot were tested running on the same kvm image. All > data could be cached in memory, so this didn't really test disk I/O. > > Dovecot was run with fsync_disable=no. Running with =yes would have made > its performance even better. > > Zimbra features/bugs > > > Zimbra's SEARCH command doesn't support substring searching as IMAP > requires: > > 1 search text performance > * SEARCH 136 183 227 231 232 233 245 > 1 OK SEARCH completed > 2 search text erformance > * SEARCH > 2 OK SEARCH completed > 3 search text performanc > * SEARCH > 3 OK SEARCH completed > > It's possible to search "performanc" in a non-standard way though: > > 4 search text "performanc*" > * SEARCH 136 183 227 231 232 233 245 > 4 OK SEARCH completed > > This means that the upcoming Dovecot v1.1 is probably the only IMAP > server that supports IMAP-compatible full text search indexes with > incremental updates. (Cyrus Squat requires rebuilding the whole index > from scratch just for adding one mail, which makes it kind of > impractical.) > > Zimbra doesn't support SORT or THREAD extensions. > > I had trouble benchmarking more than 5 simultaneous connections in one > mailbox. I'm not sure if this is a configurable setting somewhere, or if > there's just some bug. The error messages that my imaptest gave looked > like Zimbra was buggy, but I didn't look at them too closely. > > STORE command also seemed to be buggy, giving lots of "STORE failed" > errors, even with just one connection. > > Zimbra uses 500MB of memory just to start up, so it's not exactly for > hosting small installations. > > Login+Logout > > > Dovecot: > > ./imaptest - select=0 secs=10 seed=0 clients=1 > Logi Logo > 100% 100% > 3439 6878 > ./imaptest - select=0 secs=10 seed=0 clients=10 > Logi Logo > 100% 100% > 4415 8830 > > Zimbra: > > ./imaptest - select=0 secs=10 seed=0 clients=1 > Logi Logo > 100% 100% > 18032 36064 > ./imaptest - select=0 secs=10 seed=0 clients=10 > Logi Logo > 100% 100% > 25519 51056 > > Looks like Dovecot's imap process creation hurts it a lot compared to > Zimbra's thread creation. Luckily IMAP connections are usually > long-living, so this shouldn't matter much, except for webmails for > which you can use imapproxy in the middle. > > LIST "" * > - > > Dovecot: > > ./imaptest - select=0 logout=0 list=100 secs=10 seed=0 clients=1 > Logi List > 100% 100% >1 181411 > ./imaptest - select=0 logout=0 list=100 secs=10 seed=0 clients=10 > Logi List > 100% 100% > 10 133451 > > Zimbra: > > ./imaptest - select=0 logout=0 list=100 secs=10 seed=0 clients=1 > Logi List > 100% 100% >1 1021 > ./imaptest - select=0 logout=0 list=100 secs=10 seed=0 clients=10 > Logi List > 100% 100% > 10 972 > > Yes, Dovecot's LIST is over 100 times faster. > > STATUS INBOX (MESSAGES UNSEEN RECENT) > - > > 100 messages in INBOX > > dovecot: > > ./imaptest - logout=0 select=0 status=100 secs=10 seed=0 clients=1 > Logi Stat > 100% 100% >1 191003 > ./imaptest - logout=0 select=0 status=100 secs=10 seed=0 clients=10 > Logi Stat > 100% 100% > 10 171171 > > Zimbra: > > ./imaptest - logout=0 select=0 status=100 secs=10 seed=0 clients=1 > Logi Stat > 100% 100% >1 3697 > ./imaptest - logout=0 select=0 status=100 secs=10 seed=0 clients=10 > Logi Stat > 100% 100% > 10 7009 > > FETCH 1:* (UID FLAGS ENVELOPE INTERNALDATE BODYSTRUCTURE) > - > > 100 messages in INBOX. > > dovecot: > ./imaptest - logout=0 select=100 fetch=100 secs=10 seed=0 clients=1 > Logi Sele Fetc > 100% 100% 100% >11 2769 > ./imaptest - logout=0 select=100 fetch=100 secs=10 seed=0 clients=5 > Logi Sele Fetc > 100% 100% 100% >55 2902 > > Zimbra: > > ./imaptest - logout=0 select=100 fetch=100 secs=10 seed=0 clients=1 > Logi Sele Fetc > 100% 100% 100% >11 203 > ./imaptest - logout=0 select=100 fetch=100 secs=10 seed=0 clients=5 > Logi Sele Fetc > 100% 100% 100% >55 258 > > FETCH ? (BODY[]) > > > Randomly fetch message body from 100 messages > > Dovecot: > > ./imaptest - logout=0 select=100 fetch2=100 secs=10 seed=0 clients=1 > Logi Sele Fet2 > 100% 100% 100% >30% >11 51958 > ./imaptest - logout=0 select=1
[Dovecot] imaptest.c
Timo, can you, please, update imaptest.c to be compatible with recent 1.1 beta5 dovecot sources? -- WBR, Sergey Ivanov.
Re: [Dovecot] more problems with dovecot-1.1 beta3
sergey ivanov wrote: > Timo Sirainen wrote: > >> On 21.10.2007, at 11.35, sergey ivanov wrote: >> >> >>> dovecot: Oct 21 04:00:30 Error: IMAP(seriv): posix_fallocate() failed: >>> Invalid argument >>> >> I guess this happens if Solaris libc has posix_fallocate() but the >> kernel doesn't support it. >> >> This should help: http://hg.dovecot.org/dovecot/rev/a9dfe05dfadd >> >> > Thank you! > With this patch 10 first minutes with dovecot-1.1 do not exposed any > problem, I will keep eye on it and report if something happens. > First 14 hours of the run, everything looks fine but the messages in dovecot.log: --- deliver(seriv): Oct 21 09:44:57 Error: Cache file /var/spool/imap/seriv/.imap/.community-lists-altlinux-org/dovecot.index.cache: Newly added field got lost unexpectedly deliver(seriv): Oct 21 11:01:43 Error: Cache file /var/spool/imap/seriv/.imap/.sisyphus-cybertalk-lists-altlinux-org/dovecot.index.cache: Newly added field got lost unexpectedly deliver(seriv): Oct 21 11:12:14 Error: Cache file /var/spool/imap/seriv/.imap/.xen-users-lists-xensource-com/dovecot.index.cache: Newly added field got lost unexpectedly deliver(seriv): Oct 21 11:31:36 Error: Cache file /var/spool/imap/seriv/.imap/.JewisClubMaoz-yahoogroups-com/dovecot.index.cache: Newly added field got lost unexpectedly deliver(seriv): Oct 21 12:00:25 Error: Cache file /var/spool/imap/seriv/.imap/.centos-announce-centos-org/dovecot.index.cache: Newly added field got lost unexpectedly deliver(seriv): Oct 21 15:42:37 Error: Cache file /var/spool/imap/seriv/.imap/.ma-linux-calypso-tux-org/dovecot.index.cache: Newly added field got lost unexpectedly deliver(seriv): Oct 21 17:30:19 Error: Cache file /var/spool/imap/seriv/.imap/.IsraelEldad-yahoogroups-com/dovecot.index.cache: Newly added field got lost unexpectedly --- I have deleted all dovecot.index* files after stopping dovecot-1.0.5 and before starting patched dovecot-1.1. -- WBR, Sergey Ivanov.
Re: [Dovecot] more problems with dovecot-1.1 beta3
Timo Sirainen wrote: > On 21.10.2007, at 11.35, sergey ivanov wrote: > >> dovecot: Oct 21 04:00:30 Error: IMAP(seriv): posix_fallocate() failed: >> Invalid argument > > I guess this happens if Solaris libc has posix_fallocate() but the > kernel doesn't support it. > > This should help: http://hg.dovecot.org/dovecot/rev/a9dfe05dfadd > Thank you! With this patch 10 first minutes with dovecot-1.1 do not exposed any problem, I will keep eye on it and report if something happens. -- Sergey Ivanov.
Re: [Dovecot] more problems with dovecot-1.1 beta3
Hi Timo, thanks for explaining how amount of the file descriptor may be counted. Timo Sirainen wrote: > On Thu, 2007-10-18 at 15:16 -0400, Sergey wrote: > >> Thank you for pointing me about -xc99 flag, I have compiled and >> installed dovecot inplace of version 1.0.5 without any special actions >> on the upgrade. And after starting it immediately got in it's log file >> messages like: >> --- >> dovecot: Oct 16 23:10:18 Error: IMAP(seriv): file_set_size() failed with >> index cache file >> /var/spool/imap/seriv/.imap/.git-altlinux-ru/dovecot.index.cache: >> Invalid argument >> > > Could you apply this patch and see what it logs then: > http://hg.dovecot.org/dovecot/rev/b7d8695d864d > I have applied the patch and now I have in the dovecot.log after just 'make install in the new dovecot-1.1 and dovecot-sieve-1.1 dirs, on the opening of the imap Maildir folder: --- dovecot: Oct 21 04:00:30 Error: IMAP(seriv): file_set_size() failed with index cache file /var/spool/imap/seriv/.imap/.dovecot-cvs-dovecot-org/dovecot.index.cache: Invalid argument dovecot: Oct 21 04:00:30 Error: IMAP(seriv): posix_fallocate() failed: Invalid argument ... --- about 10 times a second. Then I pkill'ed dovecot and did --- find /var/spool/imap/ -name 'dovecot.index*' | xargs rm -rf --- but got similar messages with new string added before each of them: --- dovecot: Oct 21 04:17:35 Error: IMAP(seriv): posix_fallocate() failed: Invalid argument dovecot: Oct 21 04:17:35 Error: IMAP(seriv): file_set_size() failed with index cache file /var/spool/imap/seriv/.imap/dovecot.index.cache: Invalid argument --- And, after I enabled smtp service and sent email to myself, I see in dovecot.log --- deliver(seriv): Oct 21 04:17:05 Error: posix_fallocate() failed: Invalid argument deliver(seriv): Oct 21 04:17:06 Error: posix_fallocate() failed: Invalid argument --- > >> dovecot: Oct 16 23:52:28 Panic: IMAP(seriv): file client.c: line 105: >> assertion failed: (!client->destroyed) >> > > Fixed: http://hg.dovecot.org/dovecot/rev/86e964111b1f > Yes, no anything like this after applying the patch. > >> dovecot: Oct 18 15:02:58 Warning: fd limit 256 is lower than what >> Dovecot can use under full load (more than 384). Either grow the limit >> or change login_max_processes_count a >> nd max_mail_processes settings >> > .. > >> One more problem is with fd limit: I have a small dovecot installation, >> so don't want to increase fd limit. I tried to decreasee >> max_mail_processes, login_max_processes_count and login_max_connections, >> but still I have >> > .. > >> login_max_connections: 120 >> max_mail_processes: 128 >> > > Changing login_max_connections doesn't affect anything because you're > using login_process_per_connection=yes. > > The needed fd count is calculated from login_max_processes_count(pop3) + > login_max_processes_count(imap) + max_mail_processes. > > So in your case 128+128+128. > -- With best regards, Sergey Ivanov
Re: [Dovecot] dovecot-1.0.3 & apacheds ldap
Timo Sirainen wrote: > On Fri, 2007-08-03 at 08:22 -0400, sergey ivanov wrote: > >> dovecot: Aug 03 08:07:10 Info: auth(default): ldap(seriv,127.0.0.1): >> pass search: base=ou=people,dc=parkheights,dc=dyndns,dc=org >> scope=subtree filter=(&(objectClass=posixAccount)(uid=seriv)) >> fields=uid,gidNumber,userPassword,homeDirectory,uidNumber >> dovecot: Aug 03 08:07:10 Info: auth(default): ldap(seriv,127.0.0.1): >> result: uid(user)=seriv gidnumber(?unknown?)= userpassword(?unknown?)= >> homedirectory(?unknown?)= uidnumber(?unknown?)= >> > > Looks like Dovecot found only "uid" field. Perhaps it would be also > helpful if it returned if there were any extra fields it didn't > recognize.. > > >> Attribute id : 'gidnumber', Values : ['1927'] >> Attribute id : 'userpassword', Values : [0x7B 0x4D ... >> (skipped some bytes here) ... 0x3D 0x3D ] >> Attribute id : 'homedirectory', Values : >> ['/var/spool/imap/seriv'] >> Attribute id : 'uidnumber', Values : ['1001'] >> > > Could it be that you need to use all lowercase letters, like gidnumber > instead of gidNumber? I didn't think LDAP attributes were > case-insensitive. > > You are rights. It's very strange, but when I changed gidNumber, uidNumber, userPassword and homeDirectory to all lowercase, dovecot successfully authorize against apacheds ldap server. Thanks. -- Sergey.
[Dovecot] dovecot-1.0.3 & apacheds ldap
I have problem with dovecot-1.0.3 and apacheds ldap server. If I change just uris in dovecot-ldap.conf to point to fedora-ds server, everything works O.K. I've tried with apacheds ldap server versions 1.0.2 and 1.5.0 command line search with parameters taken from dovecot.debug log gives me all needed attributes. Comments and help welcome. Here is my data: --- # /opt/dovecot/sbin/dovecot -n # 1.0.3: /opt/dovecot/etc/dovecot.conf log_path: /tmp/dovecot.log info_log_path: /tmp/dovecot.debug protocols: pop3 pop3s imap imaps ssl_cert_file: /etc/ssl/parkheights.cert ssl_key_file: /etc/ssl/parkheights.key login_dir: /opt/dovecot/var/run/dovecot/login login_executable(default): /opt/dovecot/libexec/dovecot/imap-login login_executable(imap): /opt/dovecot/libexec/dovecot/imap-login login_executable(pop3): /opt/dovecot/libexec/dovecot/pop3-login mail_extra_groups: mail mail_location: maildir:/var/spool/imap/%n/.imap mail_debug: yes mail_executable(default): /opt/dovecot/libexec/dovecot/imap mail_executable(imap): /opt/dovecot/libexec/dovecot/imap mail_executable(pop3): /opt/dovecot/libexec/dovecot/pop3 mail_plugin_dir(default): /opt/dovecot/lib/dovecot/imap mail_plugin_dir(imap): /opt/dovecot/lib/dovecot/imap mail_plugin_dir(pop3): /opt/dovecot/lib/dovecot/pop3 pop3_uidl_format(default): pop3_uidl_format(imap): pop3_uidl_format(pop3): %08Xu%08Xv auth default: verbose: yes debug: yes debug_passwords: yes passdb: driver: ldap args: /opt/dovecot/etc/dovecot-ldap.conf userdb: driver: ldap args: /opt/dovecot/etc/dovecot-ldap.conf userdb: driver: prefetch socket: type: listen master: path: /opt/dovecot/var/run/dovecot/auth-master mode: 384 user: vmail group: vmail --- # grep -v '#' /opt/dovecot/etc/dovecot-ldap.conf |grep -v '^\s*$' hosts = 192.168.10.43:389 dn = uid=admin,ou=system dnpass = Ahma3zoc sasl_bind = no auth_bind = no ldap_version = 3 base = ou=people,dc=parkheights,dc=dyndns,dc=org user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid user_filter = (&(objectClass=posixAccount)(uid=%Ln)) pass_attrs = uid=user,gidNumber=userdb_gid,userPassword=password,homeDirectory=userdb_home,uidNumber=userdb_uid default_pass_scheme = MD5 --- # tail -5 /tmp/dovecot.debug dovecot: Aug 03 08:07:10 Info: auth(default): client in: AUTH 1 PLAIN service=IMAPsecured lip=127.0.0.1 rip=127.0.0.1 resp=AHNlc(here_also_skipped_something)3N1Pg== dovecot: Aug 03 08:07:10 Info: auth(default): ldap(seriv,127.0.0.1): pass search: base=ou=people,dc=parkheights,dc=dyndns,dc=org scope=subtree filter=(&(objectClass=posixAccount)(uid=seriv)) fields=uid,gidNumber,userPassword,homeDirectory,uidNumber dovecot: Aug 03 08:07:10 Info: auth(default): ldap(seriv,127.0.0.1): result: uid(user)=seriv gidnumber(?unknown?)= userpassword(?unknown?)= homedirectory(?unknown?)= uidnumber(?unknown?)= dovecot: Aug 03 08:07:12 Info: auth(default): client out: FAIL 1 user=seriv temp dovecot: Aug 03 08:10:10 Info: imap-login: Disconnected: Inactivity: user=, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured --- # tail -3 /tmp/dovecot.log dovecot: Aug 03 08:06:53 Warning: auth(default): Killed with signal 15 dovecot: Aug 03 08:06:53 Warning: Killed with signal 15 dovecot: Aug 03 08:07:10 Error: auth(default): ldap(seriv,127.0.0.1): No password in reply --- here is the snippet from apacheds debug log: --- message Id : 2 Search Request Base Object : 'ou=people,dc=parkheights,dc=dyndns,dc=org' Scope : whole subtree Deref Aliases : never Deref Aliases Size Limit : no limit Time Limit : no limit Types Only : false Filter : '(&(objectClass=posixAccount)(uid=seriv))' Attributes : gidNumber, uid, userPassword, homeDirectory, uidNumber baseDn : 'ou=people,dc=parkheights,dc=dyndns,dc=org' filter : '(& (objectClass=posixAccount) (uid=seriv) ) ' scope : whole subtree typesOnly : false no limit Time Limit : no limit Deref Aliases : never Deref Aliases attributes : 'gidNumber', 'uid', 'userPassword', 'homeDirectory', 'uidNumber' message Id : 2 Search Result Entry Object Name : 'uid=seriv,ou=people,dc=parkheights,dc=dyndns,dc=org' Attributes Attributes Attribute id : 'uid', Values : ['seriv'] Attribute id : 'gidnumber', Values : ['1927'] Attribute id : 'userpassword', Values : [0x7B 0x4D ... (skipped some bytes here) ... 0x3D 0x3D ] Attribute id : 'homedirectory', Values : ['/var/spool/imap/seriv'] Attribute id : 'uidnumber', Values : ['1001']
Re: [Dovecot] dovecot mmap() complaints: No such device
Excuse me, I've forgotten to write: it's linux, and filesystem is fuse mounted zfs volume, see http://www.wizy.org. After uncommenting mmap_disable line in dovecot.conf, changing 'no' to 'yes' and restarting dovecot thre are no new complaints in logs. Thank you. -- Sergey Ivanov Timo Sirainen wrote: > On Thu, 2007-03-29 at 00:26 -0400, sergey ivanov wrote: > >> Mar 29 00:06:00 alt64 dovecot: IMAP(seriv): mmap() failed with index >> file /home/seriv/.imap/dovecot.index: No such device >> > >ENODEV The underlying filesystem of the specified file does not > support > memory mapping. > > What OS/filesystem are you using? Anyway, mmap_disable=yes helps. > >
[Dovecot] dovecot mmap() complaints: No such device
I'm trying to use dovecot-deliver with sieve plugin, delivering to Maildirs. Everything seems working O.K., but I'm getting the following lines in /var/log/maillog: --- Mar 29 00:06:00 alt64 dovecot: imap-login: Login: user=, method=PLAIN, rip=66.80.117.2, lip=192.168.10.8, TLS Mar 29 00:06:00 alt64 dovecot: IMAP(seriv): mmap() failed with index file /home/seriv/.imap/dovecot.index: No such device ... Mar 29 00:06:19 alt64 deliver(seriv): mmap() failed with index file /home/seriv/.imap/dovecot.index: No such device Mar 29 00:06:19 alt64 deliver(seriv): msgid=<[EMAIL PROTECTED]>: saved mail to INBOX Mar 29 00:06:19 alt64 postfix/local[15166]: 6294A141C269: to=<[EMAIL PROTECTED]>, relay=local, delay=0.24, delays=0.03/0.01/0/0.2, dsn=2.0.0, status=sent (delivered to command: /usr/lib64/dovecot/deliver -d ${USER}) Mar 29 00:06:19 alt64 postfix/qmgr[20933]: 6294A141C269: removed --- I have tried to enable rawlog, but have corresponding rawlog file do not explain the problem for me: --- 3 select "INBOX" 4 UID fetch 1:* (FLAGS) 5 UID fetch 43498:43501 (UID RFC822.SIZE FLAGS BODY.PEEK[HEADER.FIELDS (From To Cc Subject Date Message-ID Priority X-Priority References Newsgroups In-Reply-To Content-Type)]) 6 UID fetch 43500 (UID RFC822.SIZE BODY.PEEK[]) 7 uid store 43500 +FLAGS (NonJunk) 8 IDLE --- Dovecot compiled from cvs branch_1_0 at March 25. --- $ sudo dovecot -n Password: # /etc/dovecot/dovecot.conf ssl_cert_file: /etc/postfix/cert.pem ssl_key_file: /etc/postfix/key.pem login_dir: /var/run/dovecot/login login_executable: /usr/lib64/dovecot/imap-login mail_extra_groups: mail mail_location: maildir:/home/%u/.imap mail_executable: /usr/lib64/dovecot/rawlog /usr/lib64/dovecot/imap auth default: passdb: driver: pam userdb: driver: passwd socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 438 --- /home mounted as zfs-fuse filesystem. I guess the problem due to fuse mounted filesystem. -- With best regards, Sergey Ivanov.
Re: [Dovecot] 1.0.rc28 / v1.0 plans
I've compiled for Solaris-10 with Sun's cc, and for Altlinux. Both installations are working fine. -- Sergey. Timo Sirainen wrote: > I'll probably release 1.0.rc28 in a few days. Would be nice to get some > testing for it first. http://dovecot.org/nightly/dovecot-latest.tar.gz > contains pretty much what it's supposed to be. > > [skip...]