[Dovecot] dspam integration

2007-11-19 Thread Eugene Prokopiev
Hi,

I see http://johannes.sipsolutions.net/Projects/dovecot-antispam and
http://blog.cynapses.org/2007/09/13/dovecot-dspam-plugin/ solutions.
Second git repo is not answer, first one is cloned, but I see some
drawbacks with it.

Dspam backend is more native solution but libdspam using instead of
dspam external binary looks like preffered way to integrate dspam.
Another problem is waiting for dspam child process exit, so IMAP
session is blocked. Why not to fork and forget dspam child process?

Email sender backend is non-blocking, but using MTA is great overhead.
Calling external program with some args and mail body via pipe can be
more suitable way, so external program may be dspam binary directly or
shell/perl/python filter to any antispam engine via sendmail or
something else.

Has anybody plans to implement this features or it will be better to
try it myself?


Re: [Dovecot] dovecot mysql support

2007-11-19 Thread Bazy

jan gestre wrote:

Hi Guys,

I'm using CentOS 4.5, is the dovecot default rpm comes with mysql
support? Do I need to rebuild it?


TIA.

jan


Hi Jan,

You need to rebuild it, without any patches or so... Just enable mysql 
and LDA support in the .spec and don't forget to edit yum.conf and 
exclude=postfix*.


Re: [Dovecot] dovecot mysql support

2007-11-19 Thread Benjamin R. Haskell

On Mon, 19 Nov 2007, jan gestre wrote:


On Nov 19, 2007 12:57 AM, Bazy [EMAIL PROTECTED] wrote:


jan gestre wrote:

Hi Guys,

I'm using CentOS 4.5, is the dovecot default rpm comes with mysql
support? Do I need to rebuild it?


TIA.

jan


Hi Jan,

You need to rebuild it, without any patches or so... Just enable mysql
and LDA support in the .spec and don't forget to edit yum.conf and
exclude=postfix*.



Hi Bazy,

Sigh.. that's what I'm afraid of, anyways, I tried rebuilding it using
dovecot-1.0.7-0_63.src.rpm however I keep on getting this

# rpmbuild -bb /usr/src/redhat/SPECS/dovecot.spec

Unknown tag error in line 1
%bcond_without inotify --- line 1

I already tried adding --without inotify switch with same result.
Googling around told me that the option is only  available on the
2.6.13 kernel and above, the CentOS4 kernel is only 2.6.9. Any ideas
how to resolve this?



I ran into the same problem on CentOS 4.5. It's not the 'inotify' part 
that's causing that error message. It's the %bcond_without. See the wiki 
(Building your own rpms) for how to add those macros.

http://wiki.dovecot.org/PrebuiltBinaries#line-54

After those RPM macros are installed, you also need to add --without 
inotify:


rpmbuild --without inotify -bb /path/to/dovecot.spec

I didn't have to add anything regarding 'quota'. (This was with 1.0.1 a 
while ago, though. YMMV.)


Best,
Ben


Re: [Dovecot] deliver and namespaces in 1.1

2007-11-19 Thread Charles Marcus
Currently you can't deliver messages to public folders, only way is to 
copy it to this folder using email client or using copy on server.


I assume you mean in 1.0.x - since Timo just said that deliver does 
support namespaces now in 1.1...


--

Best regards,

Charles


[Dovecot] How to write plugin

2007-11-19 Thread Eugene Prokopiev
Hi,

Where can I find documentation for plugin writers? Now I see
mail-log-plugin source, but I can't understand how entry points
(functions mail-log-plugin-init and mail-log-plugin-deinit) are
defined to execute some actions on load/unload/copy messages.

Can anybody comments this?


Re: [Dovecot] How to write plugin

2007-11-19 Thread Fábio M. Catunda

Eugene Prokopiev escreveu:

Hi,

Where can I find documentation for plugin writers? Now I see
mail-log-plugin source, but I can't understand how entry points
(functions mail-log-plugin-init and mail-log-plugin-deinit) are
defined to execute some actions on load/unload/copy messages.

Can anybody comments this?

  

Hi Eugene.

I have seen your other message about dspam integration.

I believe that you are trying to create something that I already 
created: A copy-log plugin and an external daemon to train dspam, is 
that right?


