[Dovecot] Maildrop script to sieve

2008-01-19 Thread Raphael Bittencourt S. Costa
Hi,

I'm working on a system that have about 350K e-mail users and 100k users
that uses maildrop scripts to make filters on their delivery. So,
changing scripts by hand can't be a choice. I  googled so much and I
wasn't able to find any script that converts maildrop scripts to sieve.
Does anyone knows where can I find it? 

By the way, does anyone uses dovecot-1.1-beta on a production system
with sieve+maildir+lda?  


Thanks,

Raphael Costa


[Dovecot] [Sieve] Sendmail problem

2008-01-19 Thread Roger
Hi All,
it's my first post in this list.
I'm running dovecot 1.0.rc15 on my Debian Etch box. It's working very well but 
I faced a problem with Vacation using Sieve. :-(
In fact, after well configuring the system I dont't receive the vacation 
message, and in the log I found:

deliver([EMAIL PROTECTED]): 2008-01-19 12:05:32 Info: cmusieve: Using sieve 
path: /home/path/to/my/homedir/.dovecot.sieve
deliver([EMAIL PROTECTED]): 2008-01-19 12:05:32 Error: Sendmail process 
terminated abnormally, exit status 75
deliver([EMAIL PROTECTED]): 2008-01-19 12:05:32 Info: sieve runtim error: 
Vacation: Error sending mail.

Any idea about the reason this happen and how to solve?

Thank a lot for your help
Roger

Re: [Dovecot] Maildrop script to sieve

2008-01-19 Thread Daniel
On Saturday 19 January 2008 11:19:59 Raphael Bittencourt S. Costa wrote:
 Hi,

 I'm working on a system that have about 350K e-mail users and 100k
 users that uses maildrop scripts to make filters on their delivery.
 So, changing scripts by hand can't be a choice. I  googled so much
 and I wasn't able to find any script that converts maildrop scripts
 to sieve. Does anyone knows where can I find it?
Can't help you with that, sorry.


 By the way, does anyone uses dovecot-1.1-beta on a production system
 with sieve+maildir+lda?

Yes, and it is stable, when it is working. It just sometimes needs a few 
bug reports and fixes, but that is the way it is with beta software. I 
wouldn't recommend it for a big system like your's, but it sure can be 
used with maildir + sieve + deliver with no issues.

Daniel


[Dovecot] Time just moved backwards error even with ntpd

2008-01-19 Thread Luigi Rosa
Scenario: server PC abruptly switched off due to power cable problems 
(an UPS cannot solve this issue), so during shutdown Linux was not 
able to resinchronize the system clock. After a few hours the server 
come back on, Linux booted and the services (ntpd, dovecot and many 
others) started


But the system clock was 45 minutes ahead, so:

Jan 19 11:13:39 gw ntpd[2112]: synchronized to LOCAL(0), stratum 10
Jan 19 11:13:39 gw ntpd[2112]: kernel time sync disabled 0041
Jan 19 11:14:43 gw ntpd[2112]: synchronized to 62.48.35.100, stratum 2
Jan 19 10:31:55 gw ntpd[2112]: time reset -3600.221385 s
Jan 19 10:31:55 gw ntpd[2112]: kernel time sync enabled 0001
Jan 19 10:31:55 gw dovecot: Time just moved backwards by 3600 seconds. 
This might cause a lot of problems, so I'll just kill myself now. 
http://wiki.dovecot.org/TimeMovedBackwards





Ciao,
luigi

--
/
+--[Luigi Rosa]--
\

Spoon boy: Do not try and bend the spoon. That's impossible. 
Instead... only try to realize the truth.

Neo: What truth?
Spoon boy: There is no spoon.
Neo: There is no spoon?
Spoon boy: Then you'll see, that it is not the spoon that bends, it is 
only yourself.

--The Matrix


Re: [Dovecot] Maildrop script to sieve

2008-01-19 Thread mouss

Raphael Bittencourt S. Costa wrote:

Hi,

I'm working on a system that have about 350K e-mail users and 100k users
that uses maildrop scripts to make filters on their delivery. So,
changing scripts by hand can't be a choice. I  googled so much and I
wasn't able to find any script that converts maildrop scripts to sieve.
Does anyone knows where can I find it? 
  


maildrop scripts are way too flexible to write a general conversion 
program. Unless your scripts have a specific structure and logic, you 
should continue delivering with maildrop. you can build maildrop without 
authlib (I have this running on one system).


if the scripts have a common logic, show few of them and we'll see if 
it is feasible to convert them.



By the way, does anyone uses dovecot-1.1-beta on a production system
with sieve+maildir+lda?  

  




Re: [Dovecot] Time just moved backwards error even with ntpd

2008-01-19 Thread Ralf Hildebrandt
* Luigi Rosa [EMAIL PROTECTED]:
 Scenario: server PC abruptly switched off due to power cable problems (an 
 UPS cannot solve this issue), so during shutdown Linux was not able to 
 resinchronize the system clock. After a few hours the server come back on, 
 Linux booted and the services (ntpd, dovecot and many others) started

 But the system clock was 45 minutes ahead, so:

 Jan 19 11:13:39 gw ntpd[2112]: synchronized to LOCAL(0), stratum 10
 Jan 19 11:13:39 gw ntpd[2112]: kernel time sync disabled 0041
 Jan 19 11:14:43 gw ntpd[2112]: synchronized to 62.48.35.100, stratum 2
 Jan 19 10:31:55 gw ntpd[2112]: time reset -3600.221385 s
 Jan 19 10:31:55 gw ntpd[2112]: kernel time sync enabled 0001
 Jan 19 10:31:55 gw dovecot: Time just moved backwards by 3600 seconds. This 
 might cause a lot of problems, so I'll just kill myself now. 
 http://wiki.dovecot.org/TimeMovedBackwards

Solution: Start ntpdate/ntpd FIRST.

-- 
Ralf Hildebrandt ([EMAIL PROTECTED]) [EMAIL PROTECTED]
Postfix - Einrichtung, Betrieb und Wartung   Tel. +49 (0)30-450 570-155
http://www.arschkrebs.de
I realise computers suck. The only reason why they are a hobby of mine
is because I enjoy pain! 


Re: [Dovecot] Time just moved backwards error even with ntpd

2008-01-19 Thread Karsten Bräckelmann
On Sat, 2008-01-19 at 12:46 +0100, Luigi Rosa wrote:
 Scenario: server PC abruptly switched off due to power cable problems 
 (an UPS cannot solve this issue), so during shutdown Linux was not 

This sounds like rather extreme, exceptional circumstances. And actually
an infrastructure problem, rather than software. ;)

 able to resinchronize the system clock. After a few hours the server 
 come back on, Linux booted and the services (ntpd, dovecot and many 
 others) started
 
 But the system clock was 45 minutes ahead, so:

