[Dovecot] Moving a mail between folders and post-processing ?

2007-08-16 Thread Jerry Nicholls
Hi,

Within Dovecot is there a way of spotting a change to a folder and
running a post-processing script on the email that was moved ? I'm
specifically after a way of seeing either an email entering or leaving a
folder - preferably running a different post-process script depending on
the direction. Essentially if an email enters or is moved out of a
'spam' folder I'd like to mark it as 'spam'/'ham' in the Bayesian
filters respectively.

Is there any such mechanism, or should I start looking at how to write a
plugin to achieve this ? If it's the plugin route is there any good
documentation on the plugin APIs etc ?

Thanks,
Jerry.
-- 
Jerry Nicholls   E: [EMAIL PROTECTED]
Core Systems & Networks Manager  W:http://www.zen.co.uk/
Zen Internet Ltd.T:0845 058 9000
 F:0845 058 9005



[Dovecot] High CPU utilization on Solaris 10

2007-08-16 Thread Jon Alessandrello
I've read similar post about such an issue, but have not seen any posted
solutions.  I have a clean install of Solaris 10 running a Sunfire v440
w/postfix.  I am using dovecote solely for SMTP authentication, and it is
working just fine except while running top I constantly see:

548 root   1  300 5240K 3416K run522:51 49.45% dovecot-auth

 The process never crashes, nor are there any errors.  I ran a test devel
box with an almost identical setup of postfix and dovecot on Solaris 9
(V240) and the functionality is identical, but with no high CPU usage.  The
following are my configs and system info:

dovecot --version
1.0.3

OS
Solaris 10 Sparc (Patched)

No NFS all local ufs

dovecot -n
# 1.0.3: /usr/local/etc/dovecot.conf
log_path: /var/log/dovecot
protocols: none
ssl_disable: yes
login_dir: /usr/local/var/run/dovecot/login
login_executable: /usr/local/libexec/dovecot/imap-login
auth default:
  mechanisms: plain login
  passdb:
driver: ldap
args: /usr/local/etc/dovecot-ldap.conf
  userdb:
driver: ldap
args: /usr/local/etc/dovecot-ldap.conf
  socket:
type: listen
client:
  path: /opt/pmx/postfix/var/private/auth
  mode: 432
  user: postfix
  group: postfix


cat dovecot-ldap.conf:
hosts = localhost

dn = cn=priv-account,ou=container,dc=example,dc=com
dnpass = mydnpasswd

ldap_version = 3
base = ou=people,dc=example,dc=com
scope = subtree
pass_attrs = uid=user,userPassword=password
pass_filter = (&(objectClass=posixAccount)(uid=%u))

default_pass_scheme = CRYPT

Any help would be great!!

-Jon


Re: [Dovecot] Dovecot IDLE bandwidth usage

2007-08-16 Thread Fredrik Tolf
On Thu, 2007-08-16 at 08:59 +0200, Steffen Kaiser wrote:
> On Thu, 16 Aug 2007, Fredrik Tolf wrote:
> 
> > using quite a deal of bandwidth, because of the "* OK Still here"
> 
> They are very essential for the COPY command, when I tested large 
> mailboxes last. So I suggest to _not_ remove them lightheadedly.
> The problem was that after 15min (or so) the MUA decided that the server 
> stopped responding and broke the connection.

Then again, though, the COPY command isn't the IDLE command. Is there
any particular reason why the messages can't be removed from only the
IDLE command?

Fredrik Tolf




Re: [Dovecot] Dovecot IDLE bandwidth usage

2007-08-16 Thread Timo Sirainen
On Thu, 2007-08-16 at 02:22 +0200, Fredrik Tolf wrote:
> I just recently discovered the IMAP IDLE command and tried it out with
> my Dovecot server. It seems to work fine and all, but it seems to be
> using quite a deal of bandwidth, because of the "* OK Still here"
> messages sent by the server at two minute intervals. I would argue that
> is a bit of a problem when using the IDLE command for "Push mail" on a
> mobile phone.

The point is mostly to keep connections alive when NATs and stateful
firewalls are used.

> Are those messages really necessary? I mean, Dovecot still times out
> after half an hour if the client doesn't "finish" the IDLE command and
> re-issues it, right? (Coincidentally, I would like to argue that it
> would be better not to time out at all during an IDLE command 

I've actually changed it like that for v1.1. I'm not sure if I should
change it for v1.0.

> and just
> turn on TCP keepalives instead, but that is the minor issue here)