I have been using this solution for about 60 days and it's just perfect 
for now, I have some TODO things to solve...


If thats what you need just contact me, maybe I can help!

[]'s, FMC!


Re: [Dovecot] dovecot mysql support

2007-11-19 Thread jan gestre
On Nov 19, 2007 6:42 PM, Benjamin R. Haskell [EMAIL PROTECTED] wrote:

 On Mon, 19 Nov 2007, jan gestre wrote:

  On Nov 19, 2007 12:57 AM, Bazy [EMAIL PROTECTED] wrote:
 
  jan gestre wrote:
  Hi Guys,
 
  I'm using CentOS 4.5, is the dovecot default rpm comes with mysql
  support? Do I need to rebuild it?
 
 
  TIA.
 
  jan
 
  Hi Jan,
 
  You need to rebuild it, without any patches or so... Just enable mysql
  and LDA support in the .spec and don't forget to edit yum.conf and
  exclude=postfix*.
 
 
  Hi Bazy,
 
  Sigh.. that's what I'm afraid of, anyways, I tried rebuilding it using
  dovecot-1.0.7-0_63.src.rpm however I keep on getting this
 
  # rpmbuild -bb /usr/src/redhat/SPECS/dovecot.spec
 
  Unknown tag error in line 1
  %bcond_without inotify --- line 1
 
  I already tried adding --without inotify switch with same result.
  Googling around told me that the option is only  available on the
  2.6.13 kernel and above, the CentOS4 kernel is only 2.6.9. Any ideas
  how to resolve this?


 I ran into the same problem on CentOS 4.5. It's not the 'inotify' part
 that's causing that error message. It's the %bcond_without. See the wiki
 (Building your own rpms) for how to add those macros.
 http://wiki.dovecot.org/PrebuiltBinaries#line-54

 After those RPM macros are installed, you also need to add --without
 inotify:

 rpmbuild --without inotify -bb /path/to/dovecot.spec

 I didn't have to add anything regarding 'quota'. (This was with 1.0.1 a
 while ago, though. YMMV.)

 Best,
 Ben

Finally I was able to rebuild it by adding a file called
/etc/rpm/macros.atrpms with the following contents:

%bcond_with()   %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
%bcond_without()%{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
%with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
%without()  %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}

Then run:

# rpmbuild --without inotify -bb /usr/src/redhat/SPECS/dovecot.spec

Then started dovecot , but encountered an error during startup

[EMAIL PROTECTED] ~]# /etc/init.d/dovecot start
Starting Dovecot Imap: Error: Error in configuration file
/etc/dovecot.conf line 21: Unknown setting: imap_listen
Fatal: Invalid configuration in /etc/dovecot.conf
[FAILED]

I then changed imap_listen to localhost and * respectively but still
have the same error. I'm lost. :(


Re: [Dovecot] Sieve 1.1.2 - special chars

2007-11-19 Thread Osvaldo Alvarez Pozo
Hi
 I have installed dovecot 1.05 from sources it works well, but know we
want to put le mail considered as spam in a folder called spam.
how do I configure  spammassassin amavis-new and dovecot sieve?
Thanks.
Debian etch, dovecot 1.05 from sources.


Re: [Dovecot] dovecot mysql support

2007-11-19 Thread Charles Marcus

[EMAIL PROTECTED] ~]# /etc/init.d/dovecot start
Starting Dovecot Imap: Error: Error in configuration file
/etc/dovecot.conf line 21: Unknown setting: imap_listen
Fatal: Invalid configuration in /etc/dovecot.conf
[FAILED]

I then changed imap_listen to localhost and * respectively but still
have the same error. I'm lost. :(


Well, providing output of dovecot -n would maybe help...

--

Best regards,

Charles


Re: [Dovecot] dspam integration

2007-11-19 Thread Andreas Schneider
Johannes Berg wrote:
 I see http://johannes.sipsolutions.net/Projects/dovecot-antispam and
 http://blog.cynapses.org/2007/09/13/dovecot-dspam-plugin/ solutions.
 Second git repo is not answer, first one is cloned, but I see some
 drawbacks with it.
 
 The first git repo is my source, and the second one is Andreas's but I
 think last he was working on integrating libdspam into my antispam
 plugin.
 
 Dspam backend is more native solution but libdspam using instead of
 dspam external binary looks like preffered way to integrate dspam.
 
 Not really. libdspam pretty much sucks. you're entitled to your own
 opinion :)