No. :)

 Jan 19 11:13:39 gw ntpd[2112]: synchronized to LOCAL(0), stratum 10
 Jan 19 11:13:39 gw ntpd[2112]: kernel time sync disabled 0041
 Jan 19 11:14:43 gw ntpd[2112]: synchronized to 62.48.35.100, stratum 2
 Jan 19 10:31:55 gw ntpd[2112]: time reset -3600.221385 s
 Jan 19 10:31:55 gw ntpd[2112]: kernel time sync enabled 0001
 Jan 19 10:31:55 gw dovecot: Time just moved backwards by 3600 seconds. 
 This might cause a lot of problems, so I'll just kill myself now. 
 http://wiki.dovecot.org/TimeMovedBackwards

Exactly one hour. Doesn't strike me as a coincidence...

  guenther


-- 
char *t=[EMAIL PROTECTED];
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;il;i++){ i%8? c=1:
(c=*++x); c128  (s+=h); if (!(h=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}



Re: [Dovecot] Time just moved backwards error even with ntpd

2008-01-19 Thread Luigi Rosa

Ralf Hildebrandt said the following on 19/01/2008 13.16:


Solution: Start ntpdate/ntpd FIRST.


It's what I did, but it could not solve this specific issue.

Unfortunately, server and ADSL modem router went back online together 
and the ADSL router takes more time to go online than the server 
(blame it on Linux and fast processor :)


I was able to replicate this scenario: the ADSL modem/router connects 
to Internet few second after I get the login on Linux, so even 
starting ntpd right after the network and dovecot as last service 
could not help.



Ciao,
luigi

--
/
+--[Luigi Rosa]--
\

Q: And this, I'm particularly proud of - behind the headlights, 
stinger missiles!
James Bond: Excellent, just the thing for unwinding after a rough day 
at the office.
Q: Need I remind you, 007, that you have a license to kill, not to 
break traffic laws.

--007 Goldeneye


[Dovecot] Public mailboxes

2008-01-19 Thread libero1
Ciao everbody,
I have a simple question for who has a few experience with dovecot.
I want to share a mailbox with some users, I configure dovecot and now in my 
thinderbird I can see the public namespace. The problem is that I cann't see 
the inbox of the mailbox, in other words when a mail arrive in this mailbox I 
can not see it, but only what is in other folders. 
Why? Is it normal? What can I do to let my users to see new messages?


Thanks for you help.
Bye

Re: [Dovecot] Time just moved backwards error even with ntp d

2008-01-19 Thread Gunter Ohrner
Am Samstag, 19. Januar 2008 schrieb Karsten Bräckelmann:
  2 Jan 19 10:31:55 gw ntpd[2112]: time reset -3600.221385 s
 Exactly one hour. Doesn't strike me as a coincidence...

Mh, sounds as if the system clock is set to local time, including DST 
changes, and the system clock had not yet been adjusted... I know why I 
use UTC for the system clock on my machines... ;)

Greetings,

  Gunter

-- 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Give a man a fire and he's warm for a day, but set fire to him and he's 
warm for the rest of his life.-- (Terry Pratchett, Jingo)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+   PGP-verschlüsselte Mails bevorzugt! +
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


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


Re: [Dovecot] Time just moved backwards error even with ntpd

2008-01-19 Thread Luigi Rosa

Gunter Ohrner said the following on 19/01/08 16:47:

Mh, sounds as if the system clock is set to local time, including DST 
changes, and the system clock had not yet been adjusted... I know why I 
use UTC for the system clock on my machines... ;)


