Re: [Dovecot] dovecot bulletins?

2009-01-21 Thread Odhiambo Washington
On Wed, Jan 21, 2009 at 1:28 AM, Timo Sirainen t...@iki.fi wrote:

 On Tue, 2009-01-20 at 23:18 +0100, Maciej Uhlig wrote:
  Timo Sirainen:
   What exactly are they? I guess a global file that is served as a
 message
   for all users?
  Right. With POP3 it is served once - after first user login after the
  message was placed in bulletin database (just a plaintext file in a
  directory, for instance).
 
   That's more difficult to implement with IMAP than with
   POP3.
  You know better, but... just place incoming (bulletin) mail in INBOX.

 Well, okay, I was thinking about a way to not duplicate the message to
 everyone's mailbox. And I guess with virtual mailboxes there's the
 problem that users can't then delete the message (or it gets deleted for
 everyone).

 So what you want is a mailing list for your users without actually going
 through MTA. Shouldn't be too difficult to implement as a plugin I
 guess. You'd mainly just need to somehow keep track of what messages
 have been delivered to the user. You could maybe even implement this as
 a shell script with http://wiki.dovecot.org/PostLoginScripting although
 of course then users who have long running imap sessions won't see the
 bulletins until they reconnect.


Just to chip in with my $2 cents...
I used tpop3d for a long time before switching to Dovecot and we had
Bulletins functionality using some perl hooks. Below is the perl script that
Chris Lightfoot (R.I.P), provided for this:


QUOTE

#!/usr/local/bin/perl

use GDBM_File;

#Implementing POP3 server bulletins using tpop3d
#$Id: README.bulletins,v 1.1 2003/08/01 12:11:38 chris Exp $

# At many large sites it is useful to be able to distribute a `bulletin'
message
# to all mail users. tpop3d can provide this functionality by having user
login
# trigger delivery of any outstanding bulletin messages via the onlogin
# handler mechanism, as for POP-before-SMTP.

# This is new and untested functionality, but the basic idea is that you
specify

#onlogin-child-wait: yes

# in tpop3d.conf, then write an auth-perl or auth-other onlogin action to
handle
# bulletin delivery. Here is a sketch of a perl subroutine that could be
used
# for this:


# onlogin_bulletins_handler REQUEST
# Deliver any bulletins which are pending for the authenticated user
# identified in the REQUEST. This subroutine is called by tpop3d, which
# will set REQUEST-{local_part} and REQUEST-{domain} to the proper
# values. Bulletins should be complete RFC822 messages stored in flat
# text files under /etc/mail/bulletins, each with the extension .msg.
# This function will use a GDBM database for each bulletin to record the
# addresses of users to whom it has been delivered, so as to ensure that
# each user receives only one copy of each bulletin. Bulletins are
# delivered to user mailboxes using the local mail transport agent, though
# this behaviour could be changed if required.