Before I can use libdspam I need some changes and it is possible that dpsam
will be forked soon.

A nice solution is to run dspam as daemon and configure dovecot-antispam to use

dspamc --client

I haven't configured it yet but it should work.


-- andreas

-- 
http://www.cynapses.org/ - cybernetic synapses




signature.asc
Description: OpenPGP digital signature


[Dovecot] Throttle New Connections?

2007-11-19 Thread Joe Allesi -X (joallesi - Coyote Creek Consulting at Cisco)
All,

Is anyone using iptables (recent module), or any other alternatives, to
throttle the number of new imap or pop connections per minute? We have
some applications that like to login every second to pull mail using
imap, so we'd like to protect the entire dovecot server from these
applications. We've already made the change over to high-perf mode, but
we still need some type of denial of service protection. Any real-world
data would be appreciated.

Thanks!


Re: [Dovecot] Throttle New Connections?

2007-11-19 Thread Joseph W. Breu
This may be off topic - but you could always use something like imapproxy in
front of your dovecot IMAP daemon.  We do this locally for our webmail
clients which use IMAP for the access to the mail store.

Imapproxy can be found here: http://imapproxy.org/



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Joe Allesi -X
(joallesi - Coyote Creek Consulting at Cisco)
Sent: Monday, November 19, 2007 11:25 AM
To: Dovecot Mailing List
Subject: [Dovecot] Throttle New Connections?

All,

Is anyone using iptables (recent module), or any other alternatives, to
throttle the number of new imap or pop connections per minute? We have
some applications that like to login every second to pull mail using
imap, so we'd like to protect the entire dovecot server from these
applications. We've already made the change over to high-perf mode, but
we still need some type of denial of service protection. Any real-world
data would be appreciated.

Thanks!



Re: [Dovecot] dovecot mysql support

2007-11-19 Thread Axel Thimm
On Sun, Nov 18, 2007 at 05:15:24PM -0800, jan gestre wrote:
 I'm using CentOS 4.5, is the dovecot default rpm comes with mysql
 support? Do I need to rebuild it?

The packages at ATrpms already come with mysql support. Did you try them?
-- 
Axel.Thimm at ATrpms.net


pgpLziCD8DpAc.pgp
Description: PGP signature


Re: [Dovecot] Problems executing dovecot.

2007-11-19 Thread Marcelo Iturbe
yes there is actually...

Nov 20 04:13:27 postdam dovecot: imap-login: Login: user=noresponder,
method=PLAIN, rip=201.238.214.202, lip=201.238.214.203
Nov 20 04:16:07 postdam dovecot: IMAP(noresponder): block_alloc(): Out of
memory
Nov 20 04:16:07 postdam dovecot: child 23174 (imap) returned error 83 (Out
of memory)

So the only thing that comes to mind... is moving the files by command line.
Can a I just go ahead and create dot directories and move emails from one
directory to another? or will that mess up the GUIDs?

Thanks,
Marcelo


On 15/11/2007, Asheesh Laroia [EMAIL PROTECTED] wrote:

 On Thu, 15 Nov 2007, Marcelo Iturbe wrote:

  112 copy 1:100 toBeProcessed
 
  Connection to host lost.
 
  I keep getting dropped...

 Does /var/log/syslog say anything interesting?

 -- Asheesh.

 --
 Real Men don't make backups.  They upload it via ftp and let the world
 mirror
 it.
 -- Linus Torvalds




-- 
Marcelo Iturbe ■ CIO ■ Tigabytes Chile ■ Google Enterprise Partner
T: 562 264 1044 ■ www.tigabytes.com


[Dovecot] src/lib/Makefile.am: a trivial ``$(srcdir)'' patch

2007-11-19 Thread Ivan Shmakov
May I suggest the following trivial patch?

diff -r ff9e591a2aa5 src/lib/Makefile.am
--- a/src/lib/Makefile.am   Sun Nov 18 21:44:22 2007 +0200
+++ b/src/lib/Makefile.am   Tue Nov 20 00:29:04 2007 +0600
@@ -4,9 +4,9 @@ BUILT_SOURCES = unicodemap.c
 
 EXTRA_DIST = unicodemap.c unicodemap.pl
 
