Re: [Dovecot] doveadm delete folders ? / unsubscribe ?

2012-04-25 Thread Robert Schetterer
Am 24.04.2012 20:13, schrieb Timo Sirainen:
 On 24.4.2012, at 10.50, Robert Schetterer wrote:
 
 doveadm expunge -d -u *@domain.example mailbox exampelfolder\*
 savedbefore 10d

 works like charm, but the folders do not get unsubscribed
 any chance to have i.e another add parameter ,or do it auto
 cause empty and deleted folders should not stay subscribed in my eyes
 
 Yeah, I guess unsubscribing is always wanted:
 
 http://hg.dovecot.org/dovecot-2.1/rev/b1653b7bd165
 

Hi Timo, i will try after update and report, jep
unsubscribing should be the uni wanted behave
thx again !
-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


[Dovecot] dovecot %u variable problem....

2012-04-25 Thread Kris
Hi guys n gals, im on an ubuntu 11 VPS on linode (dovecot version 
2.013). ive spent a lot of time and googling trying to get postfix, 
dovecot, ssl, saslauthd and mysql to all play nice together and im quite 
close now but theres something going on i cant quite explain and id 
really appreciate some help. I have been going for ten hours on this 
today and it seems in direct conflict with what dovecot themselves say...


the problem is a variable in dovecot (%u) which is normally used as a 
full username in sql query strings (i.e. user@domain) and is simply 
dropping the domain for some reason...


From dovecot docs (http://wiki2.dovecot.org/Variables):
The variables that work everywhere are:
%uuser full username (e.g. user@domain)

so i have postfix and stuff set up ok to send at least and i know this 
because ive tested it by hard-coding the string in the sql query myself 
with a successful send...
but, anyway, the problem with the '%u' variable is it is doing stuff 
like this: (from mail.log and mysql.log)


localhost dovecot: auth: Debug: sql(ad...@microhard.com,xx.xx.xx.xx): 
SELECT home,uid,gid FROM users WHERE id = 'ad...@microhard.com'


this was derived from the following query in 
/etc/dovecot/dovecot-sql.conf.ext

user_query = SELECT home,uid,gid FROM users WHERE id = '%u'

so no problem there

but then this happens when i attempt to send mail and this means the 
user gets rejected because dovecot cant find the user id in the db 
without the correct string (i.e. user@domain):
localhost dovecot: auth: Debug: sql(admin,xx.xx.xx.xx): query: SELECT id 
as user, crypt as password FROM users WHERE id= 'admin'

QuerySELECT id as user, crypt as password FROM users WHERE id= 'admin'
which is derived from the following query also in 
/etc/dovecot/dovecot-sql.conf.ext
password_query = SELECT id as user, crypt as password FROM users WHERE 
id= '%u'


and to further confuse me, this 'unchangeable' variable sometimes 
decides to right itself without any obvious reason...
localhost dovecot: auth: Debug: sql(ad...@microhard.com,xx.xx.xx.xx): 
query: SELECT id as user, crypt as password FROM users WHERE id= 
'ad...@microhard.com'


im wondering if its something to do with my client dropping the domain, 
or whether dovecot has an error, or some other thing ive overlooked...


my dovecot.conf looks a lot like this:

# 2.0.13: dovecot.conf
# OS: Linux 3.0.18-x86_64-linode24 x86_64 Ubuntu 11.10 ext3
first_valid_uid = 5000
last_valid_uid = 5000
login_greeting = I likes my ducks n geese I do.
mail_location = maildir:/var/spool/mail/virtual/%u

#enables logging all failed authentication attempts.
auth_verbose=yes

#enables all authentication debug logging (also enables auth_verbose). 
Passwords are logged as hidden.

auth_debug=yes

#does everything that auth_debug=yes does, but it also removes password 
hiding.

auth_debug_passwords=yes

#enables all kinds of mail related debug logging, such as showing where 
Dovecot is looking for mails.

mail_debug=yes

#enables logging SSL errors and warnings. Even without this setting if 
connection is closed because of an SSL error, the error is logged as the 
disconnection reason (v1.1+).

verbose_ssl=yes

passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  acl = vfile:/etc/dovecot/acls
  #quota = maildir:storage=10240:messages=1000
  trash = /etc/dovecot/trash.conf
}
protocols =  imap
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
  unix_listener auth-master {
group = dovecot
mode = 0660
user = dovecot
  }
  user = dovecot
}

ssl_ca = /etc/pki/dovecot/certs/ca-bundle.crt
ssl_cert = /etc/ssl/certs/dovecot.pem
ssl_key = /etc/ssl/private/dovecot.pem

userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}

userdb {
  driver = prefetch
}
userdb {
  driver = passwd
}
protocol imap {
  mail_plugins = quota imap_quota
}
protocol pop3 {
  mail_plugins = quota
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}
protocol lda {
  info_log_path = /var/log/dovecot-deliver.log
  log_path = /var/log/dovecot-deliver.log
  mail_plugins = quota
  postmaster_address = ad...@microhard.com
}

any help *much* appreciated!

cheerz

Kris


Re: [Dovecot] dovecot %u variable problem....

2012-04-25 Thread Robert Schetterer
Am 25.04.2012 08:17, schrieb Kris:
 this was derived from the following query in
 /etc/dovecot/dovecot-sql.conf.ext
 user_query = SELECT home,uid,gid FROM users WHERE id = '%u'

i use like this

user_query = SELECT concat('/usr/local/virtual/', maildir) AS home, \


concat('*:bytes=', mailbox.quota) AS quota_rule, \

#when saving to Trash mailbox the user gets additional 50MB
Trash:storage=+50240 AS quota_rule2, \
#when saving to Sent mailbox the user gets additional 50MB
Sent:storage=+50240 AS quota_rule3, \
#when saving to Drafts mailbox the user gets additional 50MB
Drafts:storage=+50240 AS quota_rule4, \
#when saving to Templates mailbox the user gets additional 50MB
Templates:storage=+50240 AS quota_rule5, \
#when saving to Junk mailbox the user gets additional 50MB
Junk:storage=+50240 AS quota_rule6, \
#when saving to Archives mailbox the user gets additional 50MB
Archives:storage=+50240 AS quota_rule7, \
###

concat('maildir:/usr/local/virtual/', maildir) AS mail, \

CASE '%s' WHEN 'pop3' THEN NULL ELSE 'yes' END AS 'namespace/inbox/inbox', \
CASE '%s' WHEN 'pop3' THEN 'yes' ELSE NULL END AS
'namespace/virtual/inbox', \
1001 AS uid, 1001 AS gid FROM mailbox WHERE username = '%u' AND active = '1'


 
 so no problem there
 
 but then this happens when i attempt to send mail and this means the
 user gets rejected because dovecot cant find the user id in the db
 without the correct string (i.e. user@domain):
 localhost dovecot: auth: Debug: sql(admin,xx.xx.xx.xx): query: SELECT id
 as user, crypt as password FROM users WHERE id= 'admin'
 QuerySELECT id as user, crypt as password FROM users WHERE id= 'admin'
 which is derived from the following query also in
 /etc/dovecot/dovecot-sql.conf.ext
 password_query = SELECT id as user, crypt as password FROM users WHERE
 id= '%u'
 
 and to further confuse me, this 'unchangeable' variable sometimes
 decides to right itself without any obvious reason...
 localhost dovecot: auth: Debug: sql(ad...@microhard.com,xx.xx.xx.xx):
 query: SELECT id as user, crypt as password FROM users WHERE id=
 'ad...@microhard.com'
 
 im wondering if its something to do with my client dropping the domain,
 or whether dovecot has an error, or some other thing ive overlooked...

password_query = SELECT username as user, password, \
1001 as userdb_uid, \
1001 as userdb_gid, \
/usr/local/virtual/%d/%u/ AS userdb_home, \
maildir:/usr/local/virtual/%d/%u/ AS userdb_mail \
FROM mailbox WHERE username = '%u' AND active = '1' AND (imap_allowed =
'1' or '%Ls' = 'pop3')


this should not fit to you ( postfixadmin full domain layout with
virtual plugin and quota additions ,clear text passwords etc), but
perhaps gives you ideas by compare,
what to fix at your side, however upgrade to dove latest 2.0.20

-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


Re: [Dovecot] dovecot %u variable problem....

2012-04-25 Thread Dennis Guhl
On Wed, Apr 25, 2012 at 07:17:18AM +0100, Kris wrote:

[..]

 the problem is a variable in dovecot (%u) which is normally used as
 a full username in sql query strings (i.e. user@domain) and is
 simply dropping the domain for some reason...

[..]

 and to further confuse me, this 'unchangeable' variable sometimes
 decides to right itself without any obvious reason...
 localhost dovecot: auth: Debug:
 sql(ad...@microhard.com,xx.xx.xx.xx): query: SELECT id as user,
 crypt as password FROM users WHERE id= 'ad...@microhard.com'
 
 im wondering if its something to do with my client dropping the
 domain, or whether dovecot has an error, or some other thing ive
 overlooked...

Indeed, it seems some of your users try to authenticate with a
username without the '@domain' part.

You can either try to make your users comply or you can use
auth_default_realm in your config:

# Default realm/domain to use if none was specified. This is
# used for both SASL realms and appending @domain to username
# in plaintext logins.
#
#auth_default_realm =

Dennis

[..]


Re: [Dovecot] trash plugin bug?

2012-04-25 Thread Cor Bosman
 
 Well, normally you shouldn't be over quota I guess.. :) Anyway,
 
 http://hg.dovecot.org/dovecot-2.1/rev/ec8564741aa8
 http://hg.dovecot.org/dovecot-2.1/rev/dd3798681283

This indeed fixed the problem. Thank you,

Cor



Re: [Dovecot] dovecot %u variable problem....

2012-04-25 Thread Kris Weston


thanks for your help dennis...

Indeed, it seems some of your users try to authenticate with a
username without the '@domain' part.

You can either try to make your users comply or you can use
auth_default_realm in your config:


in this case the users are me :)
same username every time i connect, but each time i see a load of db 
lookups that are different but using this same u variable...




# Default realm/domain to use if none was specified. This is
# used for both SASL realms and appending @domain to username
# in plaintext logins.
#
#auth_default_realm =



ahhh, ok. only i have multiple domains, so how does that werk ?
just put em all in ?

cheerz

Kris


Re: [Dovecot] dovecot %u variable problem....

2012-04-25 Thread Dennis Guhl
On Wed, Apr 25, 2012 at 09:50:20AM +0100, Kris Weston wrote:
 
 thanks for your help dennis...
 Indeed, it seems some of your users try to authenticate with a
 username without the '@domain' part.
 
 You can either try to make your users comply or you can use
 auth_default_realm in your config:
 
 in this case the users are me :)
 same username every time i connect, but each time i see a load of db
 lookups that are different but using this same u variable...

