[Dovecot] New log entries with 2.0.19?

2012-08-31 Thread Knute Johnson
I just upgraded my Ubuntu server from 11.10 to 12.04.1 and that upgraded 
Dovecot to 2.0.19.  For some reason I'm getting a lot more (5 times) 
disconnect in IDLE and inactivity time outs.  I'm using only IMAP with 
two users.  Both users access the server from multiple devices, phone, 
tablet and desktop computer.  I had previously set the 
max_userip_connections to 20 and rarely got the following limits 
exceeded message.  That's probably being triggered when we are both home 
and using all of our devices on the same network.  I've now changed it 
to 40 and we'll see how that does.


The other is the IDLE and inactivity timeouts.  I don't really 
understand how IDLE works and I couldn't find an inactivity timeout 
setting to play with.  There are at this second 32 imap or imap-login 
processes running with only two phones and one desktop running.  That's 
a few more than before the upgrade but not a lot.


- Dovecot Begin 

 Dovecot limits exceeded:
max_userip_connections: penny from 216.240.58.138 to 
216.240.58.140: 56 Time(s)


 Dovecot disconnects:
Disconnected in IDLE: 485 Time(s)
Inactivity: 343 Time(s)
no auth attempts: 14 Time(s)
no reason: 21 Time(s)

Everything seems to be working OK so maybe I should just not worry about it?

Thanks,

knute...

# 2.0.19: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-29-generic x86_64 Ubuntu 12.04.1 LTS
auth_anonymous_username = anonymous
auth_cache_negative_ttl = 1 hours
auth_cache_size = 0
auth_cache_ttl = 1 hours
auth_debug = no
auth_debug_passwords = no
auth_default_realm =
auth_failure_delay = 2 secs
auth_first_valid_uid = 500
auth_gssapi_hostname =
auth_krb5_keytab =
auth_last_valid_uid = 0
auth_master_user_separator =
auth_mechanisms = plain login
auth_realms =
auth_socket_path = auth-userdb
auth_ssl_require_client_cert = no
auth_ssl_username_from_cert = no
auth_use_winbind = no
auth_username_chars = 
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@

auth_username_format =
auth_username_translation =
auth_verbose = no
auth_verbose_passwords = no
auth_winbind_helper_path = /usr/bin/ntlm_auth
auth_worker_max_count = 30
base_dir = /var/run/dovecot
config_cache_size = 1 M
debug_log_path =
default_client_limit = 1000
default_idle_kill = 60
default_internal_user = dovecot
default_login_user = dovenull
default_process_limit = 100
default_vsz_limit = 256 M
deliver_log_format = msgid=%m: %$
dict_db_config =
director_doveadm_port = 0
director_mail_servers =
director_servers =
director_user_expire = 15 mins
disable_plaintext_auth = yes
dotlock_use_excl = yes
doveadm_allowed_commands =
doveadm_password =
doveadm_proxy_port = 0
doveadm_socket_path = doveadm-server
doveadm_worker_count = 0
first_valid_gid = 1
first_valid_uid = 500
hostname =
imap_capability =
imap_client_workarounds =
imap_id_log =
imap_id_send =
imap_idle_notify_interval = 2 mins
imap_logout_format = bytes=%i/%o
imap_max_line_length = 64 k
import_environment = TZ
info_log_path =
instance_name = dovecot
last_valid_gid = 0
last_valid_uid = 0
lda_mailbox_autocreate = no
lda_mailbox_autosubscribe = no
lda_original_recipient_header =
libexec_dir = /usr/lib/dovecot
listen = *, ::
lmtp_proxy = no
lmtp_save_to_detail_mailbox = no
lock_method = fcntl
log_path = syslog
log_timestamp = "%b %d %H:%M:%S "
login_access_sockets =
login_greeting = Dovecot ready.
login_log_format = %$: %s
login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c
login_trusted_networks =
mail_access_groups =
mail_attachment_dir =
mail_attachment_fs = sis posix
mail_attachment_hash = %{sha1}
mail_attachment_min_size = 128 k
mail_cache_fields = flags
mail_cache_min_mail_count = 0
mail_chroot =
mail_debug = no
mail_fsync = optimized
mail_full_filesystem_access = no
mail_gid =
mail_home =
mail_location = mbox:~/mail:INBOX=/var/mail/%u
mail_log_prefix = "%s(%u): "
mail_max_keyword_length = 50
mail_max_lock_timeout = 0
mail_max_userip_connections = 10
mail_never_cache_fields = imap.envelope
mail_nfs_index = no
mail_nfs_storage = no
mail_plugin_dir = /usr/lib/dovecot/modules
mail_plugins =
mail_privileged_group =
mail_save_crlf = no
mail_temp_dir = /tmp
mail_uid =
mailbox_idle_check_interval = 30 secs
mailbox_list_index_disable = no
maildir_copy_with_hardlinks = yes
maildir_stat_dirs = no
maildir_very_dirty_syncs = no
master_user_separator =
mbox_dirty_syncs = yes
mbox_dotlock_change_timeout = 2 mins
mbox_lazy_writes = yes
mbox_lock_timeout = 5 mins
mbox_min_index_size = 0
mbox_read_locks = fcntl
mbox_very_dirty_syncs = no
mbox_write_locks = dotlock fcntl
mdbox_preallocate_space = no
mdbox_rotate_interval = 0
mdbox_rotate_size = 2 M
mmap_disable = no
passdb {
  args =
  deny = no
  driver = pam
  master = no
  pass = no
}
pop3_client_workarounds =
pop3_enable_last = no
pop3_fast_size_lookups = no
pop3_lock_session = no
pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
pop3_no_flag_updates = no
pop3_reuse_xuidl = no
pop3_save_uidl = no