-unicodemap.c:
+$(srcdir)/unicodemap.c:
test -f UnicodeData.txt || wget 
http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
-   perl unicodemap.pl  UnicodeData.txt  $@
+   perl $(srcdir)/unicodemap.pl  UnicodeData.txt  $@
 
 liblib_a_SOURCES = \
backtrace-string.c \



[Dovecot] Mailbox is in inconsistent state

2007-11-19 Thread Nikolay Shopik

I have few such messages should I aware about them or just ignore?

Disconnected: Mailbox is in inconsistent state, please relogin.


Re: [Dovecot] mail_location backends

2007-11-19 Thread Asheesh Laroia

On Mon, 19 Nov 2007, Harrison Metzger wrote:


Hello,

Where I work we have have an interesting setup, we have 2 machines with mail
accounts on them and both have dovecot. We would really like to centralize
all the mail accounts on one machine, but unfortunately the administration
has not approved it. However, if we could create the illusion that they
are on the same machine that would be acceptable.


Check out the Dovecot IMAP proxy, or a separate IMAP proxy project maybe?

-- Asheesh.

--
The ratio of literacy to illiteracy is a constant, but nowadays the
illiterates can read.
-- Alberto Moravia


Re: [Dovecot] dovecot mysql support

2007-11-19 Thread Benjamin R. Haskell

On Mon, 19 Nov 2007, Axel Thimm wrote:


On Sun, Nov 18, 2007 at 05:15:24PM -0800, jan gestre wrote:

I'm using CentOS 4.5, is the dovecot default rpm comes with mysql
support? Do I need to rebuild it?


The packages at ATrpms already come with mysql support. Did you try them?


Do they also have 'inotify' support? I seem to recall trouble with the 
ATrpms version of dovecot. The particular CentOS 4.5 box I was using still 
had a 2.4 kernel, since it'd been recently upgraded from RHEL3. (We didn't 
want to upgrade the kernel on the remote box since it was working fine for 
our purposes).


Best,
Ben


Re: [Dovecot] imap process consuming 100% CPU (Dovecot 1.0.3)

2007-11-19 Thread Stewart Dean
I think I'm seeing this with TBird and 1.0.7...with my own account!  It 
may even be a Tbird problem.
I have a 4way mail server, so when I get 25%, it's 100% of one 
processor. I tried killing the imap process on the server and  it can 
back at 9% and climbed quickly back up to 25%.  It wasn't until I 
shutdown my TBird session that a clean imap session was established.



Jackie Hunt wrote:

Is this behavior cured, or do you continue to see it?




No, the behavior isn't cured.  We still continue to see it 
with various clients.  I have posted a couple of truss outputs,
but so far no resolution.  


Sorry for the slow response.  I've been fighting other fires.

Jackie


  

Jackie Hunt wrote:


On Mon, 2007-09-03 at 12:37 +0200, Robert Tomanek wrote:



Hi,

Sunday, September 2, 2007, 22:42:37, you wrote:
  
  