If it's no bug, I doubt it randomly changes the value for %u while the
input is the same. So it seems the problem lies somewhere else. And if
it is no layer 8 problem it must be the client ;)

  # Default realm/domain to use if none was specified. This is
  # used for both SASL realms and appending @domain to username
  # in plaintext logins.
  #
  #auth_default_realm =
 
 
 ahhh, ok. only i have multiple domains, so how does that werk ?
 just put em all in ?

IIRC no, you can only name one default.

Dennis


Re: [Dovecot] dovecot %u variable problem....

2012-04-25 Thread Timo Sirainen
On 25.4.2012, at 9.49, Robert Schetterer wrote:

 #when saving to Trash mailbox the user gets additional 50MB
 Trash:storage=+50240 AS quota_rule2, \
 #when saving to Sent mailbox the user gets additional 50MB
 Sent:storage=+50240 AS quota_rule3, \
 #when saving to Drafts mailbox the user gets additional 50MB
 Drafts:storage=+50240 AS quota_rule4, \
 #when saving to Templates mailbox the user gets additional 50MB
 Templates:storage=+50240 AS quota_rule5, \
 #when saving to Junk mailbox the user gets additional 50MB
 Junk:storage=+50240 AS quota_rule6, \
 #when saving to Archives mailbox the user gets additional 50MB
 Archives:storage=+50240 AS quota_rule7, \
 ###

BTW. These are all static values and don't really need to be in SQL query:

plugin {
  quota_rule2 = Trash:...
  quota_rule3 = ...
  ...
}

 1001 as userdb_uid, \
 1001 as userdb_gid, \
 /usr/local/virtual/%d/%u/ AS userdb_home, \
 maildir:/usr/local/virtual/%d/%u/ AS userdb_mail \

Same for these. Also slightly confusing that your passdb and userdb lookups 
return mail setting differently.

Re: [Dovecot] dovecot %u variable problem....

2012-04-25 Thread Timo Sirainen
On 25.4.2012, at 9.17, Kris wrote:

 but then this happens when i attempt to send mail and this means the user 
 gets rejected because dovecot cant find the user id in the db without the 
 correct string (i.e. user@domain):
 localhost dovecot: auth: Debug: sql(admin,xx.xx.xx.xx): query: SELECT id as 
 user, crypt as password FROM users WHERE id= 'admin'

What exactly is doing this lookup? SMTP AUTH? Maybe the client's SMTP 
authentication is configured without the @domain part in username?



Re: [Dovecot] How to remove duplicate GUID messages from storage?

2012-04-25 Thread Timo Sirainen
On 21.4.2012, at 23.29, Daniel Parthey wrote:

 The following command
 doveadm -v force-resync -u usern...@example.org INBOX
 outputs lots of messages like this one, with different GUID
 doveadm(usern...@example.org): Error: mdbox 
 /mail/dovecot/example.org/username/mail/storage: Duplicate GUID 
 0b8a032d66a0924fb42cde5f8128 in m.55:45484041 and m.14:52173045

I think this is a force-resync bug and it shouldn't really complain about 
duplicates. Although I'm not entirely sure why with you it's complaining about 
them at all. I have anyway in TODO to look into this..

 How can I manually remove these identical, duplicate messages
 from the storage to save space? Dovecot does not do it
 automatically.

Perhaps force-resync + purge should do that, but currently it doesn't.

Also it would be nice if doveadm import didn't add duplicates in the first 
place. This is also something for which I have vague plans, because it would 
help dsync as well.



Re: [Dovecot] dovecot %u variable problem....

2012-04-25 Thread Robert Schetterer
Am 25.04.2012 12:45, schrieb Timo Sirainen:
 On 25.4.2012, at 9.49, Robert Schetterer wrote:
 
 #when saving to Trash mailbox the user gets additional 50MB
 Trash:storage=+50240 AS quota_rule2, \
 #when saving to Sent mailbox the user gets additional 50MB
 Sent:storage=+50240 AS quota_rule3, \
 #when saving to Drafts mailbox the user gets additional 50MB
 Drafts:storage=+50240 AS quota_rule4, \
 #when saving to Templates mailbox the user gets additional 50MB
 Templates:storage=+50240 AS quota_rule5, \
 #when saving to Junk mailbox the user gets additional 50MB
 Junk:storage=+50240 AS quota_rule6, \
 #when saving to Archives mailbox the user gets additional 50MB
 Archives:storage=+50240 AS quota_rule7, \
 ###
 
 BTW. These are all static values and don't really need to be in SQL query:
 
 plugin {
   quota_rule2 = Trash:...
   quota_rule3 = ...
   ...
 }
 
 1001 as userdb_uid, \
 1001 as userdb_gid, \
 /usr/local/virtual/%d/%u/ AS userdb_home, \
 maildir:/usr/local/virtual/%d/%u/ AS userdb_mail \
 
 Same for these. Also slightly confusing that your passdb and userdb lookups 
 return mail setting differently.

thx timo, i will look at this, thats all historic but ever worked
currently i am still  fighting with some upgrade issues to 2.1
just now some sieve experimental stuff failed , i will post about it

-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


[Dovecot] sieve vacation redirect problem

2012-04-25 Thread Robert Schetterer
Hi , since upgrade
sieve vacation, redirect stopped working getting

postfix error
while sending end of data -- message may be sent more than once

i played a lot about sieve , lda submission host conf entries etc but
all failed , i am not seeing any heavy bug in the logs

-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


Re: [Dovecot] sieve vacation redirect problem

2012-04-25 Thread Robert Schetterer
Am 25.04.2012 15:06, schrieb Robert Schetterer:
 Hi , since upgrade
 sieve vacation, redirect stopped working getting
 
 postfix error
 while sending end of data -- message may be sent more than once
 
 i played a lot about sieve , lda submission host conf entries etc but
 all failed , i am not seeing any heavy bug in the logs
 

that not full truth i am seeing

master: service(lmtp): child 31952 killed with signal 11 (core not dumped)


-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


Re: [Dovecot] sieve vacation redirect problem

2012-04-25 Thread Timo Sirainen
On 25.4.2012, at 16.29, Robert Schetterer wrote:

 master: service(lmtp): child 31952 killed with signal 11 (core not dumped)

Can you get a gdb backtrace? Might be a bit difficult to get a core dump from 
lmtp, but you should be able to attach gdb into it:

service lmtp {
  process_min_avail = 1
}

gdb -p `pidof lmtp`
cont
make lmtp crash
bt full



Re: [Dovecot] sieve vacation redirect problem

2012-04-25 Thread Stephan Bosch

Op 4/25/2012 3:29 PM, Robert Schetterer schreef:

Am 25.04.2012 15:06, schrieb Robert Schetterer:

Hi , since upgrade
sieve vacation, redirect stopped working getting

postfix error
while sending end of data -- message may be sent more than once

i played a lot about sieve , lda submission host conf entries etc but
all failed , i am not seeing any heavy bug in the logs


that not full truth i am seeing

master: service(lmtp): child 31952 killed with signal 11 (core not dumped)


Please try to obtain a gdb backtrace:

http://dovecot.org/bugreport.html

And provide dovecot -n output

Regards,

Stephan.


Re: [Dovecot] sieve vacation redirect problem

2012-04-25 Thread Robert Schetterer
Am 25.04.2012 15:46, schrieb Timo Sirainen:
 bt full


Program received signal SIGSEGV, Segmentation fault.
smtp_client_open (set=0x252b0b0, destination=0x254e410
ncitest...@onmotive.de, return_path=0x24e4148
r...@mail02.mailspooler.com, file_r=0x7fff2040a748) at smtp-client.c:146
146 smtp-client.c: Datei oder Verzeichnis nicht gefunden.
in smtp-client.c
(gdb) make lmtp crash
Undefined command: make.  Try help.
(gdb) bt full
#0  smtp_client_open (set=0x252b0b0, destination=0x254e410
ncitest...@onmotive.de, return_path=0x24e4148
r...@mail02.mailspooler.com, file_r=0x7fff2040a748) at smtp-client.c:146
client = value optimized out
path = 0x18 Address 0x18 out of bounds
fd = value optimized out
#1  0x7fd4e58b57a5 in act_redirect_send (action=value optimized
out, aenv=0x254e2c0, tr_context=value optimized out, keep=value
optimized out) at cmd-redirect.c:339
size = value optimized out
msgctx = value optimized out
crlf_input = value optimized out
smtp_handle = 0x24e4148
data = value optimized out
ret = value optimized out
sender = 0x24e4148 r...@mail02.mailspooler.com
recipient = 0x24e4168 rob...@schetterer.name
input = value optimized out
f = value optimized out
hide_headers = {0x7fd4e58d2ee7 Return-Path, 0x7fd4e58d6d3c
X-Sieve, 0x7fd4e58d7929 X-Sieve-Redirected-From}
#2  act_redirect_commit (action=value optimized out, aenv=0x254e2c0,
tr_context=value optimized out, keep=value optimized out) at
cmd-redirect.c:402
ctx = 0x254e408
mail = 0x252ba90
senv = 0x7fff2040a8c0
dupeid = value optimized out
#3  0x7fd4e58a7eeb in sieve_result_execute (result=value optimized
out, keep=value optimized out) at sieve-result.c:1156
impl_keep = true
rsef = 0x0
implicit_keep = true
success = true
commit_ok = value optimized out
rac = 0x254e428
first_action = value optimized out
#4  0x7fd4e58b8418 in sieve_multiscript_execute (mscript=0x254e3d8,
sbin=0x25516c0, ehandler=0x254c100, flags=value optimized out,
final=true) at sieve.c:601
No locals.
#5  sieve_multiscript_run (mscript=0x254e3d8, sbin=0x25516c0,
ehandler=0x254c100, flags=value optimized out, final=true) at sieve.c:630
No locals.
#6  0x7fd4e5af47e6 in lda_sieve_multiscript_execute (mdctx=value
optimized out, storage_r=value optimized out) at lda-sieve-plugin.c:514
sbin = 0x25516c0
rtflags = SIEVE_RUNTIME_FLAG_NOGLOBAL
cpflags = SIEVE_COMPILE_FLAG_NOGLOBAL
mscript = 0x254e3d8
svinst = 0x2546e80
last_script = 0x254b8e0
ret = value optimized out
scripts = value optimized out
ehandler = 0x254c100
i = 1
more = true
error = SIEVE_ERROR_NONE
#7  lda_sieve_deliver_mail (mdctx=value optimized out,
storage_r=value optimized out) at lda-sieve-plugin.c:794
scripts = value optimized out
i = value optimized out
_data_stack_cur_id = 3
srctx = {svinst = 0x2546e80, mdctx = 0x7fff2040aac0, scripts =
0x24e3340, script_count = 2, user_script = 0x254b8e0, main_script =
0x254b8e0, msgdata = 0x7fff2040a990, scriptenv = 0x7fff2040a8c0,
user_ehandler = 0x254c100,
  master_ehandler = 0x254b7d0, userlog = 0x24e3658
/usr/local/virtual/schetterer.name/rob...@schetterer.name/dovecot.sieve.log}
svenv = {hostname = 0x250aba0 mail02.mailspooler.com, base_dir
= 0x2536a78 /var/run/dovecot, username = 0x25354c8
rob...@schetterer.name, home_dir = 0x2537c40
/usr/local/virtual/schetterer.name/rob...@schetterer.name/,
  flags = SIEVE_FLAG_HOME_RELATIVE}