[Dovecot] dovecotadm error

2012-08-31 Thread Michael

When I use the following command:
doveadm expunge -A mailbox Junk savedbefore 28d

I get:
doveadm(root): Error: User listing returned failure

In the mail log file it says:
dovecot: auth-worker(18549): Error: sql: Iterate query failed: Table 
'system.users' doesn't exist (using built-in default iterate_query: 
SELECT username, domain FROM users)


However this is setup:

dovecot-sql.conf:
iterate_query = SELECT username AS user FROM accounts

though I have had to comment the following from dovecot.conf:
#iteratedb {
#  args = /usr/local/etc/dovecot/dovecot-sql.conf
#  driver = sql
#}
because it errors on dovecot start up.

I have already spent a bit of time on the Dovecot website and Google 
trying to find an answer. I want to get the expires plugin working.


Any leads please?

dovecot -n

# 2.1.9: /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 2.6.29.6-rt24-smp i686 Slackware 13.1.0
auth_master_user_separator = *
auth_mechanisms = plain login
dict {
  expire = mysql:/usr/local/etc/dovecot/dovecot-dict-expire.conf
  quotadict = mysql:/usr/local/etc/dovecot/dovecot-dict-sql.conf
}
disable_plaintext_auth = no
first_valid_gid = 1000
first_valid_uid = 1000
mail_access_groups = dovecot
mail_location = Maildir:%h/Maildir
mail_plugins = " expire"
mail_privileged_group = mail
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

passdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf
  driver = sql
}
plugin {
  autocreate = Drafts
  autocreate2 = Junk
  autocreate3 = Sent
  autocreate4 = Trash
  autosubscribe = Drafts
  autosubscribe2 = Junk
  autosubscribe3 = Sent
  autosubscribe4 = Trash
  expire = Junk
  expire_dict = proxy::expire
  quota = dict:user::proxy::quotadict
  sieve = %h/.dovecot.sieve
  sieve_before = /var/lib/dovecot/sieve/before.sieve
  sieve_dir = %h/sieve
  sieve_global_dir = /var/lib/dovecot/sieve/global/
}
protocols = imap pop3 sieve
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
  user = root
}
service dict {
  unix_listener dict {
group = dovecot
mode = 0660
  }
}
service imap-login {
  inet_listener imap {
address = DELETED
  }
}
service managesieve-login {
  executable = /usr/local/libexec/dovecot/managesieve-login
}
service managesieve {
  executable = /usr/local/libexec/dovecot/managesieve
}
ssl_cert = 

Re: [Dovecot] How Converting/Using courier-userdb Files ?

2012-08-31 Thread Pascal Volk
On 08/31/2012 03:51 PM Dirk Caspari wrote:
> Hello,
> 
> how can i convert/use the Original userdb-Files from courier Installation ?
> The files are looking like a "Special"-DB-Format and are not readable.
> -
> #file /etc/courier/userdb.dat
> /etc/courier/userdb.dat: GNU dbm 1.x or ndbm database, little endian
> -
> 
> /etc/courier/userdb.dat
> /etc/courier/userdbshadow.dat
> 
> These Files was created with the following scripts (Part of  
> "courier-authlib-userdb" Package).
> .
> /usr/sbin/makeuserdb
> /usr/sbin/pw2userdb
> /usr/sbin/userdb
> ..
> 
> Regards
>   D I R K

RTFM: makeuserdb(8) / DESCRIPTION / Format of /etc/courier/userdb
http://manpages.ubuntu.com/manpages/natty/man8/makeuserdb.8.html


Regards,
Pascal
-- 
The trapper recommends today: decade.1224...@localdomain.org


Re: [Dovecot] Imap Ghost folder

2012-08-31 Thread Sven Hartge
Sascha Zucca  wrote:
> Am 31.08.2012 16:06, schrieb Timo Sirainen:
>> On 31.8.2012, at 16.59, Sascha Zucca wrote:
>>> So i guess
>>> * LIST (\Noselect \HasNoChildren) "/" "Freigaben/"
>>> is the Problem...

>> Yes. The problem is, I don't see it even with v2.1.7. Although I do
>> see that when a user sees zero shared mailboxes, but that has also
>> been fixed with v2.1.9. So I'd try upgrading again..
>>
> hm, but 2.1.9 is not in backports yet, is it?

And will not be for some time. 2.1.9 is not even in Unstable and even if
it were, it would not migrate to testing (and be an eligible backporting
target) due to the freeze before the Wheezy release.