Probably. As I said the server lost power without a clean shutdown and its 
uptime was very high.




Ciao,
luigi

--
/
+--[Luigi Rosa]--
\

If it's working, the diagnostics say it's fine.
If it's not working, the diagnostics say it's fine.


Re: [Dovecot] Time just moved backwards error even with ntpd

2008-01-19 Thread Luigi Rosa

Karsten Bräckelmann said the following on 19/01/2008 13.26:


But the system clock was 45 minutes ahead, so:

No. :)


You'r right, my mistake.


Exactly one hour. Doesn't strike me as a coincidence...


Don't know. That machine had a very long uptime. The system is
configured to have the hardware clock on GMT.





Ciao,
luigi


Ciao,
luigi

--
/
+--[Luigi Rosa]--
\

We must acknowledge once and for all that the purpose of diplomacy
is to prolong a crisis.
--Spock, The Mark of Gideon



Re: [Dovecot] Time just moved backwards error even with ntp d

2008-01-19 Thread Gunter Ohrner
Hi!

Am Samstag, 19. Januar 2008 schrieb Luigi Rosa:
  How about first starting ntpd, forcing a time-update using ntpdate
  even before starting ntpd, and delaying the dovecot start until after
  the time has been adjusted?
 The problem is tha you cannot tell when the time is adjusted because
 it take some time to the ntp protocol to synchronize.

That's why I suggested to use ntpdate to force the correct time to be set 
before ntpd even starts and the ntp init script returns.

Admittedly, this won't work if you have no network connectivity during 
boot up, but if you have, this paticular problem is most likely solved.

ntpdate optionally can be given a timeout value and indicates success or 
failure via its return code so that a calling script might initiate 
appropriate measures.

Greetings,

  Gunter

-- 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
You're dead, he said. Keli waited. She couldn't think of any suitable 
reply. I'm not lacked a certain style, while Is it serious? seemed 
somehow too frivolous.-- Princess Keli in trouble   
(Terry Pratchett, Mort)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+   PGP-verschlüsselte Mails bevorzugt! +
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


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


Re: [Dovecot] dovecot Digest, Vol 57, Issue 55

2008-01-19 Thread Sean Smitz
I'm trying to configure PAM authentication and I'm having some issues. 
I'm using RHEL 5 and  included below are excerpts from my relevant 
configuration and log files:


*/var/log/maillog*
Jan 19 10:55:39 flacpmail dovecot: imap-login: Aborted login: 
user=test, method=PLAIN, rip=:::128.8.244.15, 
lip=:::128.8.244.161, TLS


*/etc/dovecot.conf*
 passdb pam {
   args = session=yes dovecot # also tried args = session=yes *
 }

*/etc/pam.d/dovecot*
#%PAM-1.0
auth   required pam_unix.so nullok
auth   include  system-auth
accountinclude  pam_unix.so
sessioninclude  system-auth

Thanks in advnaced,


Sean Smitz
System Administrator
Fujitsu Laboratories of America
8400 Baltimore Ave, Suite 302
College Park, MD 20740
(301) 486-0298 (Desk)