0x0806049d in imap_sync_more (ctx=3D0x80d9770) at imap-sync.c:104
104 if (ctx-seq =3D=3D 0) {
  
  

 A short follow-up on this, looks like an infinite loop to me, unless
 some threading magic is supposed to happen here:
  
  

Fixed: http://hg.dovecot.org/dovecot-1.0/rev/8e86137a04fb



We also are seeing imap processes consuming 100% CPU.  We have
installed Dovecot v1.0.5 and still see the problem.  I have a user 
who can pretty reliably reproduce the problem.  It occurs each

morning after the imap connection has been idling all night.  The
user is running Thunderbird 2.0.0.6 (I think) on Solaris.  On the
client side, he see an hourglass that never goes away, has to shut
down Thunderbird.

Below is a log, which shows how the CPU is being used (the ps commands
are done one right after another) and a dbx trace of the state of
the imap process.  I'm hoping that's enough info to figure out what's
happening.

Thanks much,
Jackie
---
Jackie Hunt   
ACNSVoice:  (970) 663-3789 
Colorado State University   FAX:(970) 491-1958

Fort Collins, CO  80523 Email:  [EMAIL PROTECTED]


$ ps -ef | grep -i xx | grep imap
  xx  43004  92942  74 07:15:33  - 38:54 imap 
$ ps -ef | grep -i xx | grep imap
  xx  43004  92942  81 07:15:33  - 38:58 imap 
$ ps -ef | grep -i xx | grep imap
  xx  43004  92942 120 07:15:33  - 39:01 imap 
$ dbx -a 43004

Waiting to attach to process 43004 ...
Successfully attached to imap.
warning: Directory containing imap could not be determined.
Apply 'use' command to initialize source path.

Type 'help' for help.
reading symbolic information ...
stopped in pread at 0xd01f06cc
0xd01f06cc (pread+0x30) 80410014lwz   r2,0x14(r1)
(dbx) step
stopped in istream-file._read at line 120 in file 
could not read istream-file.c
(dbx) use src lib src/lib src/lib-storage/index/mbox src/lib-mail 
src/lib-storage/index src/lib-storage src/imap src/imap-login
(dbx) use
src lib src/lib src/lib-storage/index/mbox src/lib-mail src/lib-storage/index src/lib-storage src/imap src/imap-login 
(dbx) where

istream-file._read(stream = 0x200274a8), line 120 in istream-file.c
i_stream_read(stream = 0x200274cc), line 58 in istream.c
istream-raw-mbox._read(stream = 0x20028ab8), line 160 in istream-raw-mbox.c
i_stream_read(stream = 0x20028adc), line 58 in istream.c
istream-limit._read(stream = 0x20031458), line 56 in istream-limit.c
i_stream_read(stream = 0x2003147c), line 58 in istream.c
istream-header-filter._read(stream = 0x2004aa98), line 234 in 
istream-header-filter.c
i_stream_read(stream = 0x2004aabc), line 58 in istream.c
i_stream_read_data(stream = 0x2004aabc, data = 0x2ff22630, size = 0x2ff22638, threshold = 
1), line 250 in istream.c
message_get_body_size(input = 0x2004aabc, body = 0x2002827c, has_nuls = (nil)), line 107 
in message-size.c
index_mail_init_stream(_mail = 0x200281a8, hdr_size = 0x2ff227a8, body_size = 
0x2ff227b8), line 502 in index-mail.c
mbox_mail_get_stream(_mail = 0x200281a8, hdr_size = 0x2ff227a8, body_size = 0x2ff227b8), 
line 206 in mbox-mail.c
mail_get_stream(mail = 0x200281a8, hdr_size = 0x2ff227a8, body_size = 0x2ff227b8), line 
107 in mail.c
imap-fetch-body.fetch_body(ctx = 0x200205e0, mail = 0x200281a8, context = 0x20020858), 
line 331 in imap-fetch-body.c
imap_fetch(ctx = 0x200205e0), line 291 in imap-fetch.c
cmd_fetch(cmd = 0x2001e35c), line 163 in cmd-fetch.c
cmd_uid(cmd = 0x2001e35c), line 19 in cmd-uid.c
client_handle_input(cmd = 0x2001e35c), line 344 in client.c
client_handle_input(cmd = 0x2001e35c), line 398 in client.c
_client_input(context = 0x2001e318), line 441 in client.c
io_loop_handler_run(ioloop = 0x2001d0e8), line 199 in ioloop-poll.c
io_loop_run(ioloop = 0x2001d0e8), line 329 in ioloop.c
main(argc = 1, argv = 0x2ff22b50, envp = 0x2ff22b58), line 290 in main.c
(dbx) list
   58   return _stream-read(_stream);
   59   }
   60   
   61   void i_stream_skip(struct istream *stream, uoff_t count)

   62   

Re: [Dovecot] dovecot mysql support

2007-11-19 Thread Axel Thimm
On Mon, Nov 19, 2007 at 03:21:08PM -0500, Benjamin R. Haskell wrote:
 On Mon, 19 Nov 2007, Axel Thimm wrote:
 
 On Sun, Nov 18, 2007 at 05:15:24PM -0800, jan gestre wrote:
 I'm using CentOS 4.5, is the dovecot default rpm comes with mysql
 support? Do I need to rebuild it?
 
 The packages at ATrpms already come with mysql support. Did you try them?
 
 Do they also have 'inotify' support? I seem to recall trouble with the 
 ATrpms version of dovecot. The particular CentOS 4.5 box I was using still 
 had a 2.4 kernel, since it'd been recently upgraded from RHEL3. (We didn't 
 want to upgrade the kernel on the remote box since it was working fine for 
 our purposes).