Grüße,
Sven.

-- 
Sigmentation fault. Core dumped.



Re: [Dovecot] Dovecot generate file when over quota detected

2012-08-31 Thread Timo Sirainen
On 31.8.2012, at 17.23, Dominic Malolepszy wrote:

> On 31/08/2012 11:40 PM, Timo Sirainen wrote:
>> On 23.8.2012, at 9.48, Dominic Malolepszy wrote:
>> 
>>> I am curious if Dovecot can add an empty file into a Maildir folder as soon 
>>> as a mailbox has exceeded 100% capacity, and later when it detects the 
>>> quota has fallen below 100% unlink the file. The idea is the Dovecot LDA 
>>> would deliver the message and if this caused the mailbox to reach 100%+, 
>>> add a file into the maibox say "username/Maildir/overquota". Interactions 
>>> via Dovecot IMAP/POP3 that lower the mailbox usage, for example the user 
>>> popping, or deleting mail from the mailbox would trigger Dovecot to unlink 
>>> the file.
>> Quota warning scripts can do that. 
>> http://wiki2.dovecot.org/Quota/Configuration#Quota_warnings
>> 
>> 
> They appear to trigger during maildelivers say via the LDA, however IMAP 
> mailbox interactions (say deleting an email or copying an email) do not 
> trigger them. I ended up having this patched into the quota plugin and works 
> a treat.

The quota plugin, including quota warnings, works identically in LDA and IMAP. 
So I wonder what your patch does.

Of course in IMAP a mail deletion is often a copy+mark as deleted with the 
expunge happening sometimes later.



Re: [Dovecot] Dovecot generate file when over quota detected

2012-08-31 Thread Dominic Malolepszy

On 31/08/2012 11:40 PM, Timo Sirainen wrote:

On 23.8.2012, at 9.48, Dominic Malolepszy wrote:


I am curious if Dovecot can add an empty file into a Maildir folder as soon as a mailbox 
has exceeded 100% capacity, and later when it detects the quota has fallen below 100% 
unlink the file. The idea is the Dovecot LDA would deliver the message and if this caused 
the mailbox to reach 100%+, add a file into the maibox say 
"username/Maildir/overquota". Interactions via Dovecot IMAP/POP3 that lower the 
mailbox usage, for example the user popping, or deleting mail from the mailbox would 
trigger Dovecot to unlink the file.

Quota warning scripts can do that. 
http://wiki2.dovecot.org/Quota/Configuration#Quota_warnings


They appear to trigger during maildelivers say via the LDA, however IMAP 
mailbox interactions (say deleting an email or copying an email) do not 
trigger them. I ended up having this patched into the quota plugin and 
works a treat.


Re: [Dovecot] Imap Ghost folder

2012-08-31 Thread Sascha Zucca

Am 31.08.2012 16:06, schrieb Timo Sirainen:

On 31.8.2012, at 16.59, Sascha Zucca wrote:


So i guess
* LIST (\Noselect \HasNoChildren) "/" "Freigaben/"
is the Problem...

Yes. The problem is, I don't see it even with v2.1.7. Although I do see that 
when a user sees zero shared mailboxes, but that has also been fixed with 
v2.1.9. So I'd try upgrading again..


hm, but 2.1.9 is not in backports yet, is it?


--
Systemschmiede IT-Lösungen
Zucca & Teves GbR
August-Thyssen-Str. 2-4
52511 Geilenkirchen
www.systemschmiede.com


Tel.:  02451 - 9088390
Fax:   02451 - 9124070
Mobil: 0178  - 4073254

Ust.ID: DE248030393



[Dovecot] How Converting/Using courier-userdb Files ?

2012-08-31 Thread Dirk Caspari

Hello,

how can i convert/use the Original userdb-Files from courier Installation ?
The files are looking like a "Special"-DB-Format and are not readable.
-
#file /etc/courier/userdb.dat
/etc/courier/userdb.dat: GNU dbm 1.x or ndbm database, little endian
-

/etc/courier/userdb.dat
/etc/courier/userdbshadow.dat

These Files was created with the following scripts (Part of  
"courier-authlib-userdb" Package).

.
/usr/sbin/makeuserdb
/usr/sbin/pw2userdb
/usr/sbin/userdb
..

Regards
 D I R K





smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Dovecot] [Postfix] SASL Auth. using Dovecot with password forwarding proxy configuration

2012-08-31 Thread Timo Sirainen
On 31.8.2012, at 5.51, Adi Pircalabu wrote:

> I'm relatively new to Dovecot and I did a bit of search but couldn't
> find a possible solution for the particular setup I'm working on.
> Basically I have an SMTP/POP/IMAP proxy setup running Postfix &
> Dovecot. IMAP/POP authentication is done using the password proxy
> feature, where the login credentials are passed to the backend server
> after a db lookup, which does the actual authentication.

POP/IMAP logs the user in and Dovecot proxies it.

> The POP/IMAP part is working fine. What I'm trying to do is to use
> Dovecot SASL implementation in Postfix to do SMTP authentication in a
> similar manner. The problem I have with my current configuration is that
> SMTP authentication succeeds if only the username matches, because
> password forwarding works if the authentication succeeds with any given
> password, as documented at
> http://wiki.dovecot.org/PasswordDatabase/ExtraFields/Proxy