svinst = 0x2546e80
msgdata = {mail = 0x252ba90, return_path = 0x24f0c68
r...@mail02.mailspooler.com, orig_envelope_to = 0x24f12c0
rob...@schetterer.name, final_envelope_to = 0x24f12c0
rob...@schetterer.name, auth_user = 0x25354c8 rob...@schetterer.name,
  id = 0x252c410
20120425140007.d3556840...@mail02.mailspooler.com}
scriptenv = {action_log_format = 0x250ac28 msgid=%m: %$, user
= 0x2535410, default_mailbox = 0x4077ac INBOX, postmaster_address =
0x250ab78 hostmas...@mail02.mailspooler.com, mailbox_autocreate =
false, mailbox_autosubscribe = false,
  script_context = 0x7fff2040aac0, smtp_open = 0x7fd4e5af4180
lda_sieve_smtp_open, smtp_close = 0x7fd4e5af4160
lda_sieve_smtp_close, duplicate_check = 0x7fd4e5af4110
lda_sieve_duplicate_check,
  duplicate_mark = 0x7fd4e5af4140 lda_sieve_duplicate_mark,
reject_mail = 0x7fd4e5af4100 lda_sieve_reject_mail, exec_status =
0x7fff2040aa00, trace_stream = 0x0, trace_config = {level =
SIEVE_TRLVL_NONE, flags = 0}}
estatus = {message_saved = false, message_forwarded = false,
tried_default_save = false, keep_original = false, last_storage = 0x0}
master_ehandler = 0x254b7d0
user_location = value optimized out
default_location = value optimized out
sieve_before = 

Re: [Dovecot] sieve vacation redirect problem

2012-04-25 Thread Robert Schetterer
Am 25.04.2012 15:51, schrieb Stephan Bosch:
 Op 4/25/2012 3:29 PM, Robert Schetterer schreef:
 Am 25.04.2012 15:06, schrieb Robert Schetterer:
 Hi , since upgrade
 sieve vacation, redirect stopped working getting

 postfix error
 while sending end of data -- message may be sent more than once

 i played a lot about sieve , lda submission host conf entries etc but
 all failed , i am not seeing any heavy bug in the logs

 that not full truth i am seeing

 master: service(lmtp): child 31952 killed with signal 11 (core not
 dumped)
 
 Please try to obtain a gdb backtrace:
 
 http://dovecot.org/bugreport.html
 
 And provide dovecot -n output
 
 Regards,
 
 Stephan.

did test a few sieve related stuff
cause the working 2.0.20 didnt worked
but now my ideas are running out