TCP keepalives get sent so rarely that they don't keep NATed connections
alive. (Linux's tcp(7) says the first one is sent after 2h of idling)

> I'll apologize in advance if this is already a tunable option, but I
> haven't found anything about it in the configuration file.

Perhaps there should be.. But since this is client connection-specific
and not server-specific issue I'm not sure if that's a good idea either.
Wonder if this could be figured out automatically in some way..


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] High CPU utilization on Solaris 10

2007-08-16 Thread Timo Sirainen
On Thu, 2007-08-16 at 08:28 -0400, Jon Alessandrello wrote:
> I've read similar post about such an issue, but have not seen any posted
> solutions.  I have a clean install of Solaris 10 running a Sunfire v440
> w/postfix.  I am using dovecote solely for SMTP authentication, and it is
> working just fine except while running top I constantly see:
> 
> 548 root   1  300 5240K 3416K run522:51 49.45% dovecot-auth

See what it's doing with truss:

truss -p 548



signature.asc
Description: This is a digitally signed message part


[Dovecot] imap killed with signal 6 (including backtrace)

2007-08-16 Thread Ralf Hildebrandt
Found this today multiple times for the same user:

Aug 16 16:59:38 postamt dovecot: IMAP(username): file strfuncs.c: line 165 
(p_strndup): assertion failed: (max_chars != (size_t)-1)
Aug 16 16:59:38 postamt dovecot: IMAP(username): Raw backtrace: imap 
[0x80c6d53] -> imap(i_fatal+0) [0x80c6795] -> imap(p_strndup+0x38)
[0x80d8316] -> imap(t_strndup+0x22) [0x80d86d7] -> imap(cmd_create+0xb5) 
[0x8059a39] -> imap [0x805eb09] -> imap
[0x805ecf9] -> imap(_client_input+0x116) [0x805ee1b] -> 
imap(io_loop_handler_run+0x191) [0x80cebf8] -> imap(io_loop_run+0x20)
[0x80cde56] -> imap(main+0xb8) [0x8069cbf] -> 
/lib/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb7dc8030] -> imap 
[0x8058361]
Aug 16 16:59:38 postamt dovecot: child 11760 (imap) killed with signal 6

-- 
Ralf Hildebrandt ([EMAIL PROTECTED]) [EMAIL PROTECTED]
Postfix - Einrichtung, Betrieb und Wartung   Tel. +49 (0)30-450 570-155
http://www.arschkrebs.de
Do not worry about your problems with mathematics, I assure you mine are
far greater.   -- Albert Einstein


Re: [Dovecot] Moving a mail between folders and post-processing ?

2007-08-16 Thread Angel Marin

Jerry Nicholls escribió:

Hi,

Within Dovecot is there a way of spotting a change to a folder and
running a post-processing script on the email that was moved ? I'm
specifically after a way of seeing either an email entering or leaving a
folder - preferably running a different post-process script depending on
the direction. Essentially if an email enters or is moved out of a
'spam' folder I'd like to mark it as 'spam'/'ham' in the Bayesian
filters respectively.

Is there any such mechanism, or should I start looking at how to write a
plugin to achieve this ? If it's the plugin route is there any good
documentation on the plugin APIs etc ?


Have a look at the pipe[1] and dspam[2] plugins.

[1] 
[2] 

--
Angel Marin
http://anmar.eu.org/



Re: [Dovecot] Moving a mail between folders and post-processing ?

2007-08-16 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, Aug 16, 2007 at 12:56:12PM +0100, Jerry Nicholls wrote:
> Hi,
> 
> Within Dovecot is there a way of spotting a change to a folder and
> running a post-processing script [...]

Ah, I posed a similar question (with similar intentions ;-) on this list
this month, kindly answered by Timo et al:

  

Besides, this plug-in (announced this month) very nearly does what "we"
want, so it might be a good start (maybe you could use it as-is):

  

HTH
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFGxErKBcgs9XrR2kYRAm07AJ9xP5Gc2X2zB7izt6JVLzeJzK0yiACeMBr+
2HSYzLxdMKyYGdLQ+DXYa6A=
=vJjU
-END PGP SIGNATURE-



Re: [Dovecot] imap killed with signal 6 (including backtrace)