Dovecot has no SMTP proxy (currently). And anyway Postfix doesn't use SMTP to 
do authentication, Postfix authenticates using Dovecot's internal protocol, 
which replies that Postfix should do the proxying, which it of course doesn't 
do.

> My question is, given the above: is there a way to get SMTP
> authentication properly in this scenario?

Make Postfix authenticate against the backend Dovecot server. You'll need to 
setup service auth { inet_listener } to some port for it.

Re: [Dovecot] Imap Ghost folder

2012-08-31 Thread Timo Sirainen
On 31.8.2012, at 16.59, Sascha Zucca wrote:

> So i guess
> * LIST (\Noselect \HasNoChildren) "/" "Freigaben/"
> is the Problem...

Yes. The problem is, I don't see it even with v2.1.7. Although I do see that 
when a user sees zero shared mailboxes, but that has also been fixed with 
v2.1.9. So I'd try upgrading again..



Re: [Dovecot] Imap Ghost folder

2012-08-31 Thread Sascha Zucca

Hi and thanks for replying!
Here's what you asked for:


_*with %%n:*_

1 LIST "" *
* LIST (\HasNoChildren) "/" "Papierkorb"
* LIST (\HasNoChildren) "/" "Gesendete Objekte"
* LIST (\HasNoChildren) "/" "Spam"
* LIST (\HasNoChildren) "/" "Entw&APw-rfe"
* LIST (\HasNoChildren) "/" "INBOX"
* LIST (\Noselect \HasNoChildren) "/" "Freigaben/"
* LIST (\Noselect \HasChildren) "/" "Freigaben/testuser-1"
* LIST (\HasNoChildren) "/" "Freigaben/testuser-1/INBOX/test"
1 OK List completed.

_*with %%u:*_

1 LIST "" *
* LIST (\HasNoChildren) "/" "Papierkorb"
* LIST (\HasNoChildren) "/" "Gesendete Objekte"
* LIST (\HasNoChildren) "/" "Spam"
* LIST (\HasNoChildren) "/" "Entw&APw-rfe"
* LIST (\HasNoChildren) "/" "INBOX"
* LIST (\Noselect \HasChildren) "/" "Freigaben/testuse...@parrotshop.de"
* LIST (\HasNoChildren) "/" "Freigaben/testuse...@parrotshop.de/INBOX/test"
1 OK List completed.


So i guess
* LIST (\Noselect \HasNoChildren) "/" "Freigaben/"
is the Problem...

Thank you again
Sascha

Am 31.08.2012 15:34, schrieb Timo Sirainen:

On 31.8.2012, at 11.16, Sascha Zucca wrote:


Hi!
Still noone?
strange...this must be some easy thing to solve if you're familiar with 
dovecot, i thought.

No. I can't reproduce it. What does your LIST "" * reply look like now with 
v2.1?




--
Systemschmiede IT-Lösungen
Zucca & Teves GbR
August-Thyssen-Str. 2-4
52511 Geilenkirchen
www.systemschmiede.com


Tel.:  02451 - 9088390
Fax:   02451 - 9124070
Mobil: 0178  - 4073254

Ust.ID: DE248030393



Re: [Dovecot] LDAP auth and multiple attributes to construct the mail path

2012-08-31 Thread Timo Sirainen
On 31.8.2012, at 2.45, Anatoly Ivanov wrote:

> So I am trying to construct mail path for my LDAP user lookups, and i need
> to use two attributes instead of one.
> 
> For examle, my LDAP directory has two attributes: departmentAttr and
> userIDAttr, and I want the maildir to reside in
> /home/${departmentAttr}/${userIDAttr}

With v2.1:

/home/%{ldap:departmentAttr}/%{ldap:userIDAttr}

With older versions: you can't.



Re: [Dovecot] mail_location / mail_home

2012-08-31 Thread Timo Sirainen
On 31.8.2012, at 11.15, Denny Schierz wrote:

> Am 31.08.2012 um 09:55 schrieb Denny Schierz:
>> 
>> mail_home = /imap/spool/%d/%1u/%u
>> mail_location = maildir:~/:INDEX=~/
> 
> I think, it doesn't make any difference, if I have "~" or a fixed path :-/  
> On the productive system (also 2.1.9) I get messages like:
> 
> [...] dovecot.lda-dupes/tmp) failed: Not a directory [...]

Here's a simple fix: maildir_stat_dirs=yes



Re: [Dovecot] Length of attachment filenames

2012-08-31 Thread Timo Sirainen
On 31.8.2012, at 15.27, Fuhrmann, Hauke wrote:

> I have a beginners question to Dovecot: does it have a restriction on
> the supported length and character encodings of filenames of
> attachments?
> 
> Can filenames be arbitrary large?


The filenames in IMAP's BODYSTRUCTURE reply probably get truncated somewhere 
around 8192 bytes (then again, maybe not, depends on the encoding I think). And 
in any case not all IMAP clients use BODYSTRUCTURE.