Re: [Dovecot] Time just moved backwards error even with ntpd

2008-01-19 Thread Charles Marcus

On 1/19/2008 Luigi Rosa wrote:
On one hand we have Dovecot that kill itself until someone kicks it 
back on, on the other hand we have just some errors on the logfile.


Well, IMHO at least there could be a configuration parameter that 
allows me to choose between a service that kills itself and some 
errors on a logfile and maybe a temporary service failure.


Each SysAdmin could weight the consequences and choose the option 
he/she thinks is more appropriate to his/her server. 


Accurate time is CRITICAL for a mail server (and most any other server 
as well).


I think the current behavior is reasonable. Fix the actual problem 
(server time being incorrect at boot time), and this is not an issue.


Re: [Dovecot] Time just moved backwards error even with ntpd

2008-01-19 Thread Adam McDougall
On Sat, Jan 19, 2008 at 11:07:58AM -0500, Charles Marcus wrote:

  On 1/19/2008 Luigi Rosa wrote:
 On one hand we have Dovecot that kill itself until someone kicks it back 
 on, on the other hand we have just some errors on the logfile.
 
 Well, IMHO at least there could be a configuration parameter that allows 
 me to choose between a service that kills itself and some errors on a 
 logfile and maybe a temporary service failure.
 
 Each SysAdmin could weight the consequences and choose the option he/she 
 thinks is more appropriate to his/her server. 
  
  Accurate time is CRITICAL for a mail server (and most any other server as 
  well).
  
  I think the current behavior is reasonable. Fix the actual problem (server 
  time being incorrect at boot time), and this is not an issue.
  
Even without this problem, it may be wise to add a script to check often 
if dovecot is running, and start it if it is not.  That way your downtime
caused by this issue will be minimal.  and/or add more servers so users won't
notice any downtime except possibly being disconnected once.


[Dovecot] Plans for 1.1beta14 release?

2008-01-19 Thread Adam McDougall
I've been glancing at the hg changelogs, watching a number of basic fixes
going in, including squat and uidlist fixes.  Are there any plans for a beta14
release soon to increase exposure to these fixes, or is it in flux too much?
My time lately to spend on dovecot has been sparse but I can definitely afford
the time right now to roll betas into service because it is convenient.  I have
some tiny issues to track down that I noticed in the logs but if a new snapshot
fixes them already, it saves both of us time.  


[Dovecot] Exim Dovecot Authentication Problem

2008-01-19 Thread Marc Perkel
Having a hard time figuring out something that is supposed to be easy. 
Tryiong to configure Dovecot so that it provides authentication to Exim 
for outgoing smtp. Tried different things and getting


authentication socket protocol error

dovecot_plain:
 driver = dovecot
 public_name = PLAIN
 server_socket = /var/run/dovecot/auth-client
 server_set_id = $auth1

auth default {
 # Space separated list of wanted authentication mechanisms:
 #   plain digest-md5 cram-md5 apop anonymous
 mechanisms = plain

 #
 # Password database is used to verify user's password (and nothing more).
 # You can have multiple passdbs and userdbs. This is useful if you want to
 # allow both system users (/etc/passwd) and virtual users to login without
 # duplicating the system users into virtual database.
 #
 # http://wiki.dovecot.org/Authentication
 #

 # PAM authentication. Preferred nowadays by most systems.
 # Note that PAM can only be used to verify if user's password is correct,
 # so it can't be used as userdb. If you don't want to use a separate user
 # database (passwd usually), you can use static userdb.

 passdb passwd-file {
   # Master users that can log in as anyone
   args = /etc/dovecot.masterusers
   master = yes
   pass =yes
 }


 # Linuxconf passwd-like file with specified location
 passdb passwd-file {
   args = /etc/exim/control/vmail/shadow.%d
 }


 # Linuxconf passwd-like file with specified location
 userdb passwd-file {
   args = /etc/exim/control/vmail/passwd.%d
 }

 # User to use for the process. This user needs access to only user and
 # password databases, nothing else. Only shadow and pam authentication
 # requires roots, so use something else if possible. Note that passwd
 # authentication with BSDs internally accesses shadow files, which also
 # requires roots. Note that this user is NOT used to access mails.
 # That user is specified by userdb above.
 user = root


 # Number of authentication processes to create
 count = 10

}


# It's possible to export the authentication interface to other programs,
# for example SMTP server which supports talking to Dovecot. Client socket
# handles the actual authentication - you give it a username and password
# and it returns OK or failure. So it's pretty safe to allow anyone 
access to