2007-08-16 Thread Timo Sirainen
On Thu, 2007-08-16 at 17:52 +0200, Ralf Hildebrandt wrote:
> Found this today multiple times for the same user:
> 
> Aug 16 16:59:38 postamt dovecot: IMAP(username): file strfuncs.c: line 165 
> (p_strndup): assertion failed: (max_chars != (size_t)-1)
> Aug 16 16:59:38 postamt dovecot: IMAP(username): Raw backtrace: imap 
> [0x80c6d53] -> imap(i_fatal+0) [0x80c6795] -> imap(p_strndup+0x38)
> [0x80d8316] -> imap(t_strndup+0x22) [0x80d86d7] -> imap(cmd_create+0xb5) 
> [0x8059a39] -> imap [0x805eb09] -> imap
> [0x805ecf9] -> imap(_client_input+0x116) [0x805ee1b] -> 
> imap(io_loop_handler_run+0x191) [0x80cebf8] -> imap(io_loop_run+0x20)
> [0x80cde56] -> imap(main+0xb8) [0x8069cbf] -> 
> /lib/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb7dc8030] -> imap 
> [0x8058361]
> Aug 16 16:59:38 postamt dovecot: child 11760 (imap) killed with signal 6

http://hg.dovecot.org/dovecot-1.0/rev/33690bb286af probably fixes it



signature.asc
Description: This is a digitally signed message part


[Dovecot] MANAGESIEVE patch v6 for dovecot 1.0.3

2007-08-16 Thread Stephan Bosch
Hello dovecot users,

I have updated the MANAGESIEVE patch to (hopefully) fix the compilation
issues reported by Robin Breathe. This is a patch against the latest
stable release 1.0.3. It currently won't compile with 1.1 due to
significant changes in the master code.  

Change Log V6
-

- Corked the client output stream while producing the capability greeting and on
  other some other occasions as well. Some naive client implementations expect 
to
  receive this as a single tcp frame and it is a good practice to do so anyway.
  Using this change the Thunderbird sieve extension (v0.1.1) seemed to work. 
However,
  scripts larger than a tcp frame still caused failures. All these issues are 
fixed
  in the latest version of the sieve add-on (currently v0.1.4).
- Cleaned up the new proxy source. My editor made the indentation a complete 
mess
  in terms of TABs vs spaces.
- Added TRYLATER response codes to BYE and NO messages where appropriate.
- Recopied the libsieve library into this patch to incorporate any changes that 
were
  made (only sieve-cmu.c still needs to be compared to the old cmu-sieve.c). 
This
  also solves the __attribute__((unused)) GCC dependencies. These were fixed 
long
  ago by Timo  the code duplication beast strikes again. (Will have to do
  this again for dovecot 1.1)
- Removed spurious return value from void function in
  src/lib-sieve/sieve-implementation.c as reported by Robin Breathe. GCC fails 
to
  report these issues. The function involved is currently not used and serves 
only
  as an example on how dovecot could support multiple sieve back-ends...

This patch still includes (yet another) instance of the CMU Sieve
source, as explained in one of my previous e-mails
(http://dovecot.org/list/dovecot/2006-July/015016.html). 

The patch can be downloaded at:

http://sinas.rename-it.nl/~sirius/dovecot-1.0.3-MANAGESIEVE-v6.diff.gz

The README.managesieve is located in the root of the dovecot source tree 
after applying the patch.

Have fun testing the patch. Don't hesitate to notify me when there are problems.

Regards,

--
Stephan Bosch
[EMAIL PROTECTED]
IRC: Freenode, #dovecot, S[r]us










Re: [Dovecot] ANY password option

2007-08-16 Thread Timo Sirainen
On Thu, 2007-08-16 at 12:31 +1000, Master Abi wrote:
> Hi
> 
> We sometimes migrate mailboxes over to one of our mail servers which has 
> a very handy feature called 'ANY password'. This will allow access to a 
> mailbox using the given username and disregard checking for the 
> password. This is a useful feature for many reasons.
> 
> Is there a possibility Dovecot could have such a a feature or is there a 
> workaround already.

What passdb do you use? With SQL NULL password means "any password",
although with v1.1 you'll also need to return "nopassword" field.



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] use of deliver from procmail advisable?

2007-08-16 Thread Kyle Wheeler