Re: [Dovecot] Vpopmail Dynamic Authentication Module

2012-08-31 Thread Timo Sirainen
On 24.8.2012, at 16.42, Eric Sisolak wrote:

> I had to modify the command to build the module, but was able to
> successfully build it:
> gcc -shared -fPIC -DHAVE_CONFIG_H -DUSERDB_VPOPMAIL -DPASSDB_VPOPMAIL
> -I../.. -I../lib -I/home/vpopmail/include -I/home/vpopmail/lib
> userdb-vpopmail.c passdb-vpopmail.c -o vpopmail.so
> -L/home/vpopmail/lib/libvpopmail.a

-L means a path, pointing it to .a file doesn't do anything useful. By giving 
the .a file directly probably also fails if libvpopmail.a hasn't been built 
with -fPIC.

> /usr/lib64/dovecot/auth/vpopmail.so: undefined symbol: vclose

And that's the reason this fails, because libvpopmail isn't included in 
vpopmail.so.



Re: [Dovecot] pop3 migration

2012-08-31 Thread Timo Sirainen
On 23.8.2012, at 16.40, TeTeHacko wrote:

> I have problems with pop3 migration, the server disconect the dovesync when
> fetching mails after 5 minutes with this error in server log:
> 
> xx.xx.xx.xx   [28F4] 11:54:05 <<< RETR 6548
> xx.xx.xx.xx   [28F4] 11:54:05 >>> +OK 47522 octets
> xx.xx.xx.xx   [28F4] 11:54:05 <<< RETR 6549
> xx.xx.xx.xx   [28F4] 11:54:05 >>> +OK 355289 octets
> xx.xx.xx.xx   [28F4] 11:54:05 <<< RETR 6550
> xx.xx.xx.xx   [28F4] 11:54:05 >>> +OK 9638 octets
> xx.xx.xx.xx   [28F4] 11:54:05 <<< RETR 6551
> xx.xx.xx.xx   [28F4] 11:54:05 >>> +OK 2188 octets
> xx.xx.xx.xx   [28F4] 11:59:05 >>> -ERR Command unrecognized: ""
> xx.xx.xx.xx   [28F4] 11:59:05 ***  6551 477693894 00:12:55 
> ERROR
> xx.xx.xx.xx   [28F4] 11:59:05 Disconnected

Looks like a bug. But in Dovecot POP3 client or the POP3 server? Apparently 
either Dovecot sends an empty line after RETR or the server thinks Dovecot 
sends it. Can you get the actual TCP traffic logs? and/or set pop3c_rawlog_dir 
and see if it's there.



Re: [Dovecot] Dovecot generate file when over quota detected

2012-08-31 Thread Timo Sirainen
On 23.8.2012, at 9.48, Dominic Malolepszy wrote:

> I am curious if Dovecot can add an empty file into a Maildir folder as soon 
> as a mailbox has exceeded 100% capacity, and later when it detects the quota 
> has fallen below 100% unlink the file. The idea is the Dovecot LDA would 
> deliver the message and if this caused the mailbox to reach 100%+, add a file 
> into the maibox say "username/Maildir/overquota". Interactions via Dovecot 
> IMAP/POP3 that lower the mailbox usage, for example the user popping, or 
> deleting mail from the mailbox would trigger Dovecot to unlink the file.

Quota warning scripts can do that. 
http://wiki2.dovecot.org/Quota/Configuration#Quota_warnings



Re: [Dovecot] Imap Ghost folder

2012-08-31 Thread Timo Sirainen
On 31.8.2012, at 11.16, Sascha Zucca wrote:

> Hi!
> Still noone?
> strange...this must be some easy thing to solve if you're familiar with 
> dovecot, i thought.

No. I can't reproduce it. What does your LIST "" * reply look like now with 
v2.1?



Re: [Dovecot] exclude a folder for lazy expunge (move to trash)

2012-08-31 Thread Timo Sirainen
On 22.8.2012, at 11.01, Angel L. Mateo wrote:

>   I'm configuring lazy expunge plugin to act as a kind of backup of my 
> user's emails.
> 
>   I'm getting a little problem because a lot of my users use "move to 
> trash" behaviour in their email client (most of them are using thunderbird 
> which has no option to hide deleted messages and is a hassle working with 
> mark as deleted with it). The problem combining move to trash with lazy 
> expunge is that messages are stored in the expunge namespace twice, first 
> when it was deleted from the original folder and the second when is deleted 
> from the trash.
> 
>   So... is there any way to exclude trash folder from lazy expunge 
> plugin, so mails are stored in the expunge namespace only when they are 
> deleted from their original folder and not from the trash?

Not right now. Maybe it could be automatically done when SPECIAL-USE is enabled 
and the deletion is from a \Trash mailbox.

>   Another idea... We are purging trash folders with a cron running 
> "doveadm purge" commands. Is there any way to run this command disabling lazy 
> expunge plugin?

doveadm purge shouldn't affect lazy expunge, but you can disable lazy_expunge 
by using something like doveadm -o mail_plugins=everything,except,lazy_expunge 
expunge ..