# 2.1.5 (d2b01dcce79f): /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-37-server x86_64 Ubuntu 10.04.4 LTS
auth_cache_negative_ttl = 0
auth_cache_size = 50 M
auth_debug = yes
auth_debug_passwords = yes
auth_master_user_separator = *
auth_mechanisms = plain login
auth_socket_path = /var/run/dovecot/auth-userdb
auth_verbose = yes
auth_verbose_passwords = plain
auth_worker_max_count = 300
default_process_limit = 250
dict {
  acl = mysql:/etc/dovecot/dovecot-dict-acl-sql.conf.ext
  expire = mysql:/etc/dovecot/dovecot-dict-expire-sql.conf.ext
  quotadict = mysql:/etc/dovecot/dovecot-dict-quota-sql.conf.ext
}
disable_plaintext_auth = no
first_valid_gid = 1001
first_valid_uid = 1001
hostname = mail02.mailspooler.com
last_valid_gid = 1001
last_valid_uid = 1001
listen = *
login_greeting = imap, pop ready
mail_access_groups = vmail
mail_debug = yes
mail_fsync = always
mail_gid = 1001
mail_location = maildir:~/
mail_nfs_index = yes
mail_nfs_storage = yes
mail_plugins =  zlib expire virtual fts fts_squat mail_log autocreate
notify acl listescape
mail_privileged_group = vmail
mail_uid = 1001
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope
encoded-character vacation subaddress comparator-i;ascii-numeric
relational regex imap4flags copy include variables body enotify
environment mailbox date ihave imapflags notify
mmap_disable = yes
namespace {
  inbox = no
  list = children
  location = maildir:/usr/local/virtual/%%d/%%u:INDEX=~/shared/%%d/%%u
  prefix = shared/%%u/
  separator = /
  subscriptions = no
  type = shared
}
namespace inbox {
  hidden = no
  list = yes
  location =
  mailbox Drafts {
auto = subscribe
special_use = \Drafts
  }
  mailbox Junk {
auto = subscribe
special_use = \Junk
  }
  mailbox Sent {
auto = subscribe
special_use = \Sent
  }
  mailbox Sent Messages {
special_use = \Sent
  }
  mailbox Trash {
auto = subscribe
special_use = \Trash
  }
  mailbox name {
special_use = \Drafts \Junk \Sent \Trash
  }
  prefix =
  separator = /
  subscriptions = yes
}
namespace real {
  hidden = yes
  list = no
  location =
  prefix = RealMails/
  separator = /
}
namespace virtual {
  hidden = yes
  list = no
  location = virtual:/etc/dovecot/virtual:LAYOUT=maildir++:INDEX=~/virtual
  prefix = virtual/
  separator = /
  subscriptions = no
}
passdb {
  args = /etc/dovecot/dovecot-sql-master.conf.ext
  driver = sql
  master = yes
  pass = yes
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  acl = vfile:/etc/dovecot/global-acls:cache_secs=300
  acl_shared_dict = proxy::acl
  autocreate = Trash
  autocreate2 = Junk
  autocreate3 = Sent
  autocreate4 = Drafts
  autocreate5 = Templates
  autocreate6 = Hostmaster-Backup
  autocreate7 = archiv-backup-mailspooler
  autosubscribe = Trash
  autosubscribe2 = Junk
  autosubscribe3 = Sent
  autosubscribe4 = Drafts
  autosubscribe5 = Templates
  expire = Trash
  expire2 = Trash/*
  expire3 = Junk
  expire4 = Junk/*
  expire5 = Hostmaster-Backup
  expire6 = Hostmaster-Backup/*
  expire7 = archiv-backup-mailspooler/*
  expire_dict = proxy::expire
  fts = squat
  home = /usr/local/virtual/%d/%u
  mail_log_events = delete undelete expunge copy mailbox_delete
mailbox_rename
  mail_log_fields = uid box msgid size
  mail_log_group_events = yes
  quota = dict:::proxy::quotadict
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=80%% quota-warning 80 %u
  sieve = /usr/local/virtual/%d/%u/dovecot.sieve
  sieve_before = /etc/dovecot/sieve/global.sieve
  sieve_dir = /usr/local/virtual/%d/%u/sieve
  sieve_extensions = +fileinto +reject +envelope +encoded-character
+vacation +subaddress +relational +regex +imap4flags +copy +include
+variables +body +enotify +environment +mailbox +date +ihave +imapflags
+notify
  sieve_global_dir = /etc/dovecot/sieve/
  sieve_global_path = /etc/dovecot/sieve/global.sieve
  zlib_save = gz
  zlib_save_level = 6
}
postmaster_address = hostmas...@mail02.mailspooler.com
protocols = imap pop3 lmtp sieve
service anvil {
  client_limit = 1000
}
service auth-worker {
  user = root
}
service auth {
  client_limit = 1000
  unix_listener /var/spool/postfix/private/auth {

Re: [Dovecot] sieve vacation redirect problem

2012-04-25 Thread Timo Sirainen
On 25.4.2012, at 17.03, Robert Schetterer wrote:

 Program received signal SIGSEGV, Segmentation fault.
 smtp_client_open (set=0x252b0b0, destination=0x254e410
 ncitest...@onmotive.de, return_path=0x24e4148
 r...@mail02.mailspooler.com, file_r=0x7fff2040a748) at smtp-client.c:146
 146 smtp-client.c: Datei oder Verzeichnis nicht gefunden.
in smtp-client.c

If you do the same and get here again, what does it say with:

p *set



Re: [Dovecot] sieve vacation redirect problem

2012-04-25 Thread Robert Schetterer
Am 25.04.2012 16:11, schrieb Timo Sirainen:
 p *set

hope doing it right

(gdb) p *set
$1 = {postmaster_address = 0xaa33d0 P6\252, hostname = 0x0,
submission_host = 0x0, sendmail_path = 0x7fbaf6e41f50
H\211\\$\360H\211l$\370H\203\354\030\200=\207A%,
  rejection_subject = 0x7fbaf6e42b90
H\211\\$\350L\211d$\370H\211\373H\211l$\360H\203\354(\200=?5%,
rejection_reason = 0x7fbaf6e41ed0
H\211\\$\360H\211l$\370H\203\354(\200=\aB%, deliver_log_format = 0x1
Address 0x1 out of bounds,
  recipient_delimiter = 0xa9c910 \003, lda_original_recipient_header =
0xabd490 \001, quota_full_tempfail = 16, lda_mailbox_autocreate = 208,
lda_mailbox_autosubscribe = 171}


-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


[Dovecot] stats + fts squat plugins, indexer-worker error on message indexing

2012-04-25 Thread David Warden
On RHEL 6.2 + dovecot 2.1.5 with the stats and fts (squat) plugins enabled and 
each user having their own uid on the system I get the following error in the 
logs when the indexer-worker process indexes some messages:

Apr 25 09:56:19 wardentest3 dovecot: imap-login: Login: user=warden, 
method=PLAIN, rip=137.238.60.164, lip=137.238.2.240, lport=1993, mpid=19464, 
encryption=TLS
Apr 25 09:56:26 wardentest3 dovecot: service=indexer-worker user=warden rip= 
Indexed 12 messages in INBOX
Apr 25 09:56:26 wardentest3 dovecot: service=indexer-worker user=warden rip= 
Error: open(/proc/self/io) failed: Permission denied
Apr 25 09:56:29 wardentest3 dovecot: service=imap user=warden 
rip=137.238.60.164 Disconnected: Logged out bytes(in/out)=46/780

What I did to generate the above was remove the squat indexes for my Inbox then 
log in via telnet and search for a string in my Inbox, which forced an index of 
the messages in my Inbox.

Based on http://wiki2.dovecot.org/Services#indexer-worker it seems like this is 
because the indexer-worker process is created as root but at the time of 
indexing the indexer-worker drops privs to the mail user. In 
/proc/indexer-worker pid/, io is mode 0400 and owned by root, so it makes 
sense that the mail user would be unable to read that file.

The strange thing is it looks like the stats are still collected (unless I am 
reading the output of the stats dump incorrectly):

[root@wardentest3 mailtest]# doveadm stats dump -s 
/var/run/dovecot/mailtest/stats command user=warden
cmd argssession userlast_update user_cpusys_cpu 
min_faults  maj_faults  vol_cs  invol_csdisk_input  
disk_output read_count  read_bytes  write_count write_bytes 
mail_lookup_pathmail_lookup_attrmail_read_count mail_read_bytes 
mail_cache_hits
select  inbox   27fb87218302984f084cae899e04warden  
1335362182.950250   0.000.00172 0   46  
0   0   12288   13  78834   381 0   0   0   
0   0
search  text warden   27fb87218302984f084cae899e04warden  
1335362186.588023   0.0010000.0032  0   4   
1   0   0   4   108 1   43  0   0   0   
0   0
logout  27fb87218302984f084cae899e04warden  
1335362189.161790   0.000.001   0   0   
3   0   0   1   108 3   157 0   0   0   
0   0

This obviously isn't a show-stopper but if this is causing stats to be 
incorrect it would be great if this could be fixed.

-David Warden

My doveconf -n:

# 2.1.5: /etc/dovecot/mailtest/dovecot.conf
doveconf: Warning: service auth { client_limit=4096 } is lower than required 
under max. load (12288)
doveconf: Warning: service anvil { client_limit=4096 } is lower than required 
under max. load (12291)
# OS: Linux 2.6.32-220.7.1.el6.x86_64 x86_64 Red Hat Enterprise Linux Server 
release 6.2 (Santiago) nfs
auth_cache_negative_ttl = 0
auth_cache_size = 16 M
auth_gssapi_hostname = $ALL
auth_krb5_keytab = /etc/dovecot/mailtest.combined.keytab
auth_master_user_separator = *
auth_mechanisms = plain login gssapi
auth_username_format = %Ln
base_dir = /var/run/dovecot/mailtest/
default_client_limit = 4096
default_process_limit = 4096
deliver_log_format = msgid=%m subject=%s from=%f size=%p result=%$
first_valid_uid = 0
hostname = mailtest.geneseo.edu
instance_name = mailtest
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
login_log_format_elements = user=%u method=%m rip=%r lip=%l lport=%a mpid=%e 
encryption=%c
mail_fsync = always
mail_location = 
maildir:/Mail/mailhome/%Ln/mailtest/Maildir:CONTROL=/Mail/mailhome/%Ln/mailtest/.dovecot-control:INDEX=/Mail/mailhome/%Ln/mailtest/.dovecot-index
mail_log_prefix = service=%s user=%u rip=%r 
mail_nfs_index = yes
mail_nfs_storage = yes
mail_plugins = zlib quota mail_log notify fts fts_squat stats
maildir_very_dirty_syncs = yes
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character 
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy 
include variables body enotify environment mailbox date ihave
mbox_write_locks = fcntl
mmap_disable = yes
namespace default {
  inbox = yes
  location = 
  mailbox Drafts {
auto = subscribe
special_use = \Drafts
  }
  mailbox Junk {
auto = no
special_use = \Junk
  }
  mailbox Sent {
auto = subscribe
special_use = \Sent
  }
  mailbox Trash {
auto = subscribe
special_use = \Trash
  }
  prefix = 
  separator = .
  type = private
}
passdb {
  args = /etc/dovecot/passwd.masterusers
  driver = passwd-file
  master = yes
}
passdb {
  args = cache_key=%u dovecot
  driver = pam
}
plugin {
  fts = squat
  mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename 
flag_change append
  

Re: [Dovecot] dsync on large mailbox fails

2012-04-25 Thread Jeff Kletsky

On 04/24/2012 10:08 AM, Timo Sirainen wrote:



25934 jeff  1 1030   135M   102M CPU22 128:47 100.00% doveadm

Looks like it could be in an infinite loop. To find out where:


That's a lot of getdirentries() calls in there, repeating all the time. So I 
don't think it's an infinite loop, just a lot of slowness repeating the same 
work over and over again. See if it helps if you add:

maildir_very_dirty_syncs = yes



I hope I understood correctly when I tried

$ dsync -Dv -o maildir_very_dirty_syncs=yes backup maildir:~/Maildir

into fresh directories (moving the previous Maildir aside).

I didn't see any significant change (and it did not complete in several 
hours) on the usual UFS directory, and have also tried ZFS to see if it 
might be a filesystem issue. That has not completed either after over 
nine  hours.


From what I can see, I am guessing that it is hanging in index 
creation. Below, mail is the source directory, and Maildir is the 
destination of the sync. This is about nine hours of run time.


[jeff@mail ~]$ ls -Al mail/.imap/cron_2010-07-10
total 9
-rw---  1 jeff  jeff  4910320 Feb 22  2011 dovecot.index
-rw---  1 jeff  jeff  3600384 Apr 25 01:18 dovecot.index.cache
-rw---  1 jeff  jeff   56 Feb 22  2011 dovecot.index.log
[jeff@mail ~]$ ls -Al Maildir/.cron_2010-07-10
total 26
drwx--  2 jeff  jeff   102291 Apr 25 01:17 cur
-rw---  1 jeff  jeff   36 Apr 25 01:18 dovecot-keywords
-rw---  1 jeff  jeff  4122971 Apr 25 01:17 dovecot-uidlist
-rw---  1 jeff  jeff   24 Apr 25 07:19 dovecot-uidlist.lock
-rw---  1 jeff  jeff  1637008 Apr 25 07:03 dovecot.index
-rw---  1 jeff  jeff  9442304 Apr 25 07:19 dovecot.index.cache
-rw---  1 jeff  jeff87984 Apr 25 07:19 dovecot.index.log
-rw---  1 jeff  jeff  1048600 Apr 25 07:03 dovecot.index.log.2
-rw---  1 jeff  jeff0 Apr 24 22:12 maildirfolder
drwx--  2 jeff  jeff2 Apr 24 22:12 new
drwx--  2 jeff  jeff2 Apr 25 01:17 tmp




Re: [Dovecot] sieve vacation redirect problem

2012-04-25 Thread Timo Sirainen
On 25.4.2012, at 17.16, Robert Schetterer wrote:

 Am 25.04.2012 16:11, schrieb Timo Sirainen:
 p *set
 
 hope doing it right
 
 (gdb) p *set
 $1 = {postmaster_address = 0xaa33d0 P6\252, hostname = 0x0,
 submission_host = 0x0, sendmail_path = 0x7fbaf6e41f50
 H\211\\$\360H\211l$\370H\203\354\030\200=\207A%,
  rejection_subject = 0x7fbaf6e42b90
 H\211\\$\350L\211d$\370H\211\373H\211l$\360H\203\354(\200=?5%,
 rejection_reason = 0x7fbaf6e41ed0

That's totally broken.. You sure you recompiled Pigeonhole correctly against 
the same Dovecot version?



Re: [Dovecot] sieve vacation redirect problem

2012-04-25 Thread Robert Schetterer
Am 25.04.2012 16:30, schrieb Timo Sirainen:
 On 25.4.2012, at 17.16, Robert Schetterer wrote:
 
 Am 25.04.2012 16:11, schrieb Timo Sirainen:
 p *set

 hope doing it right

 (gdb) p *set
 $1 = {postmaster_address = 0xaa33d0 P6\252, hostname = 0x0,
 submission_host = 0x0, sendmail_path = 0x7fbaf6e41f50
 H\211\\$\360H\211l$\370H\203\354\030\200=\207A%,
  rejection_subject = 0x7fbaf6e42b90
 H\211\\$\350L\211d$\370H\211\373H\211l$\360H\203\354(\200=?5%,
 rejection_reason = 0x7fbaf6e41ed0
 
 That's totally broken.. You sure you recompiled Pigeonhole correctly against 
 the same Dovecot version?
 

its from latest
http://xi.rename-it.nl/debian/pool/testing-auto/dovecot-2.1/
recompiled the debain way , never had bugged
-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


Re: [Dovecot] stats + fts squat plugins, indexer-worker error on message indexing

2012-04-25 Thread Timo Sirainen
On 25.4.2012, at 17.20, David Warden wrote:

 Apr 25 09:56:26 wardentest3 dovecot: service=indexer-worker user=warden rip= 
 Error: open(/proc/self/io) failed: Permission
..
 Based on http://wiki2.dovecot.org/Services#indexer-worker it seems like this 
 is because the indexer-worker process is created as root but at the time of 
 indexing the indexer-worker drops privs to the mail user. In 
 /proc/indexer-worker pid/, io is mode 0400 and owned by root, so it makes 
 sense that the mail user would be unable to read that file.

Does the attached patch fix it?



diff
Description: Binary data

 The strange thing is it looks like the stats are still collected (unless I am 
 reading the output of the stats dump incorrectly):
 
 [root@wardentest3 mailtest]# doveadm stats dump -s 
 /var/run/dovecot/mailtest/stats command user=warden
 cmd   argssession userlast_update user_cpusys_cpu 
 min_faults  maj_faults  vol_cs  invol_csdisk_input  
 disk_output read_count  read_bytes  write_count write_bytes   
   mail_lookup_pathmail_lookup_attrmail_read_count 
 mail_read_bytes mail_cache_hits
 selectinbox   27fb87218302984f084cae899e04warden  
 1335362182.950250   0.000.00172 0   46
   0   0   12288   13  78834   381 0   0   0   
 0   0
 searchtext warden   27fb87218302984f084cae899e04warden  
 1335362186.588023   0.0010000.0032  0   4 
   1   0   0   4   108 1   43  0   0   0   
 0   0
 logout27fb87218302984f084cae899e04warden  
 1335362189.161790   0.000.001   0   0 
   3   0   0   1   108 3   157 0   0   0   
 0   0

These are IMAP command statistics. The problem was only with indexer-worker.

Re: [Dovecot] sieve vacation redirect problem

2012-04-25 Thread Chris
2012/4/25 Robert Schetterer rob...@schetterer.org:
 That's totally broken.. You sure you recompiled Pigeonhole correctly against 
 the same Dovecot version?


 its from latest
 http://xi.rename-it.nl/debian/pool/testing-auto/dovecot-2.1/
 recompiled the debain way , never had bugged

You are using packages compiled against debian sources under ubuntu???

--
Chris


Re: [Dovecot] sieve vacation redirect problem

2012-04-25 Thread Robert Schetterer
Am 25.04.2012 16:47, schrieb Chris:
 2012/4/25 Robert Schetterer rob...@schetterer.org:
 That's totally broken.. You sure you recompiled Pigeonhole correctly 
 against the same Dovecot version?


 its from latest
 http://xi.rename-it.nl/debian/pool/testing-auto/dovecot-2.1/
 recompiled the debain way , never had bugged
 
 You are using packages compiled against debian sources under ubuntu???
 
 --
 Chris

jep that works since years

-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


[Dovecot] dovecot-lda error

2012-04-25 Thread Hadi Salem


Hi,

im getting the fallowing error. from dovecot-lda log

Apr 25 17:30:41 lda(ja...@example.com): Fatal: setgid(5003(vmail) from 
userdb lookup) failed with euid=8(mail), gid=12(mail), egid=12(mail): 
Operation not permitted (This binary should probably be called with 
process group set to 5003(vmail) instead of 12(mail))


this error occur if im using different uid and gid part from mail uid..
ja...@example.com:{PLAIN}123:5003:5003::/var/vmail/example.com/jamal/::userdb_mail=maildir:~/Maildir

but if i use mail uid it work fine..  
ja...@example.com:{PLAIN}123:8:12::/var/vmail/example.com/jamal/::userdb_mail=maildir:~/Maildir

i tried using multiple uids as mention in wiki2.dovecot.org/LDA bye setting up 
setuid-root for dovecot-lda but im getting on-there error from sendmail :- 

Apr 25 17:30:41 host1 sendmail[31024]: q3PEUen2031022: to=ja...@example.com, 
delay=00:00:00, xdelay=00:00:00, mailer=dovecot, pri=120359, relay=dovecot, 
dsn=4.0.0, stat=Deferred: dovecot mailer 
(/usr/local/libexec/dovecot/dovecot-lda) exited with EX_TEMPFAIL

im using sendmail.
[root@host1 conf.d]# doveconf -n
# 2.0.20: /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 2.6.18-164.el5 x86_64 CentOS release 5.4 (Final)
auth_debug = yes
auth_debug_passwords = yes
auth_verbose = yes
auth_verbose_passwords = plain
debug_log_path = /var/log/dovecot.log
disable_plaintext_auth = no
first_valid_gid = 12
first_valid_uid = 8
hostname = host1.bigmama.com
info_log_path = /var/log/dovecot.log
last_valid_gid = 5
last_valid_uid = 5
log_path = /var/log/dovecot.log
mail_debug = yes
mail_gid = mail
mail_location = maildir:~/Maildir
mail_uid = mail
passdb {
  args = scheme=PLAIN username_format=%u /etc/dovecot/users
  driver = passwd-file
}
postmaster_address = r...@host1.bigmama.com
service auth {
  unix_listener auth-userdb {
group = mail
mode = 0666
user = mail
  }
}
ssl = no
userdb {
  args = username_format=%u /etc/dovecot/users
  driver = passwd-file
}
protocol lda {
  info_log_path = /var/log/dovecot-lda.log
  log_path = /var/log/dovecot-lda-errors.log
}

  

Re: [Dovecot] sieve vacation redirect problem

2012-04-25 Thread Chris
2012/4/25 Robert Schetterer rob...@schetterer.org:
 Am 25.04.2012 16:47, schrieb Chris:
 2012/4/25 Robert Schetterer rob...@schetterer.org:
 That's totally broken.. You sure you recompiled Pigeonhole correctly 
 against the same Dovecot version?


 its from latest
 http://xi.rename-it.nl/debian/pool/testing-auto/dovecot-2.1/
 recompiled the debain way , never had bugged

 You are using packages compiled against debian sources under ubuntu???

 --
 Chris

 jep that works since years

Thats really a very bad idea. Please recompile it under ubuntu 10.04.

--
Chris


Re: [Dovecot] sieve vacation redirect problem

2012-04-25 Thread Robert Schetterer
Am 25.04.2012 16:54, schrieb Chris:
 2012/4/25 Robert Schetterer rob...@schetterer.org:
 Am 25.04.2012 16:47, schrieb Chris:
 2012/4/25 Robert Schetterer rob...@schetterer.org:
 That's totally broken.. You sure you recompiled Pigeonhole correctly 
 against the same Dovecot version?


 its from latest
 http://xi.rename-it.nl/debian/pool/testing-auto/dovecot-2.1/
 recompiled the debain way , never had bugged

 You are using packages compiled against debian sources under ubuntu???

 --
 Chris

 jep that works since years
 
 Thats really a very bad idea. Please recompile it under ubuntu 10.04.
you miss understand i have it compiled under ubuntu 10.04
 
 --
 Chris


-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


Re: [Dovecot] Error compiling pigeonhole 0.3.0 with dovecot-2.1.5 in openbsd 5.0

2012-04-25 Thread Joseba Torre




Looks like BSD doesn't know EPROTO (although it is POSIX). Dovecot uses
EIO elsewhere for such stream errors, so I adopted that for ManageSieve
as well. This should fix it:

http://hg.rename-it.nl/dovecot-2.1-pigeonhole/rev/ef5045159e6b

Regards,


Perfect, thank you



Re: [Dovecot] sieve vacation redirect problem / solved

2012-04-25 Thread Robert Schetterer
Am 25.04.2012 16:30, schrieb Timo Sirainen:
 On 25.4.2012, at 17.16, Robert Schetterer wrote:
 
 Am 25.04.2012 16:11, schrieb Timo Sirainen:
 p *set

 hope doing it right

 (gdb) p *set
 $1 = {postmaster_address = 0xaa33d0 P6\252, hostname = 0x0,
 submission_host = 0x0, sendmail_path = 0x7fbaf6e41f50
 H\211\\$\360H\211l$\370H\203\354\030\200=\207A%,
  rejection_subject = 0x7fbaf6e42b90
 H\211\\$\350L\211d$\370H\211\373H\211l$\360H\203\354(\200=?5%,
 rejection_reason = 0x7fbaf6e41ed0
 
 That's totally broken.. You sure you recompiled Pigeonhole correctly against 
 the same Dovecot version?
 

 jep it was broken , no idea why serveral new downloads give same result
using
http://www.rename-it.nl/dovecot/2.1/dovecot-2.1-pigeonhole-0.3.0.tar.gz
with recompile debian way ( same scripts etc ) to recent  downloaded
dovecot sources
http://xi.rename-it.nl/debian/pool/testing-auto/dovecot-2.1/

works now

no idea whats going on , but works now

-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


Re: [Dovecot] dovecot %u variable problem....

2012-04-25 Thread Kris Weston

On 25/04/12 11:48, Timo Sirainen wrote:

On 25.4.2012, at 9.17, Kris wrote:


but then this happens when i attempt to send mail and this means the user gets 
rejected because dovecot cant find the user id in the db without the correct 
string (i.e. user@domain):
localhost dovecot: auth: Debug: sql(admin,xx.xx.xx.xx): query: SELECT id as 
user, crypt as password FROM users WHERE id= 'admin'

What exactly is doing this lookup? SMTP AUTH? Maybe the client's SMTP 
authentication is configured without the @domain part in username?

saslauthd via a query in dovecot-sql.conf.ext? after these suggestions 
im pretty sure nobody here has a clue about this, and this is not a 
known problem, i cant find anyone on the internet with it and the query 
is quite clearly coming up wrong and the unchangeable variable is quite 
clearly changing.


the client can not be sending out different usernames every second 
surely. i put the username in myself in thunderbird, double, triple 
checked, made other accounts etc, the username changes by the second, 
ive watched the sql queries go in and they change for no obvious reason.





Re: [Dovecot] dovecot %u variable problem....

2012-04-25 Thread Timo Sirainen
On 25.4.2012, at 18.52, Kris Weston wrote:

 On 25/04/12 11:48, Timo Sirainen wrote:
 On 25.4.2012, at 9.17, Kris wrote:
 
 but then this happens when i attempt to send mail and this means the user 
 gets rejected because dovecot cant find the user id in the db without the 
 correct string (i.e. user@domain):
 localhost dovecot: auth: Debug: sql(admin,xx.xx.xx.xx): query: SELECT id as 
 user, crypt as password FROM users WHERE id= 'admin'
 What exactly is doing this lookup? SMTP AUTH? Maybe the client's SMTP 
 authentication is configured without the @domain part in username?
 
 saslauthd via a query in dovecot-sql.conf.ext?

There is no saslauthd in Dovecot.

 after these suggestions im pretty sure nobody here has a clue about this, and 
 this is not a known problem, i cant find anyone on the internet with it and 
 the query is quite clearly coming up wrong and the unchangeable variable is 
 quite clearly changing.

To me it looks like the client isn't sending the domain.

 the client can not be sending out different usernames every second surely. i 
 put the username in myself in thunderbird, double, triple checked, made other 
 accounts etc, the username changes by the second, ive watched the sql queries 
 go in and they change for no obvious reason.

Show the full logs for a failing session, not just this one line. Even better 
would be full logs with auth_debug_passwords=yes, but in that case you'd better 
be using an unimportant password (some of the base64 encoded strings contain 
the password).

[Dovecot] 2.1.5 problem with mail_location

2012-04-25 Thread postmaster

I've been advised to set :
mail_location = maildir:~/
as the home directory is found through a sql request.

this has been working perfectly up to and including 2.1.4

from 2.1.5 however this setting gives cause to a problem :
instead of looking in the mail home eg /var/mail/domain/user\@domain/ 
dovecot is looking for mail in /var/mail/domain/user\@domain/~


the '~' directory is created upon the first request for mail and all 
future mail transactions in dovecot is done relative to this folder.


is this behavior a bug or a feature ???

--
Bjarne D Mathiesen
København N ; Danmark ; Europa
++
denne besked er skrevet i et totalt M$-frit miljø
MacOS X 10.7.3 Lion ; 2.8GHz Intel Core i7 ; 16GB 1067MHz DDR3


Re: [Dovecot] sieve vacation redirect problem / solved / restested with lates hg pigeonhole broken

2012-04-25 Thread Robert Schetterer
Am 25.04.2012 17:48, schrieb Robert Schetterer:
 Am 25.04.2012 16:30, schrieb Timo Sirainen:
 On 25.4.2012, at 17.16, Robert Schetterer wrote:

 Am 25.04.2012 16:11, schrieb Timo Sirainen:
 p *set

 hope doing it right

 (gdb) p *set
 $1 = {postmaster_address = 0xaa33d0 P6\252, hostname = 0x0,
 submission_host = 0x0, sendmail_path = 0x7fbaf6e41f50
 H\211\\$\360H\211l$\370H\203\354\030\200=\207A%,
  rejection_subject = 0x7fbaf6e42b90
 H\211\\$\350L\211d$\370H\211\373H\211l$\360H\203\354(\200=?5%,
 rejection_reason = 0x7fbaf6e41ed0

 That's totally broken.. You sure you recompiled Pigeonhole correctly against 
 the same Dovecot version?

 
  jep it was broken , no idea why serveral new downloads give same result
 using
 http://www.rename-it.nl/dovecot/2.1/dovecot-2.1-pigeonhole-0.3.0.tar.gz
 with recompile debian way ( same scripts etc ) to recent  downloaded
 dovecot sources
 http://xi.rename-it.nl/debian/pool/testing-auto/dovecot-2.1/
 
 works now
 
 no idea whats going on , but works now
 

just for info, i retested again
with hg code latest
hg clone http://hg.rename-it.nl/dovecot-2.1-pigeonhole/
compile runs ok...
dpkg-buildpackage -rfakeroot -b

( on ubuntu 64 lucid latest patchlevel from today )

but at dpkg install
it gives warning

/usr/lib/dovecot/managesieve: symbol lookup error:
/usr/lib/dovecot/managesieve: undefined symbol: sieve_file_script
doveconf: Error: managesieve-login: dump-capability process returned 127

dont know if there is the bug reason

however my test showes up described failures with latest hg code then
sieve vacation redirect got broken

it works if i use
http://www.rename-it.nl/dovecot/2.1/dovecot-2.1-pigeonhole-0.3.0.tar.gz
for compile

thx for your help and code anywhere, hope this results may help for debug


-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


Re: [Dovecot] doveadm delete folders ? / unsubscribe ?

2012-04-25 Thread Robert Schetterer
Am 25.04.2012 08:13, schrieb Robert Schetterer:
 Am 24.04.2012 20:13, schrieb Timo Sirainen:
 On 24.4.2012, at 10.50, Robert Schetterer wrote:

 doveadm expunge -d -u *@domain.example mailbox exampelfolder\*
 savedbefore 10d

 works like charm, but the folders do not get unsubscribed
 any chance to have i.e another add parameter ,or do it auto
 cause empty and deleted folders should not stay subscribed in my eyes

 Yeah, I guess unsubscribing is always wanted:

 http://hg.dovecot.org/dovecot-2.1/rev/b1653b7bd165

 
 Hi Timo, i will try after update and report, jep
 unsubscribing should be the uni wanted behave
 thx again !

tested works nice
thx Timo !

-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


Re: [Dovecot] dovecot %u variable problem....

2012-04-25 Thread Kris Weston

but then this happens when i attempt to send mail and this means the user gets 
rejected because dovecot cant find the user id in the db without the correct 
string (i.e. user@domain):
localhost dovecot: auth: Debug: sql(admin,xx.xx.xx.xx): query: SELECT id as 
user, crypt as password FROM users WHERE id= 'admin'

What exactly is doing this lookup? SMTP AUTH? Maybe the client's SMTP 
authentication is configured without the @domain part in username?


saslauthd via a query in dovecot-sql.conf.ext?

There is no saslauthd in Dovecot.


thats correct, its not in dovecot, its installed on the same machine.
but regardless, its salsauthd.


after these suggestions im pretty sure nobody here has a clue about this, and 
this is not a known problem, i cant find anyone on the internet with it and the 
query is quite clearly coming up wrong and the unchangeable variable is quite 
clearly changing.

To me it looks like the client isn't sending the domain.


so the client is changing its domain every coupla seconds for what 
reason, surely the thunderbird devs would have found this error? and 
even if thunderbird is sending it without the domain, the server should 
deal with thunderbird correctly, the user should not have to configure 
her thunderbird to work with dovecot rather than the other way round ? i 
dont believe this is the problem at all.



the client can not be sending out different usernames every second surely. i 
put the username in myself in thunderbird, double, triple checked, made other 
accounts etc, the username changes by the second, ive watched the sql queries 
go in and they change for no obvious reason.

Show the full logs for a failing session, not just this one line. Even better 
would be full logs with auth_debug_passwords=yes, but in that case you'd better 
be using an unimportant password (some of the base64 encoded strings contain 
the password).


thanks for trying, but forget it, its clear to me from answers ive 
received that nobody has a clue about this problem. guess im on me own. 
cheers bye!


Re: [Dovecot] stats + fts squat plugins, indexer-worker error on message indexing

2012-04-25 Thread David Warden

On Apr 25, 2012, at 10:43 AM, Timo Sirainen wrote:

 On 25.4.2012, at 17.20, David Warden wrote:
 
 Apr 25 09:56:26 wardentest3 dovecot: service=indexer-worker user=warden rip= 
 Error: open(/proc/self/io) failed: Permission
 ..
 Based on http://wiki2.dovecot.org/Services#indexer-worker it seems like this 
 is because the indexer-worker process is created as root but at the time of 
 indexing the indexer-worker drops privs to the mail user. In 
 /proc/indexer-worker pid/, io is mode 0400 and owned by root, so it makes 
 sense that the mail user would be unable to read that file.
 
 Does the attached patch fix it?
 
 diff

The error is still logged, but is that intentional on your part? It looks like 
the patch logs the failure to open() when the error returned is anything other 
than ENOENT and in my case the error is EACCESS. Other than that it looks like 
it correctly disables accessing that file.

 The strange thing is it looks like the stats are still collected (unless I 
 am reading the output of the stats dump incorrectly):
 
 [root@wardentest3 mailtest]# doveadm stats dump -s 
 /var/run/dovecot/mailtest/stats command user=warden
 cmd  argssession userlast_update user_cpusys_cpu 
 min_faults  maj_faults  vol_cs  invol_csdisk_input  
 disk_output read_count  read_bytes  write_count write_bytes  
mail_lookup_pathmail_lookup_attrmail_read_count 
 mail_read_bytes mail_cache_hits
 select   inbox   27fb87218302984f084cae899e04warden  
 1335362182.950250   0.000.00172 0   46   
0   0   12288   13  78834   381 0   0   0 
   0   0
 search   text warden   27fb87218302984f084cae899e04warden  
 1335362186.588023   0.0010000.0032  0   4
1   0   0   4   108 1   43  0   0   0 
   0   0
 logout   27fb87218302984f084cae899e04warden  
 1335362189.161790   0.000.001   0   0
3   0   0   1   108 3   157 0   0   0 
   0   0
 
 These are IMAP command statistics. The problem was only with indexer-worker.



Re: [Dovecot] dovecot %u variable problem....

2012-04-25 Thread Timo Sirainen
On 25.4.2012, at 21.28, Kris Weston wrote:

 but then this happens when i attempt to send mail and this means the user 
 gets rejected because dovecot cant find the user id in the db without the 
 correct string (i.e. user@domain):
 localhost dovecot: auth: Debug: sql(admin,xx.xx.xx.xx): query: SELECT id 
 as user, crypt as password FROM users WHERE id= 'admin'
 What exactly is doing this lookup? SMTP AUTH? Maybe the client's SMTP 
 authentication is configured without the @domain part in username?
 
 saslauthd via a query in dovecot-sql.conf.ext?
 There is no saslauthd in Dovecot.
 
 thats correct, its not in dovecot, its installed on the same machine.
 but regardless, its salsauthd.

saslauthd doesn't authenticate via Dovecot. It might authenticate via IMAP 
though.

 thanks for trying, but forget it, its clear to me from answers ive received 
 that nobody has a clue about this problem. guess im on me own. cheers bye!


The reason why nobody has a clue is because you haven't provided the full logs. 
We can only guess what the problem is. With full logs there would be no 
guessing necessary.

Re: [Dovecot] stats + fts squat plugins, indexer-worker error on message indexing

2012-04-25 Thread Timo Sirainen
On 25.4.2012, at 21.30, David Warden wrote:

 Apr 25 09:56:26 wardentest3 dovecot: service=indexer-worker user=warden 
 rip= Error: open(/proc/self/io) failed: Permission
 
 Does the attached patch fix it?
 
 The error is still logged, but is that intentional on your part? It looks 
 like the patch logs the failure to open() when the error returned is anything 
 other than ENOENT and in my case the error is EACCESS. Other than that it 
 looks like it correctly disables accessing that file.

The patch intended to open the /proc/self/io immediately at startup while still 
running as root.

Anyway, now that I'm testing it again myself, I see that it's supposed to work 
even without the patch, because /proc/self/io's permissions change after 
seteuid().

I noticed similar errors happening somewhat randomly in another CentOS 6.2 
system. Changing the kernel fixed it. (Downgrading at least worked, possibly 
upgrading might also.)



Re: [Dovecot] 2.1.5 problem with mail_location

2012-04-25 Thread Timo Sirainen
On 25.4.2012, at 20.56, postmaster wrote:

 I've been advised to set :
 mail_location = maildir:~/
 as the home directory is found through a sql request.
 
 this has been working perfectly up to and including 2.1.4
 
 from 2.1.5 however this setting gives cause to a problem :
 instead of looking in the mail home eg /var/mail/domain/user\@domain/ dovecot 
 is looking for mail in /var/mail/domain/user\@domain/~
 
 the '~' directory is created upon the first request for mail and all future 
 mail transactions in dovecot is done relative to this folder.

Yeah, it's a bug. Fixed and added to tests so it won't break in future: 
http://hg.dovecot.org/dovecot-2.1/rev/249c1c89d9d3



Re: [Dovecot] v2.1.5 released

2012-04-25 Thread Timo Sirainen
On 24.4.2012, at 11.59, Gerhard Wiesinger wrote:

 Hello Timo,
 
 Dovecot 2.1.5 seems to be broken. After upgrade from
 2.1.3 + patch http://hg.dovecot.org/dovecot-2.1/rev/86e6dc46a80e
 I only see Inbox and Trash folder.
 
 Reverting = OK.
 
 Same config as before and disucssed per private E-mail and on the list. 
 Guessing this comes again from:
 mail_full_filesystem_access=yes

I guess the problem was this: http://hg.dovecot.org/dovecot-2.1/rev/249c1c89d9d3



Re: [Dovecot] v2.1.5 released

2012-04-25 Thread Ralf Hildebrandt
* Timo Sirainen t...@iki.fi:
 On 24.4.2012, at 11.59, Gerhard Wiesinger wrote:
 
  Hello Timo,
  
  Dovecot 2.1.5 seems to be broken. After upgrade from
  2.1.3 + patch http://hg.dovecot.org/dovecot-2.1/rev/86e6dc46a80e
  I only see Inbox and Trash folder.
  
  Reverting = OK.
  
  Same config as before and disucssed per private E-mail and on the list. 
  Guessing this comes again from:
  mail_full_filesystem_access=yes
 
 I guess the problem was this: 
 http://hg.dovecot.org/dovecot-2.1/rev/249c1c89d9d3

2.1.5 doesn't seem to build with pigeonhole-sieve (or it's
pigeonhole-sieve itself?):

/bin/bash ../../libtool --tag=CC   --mode=link gcc  -std=gnu99 -g -O2
-Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith
-Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime
-Wstrict-aliasing=2  -export-dynamic -g -Wl,--as-needed -o sievec
sievec.o ../../src/lib-sieve/libdovecot-sieve.la
../../src/lib-sieve-tool/libsieve-tool.la
/usr/src/dovecot-2.1/dovecot-2.1/src/lib-storage/libdovecot-storage.la
-lssl -lcrypto
/usr/src/dovecot-2.1/dovecot-2.1/src/lib-lda/libdovecot-lda.la
/usr/src/dovecot-2.1/dovecot-2.1/src/lib-dovecot/libdovecot.la
-export-dynamic -ldl -lrt
libtool: link: gcc -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes
-Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2
-Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2 -g
-Wl,--as-needed -o .libs/sievec sievec.o -Wl,--export-dynamic
../../src/lib-sieve/.libs/libdovecot-sieve.so
../../src/lib-sieve-tool/.libs/libsieve-tool.a
/usr/src/dovecot-2.1/dovecot-2.1/src/lib-storage/.libs/libdovecot-storage.so
-lssl -lcrypto
/usr/src/dovecot-2.1/dovecot-2.1/src/lib-lda/.libs/libdovecot-lda.so
/usr/src/dovecot-2.1/dovecot-2.1/src/lib-dovecot/.libs/libdovecot.so
-ldl -lrt -Wl,-rpath -Wl,/usr/local/dovecot-2.1/lib/dovecot
../../src/lib-sieve/.libs/libdovecot-sieve.so: error: undefined reference to 
'sieve_file_script'
../../src/lib-sieve/.libs/libdovecot-sieve.so: error: undefined reference to 
'sieve_dict_script'
sievec.c:116: error: undefined reference to 'sieve_scriptfile_has_extension'
collect2: ld returned 1 exit status
make[3]: *** [sievec] Error 1
make[3]: Leaving directory 
/usr/src/dovecot-2.1/dovecot-2.1-pigeonhole/src/sieve-tools'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory /usr/src/dovecot-2.1/dovecot-2.1-pigeonhole/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory /usr/src/dovecot-2.1/dovecot-2.1-pigeonhole'
make: *** [all] Error 2
Making install in .


-- 
Ralf Hildebrandt
  Geschäftsbereich IT | Abteilung Netzwerk
  Charité - Universitätsmedizin Berlin
  Campus Benjamin Franklin
  Hindenburgdamm 30 | D-12203 Berlin
  Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
  ralf.hildebra...@charite.de | http://www.charite.de



Re: [Dovecot] Permission problems when trying to create new folders with ACL plugin

2012-04-25 Thread Timo Sirainen
On 24.4.2012, at 14.00, Markus Petri wrote:

 I have the a problem with shared folders and the ACL plugin. The user
 markus has full access to Shared/shared-user/Data:
 
 3 GETACL Shared/shared-user/Data
 * ACL Shared/shared-user/Data markus akxeilprwtscd
 3 OK Getacl completed.
 
 but creating a new subfolder under Data fails:
 
 4 CREATE Shared/shared-user/Data/New1 
 4 NO [NOPERM] Permission denied

Fixed: http://hg.dovecot.org/dovecot-2.1/rev/e8b80e0767ac



Re: [Dovecot] acls not copied when creating subfolder of private INBOX

2012-04-25 Thread Timo Sirainen
On 24.4.2012, at 17.09, Andreas Helmcke wrote:

 Using brand new dovecot 2.1.5 I still have a problem with the inheritance of 
 acls.

Maybe http://hg.dovecot.org/dovecot-2.1/rev/e8b80e0767ac fixes this as well?



Re: [Dovecot] Reading Mutt mboxes from Thunderbird

2012-04-25 Thread Timo Sirainen
On 24.4.2012, at 19.07, Leonardo M. Ramé wrote:

 Hi, I'm a user of Mutt, and before moving to Thunderbird I'm trying to
 share mboxes between them. To do this, I installed Dovecot to create an
 IMAP server in my local machine, to serve mutt mboxes to be read by
 Thunderbird.
 
 So far, I can read my inbox from /var/mail/%u, but in mutt, I have many
 folders in ~/mail, like 2010-mails, 2011-mails, mailing-list-x,
 mailing-list-y, and so on. How can I configure Dovecot to read them?.
 
 In /etc/dovecot/conf.d/10-mail.conf I have this:
 
 mail_location = mbox:~/Mail:INBOX=/var/mail/%u 

~/mail vs. ~/Mail?



Re: [Dovecot] dovecot LDA error

2012-04-25 Thread Timo Sirainen
On 24.4.2012, at 20.41, Hadi Salem wrote:

 Apr 24 20:25:46 lda(ja...@example.com): Fatal:
 setgid(5000(vmail) from userdb lo 
  
 okup) failed with
 euid=8(mail), gid=12(mail), egid=12(mail): Operation not permi

 tted (This binary should probably be called with process group set to 
 5000(vmail

 ) instead of 12(mail))

Configure your MTA to run dovecot-lda as vmail instead of as mail.



Re: [Dovecot] dovecot-lda error

2012-04-25 Thread Timo Sirainen
On 25.4.2012, at 17.52, Hadi Salem wrote:

 i tried using multiple uids as mention in wiki2.dovecot.org/LDA bye setting 
 up setuid-root for dovecot-lda but im getting on-there error from sendmail :- 
 
 Apr 25 17:30:41 host1 sendmail[31024]: q3PEUen2031022: 
 to=ja...@example.com, delay=00:00:00, xdelay=00:00:00, mailer=dovecot, 
 pri=120359, relay=dovecot, dsn=4.0.0, stat=Deferred: dovecot mailer 
 (/usr/local/libexec/dovecot/dovecot-lda) exited with EX_TEMPFAIL

What do the Dovecot logs say about this?

 protocol lda {
  info_log_path = /var/log/dovecot-lda.log
  log_path = /var/log/dovecot-lda-errors.log
 }

If there is nothing in dovecot-lda-errors.log, make sure dovecot-lda has 
permissions to write there (e.g. temporarily make it world-writable).



Re: [Dovecot] v2.1.5 released

2012-04-25 Thread Timo Sirainen
On 26.4.2012, at 0.26, Ralf Hildebrandt wrote:

 2.1.5 doesn't seem to build with pigeonhole-sieve (or it's
 pigeonhole-sieve itself?):

Builds against Pigeonhole 0.3.0 tarball at least.



Re: [Dovecot] v2.1.5 released

2012-04-25 Thread Ralf Hildebrandt
* Timo Sirainen t...@iki.fi:
 On 26.4.2012, at 0.26, Ralf Hildebrandt wrote:
 
  2.1.5 doesn't seem to build with pigeonhole-sieve (or it's
  pigeonhole-sieve itself?):
 
 Builds against Pigeonhole 0.3.0 tarball at least.

Thought so. I'm rebuilding against that one while I write this :O

-- 
Ralf Hildebrandt
  Geschäftsbereich IT | Abteilung Netzwerk
  Charité - Universitätsmedizin Berlin
  Campus Benjamin Franklin
  Hindenburgdamm 30 | D-12203 Berlin
  Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
  ralf.hildebra...@charite.de | http://www.charite.de



Re: [Dovecot] v2.1.5 released

2012-04-25 Thread Timo Sirainen
On 26.4.2012, at 0.26, Ralf Hildebrandt wrote:

 * Timo Sirainen t...@iki.fi:
 2.1.5 doesn't seem to build with pigeonhole-sieve (or it's
 pigeonhole-sieve itself?):
 
 ../../src/lib-sieve/.libs/libdovecot-sieve.so: error: undefined reference to 
 'sieve_file_script'
 ../../src/lib-sieve/.libs/libdovecot-sieve.so: error: undefined reference to 
 'sieve_dict_script'

That's from hg, and you didn't run autogen.sh? ./configure 
--enable-maintainer-mode also helps avoiding this.



Re: [Dovecot] v2.1.5 released

2012-04-25 Thread Ralf Hildebrandt
* Timo Sirainen t...@iki.fi:
 On 26.4.2012, at 0.26, Ralf Hildebrandt wrote:
 
  * Timo Sirainen t...@iki.fi:
  2.1.5 doesn't seem to build with pigeonhole-sieve (or it's
  pigeonhole-sieve itself?):
  
  ../../src/lib-sieve/.libs/libdovecot-sieve.so: error: undefined reference 
  to 'sieve_file_script'
  ../../src/lib-sieve/.libs/libdovecot-sieve.so: error: undefined reference 
  to 'sieve_dict_script'
 
 That's from hg, 

yes

 and you didn't run autogen.sh? ./configure --enable-maintainer-mode
 also helps avoiding this.

Damn, forgot that in the pigeonhole dir (I have that for the dovecot
sources, but not for the pigeonhole sources)...


-- 
Ralf Hildebrandt
  Geschäftsbereich IT | Abteilung Netzwerk
  Charité - Universitätsmedizin Berlin
  Campus Benjamin Franklin
  Hindenburgdamm 30 | D-12203 Berlin
  Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
  ralf.hildebra...@charite.de | http://www.charite.de



Re: [Dovecot] How to remove duplicate GUID messages from storage?

2012-04-25 Thread Daniel Parthey
Timo Sirainen schrieb:
 On 21.4.2012, at 23.29, Daniel Parthey wrote:
 
  The following command
  doveadm -v force-resync -u usern...@example.org INBOX
  outputs lots of messages like this one, with different GUID
  doveadm(usern...@example.org): Error: mdbox 
  /mail/dovecot/example.org/username/mail/storage: Duplicate GUID 
  0b8a032d66a0924fb42cde5f8128 in m.55:45484041 and m.14:52173045
 
 I think this is a force-resync bug and it shouldn't really complain about 
 duplicates.
 Although I'm not entirely sure why with you it's complaining about them at 
 all. I have anyway in TODO to look into this..

Maybe this is because I manually deleted all the mailboxes directories (rm 
-rf)
containing the duplicates, which one should better avoid with mdbox 
mailboxes... :(

So there is no meta information anymore, just the duplicate messages in the 
storage.
and dovecot would need to guess where these messages from the store belong.

  How can I manually remove these identical, duplicate messages
  from the storage to save space? Dovecot does not do it
  automatically.
 
 Perhaps force-resync + purge should do that, but currently it doesn't.

I already tried both, and purge is even running as a nightly cronjob.

 Also it would be nice if doveadm import didn't add duplicates in the first 
 place.
 This is also something for which I have vague plans, because it would help 
 dsync as well.

Thanks for looking into this.

I would really appreciate this idea of duplicate GUID prevention while
duplicate messages (with different GUIDs) should probably be allowed.
Maybe someone wants to store the same message several times...

Regards,
Daniel


Re: [Dovecot] Reading Mutt mboxes from Thunderbird

2012-04-25 Thread Daniel Parthey
Timo Sirainen schrieb:
 On 24.4.2012, at 19.07, Leonardo M. Ramé wrote:
 
  Hi, I'm a user of Mutt, and before moving to Thunderbird I'm trying to
  share mboxes between them. To do this, I installed Dovecot to create an
  IMAP server in my local machine, to serve mutt mboxes to be read by
  Thunderbird.
  
  So far, I can read my inbox from /var/mail/%u, but in mutt, I have many
  folders in ~/mail, like 2010-mails, 2011-mails, mailing-list-x,
  mailing-list-y, and so on. How can I configure Dovecot to read them?.
  
  In /etc/dovecot/conf.d/10-mail.conf I have this:
  
  mail_location = mbox:~/Mail:INBOX=/var/mail/%u 
 
 ~/mail vs. ~/Mail?

On 2012-04-25 04:26:27 +0200, Daniel Parthey wrote:
 Are you sure, dovecot does not read them, or are you just not seeing
 your folders in thunderbird? Please try to right click your INBOX and
 subscribe to the folders. On serverside, the subscribed folders are
 listed in $mail_location/subscriptions, so you might auto-generate
 this file by listing your mutt mailboxes.

 Regards,
 Daniel

You are right!, I just had to subscribe to the folders.

Regards,
Leonardo


[Dovecot] 2.1.x changes and dsync -- Wiki suggestion

2012-04-25 Thread Jeff Kletsky
There are a couple things that show up on the Upgrading/2.1 wiki page 
that would be useful to have on pages describing dsync (Tools/Dsync, 
Migration/MailFormat, Tools, perhaps others):


* dsync was merged into doveadm
* You can't dsync 2.0.x to/from 2.1.x

That second point is especially interesting to me as it seems that 
Apple MacOS X Server is still on 2.0.16, at least from what I see on 
opensource.apple.com. I was planning on migrating mail off the current 
server onto my friend's new MacMini, but I'll have to figure out how to 
downgrade the mail jail to a 2.0 version, it seems.


Thanks for all the great work,

Jeff



Re: [Dovecot] dsync: convert only mbox in /var/mail to maildir?

2012-04-25 Thread Jeff Simmons
On Friday, April 20, 2012 02:27:59 pm Timo Sirainen wrote:
 On 20.4.2012, at 22.26, Jeff Simmons wrote:
  I'm migrating an old UW pop server to a new Dovecot server. The old
  server did not allow mail to be stored on the server, so only mbox files
  exist in /var/mail, with nothing in /home/$user. I'd like to copy the
  /var/mail directory over to the new server and then use dsync to convert
  the mbox files and put them in /home/$user/Maildir, but every
  permutation of the command line I've tried dies with a variation on
  can't find/write either /var/mail/mail or /home/$user/mail, seems it
  won't deal with mbox files without an associated mail directory. Can
  dsync be used for this kind of conversion, or should I look elsewhere
  for conversion utilities?
 
 Assuming in destination server the mbox is in /var/mail/$user and you want
 the destination to ~/Maildir:
 
 in dovecot.conf set:
 mail_location = maildir.~/Maildir
 
 rm -rf /tmp/emptydir
 dsync mirror mbox:/tmp/emptydir:/var/mail/$user

Actually:

dsync mirror mbox:/tmp/emptydir:INBOX=/var/mail/$user  :)

And be sure that /var/mail/$user has the same ownership:group as the user 
(i.e. $user:$user NOT $user:mail).

 be sure to delete the emptydir between users.

-- 
Jeff Simmons   j...@j-simmons.net
Simmons Consulting - Network Engineering, Administration, Security


Re: [Dovecot] dovecot %u variable problem....

2012-04-25 Thread Benny Pedersen

Den 2012-04-25 10:50, Kris Weston skrev:


# auth_default_realm =



ahhh, ok. only i have multiple domains, so how does that werk ?
just put em all in ?


if you use @ in imap/pop3 logins then the default for this setting is 
fine, if logins is without @ then you need to set it to the hostname of 
the machine where users is on, it cant be multiple hostnames on 
127.0.0.1 :=)


use localhost.example.org if unsure

saslauthtest -u user -p passwd -r example.org
OK

or

saslauthtest -u u...@example.org -p passwd
OK





Re: [Dovecot] dovecot LDA with sendmail

2012-04-25 Thread Joseph Tam


Timo, in response to Hadi, wrote:


Apr 24 20:25:46 lda(ja...@example.com): Fatal:
setgid(5000(vmail) from userdb lo
okup) failed with
euid=8(mail), gid=12(mail), egid=12(mail): Operation not permi
tted (This binary should probably be called with process group set to 5000(vmail
) instead of 12(mail))


Configure your MTA to run dovecot-lda as vmail instead of as mail.


Yeah, what he said.  Someone helpfully added documentation on how to do
this at the end of Dovecot1's wiki (http://wiki.dovecot.org/LDA/Sendmail),
which probably should be copied to Dovecot 2's wiki.  So that's what I
did.

Joseph Tam jtam.h...@gmail.com


Re: [Dovecot] LDAP Lookup not returning value in maxStorage

2012-04-25 Thread Bruce, Andrew
On 30 March 2012 08:05, Andrew Bruce abr...@tumnus.co.nz wrote:

 On 28/03/2012 19:25, Nikita Koshikov wrote:

 On Wed, 28 Mar 2012 09:39:37 +1300
 Bruce, Andrew wrote:

 On 28 March 2012 09:36, Bruce, Andrewabr...@tumnus.co.nz  wrote:

 On 27 March 2012 19:14, Nikita Koshikovkoshi...@gmail.com  wrote:

 On Tue, 27 Mar 2012 13:57:04 +1300
 Bruce, Andrew wrote:

 Hi there,

 We're setting up a Dovecot virtual email setup - we've got everything
 working perfect with LDAP logins authenticating against AD and so
 forth, but we're having issues with retrieving the maxStorage value
 from AD (this is a pre-setup field in AD that we'd like to use to set
 per user quotas).

 In our LDAP lookup, we have the maxStorage entry listed under
 user_attrs for the quota (user_attrs =
 maxStorage=quota_rule=*:storage=%$M), and in the debug logs, can see
 it trying to get the entry, but it fails with:
 Mar 27 13:19:27 auth: Debug: ldap(username@site,192.168.1.5): user
 search: base=dc=site,dc=local scope=subtree
 filter=((objectClass=person)(| (userPrincipalName=username@site)
 (|(mail=username@site)(samAccountName=username@site
 fields=maxStorage
 Mar 27 13:19:27 auth: Debug: ldap(username@site,192.168.1.5): no
 fields returned by the server

 At this point, we then see the default quota applied.

 Try to change your quota rule to be like:
 maxStorage=quota_rule=*:bytes=%$
                        ^
 And put the value in bytes to maxStorage - if I remember correct - this
 is integer field and no K\M\G values is valid here.

 PS We successfully using maxStorage field to obtain non-default quota
 from AD, dovecot version 2.0.x

 If we change the name of the field from maxStorage to instanceType we
 see the value show up in the logs and passed through to the quota
 system and applied successfully:
 Mar 27 11:09:01 auth: Debug: ldap(username@site,192.168.1.5): user
 search: base=dc=site,dc=local scope=subtree
 filter=((objectClass=person)(| (userPrincipalName=username@site)
 (|(mail=username@site)(samAccountName=username@site
 fields=instanceType
 Mar 27 11:09:01 auth: Debug: ldap(username@site,192.168.1.5): result:
 instanceType(quota_rule=*:storage=%$M)=*:storage=4M
 Mar 27 11:09:01 auth: Debug: master out: USER   3901227009
 username@site    quota_rule=*:storage=4M


 Which seems a bit weird.

 If we use ldapsearch and pass it the same search string and look for
 the field maxStorage, we clearly see the field and the value being
 returned.  The result looks the same if we also lookup instanceType.

 We're using Dovecot 2.0.9.

 Does anyone have any idea as to why we can't use this field?

 Thanks,

 Andrew

 Tried your suggestion Nikita, no joy unfortunately.  It still looks
 like the value never gets returned from the LDAP server to Dovecot.
 It definitely has something in the field (equivalent of 10GB, but in
 bytes as suggested) and I changed the user_attrs also, but still get
 the same no fields returned by the server error message.

 Modifying the user_attrs to lookup from a different field
 (instanceType) definitely works.

 What exact version are you using - perhaps it's a problem with our
 copy of 2.0.9.

 Thanks,

 Andrew

 maybe you met restriction of ldap port
 3268?(http://wiki2.dovecot.org/AuthDatabase/LDAP)

 Dead on - it was a restriction of ldap port 3268 - as soon as we pointed
 ldapsearch at the same port, we got the same result - some of the fields
 were missing.  It all makes perfect sense and I wish I noticed that earlier.

 Now need to work out why Dovecot can get the fields and username back from
 ldap on port 389, but it can't do the auth through it like it could with
 3268.

 Thanks Nikita for your help.

 Andrew


Just to update the solution for us in the end...

We couldn't get auth to work on port 389, but in the end we managed to
get the maxStorage field to be presented via the query on port 3268.

What we needed to do was to ensure that it was added as an attribute
to the Global Catalog on our Windows Servers.

We could then get this entry back via our query.

There's instructions on how to do this on the following page:
http://technet.microsoft.com/en-us/library/cc737521(v=ws.10).aspx

Thanks for the help.

Regards,

Andrew