No, on RHEL4 (and therefore CentOS4 as well) inotify has been
disabled. Although I didn't document the reason good enough, so maybe
it is worth while checking if a rebuild would be OK (simply rebuilding
the package will enable inotify). Would you like to test it and report
back?

As for a 2.4 kernel on RHEL4  clones: The kernel will not provide the
neccessary inotify functions, but I hope dovecot will just notice that
and not fail on it (e.g. just disable inotify support). But I haven't
tested that combo.
-- 
Axel.Thimm at ATrpms.net


pgpubV0ZnzvEg.pgp
Description: PGP signature


Re: [Dovecot] imap process consuming 100% CPU (Dovecot 1.0.3)

2007-11-19 Thread Timo Sirainen
On Sun, 2007-10-21 at 00:47 +0300, Timo Sirainen wrote:
 On Wed, 2007-10-10 at 10:50 -0600, Jackie Hunt wrote:
  Attached is the truss for the imap process we are seeing which is
  chewing up CPU.  We've seen this issue on several different clients,
  usually first thing in the morning.  Shutting down the client and
  restarting always seems to get Dovecot back in sync.   Hope we can
  get some help with this.   We're running 1.0.5.  Thanks!
 
 The truss output looks like Dovecot re-reads the entire mbox file for
 each FETCH command. Did you use NFS? Do you have mbox_dirty_syncs=yes
 (default)?
 
 Anyway this isn't an infinite loop in Dovecot. It's processing multiple
 FETCH commands. Maybe the client got stuck somehow and just keeps
 sending the same command over and over again? Would have been nice to
 see the entire FETCH command and its output. truss -r0 -w1 does that I
 think.

truss -d -r0 -w1 for future reference. That includes nice timestamps
and also shows the IMAP traffic.



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


Re: [Dovecot] imap process consuming 100% CPU (Dovecot 1.0.3)

2007-11-19 Thread Timo Sirainen
On Mon, 2007-11-19 at 16:12 -0500, Stewart Dean wrote:
 I think I'm seeing this with TBird and 1.0.7...with my own account!  It 
 may even be a Tbird problem.
 I have a 4way mail server, so when I get 25%, it's 100% of one 
 processor. I tried killing the imap process on the server and  it can 
 back at 9% and climbed quickly back up to 25%.  It wasn't until I 
 shutdown my TBird session that a clean imap session was established.

You could truss the process or do something else to find out what
Thunderbird and Dovecot are talking to each others. If shutting down
Thunderbird dropped the load, it sounds like a bug in Thunderbird. Some
clients have been known to keep requesting same data over and over again
from the server in some situations. If I could see what the IMAP traffic
looks like, I might be able to add a workaround to it.



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


Re: [Dovecot] Mailbox is in inconsistent state

2007-11-19 Thread Timo Sirainen
On Mon, 2007-11-19 at 23:05 +0300, Nikolay Shopik wrote:
 I have few such messages should I aware about them or just ignore?
 
 Disconnected: Mailbox is in inconsistent state, please relogin.

Do you see any errors in logs? I think there should be. Also what
Dovecot version is this with?



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


Re: [Dovecot] src/lib/Makefile.am: a trivial ``$(srcdir)'' patch

2007-11-19 Thread Timo Sirainen
On Tue, 2007-11-20 at 00:33 +0600, Ivan Shmakov wrote:
   May I suggest the following trivial patch?

Done.



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


Re: [Dovecot] Throttle New Connections?

2007-11-19 Thread Sean Kamath


On Nov 19, 2007, at 9:24 AM, Joe Allesi -X (joallesi - Coyote Creek  
Consulting at Cisco) wrote:



All,

Is anyone using iptables (recent module), or any other alternatives,  
to

throttle the number of new imap or pop connections per minute? We have
some applications that like to login every second to pull mail using
imap, so we'd like to protect the entire dovecot server from these
applications. We've already made the change over to high-perf mode,  
but
we still need some type of denial of service protection. Any real- 
world

data would be appreciated.