Re: [Dovecot] segfault in mail_user_get_home()

2012-08-31 Thread Timo Sirainen
I couldn't reproduce it with your config, but I figured out the cause of it 
anyway. Fixed:
http://hg.dovecot.org/dovecot-2.1/rev/6b9db780b47d

On 21.8.2012, at 15.45, Lazy wrote:

> it was shared namespace with empty location that produced the error
> so :
> namespace test {
>  list = children
>  location =
>  prefix = test.
>  subscriptions = yes
>  type = shared
> }
> 
> segfaults
> 
> with location is fine
> 
> 
> 
> 2012/8/21, Lazy :
>> gdb ./src/imap/.libs/imap
>> 
>> Reading symbols from /usr/src/dovecot-2.1.9/src/imap/.libs/imap...done.
>> (gdb) run
>> Starting program: /usr/src/dovecot-2.1.9/src/imap/.libs/imap
>> warning: no loadable sections found in added symbol-file
>> system-supplied DSO at 0x77ffa000
>> [Thread debugging using libthread_db enabled]
>> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
>> process 1104 is executing new program: /usr/local/dovecot/bin/doveconf
>> [Thread debugging using libthread_db enabled]
>> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
>> process 1104 is executing new program:
>> /usr/src/dovecot-2.1.9/src/imap/.libs/imap
>> [Thread debugging using libthread_db enabled]
>> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
>> 
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x77b2a0ff in mail_user_get_home (user=0x0,
>> home_r=0x7fffe308) at mail-user.c:310
>> 310 if (user->home_looked_up) {
>> (gdb) bt
>> #0  0x77b2a0ff in mail_user_get_home (user=0x0,
>> home_r=0x7fffe308) at mail-user.c:310
>> #1  0x77ad172e in mdbox_storage_find_root_dir (ns=0x648610) at
>> mdbox-storage.c:90
>> #2  0x77ad180c in mdbox_storage_autodetect (ns=0x648610,
>> set=0x7fffe4d0) at mdbox-storage.c:113
>> #3  0x77b2345d in mail_storage_autodetect (ns=0x648610,
>> set=0x7fffe4d0) at mail-storage.c:105
>> #4  0x77b2369d in mail_storage_get_class (ns=0x648610,
>> driver=0x0, list_set=0x7fffe4d0, flags=0, error_r=0x7fffe5b8)
>> at mail-storage.c:180
>> #5  0x77b23c90 in mail_storage_create (ns=0x648610,
>> driver=0x0, flags=0, error_r=0x7fffe5b8) at mail-storage.c:342
>> #6  0x77b1c62a in namespace_add (user=0x649be0,
>> ns_set=0x64a8c8, unexpanded_ns_set=0x64a1c0, mail_set=0x64a440,
>> ns_p=0x645380,
>>error_r=0x7fffe6e8) at mail-namespace.c:126
>> #7  0x77b1ccbb in mail_namespaces_init (user=0x649be0,
>> error_r=0x7fffe6e8) at mail-namespace.c:289
>> #8  0x77b34a64 in mail_storage_service_init_post
>> (ctx=0x633460, user=0x633e08, priv=0x7fffe6f0,
>> mail_user_r=0x7fffe7b8,
>>error_r=0x7fffe6e8) at mail-storage-service.c:641
>> #9  0x77b35dd6 in mail_storage_service_next (ctx=0x633460,
>> user=0x633e08, mail_user_r=0x7fffe7b8) at
>> mail-storage-service.c:1114
>> #10 0x77b35efa in mail_storage_service_lookup_next
>> (ctx=0x633460, input=0x7fffe810, user_r=0x7fffe7c0,
>> mail_user_r=0x7fffe7b8,
>>error_r=0x7fffe808) at mail-storage-service.c:1149
>> #11 0x0041f61c in client_create_from_input
>> (input=0x7fffe810, login_client=0x7fffe880, fd_in=0, fd_out=1,
>> input_buf=0x0,
>>error_r=0x7fffe808) at main.c:202
>> #12 0x0041f859 in main_stdio_run (username=0x0) at main.c:247
>> #13 0x0041fd0a in main (argc=1, argv=0x631370) at main.c:381
>> 
>> /usr/local/dovecot/bin/doveconf -n
>> # 2.1.9: /usr/local/dovecot/etc/dovecot/dovecot.conf
>> # OS: Linux 2.6.32 x86_64 Debian wheezy/sid
>> namespace test {
>>  list = children
>>  location = maildir:/root/test
>>  prefix = test.
>>  subscriptions = yes
>>  type = shared
>> }
>> namespace inbox {
>>  inbox = yes
>>  list = yes
>>  location =
>>  mailbox Drafts {
>>special_use = \Drafts
>>  }
>>  mailbox Junk {
>>special_use = \Junk
>>  }
>>  mailbox Sent {
>>special_use = \Sent
>>  }
>>  mailbox "Sent Messages" {
>>special_use = \Sent
>>  }
>>  mailbox Trash {
>>special_use = \Trash
>>  }
>>  prefix =
>>  subscriptions = yes
>> }
>> passdb {
>>  driver = pam
>> }
>> ssl = no
>> userdb {
>>  driver = passwd
>> }
>> 
>> without type = shared there is no segfault,
>> 
>> I understand this config might not work (invoking imap directly) but
>> it should't segfault.
>> 
>> Regards,
>> 
>> Michal Grzedzicki
>> 
> 