sub onlogin_bulletins_handler ($) {
my $req = shift;
my $resp = { };

 #
 # Iterate over list of bulletins.
 #
foreach my $bull (glob(/usr/local/etc/tpop3d/bulletins/*.msg)) {
my $recips = $bull;

 # Obtain and tie delivery database, creating it if it does not
 # already exist.

$recips =~ s/msg$/db/;
my $r = $req-{local_part} . '@' . $req-{domain};
my %rr;
tie(%rr, 'GDBM_File', $recips, GDBM_File::GDBM_WRCREAT, 0600);

 # Attempt delivery if this user has not already been sent a copy
 # of this message.

if (!exists($rr{$r})) {

 # Invoke sendmail. There are better ways of doing this, but
 # this is simplest. Note that it wouldn't usually be safe to
 # call sendmail in this way, but tpop3d has already
 # authenticated somebody using the given local-part and
 # domain, so they're presumably safe strings.

 system(sendmail -oi '$r'  $bull);
 if ($? == 0) {

 # Sendmail exits with code 0 on success.

 $rr{$r} = 1;
  } else {

 # Sendmail (or system(3)) failed. There's not a whole lot
 # we can do here, but we log a message and abort sending
 # any other bulletins to this user for the moment.

 untie(%rr);
 return { logmsg = sendmail failed; error code $? };
}
 }
 untie(%rr);
 }

 # Don't log anything in case of success; we might want to note how
 # many bulletins were delivered or something, of course.

 return { };
 }

/QUOTE

The configuration end of tpop3d (tpop3d.conf) required the following:

# Enable authentication via an embedded perl interpreter.
auth-perl-enable: true
# auth-perl-start: perl code
# Specify a line of perl code to be executed at startup.
auth-perl-start: do '/usr/local/etc/tpop3d/bulletins.pl';
# auth-perl-finish: perl code
# Specify a line of perl code to be executed when the authentication driver
#auth-perl-finish:
# auth-perl-apop: subroutine name
# Specify the name of a perl subroutine which will be called when
#auth-perl-apop:
# auth-perl-pass: subroutine name
# Specify the name of a perl subroutine which will be called when
#auth-perl-pass:
# 

[Dovecot] maildirfolder is created world-writeable

2009-01-21 Thread Robert S
If I create a new folder using a mail client (eg. kmail/OE), the
maildirfolder file is created world-writable.  I assume that this is a
security risk and should be -rw---.

eg. - create folder Foo in mail client

 ~ $ ls -la .maildir/.Foo/
total 20
drwx--  5 robert users 4096 2009-01-21 19:56 .
drwx-- 43 robert users 4096 2009-01-21 19:56 ..
drwx--  2 robert users 4096 2009-01-21 19:56 cur
-rw-rw-rw-  1 robert users0 2009-01-21 19:56 maildirfolder
drwx--  2 robert users 4096 2009-01-21 19:56 new
drwx--  2 robert users 4096 2009-01-21 19:56 tmp

Some info:

 # dovecot --version
1.1.7

# dovecot -n
# 1.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.27-gentoo-r7 x86_64 Gentoo Base System release 1.12.11.1
ssl_cert_file: /etc/ssl/dovecot/server.pem
ssl_key_file: /etc/ssl/dovecot/server.key
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable: /usr/libexec/dovecot/imap-login
mail_location: maildir:~/.maildir
mail_plugins: deleted_to_trash
namespace:
  type: public
  separator: /
  prefix: Public/
  location: maildir:/var/local/mail/public/
  list: yes
namespace:
  type: private
  separator: /
  inbox: yes
  list: yes
  subscriptions: yes
auth default:
  passdb:
driver: pam
args: *
  userdb:
driver: passwd

I can't find this is the bugs area.


[Dovecot] docecot managesieve global filter, service name

2009-01-21 Thread Wolfgang . Friebel

I do have two questions related to the managesieve setup in dovecot

1) I did setup a global sieve filter, that is invoked if a user has no 
other sieve filter. If a user installs a sieve filter and activates it
(PUTSCRIPT, SETACTIVE) then the sieve filter gets compiled (.sievec) and 
deliver does use it.


If I want to deactivate the filter (SETACTIVE ) only the symlink (to the 
.sieve script) is removed, the .sievec file remains intact. On the other 
hand the dovecot documentation reads (http://wiki.dovecot.org/LDA/Sieve):


To stop using sieve, both the .sieve source file and the compiled .sievec 
file must be deleted


How can I let a user switch between the globally installed sieve filter 
and an own filter. Activation seems to be ok, but deactivation would not

result in the switch back to the global filter if I believe the docs.

2) To use the SASL authentication with managesieve the name of the 
service has to be given. In the managesieve RFC 
http://tools.ietf.org/html/draft-ietf-sieve-managesieve-09 
I can read (page13): The service name specified by this protocol's profile 
of SASL is  sieve.


On the other hand I can find in managesieve-0.10.4 in 
client-authenticate.c


#define MANAGESIEVE_SERVICE_NAME managesieve

The name is important for the Kerberos5 auth I am doing, as I have to 
provide a service key for managesieve.hostn...@realm instead of 
sieve.hostn...@realm. Currently I have adapted my auth to the 
managesieve service name but maybe that should be changed.


My Installation: dovecot 1.1.8 patched for dovecot-1.1-managesieve-0.10.4
Authentication using SASL (GSSAPI), contained in the perl Module
Net::ManageSieve on CPAN.
--
Wolfgang Friebel   Deutsches Elektronen-Synchrotron DESY
Phone/Fax:  +49 33762 77372/216Platanenallee 6
Mail: Wolfgang.Friebel AT desy.de  D-15738 Zeuthen  Germany


Re: [Dovecot] help on writing a rule for perventing spam

2009-01-21 Thread Charles Marcus
On 1/21/2009, Giuliano Gavazzi (dev+li...@humph.com) wrote:
 you are much better off rejecting those even before seing the DATA,
 if that address is in the envelope sender, or after, if it is only in
 the From: message header.

? If he did that, then he wouldn't see his own messages to this list.

But I agree that fighting this kind of spam is best done at the MTA
level, and isn't really a dovecot (or sieve) issue.

The postfix backscatter readme is a good start, esppecially is you are
using postfix - and if you aren't, why aren't you? ;) ... but the
concepts can be applied to any MTA...

http://www.postfix.org/BACKSCATTER_README.html

-- 

Best regards,

Charles


[Dovecot] Questions regarding Dovecot's POP3 implementation

2009-01-21 Thread Dale Gallagher
Hi all

I'm considering moving over my POP3 service from qmail-pop3d to
Dovecot for the following reasons:

- Support for Maildir++ which I have yet to implement
- Already using Dovecot for IMAP, so makes sense i.t.o Maildir++
- Support for SQL based user authentication

My primary concerns are performance and security.

Before I go down that route of migrating away from qmail-pop3d, I'd
appreciate some answers and feedback on the following.

There is mention of the Maildir filename extension W= for virtual file
size here:

http://wiki.dovecot.org/POP3Server

However, I can't find any MDAs which support writing the filename in
this format. Maildrop seems to support S= only?

If Dovecot is only able to read W= in the filename, I would imagine
that  it might make sense to have an MDA like Maildrop write the
message to disk, replacing all LF with CR+LF and finally write the
filename with identical S= and W= filename extensions included?

Example:

Maildrop replaces all LFs with CR+LF in incoming message.

Maildrop writes message as: 1035478339.27041_118.foo.org,S=1000,W=1000
(where 1000 is the file's RFC822.SIZE)

Then Dovecot doesn't have to calculate virtual message sizes.

I've also found this thread:
http://markmail.org/message/oznf2f7m7hvsxqn6

... which suggests changing mail_get_virtual_size to
mail_get_physical_size in src/pop3/client.c

Would this read the size from S=, or do a stat()?

5. Does anyone use Dovecot pop3 service on thousands of mailboxes and
if so, what specific tweaks / setup do you use?

Thanks
Dale


[Dovecot] Dovecot and .forward

2009-01-21 Thread Claudio Prono
Hello to all,

There is something to be configured to allow dovecot to use the .forward
file into the user's maildir? I have done some test, but seems dovecot
don't look into the .forward file and no result at all.

I use Postfix with the deliver of dovecot, here is my dovecot configuration:

# 1.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.25.18-0.2-pae i686 openSUSE 11.0 (i586) ext3
log_path: /var/log/dovecot-err.log
info_log_path: /var/log/dovecot-inf.log
protocols: imap imaps pop3 pop3s
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
first_valid_uid: 51
last_valid_uid: 51
first_valid_gid: 51
last_valid_gid: 51
mail_location: maildir:/var/mail/virtual/%d/%u
mail_debug: yes
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3): quota
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
imap_client_workarounds(default): outlook-idle
imap_client_workarounds(imap): outlook-idle
imap_client_workarounds(pop3):
pop3_uidl_format(default): %08Xu%08Xv
pop3_uidl_format(imap): %08Xu%08Xv
pop3_uidl_format(pop3): %Mf
auth default:
  passdb:
driver: sql
args: /etc/dovecot/dovecot-mysql.conf
  userdb:
driver: passwd
  userdb:
driver: sql
args: /etc/dovecot/dovecot-mysql.conf
  socket:
type: listen
master:
  path: /var/run/dovecot/auth-master
  mode: 384
plugin:
  quota: maildir
  quota: maildir:user quota
  quota_warning: storage=80%% /usr/bin/quota_warning.sh 80
  quota_warning2: storage=90%% /usr/bin/quota_warning.sh 90
  quota_warning3: storage=99%% /usr/bin/quota_warning.sh 90

Any suggestion to debug that problem?

Thank u,

Claudio Prono.



-- 

Claudio Prono
Systems Development @ PSS Srl, Divisione Implementazione Sistemi
Via San Bernardino, 17 - 10137 Torino (TO) - IT
Tel +39-011.32.72.100  Fax +39-011.32.46.497
PGP Fingerprint: 75C2 4049 E23D 2FBF A65F  40DB EA5C 11AC C2B0 3647
Disclaimer: http://atpss.net/disclaimer
 



Re: [Dovecot] dotlock timestamp trouble

2009-01-21 Thread Giorgenes Gelatti
Dovecot is running on a linux machine (2.6 kernel).
The nfs was mounted as:
nfs rw,vers=3,proto=tcp,intr,nolock,noexec,rsize=8192,wsize=8192 0 0

After your hint we added the noac flag:
nfs rw,vers=3,proto=tcp,intr,nolock,noexec,noac,rsize=8192,wsize=8192 0 0

But the error continues with differences of 120 and 60 seconds.

Thanks for the reply,
gpg

2009/1/20 Timo Sirainen t...@iki.fi

 On Tue, 2009-01-20 at 14:36 -0200, Giorgenes Gelatti wrote:
  Created dotlock file's timestamp is different than current time
 (1232468644
  vs 1232468524): /path/to/dovecot.index.log
 
  The IT guy swears the clocks are sincronized.

 the difference in the above message is exactly 120 seconds. Are they all
 120 seconds?

  I'm using dovecot 1.1.6 over NFS.
  Any thoughts?

 What OS are you using on the NFS clients? Perhaps this is a caching
 issue, have you tried changing/disabling attribute cache timeouts?



Re: [Dovecot] Dovecot and .forward

2009-01-21 Thread Pascal Volk
On 21.01.2009 14:50 Claudio Prono wrote:
 Hello to all,
 
 There is something to be configured to allow dovecot to use the .forward
 file into the user's maildir? I have done some test, but seems dovecot
 don't look into the .forward file and no result at all.
 
 I use Postfix with the deliver of dovecot, here is my dovecot configuration:
 
 # 1.1.7: /etc/dovecot/dovecot.conf
 # OS: Linux 2.6.25.18-0.2-pae i686 openSUSE 11.0 (i586) ext3
 ...
 auth default:
   passdb:
 driver: sql
 args: /etc/dovecot/dovecot-mysql.conf
   userdb:
 driver: passwd
   userdb:
 driver: sql
 args: /etc/dovecot/dovecot-mysql.conf
 ...
 
 Any suggestion to debug that problem?
 
 Thank u,

Dovecot doesn't read .forward files from users.
Postfixs local (LDA) reads .forward files - BUT not from virtual users
home directories.

You could use the cmusieve plugin which supports
'redirect a...@addr.ess'


Regards,
Pascal

-- 
Ubuntu is an ancient African word meaning “I can’t install Debian.”
 -- unknown


Re: [Dovecot] Dovecot and .forward

2009-01-21 Thread Claudio Prono
Mmm ok, i am looking to make work vacation of HORDE Project with my mail
server, and this uses the .forward file into the mailbox for run the
vacation script every time a mail was recieved. I have looked to
cmusieve with dovecot 1.1.7 and i don't find it. It can be used for read
the .forward file and execute the vacation program if present in the
.forward file? Or... alternatively, what i can use?

I am googled a lot for any response but the problem is...how to search
.forward :)

Greets,

Claudio Prono.


Pascal Volk ha scritto:
 On 21.01.2009 14:50 Claudio Prono wrote:
   
 Hello to all,

 There is something to be configured to allow dovecot to use the .forward
 file into the user's maildir? I have done some test, but seems dovecot
 don't look into the .forward file and no result at all.

 I use Postfix with the deliver of dovecot, here is my dovecot configuration:

 # 1.1.7: /etc/dovecot/dovecot.conf
 # OS: Linux 2.6.25.18-0.2-pae i686 openSUSE 11.0 (i586) ext3
 ...
 auth default:
   passdb:
 driver: sql
 args: /etc/dovecot/dovecot-mysql.conf
   userdb:
 driver: passwd
   userdb:
 driver: sql
 args: /etc/dovecot/dovecot-mysql.conf
 ...

 Any suggestion to debug that problem?

 Thank u,
 

 Dovecot doesn't read .forward files from users.
 Postfixs local (LDA) reads .forward files - BUT not from virtual users
 home directories.

 You could use the cmusieve plugin which supports
 'redirect a...@addr.ess'


 Regards,
 Pascal

   

-- 

Claudio Prono
Systems Development @ PSS Srl, Divisione Implementazione Sistemi
Via San Bernardino, 17 - 10137 Torino (TO) - IT
Tel +39-011.32.72.100  Fax +39-011.32.46.497
PGP Fingerprint: 75C2 4049 E23D 2FBF A65F  40DB EA5C 11AC C2B0 3647
Disclaimer: http://atpss.net/disclaimer
 



[Dovecot] dovecot and signal SIGUSR1

2009-01-21 Thread maximatt
hi..

i want to know how is defined signal SIGUSR1 for dovecot.

i want to know what dovecot do when the comand kill was executed in
Rotating logs in  http://wiki.dovecot.org/Logging..

thanks in advance!!

-- 
Salu2 ;)


Re: [Dovecot] Dovecot and .forward

2009-01-21 Thread Pascal Volk
On 21.01.2009 15:58 Claudio Prono wrote:
 Mmm ok, i am looking to make work vacation of HORDE Project with my mail
 server, and this uses the .forward file into the mailbox for run the
 vacation script every time a mail was recieved. I have looked to
 cmusieve with dovecot 1.1.7 and i don't find it. It can be used for read
 the .forward file and execute the vacation program if present in the
 .forward file? Or... alternatively, what i can use?
 
 I am googled a lot for any response but the problem is...how to search
 .forward :)
 
 Greets,
 
 Claudio Prono.
 
 
 Pascal Volk ha scritto:
 On 21.01.2009 14:50 Claudio Prono wrote:
 ...
 # 1.1.7: /etc/dovecot/dovecot.conf
 # OS: Linux 2.6.25.18-0.2-pae i686 openSUSE 11.0 (i586) ext3
 ...
 
 You could use the cmusieve plugin which supports
 'redirect a...@addr.ess'

Please stop top posting!

Are you using the docevot11 rpm from SuSE? This provides the cmusieve
plugin. If you have compiled Dovecot from source code you have also to
compile the sieve plugin in order to use the plugin.

The cmusieve plugin supports also vacation auto-replies. You will find
more details in the wiki: http://wiki.dovecot.org/LDA/Sieve
Which file the sieve plugin reads depends on your configuration.


Regards
Pascal

-- 
Ubuntu is an ancient African word meaning “I can’t install Debian.”
 -- unknown


[Dovecot] dovecot 1.1.8 compile error

2009-01-21 Thread CJ Keist
I'm trying to compile 1.1.8 with dovecot-1-1-989789b2afd8 patches 
applied on Solaris 10 sparc using gcc 2.95.3 and also tried version 
3.4.3.  This is error I'm getting:


gcc -DHAVE_CONFIG_H -I. -I../..  -I../../src/lib  -I../../src/lib-auth 
-DPKG_RUNDIR=\/userM/mail-services/dovecot/var/run/dovecot\ 
-DSBINDIR=\/userM/mail-services/dovecot/sbin\-g -O2 -Wall -W 
-Wmissing-prototypes -Wmissing-declarations -Wpointer-arith 
-Wchar-subscripts -Wformat=2 -Wbad-function-cast -I/usr/sfw/include -c 
ssl-proxy-openssl.c

In file included from ssl-proxy-openssl.c:21:
/usr/sfw/include/openssl/ssl.h:172: warning: ignoring pragma: @(#)ssl.h 
   1.4 05/10/11 SMI

In file included from /usr/sfw/include/openssl/ssl3.h:120,
 from /usr/sfw/include/openssl/ssl.h:951,
 from ssl-proxy-openssl.c:21:
/usr/sfw/include/openssl/ssl.h:172: warning: ignoring pragma: @(#)ssl.h 
   1.4 05/10/11 SMI

ssl-proxy-openssl.c: In function `ssl_params_corrupted':
ssl-proxy-openssl.c:85: `PKG_STATEDIR' undeclared (first use in this 
function)

ssl-proxy-openssl.c:85: (Each undeclared identifier is reported only once
ssl-proxy-openssl.c:85: for each function it appears in.)
ssl-proxy-openssl.c: In function `ssl_info_callback':
ssl-proxy-openssl.c:658: warning: passing arg 1 of `SSL_get_ex_data' 
discards qualifiers from pointer target type

*** Error code 1
make: Fatal error: Command failed for target `ssl-proxy-openssl.o'
Current working directory /userM/src/dovecot-1.1.8/src/login-common
*** Error code 1
The following command caused the error:
failcom='exit 1'; \
for f in x $MAKEFLAGS; do \
  case $f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
  esac; \
done; \
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
list='lib  lib-dict  lib-sql  lib-ntlm  lib-otp  lib-settings 
lib-charset  lib-mail  lib-imap  lib-index  lib-storage  lib-auth  auth 
 dict  master  login-common  imap-login  imap  pop3-login pop3  deliver 
 tests  util  plugins'; for subdir in $list; do \

  echo Making $target in $subdir; \
  if test $subdir = .; then \
dot_seen=yes; \
local_target=$target-am; \
  else \
local_target=$target; \
  fi; \
  (cd $subdir  make  $local_target) \
  || eval $failcom; \
done; \
if test $dot_seen = no; then \
  make  $target-am || exit 1; \
fi; test -z $fail
make: Fatal error: Command failed for target `all-recursive'
Current working directory /userM/src/dovecot-1.1.8/src
*** Error code 1
The following command caused the error:
failcom='exit 1'; \
for f in x $MAKEFLAGS; do \
  case $f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
  esac; \
done; \
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
list='src  doc'; for subdir in $list; do \
  echo Making $target in $subdir; \
  if test $subdir = .; then \
dot_seen=yes; \
local_target=$target-am; \
  else \
local_target=$target; \
  fi; \
  (cd $subdir  make  $local_target) \
  || eval $failcom; \
done; \
if test $dot_seen = no; then \
  make  $target-am || exit 1; \
fi; test -z $fail
make: Fatal error: Command failed for target `all-recursive'
Current working directory /userM/src/dovecot-1.1.8
*** Error code 1
make: Fatal error: Command failed for target `all'

Does anyone have work around for this on Solaris 10?


--
C. J. Keist Email: cj.ke...@colostate.edu
UNIX/Network ManagerPhone: 970-491-0630
Engineering Network ServicesFax:   970-491-5569
College of Engineering, CSU
Ft. Collins, CO 80523-1301

All I want is a chance to prove 'Money can't buy happiness'


smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Dovecot] dovecot 1.1.8 compile error

2009-01-21 Thread Timo Sirainen
On Wed, 2009-01-21 at 09:55 -0700, CJ Keist wrote:
 I'm trying to compile 1.1.8 with dovecot-1-1-989789b2afd8 patches 
 applied on Solaris 10 sparc using gcc 2.95.3 and also tried version 
 3.4.3.  This is error I'm getting:
..
 ssl-proxy-openssl.c:85: `PKG_STATEDIR' undeclared (first use in this 
 function)

This was added to Makefile.am. You'll need to run autogen.sh and
configure again to get Makefile regenerated from Makefile.am.



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


Re: [Dovecot] dovecot and signal SIGUSR1

2009-01-21 Thread maximatt
sorry for the post... i read again and i not look the comment:

# dovecot SIGUSR1: Re-opens the log files.

sorry...

Salu2!!

2009/1/21 maximatt aza...@gmail.com

 hi..

 i want to know how is defined signal SIGUSR1 for dovecot.

 i want to know what dovecot do when the comand kill was executed in
 Rotating logs in  http://wiki.dovecot.org/Logging..

 thanks in advance!!

 --
 Salu2 ;)




-- 
Salu2 ;)


Re: [Dovecot] dovecot 1.1.8 compile error

2009-01-21 Thread CJ Keist

Thanks,
   Running autogen.sh I get:

% ./autogen.sh
configure.in:16: warning: macro `AM_ICONV' not found in library
configure.in:15: error: possibly undefined macro: AC_PROG_LIBTOOL
  If this token and others are legitimate, please use m4_pattern_allow.
  See the Autoconf documentation.
configure.in:16: error: possibly undefined macro: AM_ICONV
autoreconf: /opt/csw/bin/autoconf failed with exit status: 1

Then configure fails with:
checking for dlopen... yes
./configure: line 13370: syntax error near unexpected token `SSL,'
./configure: line 13370: `PKG_CHECK_MODULES(SSL, openssl)'


Timo Sirainen wrote:

On Wed, 2009-01-21 at 09:55 -0700, CJ Keist wrote:
I'm trying to compile 1.1.8 with dovecot-1-1-989789b2afd8 patches 
applied on Solaris 10 sparc using gcc 2.95.3 and also tried version 
3.4.3.  This is error I'm getting:

..
ssl-proxy-openssl.c:85: `PKG_STATEDIR' undeclared (first use in this 
function)


This was added to Makefile.am. You'll need to run autogen.sh and
configure again to get Makefile regenerated from Makefile.am.



--
C. J. Keist Email: cj.ke...@colostate.edu
UNIX/Network ManagerPhone: 970-491-0630
Engineering Network ServicesFax:   970-491-5569
College of Engineering, CSU
Ft. Collins, CO 80523-1301

All I want is a chance to prove 'Money can't buy happiness'


smime.p7s
Description: S/MIME Cryptographic Signature


[Dovecot] How to interpret quota log entries?

2009-01-21 Thread Pascal Volk
Hi,

I've configured a global quota rule, with low limits for testing
purpose: quota_rule = *:storage=10M:messages=10

Why is the percentage value always 0?
What does 'enforcing' mean in this context? Is it not only relevant if
one uses fs-quota?

Jan 21 17:54:44 vh3 dovecot: IMAP(u...@test.tld): Quota root: name=user 
backend=dict args=:proxy::quotadict
Jan 21 17:54:44 vh3 dovecot: IMAP(u...@test.tld): dict quota: 
user=u...@test.tld, uri=proxy::quotadict, enforcing=0
Jan 21 17:54:44 vh3 dovecot: IMAP(u...@test.tld): Quota rule: root=user 
mailbox=* bytes=10485760 (0%) messages=10 (0%)
Jan 21 17:54:49 vh3 deliver(u...@test.tld): Quota root: name=user backend=dict 
args=:proxy::quotadict
Jan 21 17:54:49 vh3 deliver(u...@test.tld): dict quota: user=u...@test.tld, 
uri=proxy::quotadict, enforcing=0
Jan 21 17:54:49 vh3 deliver(u...@test.tld): Quota rule: root=user mailbox=* 
bytes=10485760 (0%) messages=10 (0%)

The current quota usage for u...@test.tld:

mailsys=# SELECT * FROM quota WHERE username = 'u...@test.tld';
   username|  path  | current 
---++-
 u...@test.tld | quota/storage  | 9977225
 u...@test.tld | quota/messages |   4


# 1.1.9: /usr/local/etc/dovecot.conf
# OS: OpenBSD 4.2 i386  
login_dir: /usr/local/var/run/dovecot/login
login_executable: /usr/local/libexec/dovecot/imap-login
login_user: _dovecot
first_valid_uid: 7
first_valid_gid: 7
mail_location: maildir:~/Maildir
mail_debug: yes
mail_plugins: quota imap_quota
auth default:
  mechanisms: plain login cram-md5
  user: nobody
  passdb:
driver: sql
args: /usr/local/etc/dovecot-sql.conf
  userdb:
driver: sql
args: /usr/local/etc/dovecot-sql.conf
  socket:
type: listen
client:
  path: /var/spool/postfix/private/auth
  mode: 432
  user: _postfix
  group: _postfix
master:
  path: /usr/local/var/run/dovecot/auth-master
  mode: 384
plugin:
  quota: dict:user::proxy::quotadict
  quota_rule: *:storage=10M:messages=10
  mail_debug: yes
dict:
  quotadict: pgsql:/usr/local/etc/dovecot-dict-quota.conf
  mail_debug: yes


Regards,
Pascal
-- 
Ubuntu is an ancient African word meaning “I can’t install Debian.”
 -- unknown



Re: [Dovecot] dovecot 1.1.8 compile error

2009-01-21 Thread Timo Sirainen
On Wed, 2009-01-21 at 10:25 -0700, CJ Keist wrote:
 Thanks,
 Running autogen.sh I get:
 
 % ./autogen.sh
 configure.in:16: warning: macro `AM_ICONV' not found in library
 configure.in:15: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
 configure.in:16: error: possibly undefined macro: AM_ICONV
 autoreconf: /opt/csw/bin/autoconf failed with exit status: 1
 
 Then configure fails with:
 checking for dlopen... yes
 ./configure: line 13370: syntax error near unexpected token `SSL,'
 ./configure: line 13370: `PKG_CHECK_MODULES(SSL, openssl)'

You'll need pkg-config package installed to be able to run autogen.sh
successfully.

I suppose instead of running autogen.sh you could also just run:

automake src/login-common/Makefile
./configure



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


Re: [Dovecot] How to interpret quota log entries?

2009-01-21 Thread Timo Sirainen
On Wed, 2009-01-21 at 18:26 +0100, Pascal Volk wrote:
 Hi,
 
 I've configured a global quota rule, with low limits for testing
 purpose: quota_rule = *:storage=10M:messages=10
 
 Why is the percentage value always 0?

It just means you're not defining quota limits using percentages. Maybe
it just shouldn't show it then since people seem to be confused about
it..

 What does 'enforcing' mean in this context? Is it not only relevant if
 one uses fs-quota?

It actually should have been called noenforcing, I fixed that a few
days ago. You can disable (dict) quota enforcing if you want to do that
for some reason.



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


Re: [Dovecot] dovecot 1.1.8 compile error

2009-01-21 Thread CJ Keist

Thanks,
   Just got it to compile cleanly by adding --with-ssl=/opt/csw/ssl 
instead of using the Solaris GNU packages in /usr/sfw.



Timo Sirainen wrote:

On Wed, 2009-01-21 at 10:25 -0700, CJ Keist wrote:

Thanks,
Running autogen.sh I get:

% ./autogen.sh
configure.in:16: warning: macro `AM_ICONV' not found in library
configure.in:15: error: possibly undefined macro: AC_PROG_LIBTOOL
   If this token and others are legitimate, please use m4_pattern_allow.
   See the Autoconf documentation.
configure.in:16: error: possibly undefined macro: AM_ICONV
autoreconf: /opt/csw/bin/autoconf failed with exit status: 1

Then configure fails with:
checking for dlopen... yes
./configure: line 13370: syntax error near unexpected token `SSL,'
./configure: line 13370: `PKG_CHECK_MODULES(SSL, openssl)'


You'll need pkg-config package installed to be able to run autogen.sh
successfully.

I suppose instead of running autogen.sh you could also just run:

automake src/login-common/Makefile
./configure



--
C. J. Keist Email: cj.ke...@colostate.edu
UNIX/Network ManagerPhone: 970-491-0630
Engineering Network ServicesFax:   970-491-5569
College of Engineering, CSU
Ft. Collins, CO 80523-1301

All I want is a chance to prove 'Money can't buy happiness'


smime.p7s
Description: S/MIME Cryptographic Signature


[Dovecot] Shared mailboxes support status

2009-01-21 Thread Thomas Hummel
Hello Timo,

I'm running dovecot-1.1.8 and I'm about to play with namespaces and shared
mailboxes.

I've read on the list that the Kolab people did contribute to that, and I read
at http://dovecot.org/doc/NEWS-1.2

  + Full support for shared mailboxes and IMAP ACL extension.

I'd like to know the differences between shared mailboxes support between 1.1.
and 1.2 branches and if it may be considered safe to use shared mailboxes on
a production server running 1.1.8+ dovecot version (i.e. is it working and how,
compared to the upcoming 1.2 release).

I guess part of the answer is in the diffences between shared and public
namespaces handling.

Thanks

-- 
Thomas Hummel   | Institut Pasteur
hum...@pasteur.fr | Pôle informatique - systèmes et réseau


Re: [Dovecot] docecot managesieve global filter, service name

2009-01-21 Thread Stephan Bosch

wolfgang.frie...@desy.de wrote:

I do have two questions related to the managesieve setup in dovecot

1) I did setup a global sieve filter, that is invoked if a user has no 
other sieve filter. If a user installs a sieve filter and activates it
(PUTSCRIPT, SETACTIVE) then the sieve filter gets compiled (.sievec) and 
deliver does use it.


If I want to deactivate the filter (SETACTIVE ) only the symlink (to 
the .sieve script) is removed, the .sievec file remains intact. On the 
other hand the dovecot documentation reads 
(http://wiki.dovecot.org/LDA/Sieve):


To stop using sieve, both the .sieve source file and the compiled 
.sievec file must be deleted


How can I let a user switch between the globally installed sieve filter 
and an own filter. Activation seems to be ok, but deactivation would not

result in the switch back to the global filter if I believe the docs.
The old and the new Sieve plugin (should) both require the original 
script to be present. The binary is ignored otherwise. I don't know why 
this is listed on the wiki. I suggest you test this first and remove 
this from the wiki. Otherwise, it would be a bug anyway. I did check the 
sources and, by the looks of it, this should work correctly.


2) To use the SASL authentication with managesieve the name of the 
service has to be given. In the managesieve RFC 
http://tools.ietf.org/html/draft-ietf-sieve-managesieve-09 I can read 
(page13): The service name specified by this protocol's profile of SASL 
is  sieve.

Ohw, good point.


On the other hand I can find in managesieve-0.10.4 in client-authenticate.c

#define MANAGESIEVE_SERVICE_NAME managesieve

The name is important for the Kerberos5 auth I am doing, as I have to 
provide a service key for managesieve.hostn...@realm instead of 
sieve.hostn...@realm. Currently I have adapted my auth to the 
managesieve service name but maybe that should be changed.


My Installation: dovecot 1.1.8 patched for dovecot-1.1-managesieve-0.10.4
Authentication using SASL (GSSAPI), contained in the perl Module
Net::ManageSieve on CPAN.
Yes, it needs to be changed. I am wondering though whether it is a good 
idea to adjust this for v1.1.8.


Regards,

Stephan Bosch.



Re: [Dovecot] Shared mailboxes support status

2009-01-21 Thread Robert Schetterer
Thomas Hummel schrieb:
 Hello Timo,
 
 I'm running dovecot-1.1.8 and I'm about to play with namespaces and shared
 mailboxes.
 
 I've read on the list that the Kolab people did contribute to that, and I read
 at http://dovecot.org/doc/NEWS-1.2
 
   + Full support for shared mailboxes and IMAP ACL extension.
 
 I'd like to know the differences between shared mailboxes support between 1.1.
 and 1.2 branches and if it may be considered safe to use shared mailboxes on
 a production server running 1.1.8+ dovecot version (i.e. is it working and 
 how,
 compared to the upcoming 1.2 release).
 

 I guess part of the answer is in the diffences between shared and public
 namespaces handling.

yes and imap_acls

 
 Thanks
 

1.2 latest works nice with shared namespace
and imap_acls over horde/imp works nice too
but the code mutates a lot at present
cause its only alpha stage for now
but its great coding work !!!

-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


[Dovecot] Sieve regex match problem

2009-01-21 Thread Andy Howell


I'm trying to make a regex to match common mailing list addresses and file messages to 
corresponding folders.


I'm using sieve-test to try and understand what is happening. The sieve script 
is:

require [ fileinto, regex, variables ];
if header :regex [Sender]
  [(.*[ \\t]*,?[ \\t]*)?([...@]*)-([...@]*)(-bounces)?...@antlr.org] {

  fileinto ${0} :: 1:${1} 2:${2} 3:${3} 4:${4} 5:${5} 6:${6} 7:${7};
}

The email contains:

Sender: antlr-interest-boun...@antlr.org

I'm trying to form a folder from the first two parts of the sender. In the real script, 
that will do a fileto antlr.interest;


Running sieve-test, I get:

 * store message in folder: antlr-interest-boun...@antlr.org :: 1: 2:antlr 3: 4:interest 
5: 6:-bounces 7:


I don't understand why parts 3 and 5 are empty. From the regex grouping, I 
expected

Part 2 antlr
Part 3 interest
Part 4 -bounces

The regex groups break done as:
1: (.*[ \\t]*,?[ \\t]*)?- match leading name, comma or spaces
2: ([...@]*)  - match first part: 'antlr' in his case
-- Hyphen between parts
3: ([...@]*)  - match second part: interest in this case
4: (-bounces)?   - When cc'd, -bounces part isn't used

The same regex tested with perl works as I expected.

Without the first group of the regex '(.*[ \\t]*,?[ \\t]*)?', it works correctly. That 
group isn't getting matched anyway, so it shouldn't matter.


This is with 1.2alpha5.

What am I missing?

Thanks,

Andy


Re: [Dovecot] help on writing a rule for perventing spam

2009-01-21 Thread Giuliano Gavazzi


On W 21 Jan, 2009, at 12:25 , Charles Marcus wrote:


On 1/21/2009, Giuliano Gavazzi (dev+li...@humph.com) wrote:

you are much better off rejecting those even before seing the DATA,
if that address is in the envelope sender, or after, if it is only in
the From: message header.


? If he did that, then he wouldn't see his own messages to this list.


you are quite right. Indeed I never check the From: header, but the  
MAIL FROM. I extended the rule for the benefit of the list, and it  
came out wrong...





But I agree that fighting this kind of spam is best done at the MTA
level, and isn't really a dovecot (or sieve) issue.

The postfix backscatter readme is a good start, esppecially is you are
using postfix - and if you aren't, why aren't you? ;) ... but the
concepts can be applied to any MTA...



I don't use postfix, because I use exim...

g


[Dovecot] Bug or other issue? Jan 22 00:02:09 argon postfix/pipe[21251]: E8126A3671: to=m...@seonic.net, orig_to=root, relay=dovecot, delay=0.38, delays=0.03/0/0/0.35, dsn=5.3.0, status=bounced (C

2009-01-21 Thread Markus Schirp
Hi,

I found the following in my logfiles: 
The failure is not reproducable at the moment. 
System is delivering mails to mailboxes with no problems at all.

It is a production installation with medium load.

dovecot --version: 1.1.7
OS: Linux (Gentoo/x86 stable) - grsec enabled kernel

deliver.log:

deliver(u...@example.tld): Panic: file istream-tee.c: line 144 
(i_stream_tee_read): assertion failed: (ret  0)
deliver(u...@example.tld): 
  Error: Raw backtrace: 
 /usr/libexec/dovecot/deliver [0x80c8032] - 
/usr/libexec/dovecot/deliver(default_fatal_handler+0x3a) [0x80c812a] - 
/usr/libexec/dovecot/deliver [0x80c796c] - 
/usr/libexec/dovecot/deliver [0x80cf5f8] - 
/usr/libexec/dovecot/deliver(i_stream_read+0x2d) [0x80cc5dd] - 
/usr/libexec/dovecot/deliver(i_stream_read_data+0x1d) [0x80cc6ed] - 
/usr/libexec/dovecot/deliver [0x80d52cb] - 
/usr/libexec/dovecot/deliver(o_stream_send_istream+0x35) [0x80d45b5] - 
/usr/libexec/dovecot/deliver(maildir_save_continue+0x32) [0x806fbb2] - 
/usr/libexec/dovecot/deliver(mail_storage_copy+0xd2) [0x8096512] - 
/usr/libexec/dovecot/deliver(maildir_copy+0x5b) [0x806c51b] - 
/usr/libexec/dovecot/deliver(deliver_save+0x17d) [0x805cbfd] - 
/usr/libexec/dovecot/deliver(main+0x161b) [0x805e41b] - 
/lib/libc.so.6(__libc_start_main+0xdc) [0x559a7fdc] - 
/usr/libexec/dovecot/deliver [0x805bb41]

mta.log (postfix with dovecot/deliver pipe transport):
  Jan 22 00:02:09 argon postfix/pipe[21251]: E8126A3671: to=u...@example.tld, 
orig_to=localalias, relay=dovecot, delay=0.38, delays=0.03/0/0/0.35, 
dsn=5.3.0, status=bounced (Command died with signal 6: 
/usr/libexec/dovecot/deliver)

Neither the grsec.log nor dmesg said anything special.

The box had filesystem issues a month ago. I sucessufly fscked it. Do you think 
its a hidden fs problem or a dovecot issue?

Here in Germay the time is at 0:30, I'll sleep some hours until I can
respond to need more information request (conf-file, or so)

Thx in advance!

Markus Schirp


Re: [Dovecot] Sieve regex match problem

2009-01-21 Thread Stephan Bosch

Andy Howell wrote:


Running sieve-test, I get:

 * store message in folder: antlr-interest-boun...@antlr.org :: 1: 
2:antlr 3: 4:interest 5: 6:-bounces 7:
Interesting use of the fileinto extension. ;) I'd better define a 
vnd.dovecot.debug extension to provide some sort of debug printing 
command. This would be an extension only provided by the sieve-test tool 
to provide such functionality more cleanly. This will print the values 
instantly in stead of waiting until the Sieve result is printed.


Without the first group of the regex '(.*[ \\t]*,?[ \\t]*)?', it works 
correctly. That group isn't getting matched anyway, so it shouldn't matter.


This is with 1.2alpha5.

What am I missing?
Nothing, this is a bug. If a non-matched match value is encountered, the 
indexes of the match values after that are mangled.


Fixed:

http://hg.rename-it.nl/dovecot-libsieve/rev/de6db6757418

As it turns out, I forgot to add the :regex match value handling to the 
test suite. I've now added a couple of simple tests based on your example.


Regards,

--
Stephan Bosch
step...@rename-it.nl


Re: [Dovecot] Bug or other issue? Jan 22 00:02:09 argon postfix/pipe[21251]: E8126A3671: to=m...@seonic.net, orig_to=root, relay=dovecot, delay=0.38, delays=0.03/0/0/0.35, dsn=5.3.0, status=bounce

2009-01-21 Thread Markus Schirp
Sry for this monster subject.
Fingers pasted something wrong

On Thu, Jan 22, 2009 at 12:32:04AM +0100, Markus Schirp wrote:
 Hi,
 
 I found the following in my logfiles: 
 The failure is not reproducable at the moment. 
 System is delivering mails to mailboxes with no problems at all.
 
 It is a production installation with medium load.
 
 dovecot --version: 1.1.7
 OS: Linux (Gentoo/x86 stable) - grsec enabled kernel
 
 deliver.log:
 
 deliver(u...@example.tld): Panic: file istream-tee.c: line 144 
 (i_stream_tee_read): assertion failed: (ret  0)
 deliver(u...@example.tld): 
   Error: Raw backtrace: 
  /usr/libexec/dovecot/deliver [0x80c8032] - 
 /usr/libexec/dovecot/deliver(default_fatal_handler+0x3a) [0x80c812a] - 
 /usr/libexec/dovecot/deliver [0x80c796c] - 
 /usr/libexec/dovecot/deliver [0x80cf5f8] - 
 /usr/libexec/dovecot/deliver(i_stream_read+0x2d) [0x80cc5dd] - 
 /usr/libexec/dovecot/deliver(i_stream_read_data+0x1d) [0x80cc6ed] - 
 /usr/libexec/dovecot/deliver [0x80d52cb] - 
 /usr/libexec/dovecot/deliver(o_stream_send_istream+0x35) [0x80d45b5] - 
 /usr/libexec/dovecot/deliver(maildir_save_continue+0x32) [0x806fbb2] - 
 /usr/libexec/dovecot/deliver(mail_storage_copy+0xd2) [0x8096512] - 
 /usr/libexec/dovecot/deliver(maildir_copy+0x5b) [0x806c51b] - 
 /usr/libexec/dovecot/deliver(deliver_save+0x17d) [0x805cbfd] - 
 /usr/libexec/dovecot/deliver(main+0x161b) [0x805e41b] - 
 /lib/libc.so.6(__libc_start_main+0xdc) [0x559a7fdc] - 
 /usr/libexec/dovecot/deliver [0x805bb41]
 
 mta.log (postfix with dovecot/deliver pipe transport):
   Jan 22 00:02:09 argon postfix/pipe[21251]: E8126A3671: 
 to=u...@example.tld, orig_to=localalias, relay=dovecot, delay=0.38, 
 delays=0.03/0/0/0.35, dsn=5.3.0, status=bounced (Command died with signal 6: 
 /usr/libexec/dovecot/deliver)
 
 Neither the grsec.log nor dmesg said anything special.
 
 The box had filesystem issues a month ago. I sucessufly fscked it. Do you 
 think its a hidden fs problem or a dovecot issue?
 
 Here in Germay the time is at 0:30, I'll sleep some hours until I can
 respond to need more information request (conf-file, or so)
 
 Thx in advance!
 
 Markus Schirp

-- 
Markus Schirp
Seonic IT-Systems GbR
Anton Shatalov  Markus Schirp
Altenessenerstraße 50
D-45141 Essen
www.seonic.net
i...@seonic.net


Re: [Dovecot] Sieve regex match problem

2009-01-21 Thread Andy Howell

Stephan Bosch wrote:

Andy Howell wrote:


Running sieve-test, I get:

 * store message in folder: antlr-interest-boun...@antlr.org :: 1: 
2:antlr 3: 4:interest 5: 6:-bounces 7:
Interesting use of the fileinto extension. ;) I'd better define a 
vnd.dovecot.debug extension to provide some sort of debug printing 
command. This would be an extension only provided by the sieve-test tool 
to provide such functionality more cleanly. This will print the values 
instantly in stead of waiting until the Sieve result is printed.


Without the first group of the regex '(.*[ \\t]*,?[ \\t]*)?', it 
works correctly. That group isn't getting matched anyway, so it 
shouldn't matter.


This is with 1.2alpha5.

What am I missing?
Nothing, this is a bug. If a non-matched match value is encountered, the 
indexes of the match values after that are mangled.


Fixed:

http://hg.rename-it.nl/dovecot-libsieve/rev/de6db6757418

As it turns out, I forgot to add the :regex match value handling to the 
test suite. I've now added a couple of simple tests based on your example.


Regards,



Stephan,

	Glad you like my creative use is 'fileinto. Thanks for the quick fix. Are there plans to 
make another release of 1.2 any time soon?


Regards,

Andy




Re: [Dovecot] dovecot bulletins?

2009-01-21 Thread Rick Widmer

Timo Sirainen wrote:


Well, okay, I was thinking about a way to not duplicate the message to
everyone's mailbox. And I guess with virtual mailboxes there's the
problem that users can't then delete the message (or it gets deleted for
everyone).



How about you write one copy of the message, then hard link it to 
everyone else's mailbox.  I think that's what vpopmail's vpopbull 
command does.  To each recipient it looks like they have a personal copy 
that they can delete, but there is only one copy of the data stored on 
disk.


One limitation, all mailboxes have to be on the same mount point.


Rick