On Wednesday, August 15 at 06:08 PM, quoth martin f krafft:

This is exactly how I used to have it but then the need for
a vacation autoresponse to the From: address (as opposed to
Return-Path) arose and I had to switch to procmail:

 http://dovecot.org/list/dovecot/2007-August/024766.html

Before that, I was using spamc with --pipe-to, but always had a bad
feeling about that, since the manpage says:

 Note that there is a very slight chance mail will be lost here,
 because if the fork-and-exec fails there’s no place to put the
 mail message.


HEH. Using procmail has the same (or worse) problems, and has the very 
real potential of lost mail if anything goes wrong (including 
fork-and-exec failure). It's *possible* to configure procmail to 
handle failure better, but it's cumbersome and irritating. You have to 
follow every rule with something like this:


:0 e
{
EXITCODE=75
HOST
}

I mean, do you know and understand the importance of the ORGMAIL 
variable to procmail? Most procmail users don't, and it's critical to 
understanding procmail's behavior when faced with errors.


For example, if you run out of disk quota, procmail will happily fail  
and exit with a successful return code, informing your MTA that the 
message was delivered when in fact it was not. Or it will be 
delivered, but to the ORGMAIL box (which most admins have never heard 
of), and it will simply *appear* to be gone. But if it can't deliver 
to ORGMAIL... according to the man page the mail will "bounce back to 
the sender", but do you know what that means? Will procmail exit with 
a non-zero exit code? Or will procmail generate its own bounce and 
feed it to sendmail?



and my message to SA-users on this was never answered[0].

0. http://marc.info/?l=spamassassin-users&m=115185095923772&w=2


fork-and-exec can fail if:

1. There is insufficient memory to fork
2. There are insufficient PIDs to fork
3. The limit on the user's number of processes has been reached 
   (RLIMIT_NPROC)

4. The total number of bytes in the environment is too large
5. Search permission is denied on a component of the path prefix
6. The script's interpreter cannot be found (if you're exec'ing a 
   script)
7. The file to be executed, or the script interpreter, is not a 
   regular file

8. Execute permission is denied for the file to be executed
9. The file system is mounted 'noexec'
   10. The executable is an invalid executable, or attempts to name 
   more than one interpreter

   11. An I/O error occurred while reading the executable
   12. The executable listed, or the script interpreter, is a 
   directory rather than a program
   13. There is a loop in the script interpreter (e.g. the interpreter 
   specified in the script is itself a script whose interpreter is 
   the first script).

   14. The limit on the user's number of open files has been reached.
   15. The name of the executable is too long.
   16. The limit on the operating system's number of open files has 
   been reached.

   17. The file to be executed does not exist.
   18. The executable is for a different architecture.
   19. Insufficient kernel memory is available.
   20. A component of the path to the executable, or to the script's 
   interpreter, is not a directory.
   21. The filesystem is mounted 'nosuid', the user is not the 
   superuser, and the file has an SUID or SGID bit set.
   22. The process is being traced, the user is not the superuser, and 
   the file has an SUID or SGID bit set.

   23. The executable was open for writing by another process.

That's the SHORT list for why things might go wrong. Depending on the 
binary that you ask spamc to run, waiting for it to finish may be 
impossible (for example, if it does a fork/exec to handle things), so 
no, the spamc client cannot be expected to simply wait and tell you 
with certainty that the mail was delivered properly in all cases.



Now I am using procmail and at least now that failure will cause
postfix to defer a message.


It may not, unless you're significantly more in-tune with procmail 
than your average sysadmin.


~Kyle
-- If I had only known, I would have been a locksmith.
-- Albert Einstein


pgpsUYrNVLotI.pgp
Description: PGP signature


Re: [Dovecot] Dovecot IDLE bandwidth usage

2007-08-16 Thread Gerald Villemure

Timo Sirainen wrote:


TCP keepalives get sent so rarely that they don't keep NATed connections
alive. (Linux's tcp(7) says the first one is sent after 2h of idling)



Its the same for windows systems, 2 hours.

All routers SHOULD keep the NAT connections open for at least that long.
But its not always the case,  a few years ago I had to get a FIX for an 
Alcatel Speedtouch Pro since its was originally programed to drop TCP 
connections after 15 minutes.


Gerald



[Dovecot] mail_location ?

2007-08-16 Thread Yu Chen
Hi, my mail server is running fine. But not sure if I am doing right with 
"mail_location" in dovecot.conf


I am using dovecot-1.0.0-8_56 on RHEL AS 4 Update 5.
Our users have a "mail" directory under their home directory(~/mail). I 
thought the "mail_location" line should be:


mail_location = 
mbox:%h/mail:INBOX=/var/mail/%u:INDEX=/var/mail_indexes/%d/%n


but if I do this, all the mailboxes in the "mail" directory won't show, 
and a new "mail" folder will be created under "~/mail/", so it is 
"~/mail/mail" now.


if I change it to this:

mail_location = mbox:%h:INBOX=/var/mail/%u:INDEX=/var/mail_indexes/%d/%n

Everything is fine, is this the supposed behavior?

Thanks
CY


===
Yu Chen
Howard Hughes Medical Institute
Chemistry Building, Rm 182
University of Maryland at Baltimore County
1000 Hilltop Circle
Baltimore, MD 21250

phone:  (410)455-6347 (primary)
(410)455-2718 (secondary)
fax:(410)455-1174
email:  [EMAIL PROTECTED]
===


[Dovecot] High CPU utilization on Solaris 10

2007-08-16 Thread Jon Alessandrello
It is putting me in an infinite loop:



truss -p 548

pollsys(0xFFBFF5B8, 5, 0xFFBFF548, 0x)  = 0
pollsys(0xFFBFF5B8, 5, 0xFFBFF548, 0x)  = 0
pollsys(0x0005C5F0, 29, 0xFFBFFA30, 0x) = 1
pollsys(0xFFBFF5B8, 5, 0xFFBFF548, 0x)  = 0
pollsys(0xFFBFF5B8, 5, 0xFFBFF548, 0x)  = 0
pollsys(0x0005C5F0, 29, 0xFFBFFA30, 0x) = 1
pollsys(0xFFBFF5B8, 5, 0xFFBFF548, 0x)  = 0
pollsys(0xFFBFF5B8, 5, 0xFFBFF548, 0x)  = 0
pollsys(0x0005C5F0, 29, 0xFFBFFA30, 0x) = 1
pollsys(0xFFBFF5B8, 5, 0xFFBFF548, 0x)  = 0
pollsys(0xFFBFF5B8, 5, 0xFFBFF548, 0x)  = 0
pollsys(0x0005C5F0, 29, 0xFFBFFA30, 0x) = 1
pollsys(0xFFBFF5B8, 5, 0xFFBFF548, 0x)  = 0
pollsys(0xFFBFF5B8, 5, 0xFFBFF548, 0x)  = 0
pollsys(0x0005C5F0, 29, 0xFFBFFA30, 0x) = 1
pollsys(0xFFBFF5B8, 5, 0xFFBFF548, 0x)  = 0
pollsys(0xFFBFF5B8, 5, 0xFFBFF548, 0x)  = 0
pollsys(0x0005C5F0, 29, 0xFFBFFA30, 0x) = 1
pollsys(0xFFBFF5B8, 5, 0xFFBFF548, 0x)  = 0
pollsys(0xFFBFF5B8, 5, 0xFFBFF548, 0x)  = 0


-Jon



Re: [Dovecot] High CPU utilization on Solaris 10

2007-08-16 Thread Dave McGuire

On Aug 16, 2007, at 1:51 PM, Jon Alessandrello wrote:

It is putting me in an infinite loop:



truss -p 548

pollsys(0xFFBFF5B8, 5, 0xFFBFF548, 0x)  = 0
pollsys(0xFFBFF5B8, 5, 0xFFBFF548, 0x)  = 0
pollsys(0x0005C5F0, 29, 0xFFBFFA30, 0x) = 1
pollsys(0xFFBFF5B8, 5, 0xFFBFF548, 0x)  = 0

...

  Just as a data point...My installation is running 1.0rc29 under  
Solaris10 (SPARC) and I'm not seeing anything liket his.  Just FYI.


   -Dave

--
Dave McGuire
Port Charlotte, FL
Farewell Ophelia, 9/22/1991 - 7/25/2007





Re: [Dovecot] High CPU utilization on Solaris 10

2007-08-16 Thread Timo Sirainen

On 16.8.2007, at 20.51, Jon Alessandrello wrote:


pollsys(0xFFBFF5B8, 5, 0xFFBFF548, 0x)  = 0
pollsys(0xFFBFF5B8, 5, 0xFFBFF548, 0x)  = 0


Some people had this problem when giving some superoptimization flags  
with Sun Studio. Did you do that?




PGP.sig
Description: This is a digitally signed message part


Re: [Dovecot] imap killed with signal 6 (including backtrace)

2007-08-16 Thread Ralf Hildebrandt
* Timo Sirainen <[EMAIL PROTECTED]>:
> On Thu, 2007-08-16 at 17:52 +0200, Ralf Hildebrandt wrote:
> > Found this today multiple times for the same user:
> > 
> > Aug 16 16:59:38 postamt dovecot: IMAP(username): file strfuncs.c: line 165 
> > (p_strndup): assertion failed: (max_chars != (size_t)-1)
> > Aug 16 16:59:38 postamt dovecot: IMAP(username): Raw backtrace: imap 
> > [0x80c6d53] -> imap(i_fatal+0) [0x80c6795] -> imap(p_strndup+0x38)
> > [0x80d8316] -> imap(t_strndup+0x22) [0x80d86d7] -> imap(cmd_create+0xb5) 
> > [0x8059a39] -> imap [0x805eb09] -> imap
> > [0x805ecf9] -> imap(_client_input+0x116) [0x805ee1b] -> 
> > imap(io_loop_handler_run+0x191) [0x80cebf8] -> imap(io_loop_run+0x20)
> > [0x80cde56] -> imap(main+0xb8) [0x8069cbf] -> 
> > /lib/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb7dc8030] -> imap 
> > [0x8058361]
> > Aug 16 16:59:38 postamt dovecot: child 11760 (imap) killed with signal 6
> 
> http://hg.dovecot.org/dovecot-1.0/rev/33690bb286af probably fixes it