Re: [Dovecot] Variables in LDAP userdb

2012-08-31 Thread Timo Sirainen
On 21.8.2012, at 11.44, Alex Crow wrote:

> To clarify, what happens in these case with regard to the default 
> mail_location set in the config files (ie is it used or overridden):
> 
> 1. The LDAP attribute referenced in the userdb lookup exists but is empty

The value will be overridden as empty, which could be an error.

> 2. The LDAP attribute is not present for the user.

The value isn't overridden.



[Dovecot] Length of attachment filenames

2012-08-31 Thread Fuhrmann, Hauke
Hi there,

 

I have a beginners question to Dovecot: does it have a restriction on
the supported length and character encodings of filenames of
attachments?

Can filenames be arbitrary large?

 

Cheers,

Hauke


-- 
Diese E-Mail kann vertrauliche und/oder rechtlich geschuetzte Informationen 
enthalten. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail 
irrtuemlich erhalten haben, informieren Sie bitte sofort den Absender durch 
eine Antwortmail und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie 
die unbefugte Weitergabe dieser Mail ist nicht gestattet. Wir danken fuer Ihre 
Kooperation.

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient or have received this e-mail in error, you are on 
notice of its status. Please notify the sender immediately by reply e-mail and 
delete this e-mail from your systems. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly prohibited. Thank you 
for your cooperation.


Re: [Dovecot] Merge multiple doveadm commands

2012-08-31 Thread Timo Sirainen
On 31.8.2012, at 13.01, Ralf Hildebrandt wrote:

> Can I merge these three commands into one?
> 
> doveadm expunge -u %s mailbox \"INBOX.Deleted Messages\" NOT NEW
> doveadm expunge -u %s mailbox INBOX.Trash NOT NEW
> doveadm expunge -u %s mailbox INBOX deleted

doveadm expunge -u %s \( mailbox \"INBOX.Deleted Messages\" NOT NEW \) or \( 
mailbox INBOX.Trash NOT NEW \) or \( mailbox INBOX deleted \)

(Does "new" actually work? I'm not sure if that's intentional, or simply a side 
effect of some IMAP behavior accidentally spilling over.. :)



[Dovecot] Merge multiple doveadm commands

2012-08-31 Thread Ralf Hildebrandt
Can I merge these three commands into one?

doveadm expunge -u %s mailbox \"INBOX.Deleted Messages\" NOT NEW
doveadm expunge -u %s mailbox INBOX.Trash NOT NEW
doveadm expunge -u %s mailbox INBOX deleted

-- 
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



[Dovecot] Possible mbox corruption if mail is saved with wrong Content-Length header (2.1.6)

2012-08-31 Thread Jost Krieger
One of our users likes to delete attachments from his mails. He is using
roundcube and we installed a plugin for that.

He reports that from time to time one of his mails gets corrupted (cut
off in the middle).

I could verify there is something wrong in the logs:

imap(x1234567): Error: Cached message size larger than expected (6796 > 2844)
imap(x1234567): Error: Corrupted index cache file 
/net/mbx3/disc2/home/85/x1234567/Index/.imap/Sent/dovecot.index.cache: Broken 
physical size for mail UID 5001
imap(x1234567): Error: read(/net/mbx3/disc2/home/85/x1234567/Mail/Sent) failed: 
Input/output error (FETCH for mailbox Sent UID 5001)
imap(x1234567): Info: Disconnected: Internal error occurred. Refer to server 
log for more information. [2012-08-23 00:00:49] in=1124145 out=1324791

I had a look at the plugin and it works by duplicating the message and
leaving out the attachment(s). The headers are also duplicated,
including Content-Length. I've fixed that in the plugin, (don't know yet
if it helps), but I think it shouldn't cause such breakage in dovecot.