# it. Master socket is used to a) query if given client was successfully
# authenticated, b) userdb lookups.

# listener sockets will be created by Dovecot's master process using the
# settings given inside the auth section

auth default_with_listener {
 mechanisms = plain

 passdb passwd-file {
   # Master users that can log in as anyone
   args = /etc/dovecot.masterusers
   master = yes
   pass =yes
 }

 passdb passwd-file {
   # Path for passwd-file
   args = /etc/exim/control/vmail/shadow.%d
 }

 userdb passwd-file {
   # Path for passwd-file
   args = /etc/exim/control/vmail/passwd.%d
 }

 socket listen {
   master {
 path = /var/run/dovecot/auth-master
 mode = 0666
   }
 }
}

auth external {
 mechanisms = plain

 passdb passwd-file {
   # Master users that can log in as anyone
   args = /etc/dovecot.masterusers
   master = yes
   pass =yes
 }

 passdb passwd-file {
   # Path for passwd-file
   args = /etc/exim/control/vmail/shadow.%d
 }

 userdb passwd-file {
   # Path for passwd-file
   args = /etc/exim/control/vmail/passwd.%d
 }

 socket listen {
   client {
 path = /var/run/dovecot/auth-client
 mode = 0666
   }
 }

}




Re: [Dovecot] maildirsize quota does not referred after migration from courier

2008-01-19 Thread Timo Sirainen
On Tue, 2008-01-15 at 11:43 +0800, Tim Chen wrote:
 Setting quota_rule = *: does not solve the problem, I still can not get the
 quota information.
 I am afraid this is a bug in v1.1 branch? Would Timo please help to fix it
 when you have time?

Fixed: http://hg.dovecot.org/dovecot/rev/097fe25ab218

There's no need to set quota_rule at all, just quota = maildir is
enough.



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


Re: [Dovecot] file system permissions

2008-01-19 Thread Timo Sirainen
On Sun, 2008-01-13 at 18:37 -0800, Anil wrote:
 I am using Maildir and virtual domains.
 
 I have the following definitions in the dovecot.conf:
 mail_uid = 1
 mail_gid = 1
 mail_location = maildir:/var/mail/apps/%d/%n/Maildir
 ...
..
 I set the permissions of /var/mail/apps, /var/mail/apps/%d directories 1777.
..
 I also see the following error message when a message is received to
 one of the users:
 Jan 13 18:33:33 vds5 deliver([EMAIL PROTECTED]): [ID 702911 mail.error]
 stat(/var/mail/apps/domain.com/admin/Maildir/tmp) failed: Permission
 denied
 
 
 The permissions of this tmp directory are:
 drwx--   2 vmailvmail  2 Jan 13 18:31 tmp

Assuming vmail is 1 it looks ok.

 Why is deliver having problems writing to that? At this point, what
 uid is deliver running as?

1. Since this has been such a common problem, I finally added some
code to make it clearly log what uid/gid it's running as and what
directory has the permission problem:
http://hg.dovecot.org/dovecot/rev/93fe72ef59f6


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


Re: [Dovecot] Out of memory [repost as a new thread]

2008-01-19 Thread Timo Sirainen
On Tue, 2008-01-15 at 14:51 +0100, Wolfram Schlich wrote:
 this happens since a few days on a Gentoo hardened system using a
 grsecurity enabled kernel running Dovecot 1.0.10, only to 2 of 10
 users though:
 
 --8--
 
 kernel: grsec: From 192.168.0.1: denied resource overstep by \
   requesting 537325568 for RLIMIT_AS against limit 536870912 \

If it's trying to allocate 500MB of memory, there's a bug somewhere.
Could you get gdb backtrace of this? The attached patch changes Dovecot
to call abort() so it should write core files to user's home dir. See
http://dovecot.org/bugreport.html


diff -r 05b7ea05c426 src/lib/mempool-alloconly.c
--- a/src/lib/mempool-alloconly.c	Sat Jan 19 08:29:04 2008 +0200
+++ b/src/lib/mempool-alloconly.c	Sun Jan 20 09:48:05 2008 +0200
@@ -206,7 +206,7 @@ static void block_alloc(struct alloconly
 	block = GC_malloc(size);
 #endif
 	if (block == NULL)
-		i_fatal_status(FATAL_OUTOFMEM, block_alloc(): Out of memory);
+		i_panic(FATAL_OUTOFMEM, block_alloc(): Out of memory);
 	block-prev = apool-block;
 	apool-block = block;
 


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