Nope, I did a hg pull yesterday and restarted dovecot.

-- 
Ralf Hildebrandt ([EMAIL PROTECTED]) [EMAIL PROTECTED]
Postfix - Einrichtung, Betrieb und Wartung   Tel. +49 (0)30-450 570-155
http://www.arschkrebs.de
All the features in the world only do more to make me believe that
Sendmail is hopelessly baroque, like some huge construction with
chrome and tailfins sticking out in every direction -- like some
monstrocity sculpted by people not the least bit interested in
correctness. 


[Dovecot] Sieve Vacation cause deliver to die

2007-08-16 Thread M1

I have compile with the vacation patch (dovecot-sieve-1.0-logging.patch) and
log file shown.

-
2007-08-15 11:28:34 deliver([EMAIL PROTECTED]):
sieve_execute_bytecode(/home/mail/sieve/[EMAIL PROTECTED]/.dovecot.sievec)
failed
2007-08-15 11:28:34 deliver([EMAIL PROTECTED]): sieve runtime error: Run
error
-

my .dovecot.sieve

# Sieve Filter
# 由 Ingo (http://www.horde.org/ingo/) 產生 (August 15, 2007, 10:49 am)

require "vacation";

# 假期通知
if allof ( not exists ["list-help", "list-unsubscribe", "list-subscribe",
"list-owner", "list-post", "list-archive", "list-id"], not header
:comparator "i;ascii-casemap" :is "Precedence" "list,bulk" ) {
   vacation :days 7 :addresses "[EMAIL PROTECTED]" :subject "test" "test
vacation";
}








[Dovecot] High CPU utilization on Solaris 10

2007-08-16 Thread Jon Alessandrello
Some people had this problem when giving some superoptimization flags
with Sun Studio. Did you do that?  -Timo


No I did not use any optimization.

And Dave, I took what you said and just tried both
dovecot-1.0.2
dovecot-1.0.rc29