# doveconf -n
# 2.1.6: /usr/local/dovecot/etc/dovecot/dovecot.conf
# OS: Linux 2.6.9-103.ELsmp i686 Red Hat Enterprise Linux AS release 4 (Nahant 
Update 9)
doveconf: Warning: Dovecot was last started using 
/usr/local/dovecot/etc/dovecot.conf, but this config is 
/usr/local/dovecot/etc/dovecot/dovecot.conf
auth_master_user_separator = *
disable_plaintext_auth = no
doveadm_password = (hidden)
lda_mailbox_autocreate = yes
log_path = /dev/stderr
log_timestamp =
mail_location = mbox:~/Mail:INBOX=~/Mailbox:INDEX=~/Index
mail_plugins = " quota zlib mail_log notify virtual"
mdbox_rotate_size = 5 M
namespace {
  hidden = no
  inbox = yes
  location =
  prefix =
  separator = /
  type = private
} 
namespace {
  hidden = yes
  inbox = no
  list = children
  location = maildir:~/Maildir
  prefix = "#MD/"
  separator = /
  type = private
}
passdb {
  driver = pam
}
passdb {
  args = /usr/local/dovecot/etc/passwd.dovcot.master
  driver = passwd-file
  master = yes
}
plugin {
  acl = vfile
  mail_log_events = undelete mailbox_delete mailbox_rename mailbox_create
  mail_log_fields = uid box msgid size
  quota = fs:Disk quota
}
protocols = pop3 imap
service auth {
  client_limit = 4300
  user = root
}
service doveadm {
  inet_listener {
port = 542
  }
}
service imap-login {
  inet_listener imap {
address = 134.147.64.42
port = 143
  }
  service_count = 0
}
service imap {
  drop_priv_before_exec = yes
  process_limit = 4096
  vsz_limit = 1 G
}
service pop3-login {
  inet_listener pop3 {
address = 134.147.64.42
port = 110
  }
  service_count = 0
}
service pop3 {
  drop_priv_before_exec = yes
  process_limit = 2048
  vsz_limit = 512 M
}
ssl = no
userdb {
  driver = passwd
}
protocol imap {
  mail_max_userip_connections = 50
  mail_plugins = " quota zlib mail_log notify virtual imap_quota imap_zlib"
}

Thanks
Jost Krieger
-- 
| Helft Spam ausrotten!HTML in Mail ist unhöflich. |
| Postmaster, JAPH, manchmal Wahrsager   am RZ der RUB |
| Wahre Worte sind nicht gefällig, gefällige Worte sind nicht wahr.|
|  Lao Tse, Tao Te King 81 |


Re: [Dovecot] Imap Ghost folder

2012-08-31 Thread Sascha Zucca

Hi!
Still noone?
strange...this must be some easy thing to solve if you're familiar with 
dovecot, i thought.

Anyways, thanks for any help
Sascha


Am 30.08.2012 08:43, schrieb Sascha Zucca:

Hi!
I am very sorry, i thought i had done so before. Well here ist is:


dovecot -n
# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-14-pve i686 Debian 6.0.5 simfs
auth_mechanisms = plain login
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/var/vmail/%%d/%%n/Maildir
mail_plugins = acl
mail_privileged_group = vmail
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

namespace {
  inbox = yes
  location =
  prefix =
  separator = /
  type = private
}
namespace {
  hidden = yes
  list = children
  location = 
maildir:/var/vmail/%%d/%%n/Maildir:INDEX=/var/vmail/%d/%n/Maildir/shared/%%u

  prefix = Freigaben/%%n/
  separator = /
  subscriptions = no
  type = shared
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
plugin {
  acl = vfile
  acl_shared_dict = file:/var/lib/dovecot/db/shared-mailboxes.db
  quota = dict:user::file:/var/vmail/%d/%n/.quotausage
  sieve = /var/vmail/%d/%n/.sieve
}
protocols = imap pop3 sieve
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
  unix_listener auth-userdb {
group = vmail
mode = 0600
user = vmail
  }
  user = root
}
ssl_cert = I don't really think, it has anything to do with sieve, as the folder 
simply won't show up as soo as i just change prefix = Freigaben/%%n/ 
to prefix = Freigaben/%%u/.
And i didn't filter into autocreated folders yet. For now, i created 
only one sieve rule, that filters into an  folder i created manually.



Thank you very much for your help
Sascha



Am 29.08.2012 22:48, schrieb Daniel Parthey:

Hi Sascha,

Sascha Zucca wrote:

Sorry, but i can't believe noone has a hint on this one.

Sorry, but you forgot to post your complete doveconf -n output
and how to exactly reproduce this.


http://s12.postimage.org/z0n82k2u5/bjddgefg.jpg (Thunderbird)

I'm getting the same result when SIEVE sorts Messages into autocreated
subfolders inside of folders which do not exist. So it's probably
not a ghost folder, it is just an intermediate folder
which does not exist itself, but contains existing subfolders.

This forces your mail client to display the folder in the tree:

INBOX exists (black)
INBOX/foo does not exist (grey)
INBOX/foo/bar exists (black)

HTH and Regards
Daniel







Re: [Dovecot] mail_location / mail_home

2012-08-31 Thread Denny Schierz

Am 31.08.2012 um 09:55 schrieb Denny Schierz:
> 
> mail_home = /imap/spool/%d/%1u/%u
> mail_location = maildir:~/:INDEX=~/

I think, it doesn't make any difference, if I have "~" or a fixed path :-/  On 
the productive system (also 2.1.9) I get messages like:

[...] dovecot.lda-dupes/tmp) failed: Not a directory [...]

So, I need a way, to move ~11.000 Maildirs  

any suggestions?



[Dovecot] mail_location / mail_home

2012-08-31 Thread Denny Schierz
hi,

I had a long (upgraded today from 2.0.17 to 2.1.9) time mail_location and 
mail_home at the same path, which I recognize know, that it wasn't a good idea, 
idea. On my testsystem I've set:

mail_home = /imap/spool/%d/%1u/%u
mail_location = maildir:~/:INDEX=~/

otherwise I don't have access to the mails anymore. Is that ok?

cu denny