Yeah, I throttle initial connections per IP to something like 15 or  
20.  I started doing this after I got hit with a little more than 600  
connections/second for a few minutes.


I use OpenBSD with pf.

Sean


[Dovecot] Helping OS's page cache

2007-11-19 Thread Timo Sirainen
http://dovecot.org/patches/1.1/fadvise.diff
http://dovecot.org/patches/1.0/fadvise.diff

These patches try to tell kernel when mail files are wanted to be read
and when they're wanted out of memory, so the memory could be used for
more important things such as index files.

I'd like to hear if someone sees any actual changes (for better or
worse) in the system load because of this.

I'm not sure if I should add this to v1.1 and if it should be enabled by
default.



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


Re: [Dovecot] Problems executing dovecot.

2007-11-19 Thread Timo Sirainen
On Mon, 2007-11-19 at 16:30 -0300, Marcelo Iturbe wrote:
 yes there is actually...
 
 Nov 20 04:13:27 postdam dovecot: imap-login: Login: user=noresponder,
 method=PLAIN, rip=201.238.214.202, lip=201.238.214.203
 Nov 20 04:16:07 postdam dovecot: IMAP(noresponder): block_alloc(): Out of
 memory

Maybe its dovecot.index.cache file has grown so large that it takes most
of the available virtual space. You can set mail_process_size=0 to
remove this limit.

 So the only thing that comes to mind... is moving the files by command line.
 Can a I just go ahead and create dot directories and move emails from one
 directory to another?

Yes.

 or will that mess up the GUIDs?

GUIDs? Global UIDs? Dovecot don't have those yet.



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


Re: [Dovecot] Received Dates/Squirrelmail

2007-11-19 Thread Timo Sirainen
On Thu, 2007-11-01 at 12:52 -0700, Jeff Grossman wrote:
 I am trying to figure out an issue I have with the e-mails in my inbox
 showing up in Squirrelmail.  I sometimes get (more often than I care for
 it to happen) e-mails which show up as new either many hours ago or days
 ago.  I have one particular e-mail that in Squirrelmail is showing a data
 of Tue, 8:23PM.
 
 The received header of that e-mail shows:
 
 Received: from murphy.debian.org (murphy.debian.org [70.103.162.31])
 by apple.stikman.com (8.14.1/8.14.1/Debian-9) with ESMTP id
 lA1JGTli011052
 for x; Thu, 1 Nov 2007 12:16:35 -0700
 
 And the date header of that e-mail shows:
 
 Date: Tue, 30 Oct 2007 23:23:11 -0400
 
 I have tried changing the Squirrelmail setting under Display Settings
 which says Use Received Date.  Both options, yes and no makes the mail
 display the same way in Squirrelmail.  Is this a problem with the way
 Dovecot is sending the information to Squirrelmail, or is this a problem
 with the way Squirrelmail is interpreting the data from Dovecot?

Does this still happen with newer betas? Have you checked what the
message file's mtime is? Use received date means IMAP's INTERNALDATE
which is taken from the file's mtime.


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


Re: [Dovecot] Dovecot + Cygwin

2007-11-19 Thread Timo Sirainen
On Sat, 2007-11-17 at 22:02 +0100, Ronny wrote:
 dovecot: Nov 17 21:40:30 Info: Dovecot v1.0.7 starting up
 dovecot: Nov 17 21:40:30 Error: Socket already exists: 
 /var/run/dovecot/dict-server

This error is ignored.

 after removing the whole directory /var/run/dovecot again there is only, 
 without any error code
 
 dovecot: Nov 17 21:58:59 Info: Dovecot v1.0.7 starting up
 dovecot: Nov 17 21:58:59 Error: Auth process died too early - shutting down

The without error code most likely just means that Dovecot shut down
before it saw that dovecot-auth exited with error 53.

Some things you could try:

Does Cygwin have strace? Run strace -f dovecot to see if it shows
something interesting.

Is the problem with starting dovecot-auth or after dovecot-auth has
already started? Try setting auth_executable = /tmp/test.sh where
test.sh is something like:

#!/bin/sh
echo i'm running  /tmp/dovecot.output
exit 0

If that worked, try adding exit(0); as the first statement in
src/auth/main.c's main() function to see if it returns 53 before or
after it reaches that far.



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