and have the same exact results :(


[Dovecot] index and control files not being created

2007-08-16 Thread Luis Pablo Michelena Scaffo

Hello, I'm configurating dovecot 1.0.3 on debian etch.
While trying to set public folders, y decided to have the index and 
control files on the users homes. those homes are mounted by nfs, with 
disabled access to root.

In that scenario, I'm getting the errors i transcribe next:

Aug 16 11:21:17 server dovecot: IMAP(user): 
fchown(/home/user/Maildir/shared-settings/control/.folder/dovecot-uidlis

t) failed: Operation not permitted
Aug 16 11:21:17 server dovecot: IMAP(user): 
fchown(/home/user/Maildir/shared-settings/control/.folder/dovecot-uidlis

t) failed: Operation not permitted
Aug 16 11:21:17 server dovecot: IMAP(user): 
rename(/inbox/shared/.folder/cur/mailfile, 
/inbox/shared/.folder/cur/mailfile

:2,S) failed: Operation not permitted
Aug 16 11:21:17 server dovecot: IMAP(user): 
fchown(/home/user/Maildir/shared-settings/control/.folder/dovecot-uidlis

t) failed: Operation not permitted
Aug 16 11:21:17 server dovecot: IMAP(user): 
rename(/inbox/shared/.folder/cur/mailfile, 
/inbox/shared/.folder/cur/mailfile

:2,S) failed: Operation not permitted
Aug 16 11:21:26 server dovecot: IMAP(user): Disconnected: Logged out
Aug 16 11:21:27 server dovecot: IMAP(user): 
fchown(/home/user/Maildir/shared-settings/control/.folder/dovecot-uidlis

t) failed: Operation not permitted
Aug 16 11:21:27 server dovecot: IMAP(user): 
rename(/inbox/shared/.folder/cur/mailfile, 
/inbox/shared/.folder/cur/mailfile

:2,S) failed: Operation not permitted

Then I touched those files and the errors faded away.
Beside that, I was testing the setup, and while trying to delete some 
files on the shared folder, I got another error:
Aug 16 16:38:04 server dovecot: IMAP(user): 
rename(/inbox/shared/.folder/cur/1183976419.755_0.server:2,Sa, 
/inbox/shared/.folder/cur/1183976419.755_0.server:2,STa) failed: 
Operation not permitted
Aug 16 16:38:11 server dovecot: IMAP(user): 
fchown(/home/user/Maildir/shared-settings/control/.folder/dovecot-uidlist) 
failed: Operation not permitted
Aug 16 16:38:11 server dovecot: IMAP(user): 
rename(/inbox/shared/.folder/cur/1183976419.755_0.server:2,Sa, 
/inbox/shared/.folder/cur/1183976419.755_0.server:2,STa) failed: 
Operation not permitted


Which seems odd, because I though that  as a flag,  the deleted flag 
should be marked on the index files and not directly on the shared  
folder (where the user hasn't any permission other than reading), ant 
the same goes to the "read" flag


Am I wrong? Is there any workaround to make dovecot behave the way I'd 
liked?


The config follows:

login_executable: /usr/lib/dovecot/imap-login
mail_extra_groups: mail
mail_location: maildir:/home/%u/Maildir:INBOX=/inbox/mdir/%u
mmap_disable: yes
namespace:
 type: private
 separator: /
 location: maildir:~/Maildir:INBOX=/inbox/mdir/%u
 inbox: yes
namespace:
 type: public
 separator: /
 prefix: Shared folders/
 location: 
maildir:/inbox/shared:INDEX=/home/%u/Maildir/shared-settings/index:CONTROL=/home/%u/Maildir/shared-settings/control

auth default:
 passdb:
   driver: passwd
   args: blocking=yes
 passdb:
   driver: shadow
 userdb:
   driver: passwd

Cheers,
Luis



Re: [Dovecot] High CPU utilization on Solaris 10

2007-08-16 Thread Peter Eriksson

Jon Alessandrello skrev:

Some people had this problem when giving some superoptimization flags
with Sun Studio. Did you do that?  -Timo


No I did not use any optimization.

And Dave, I took what you said and just tried both
dovecot-1.0.2
dovecot-1.0.rc29

and have the same exact results :(



We are also seeing lot's of problems with high CPU utilizations
on Solaris 10, but in the IMAP daemon. We found one way around it
and that is to disable the IDLE support. By disabling IDLE our CPU
load went from 100 to 3 (on a 6-core Sun T1000 (looks like a 24 CPU
machine). We typically have 100-300 users accessing this server using
POP3 and IMAP.

We also saw a lot of pollsys() calls when trussing it. We haven't had
time to debug it further though. I tried compiling the source file
that calculates the ioloop timeout using "-O" instead of "-fast" but
that didn't make any difference.

- Peter

- Peter



[Dovecot] Dovecot IMAP/POP3 Proxy with LDAP

2007-08-16 Thread Raphael Bittencourt S. Costa
Hello all,

I'm having problems to make Dovecot proxy work, I configured it
following dovecot's site. See my test below:

It accepts login and password and then closes the connection.

bastion01:~/build# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK Dovecot ready.
user [EMAIL PROTECTED]
+OK
pass xx
+OK Logged in.
Connection closed by foreign host.


See that it get the host information but still try to access the mbox
locally.

Aug 16 16:22:36 bastion01 dovecot: auth(default):
ldap([EMAIL PROTECTED],127.0.0.1): bind:
dn=cn=raphael.costa,ou=.com.br,ou=accounts,o=comMail
Aug 16 16:22:36 bastion01 dovecot: auth(default): client out: OK
2   [EMAIL PROTECTED]
host=mailserver-01..com.br
Aug 16 16:22:36 bastion01 dovecot: auth(default): master in: REQUEST
1   38942

Aug 16 16:22:36 bastion01 dovecot: POP3([EMAIL PROTECTED]):
maildir: access(/dev/null/Maildir, rwx): failed: Not a directory
Aug 16 16:22:36 bastion01 dovecot: POP3([EMAIL PROTECTED]):
maildir: couldn't find root dir
Aug 16 16:22:36 bastion01 dovecot: POP3([EMAIL PROTECTED]):
mbox: root: access(/dev/null/mail, rwx) failed: Not a directory
Aug 16 16:22:36 bastion01 dovecot: POP3([EMAIL PROTECTED]):
mbox: root: access(/dev/null/Mail, rwx) failed: Not a directory
Aug 16 16:22:36 bastion01 dovecot: POP3([EMAIL PROTECTED]):
mbox: checking if we are chrooted:
Aug 16 16:22:36 bastion01 dovecot: POP3([EMAIL PROTECTED]): mbox
autodetect: data=
Aug 16 16:22:36 bastion01 dovecot: POP3([EMAIL PROTECTED]): mbox
autodetect: has .imap/: stat(/.imap) failed: No such file or directory
Aug 16 16:22:36 bastion01 dovecot: POP3([EMAIL PROTECTED]): mbox
autodetect: has inbox: stat(/inbox) failed: No such file or directory
Aug 16 16:22:36 bastion01 dovecot: POP3([EMAIL PROTECTED]): mbox
autodetect: has mbox: stat(/mbox) failed: No such file or directory
Aug 16 16:22:36 bastion01 dovecot: POP3([EMAIL PROTECTED]):
mbox: root mail directory not found



My dovecot-ldap.conf:
pass_attrs =
uid=user,userPassword=password,mailMessageStore=userdb_home,qmailUID=userdb_uid,qmailGID=userdb_gid,proxy,mailHost=host


What am I doing wrong?


Raphael Costa


Re: [Dovecot] mail_location ?

2007-08-16 Thread Scott Silva
Yu Chen spake the following on 8/16/2007 10:41 AM:
> Hi, my mail server is running fine. But not sure if I am doing right
> with "mail_location" in dovecot.conf
> 
> I am using dovecot-1.0.0-8_56 on RHEL AS 4 Update 5.
> Our users have a "mail" directory under their home directory(~/mail). I
> thought the "mail_location" line should be:
> 
> mail_location =
> mbox:%h/mail:INBOX=/var/mail/%u:INDEX=/var/mail_indexes/%d/%n
> 
> but if I do this, all the mailboxes in the "mail" directory won't show,
> and a new "mail" folder will be created under "~/mail/", so it is
> "~/mail/mail" now.
> 
> if I change it to this:
> 
> mail_location = mbox:%h:INBOX=/var/mail/%u:INDEX=/var/mail_indexes/%d/%n
> 
> Everything is fine, is this the supposed behavior?
> 
Do your clients have a mail directory configured in them like ~/mail? It was a
common practice on older systems using other imap servers.

-- 

MailScanner is like deodorant...
You hope everybody uses it, and
you notice quickly if they don't



Re: [Dovecot] High CPU utilization on Solaris 10

2007-08-16 Thread Tomi Hakala

Peter Eriksson wrote:

We also saw a lot of pollsys() calls when trussing it. We haven't had
time to debug it further though. I tried compiling the source file
that calculates the ioloop timeout using "-O" instead of "-fast" but
that didn't make any difference.


If you are using Sun Studio 12 compile all with "-xtarget=native -xO3" 
and see if it helps for your high CPU usage, for me it did.


Tomi