[Dovecot] Dovecot sieve redirect: failed to redirect message to u...@domain.com

2011-06-09 Thread Thiago Henrique
Hello,

I'm running Dovecot 2.0.13 on my Ubuntu10.04. It's working very well but
I faced a problem with Redirect and Vacation using Sieve. :-(
In fact, after well configuring the system I dont't receive the redirect
message, and in the log I found:


Jun  9 18:49:37 box7 dovecot: lmtp(10734, u...@server.com): Fatal:
execv(/usr/sbin/sendmail) failed: Permission denied
Jun  9 18:49:37 box7 dovecot: lmtp(10734, u...@server.com): Error:
Sendmail process terminated abnormally, exit status 84
Jun  9 18:49:37 box7 dovecot: lmtp(10734, u...@server.com): Error:
At35JIgC8U3uKQAAndgVeA: sieve:
msgid=20110609184850.0fab8200a...@domain.com: failed to redirect
message to user-destinat...@server.com (refer to server log for more
information)


In sieve.log I see:


error: msgid=2011060919.0200a...@domain.com: failed to redirect
message to u...@domain.com (refer to server log for more information).


Manually sendmail command works normally. Cron sends email normally.
Any idea about the reason this happen and how to solve?

Thanks in advance,
Thiago Henrique




[Dovecot] Duplicate suppression

2011-03-14 Thread Thiago Henrique
Hello,

In a Dovecot 2.0.6 server I have an account x@domain and an alias
y@domain - x@domain.

When I send an email to x@domain with carbon copy to y@domain, X
receives two messages on mailbox. Dovecot2 has any feature of duplicate
suppression ?

Thanks, 
Thiago Henrique



[Dovecot] Prevent dovecot.sieve.log logs

2010-10-25 Thread Thiago Henrique
Hello,

When an account overquota happens, a log is generated:
/var/lib/imap/sieve/username/dovecot.sieve.log

Is there a way to prevent this?

My `dovecot -n` :

# 2.0.6 (a7d99b69523a): /etc/dovecot/dovecot.conf
# OS: Linux 2.6.35-23-server x86_64 Ubuntu 10.04.1 LTS 
auth_master_user_separator = *
auth_mechanisms = plain login
auth_username_chars =
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz01234567890...@=
auth_worker_max_count = 10
disable_plaintext_auth = no
listen = server.com
login_greeting = K8 IMAP/POP3 server
mail_gid = dovemail
mail_plugins =  quota
mail_uid = dovemail
managesieve_sieve_capability = fileinto reject envelope vacation
subaddress comparator-i;ascii-numeric relational regex imap4flags copy
include imapflags notify
mmap_disable = yes
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
passdb {
  args = /etc/dovecot/dovecot-sql-master.conf.ext
  driver = sql
  master = yes
  pass = yes
}
plugin {
  autocreate = SPAM
  autosubscribe = SPAM
  quota = dict:User quota::file:/var/lib/imap/user/%2.256RHn/%
n/dovecot-quota
  quota_rule = *:storage=1GB
  sieve = /var/lib/imap/sieve/%2.256RHn/%n/dovecot.sieve
  sieve_dir = /var/lib/imap/sieve/%2.256RHn/%n
  sieve_extensions = comparator-i;ascii-numeric copy envelope fileinto
imapflags include notify regex reject relational subaddress vacation
  sieve_max_script_size = 512KB
  sieve_quota_max_scripts = 2
}
protocols = imap pop3 lmtp sieve
service auth-worker {
  user = $default_internal_user
}
service auth {
  process_limit = 1
  process_min_avail = 1
}
service imap-login {
  inet_listener imap {
address = server.com
port = 143
  }
}
service imap {
  process_limit = 1024
  process_min_avail = 10
}
service lmtp {
  inet_listener {
address = server.com 
port = 2003
  }
  process_limit = 256
  process_min_avail = 10
}
service managesieve-login {
  inet_listener sieve {
address = server.com 
port = 4190
  }
  inet_listener sieve_deprecated {
address = server.com 
port = 2000
  }
}
service managesieve {
  process_limit = 20
  process_min_avail = 10
}
service pop3-login {
  inet_listener pop3 {
address = server.com 
port = 110
  }
}
service pop3 {
  process_limit = 256
  process_min_avail = 10
}
ssl = no
userdb {
  driver = prefetch
}
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
verbose_proctitle = yes
protocol imap {
  imap_idle_notify_interval = 2 mins
  imap_max_line_length = 64 k
  mail_max_userip_connections = 50
  mail_plugins =  quota imap_quota autocreate
}
protocol lmtp {
  mail_plugins =  sieve quota autocreate
}
protocol sieve {
  mail_plugins =  sieve
  managesieve_implementation_string = K8 ManageSieve
  managesieve_logout_format = bytes=%i/%o
  managesieve_max_line_length = 65536
  managesieve_sieve_capability = comparator-i;ascii-numeric copy
envelope fileinto imapflags include notify regex reject relational
subaddress vacation
}
protocol pop3 {
  mail_plugins =  quota autocreate
}


Thanks,
--
Thiago Henrique



Re: [Dovecot] Auto delete older messages in SPAM folder

2010-10-25 Thread Thiago Henrique
Thanks!

doveadm-expunge works fine! Now I want to improve performance. Is there
flat file dict to Expire plugin like Quota ?

Thanks

--
Thiago Henrique

Em Seg, 2010-08-02 às 15:41 +0100, Timo Sirainen escreveu:
 On Mon, 2010-08-02 at 10:33 -0300, Thiago Henrique wrote:
 
  Cyrus has a setting that purge the emails from a mailbox under a
  pre-defined criteria. For example:
  
  EVENTS {
   ...
# At 12:01 delete messages older than 60 days in SPAM folder
deletespam cmd=ipurge -d 60 -f user/*/SPAM at=1201
  }
  
  Is there in Dovecot any setting like this ?
 
 There's http://wiki.dovecot.org/Plugins/Expire
 
 With v2.0 it's been pretty much redesigned to run via doveadm, which
 works much better and easier: http://wiki2.dovecot.org/Plugins/Expire
 
 



[Dovecot] Doveadm expunge purge optimize

2010-09-29 Thread Thiago Henrique
Hello,

I'm testing Dovecot 2.0.3.

I plan to use Dovecot with 10 thousands domains per server (~50
thousands accounts). 

I use 'mdbox' as mailbox format. So, I have two cron jobs before backup:


01 22 * * * root nice -n 19 /usr/bin/doveadm expunge -A mailbox SPAM
BEFORE 60d
01 00 * * * root nice -n 19 /usr/bin/doveadm purge -A
01 02 * * * root nice -n 19 My_Backup_aplication


Each doveadm command walks through the whole file system. Is there a way
to run the two operations into a single walk? Does anyone have a
suggestion that helps optimize this?

Thank you in advance.
Best Regards

My confs :

r...@server:# dovecot -n 
# 2.0.3 (02a9cf90ad02): /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-24-server x86_64 Ubuntu 10.04.1 LTS 
auth_cache_negative_ttl = 3600 s
auth_cache_size = 33554432
auth_master_user_separator = *
auth_mechanisms = plain login
auth_username_chars =
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz01234567890...@=
auth_worker_max_count = 10
disable_plaintext_auth = no
listen = server.com
login_greeting = Dovecot server !
mail_gid = dovemail
mail_plugins = $mail_plugins quota
mail_uid = dovemail
managesieve_sieve_capability = fileinto reject envelope vacation
subaddress comparator-i;ascii-numeric relational regex imap4flags copy
include imapflags notify
mmap_disable = yes
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
passdb {
  args = /etc/dovecot/dovecot-sql-master.conf.ext
  driver = sql
  master = yes
  pass = yes
}
plugin {
  autocreate = SPAM
  autosubscribe = SPAM
  quota = dict:User quota::file:/var/lib/imap/user/%2.256RHn/%
n/dovecot-quota
  quota_rule = *:storage=1GB
  sieve = /var/lib/imap/sieve/%2.256RHn/%n/phpscript.script
  sieve_dir = /var/lib/imap/sieve/%2.256RHn/%n
  sieve_extensions = comparator-i;ascii-numeric copy envelope fileinto
imapflags include notify regex reject relational subaddress vacation
  sieve_max_script_size = 512KB
  sieve_quota_max_scripts = 2
}
protocols = imap pop3 lmtp sieve
service auth-worker {
  user = $default_internal_user
}
service auth {
  process_limit = 1
  process_min_avail = 1
}
service imap-login {
  inet_listener imap {
address = server.com
port = 143
  }
}
service imap {
  process_limit = 1024
  process_min_avail = 10
}
service lmtp {
  inet_listener {
address = server.com
port = 2003
  }
  process_limit = 256
  process_min_avail = 10
}
service managesieve-login {
  inet_listener sieve {
address = server.com
port = 4190
  }
  inet_listener sieve_deprecated {
address = server.com
port = 2000
  }
}
service managesieve {
  process_limit = 20
  process_min_avail = 10
}
service pop3-login {
  inet_listener pop3 {
address = server.com
port = 110
  }
}
service pop3 {
  process_limit = 256
  process_min_avail = 10
}
ssl = no
userdb {
  driver = prefetch
}
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
verbose_proctitle = yes
protocol imap {
  imap_idle_notify_interval = 120 s
  imap_max_line_length = 65536
  mail_max_userip_connections = 10
  mail_plugins = $mail_plugins quota imap_quota autocreate
}
protocol lmtp {
  mail_plugins = $mail_plugins sieve quota autocreate
}
protocol sieve {
  mail_plugins = $mail_plugins sieve
  managesieve_implementation_string = Dovecot ManageSieve Pigeonhole
server
  managesieve_logout_format = bytes=%i/%o
  managesieve_max_line_length = 65536
  managesieve_sieve_capability = comparator-i;ascii-numeric copy
envelope fileinto imapflags include notify regex reject relational
subaddress vacation
}
protocol pop3 {
  mail_plugins = $mail_plugins quota autocreate
}
r...@server:# 


--
[]'s
Thiago Henrique
Network Administration
Digirati Networks
K8 Networks



[Dovecot] doveadm quota recalc don't work

2010-09-24 Thread Thiago Henrique
Hello,

I'm testing Dovecot 2.0.

I plan to use Dovecot 2.0 with thousands of domains per server. My user
base is under virtual MySQL.

When I run `quota doveadm recalc`, Dovecot sets quota to zero:


r...@server:# doveadm -v quota get -u username
Quota nameTypeValue   Limit %
User quotaSTORAGE  1166 1048576 0
User quotaMESSAGE 1   - 0
r...@server:# doveadm -v quota recalc -u username
r...@server:# doveadm -v quota get -u username
Quota nameTypeValue   Limit %
User quotaSTORAGE 0 1048576 0
User quotaMESSAGE 0   - 0


My `dovecot -n` :


r...@box5:/home/thiagoh# cat a
# 2.0.3 (02a9cf90ad02): /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-24-server x86_64 Ubuntu 10.04.1 LTS ext4
auth_debug = yes
auth_debug_passwords = yes
auth_master_user_separator = *
auth_mechanisms = plain login
auth_username_chars =
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz01234567890...@=
auth_username_translation = @=
auth_verbose = yes
auth_verbose_passwords = plain
auth_worker_max_count = 10
disable_plaintext_auth = no
listen = server.com
login_greeting =  Dovecot ready!
mail_debug = yes
mail_gid = dovemail
mail_location = mdbox:/home/%u
mail_plugins = $mail_plugins quota
mail_uid = dovemail
managesieve_sieve_capability = fileinto reject envelope vacation
subaddress comparator-i;ascii-numeric relational regex imap4flags copy
include imapflags notify
mmap_disable = yes
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
passdb {
  args = /etc/dovecot/dovecot-sql-master.conf.ext
  driver = sql
  master = yes
  pass = yes
}
plugin {
  autocreate = SPAM
  autosubscribe = SPAM
  quota = maildir:User quota
  quota_rule = *:storage=1GB
  sieve = /var/lib/imap/sieve/%2.256RHu/%u/phpscript.script
  sieve_dir = /var/lib/imap/sieve/%2.256RHu/%u
  sieve_extensions = comparator-i;ascii-numeric copy envelope fileinto
imapflags include notify regex reject relational subaddress vacation
  sieve_max_script_size = 512KB
  sieve_quota_max_scripts = 2
}
protocols = imap pop3 lmtp sieve
service auth-worker {
  user = $default_internal_user
}
service auth {
  process_limit = 1
  process_min_avail = 1
}
service imap-login {
  inet_listener imap {
address = server.com
port = 143
  }
}
service imap {
  process_limit = 1024
  process_min_avail = 10
}
service lmtp {
  inet_listener {
address = server.com
port = 2003
  }
  process_limit = 256
  process_min_avail = 10
}
service managesieve-login {
  inet_listener sieve {
address = server.com
port = 4190
  }
  inet_listener sieve_deprecated {
address = server.com
port = 2000
  }
}
service managesieve {
  process_limit = 20
  process_min_avail = 10
}
service pop3-login {
  inet_listener pop3 {
address = server.com
port = 110
  }
}
service pop3 {
  process_limit = 256
  process_min_avail = 10
}
ssl = no
userdb {
  driver = prefetch
}
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
verbose_proctitle = yes
protocol imap {
  imap_idle_notify_interval = 120 s
  imap_max_line_length = 65536
  mail_max_userip_connections = 10
  mail_plugins = $mail_plugins quota imap_quota autocreate
}
protocol lmtp {
  mail_plugins = $mail_plugins sieve quota autocreate
}
protocol sieve {
  mail_plugins = $mail_plugins sieve
  managesieve_implementation_string =  Dovecot Pigeonhole
  managesieve_logout_format = bytes=%i/%o
  managesieve_max_line_length = 65536
  managesieve_sieve_capability = comparator-i;ascii-numeric copy
envelope fileinto imapflags include notify regex reject relational
subaddress vacation
}
protocol pop3 {
  mail_plugins = $mail_plugins quota autocreate
}


I use 'mdbox' as mailbox format, but my quota backend is 'maildir'. Is
there a problem?


Thank you in advance.
Best Regards
--
[]'s
Thiago Henrique
Network Administration
Digirati Networks
K8 Networks



[Dovecot] Auth error

2010-09-23 Thread Thiago Henrique
Hello,

I'm testing Dovecot 2.0.

I plan to use Dovecot 2.0 with thousands of domains per server. My user
base is under virtual MySQL.

I my tests, the authentication fails intermittently, and I could not
find what's wrong. Can anyone help me?


Sep 22 16:31:16 box5 dovecot: last message repeated 9 times
Sep 22 16:31:16 box5 dovecot: auth: Debug: auth client connected
(pid=9249)
Sep 22 16:31:20 box5 dovecot: auth: Debug: client in:
AUTH#0111#011PLAIN#011service=imap#011lip=1.2.3.4#011rip=1.2.3.4#011lport=143#011rport=45348#011resp=AHRoaWFnbz1hZG1pbmxpbnV4LmNvbS5icgAxcWF6MndzeA==
Sep 22 16:31:20 box5 dovecot: auth: Debug: Loading modules from
directory: /usr/lib/dovecot/modules/auth
Sep 22 16:31:20 box5 dovecot: auth: mysql: Connected to mysqlserver.com
(database_name)
Sep 22 16:31:20 box5 dovecot: auth: Debug:
sql(account=domain.com,1.2.3.4): query: SELECT AccountName AS
userdb_username, Password AS password, MailLocation AS userdb_mail,
concat('*:bytes=', ItQuota, 'M') AS userdb_quota_rule FROM  Account
WHERE  AccountName = 'account=domain.com' 
Sep 22 16:31:20 box5 dovecot: auth: Debug: client out:
OK#0111#011user=account=domain.com
Sep 22 16:31:20 box5 dovecot: auth: Debug: master in:
REQUEST#0111#0119249#0111#011ba525e3c7ea765255e814a27c5ef8294
Sep 22 16:31:20 box5 dovecot: auth: Error: Master requested auth for
nonexistent client 9249
Sep 22 16:31:20 box5 dovecot: imap-login: Internal login failure (auth
failed, 1 attempts): user=account=domain.com, method=PLAIN,
rip=1.2.3.4, lip=1.2.3.4, mpid=9225


Thank you in advance.
Best Regards
--
[]'s
Thiago Henrique
Network Administration
Digirati Networks
K8 Networks



[Dovecot] Delete user data from Dovecot server

2010-08-17 Thread Thiago Henrique
Hello,

I'm testing Dovecot 2.0.

I plan to use Dovecot 2.0 with thousands of domains per server. My user
base is under virtual MySQL.

when I add a user in the database, it is automatically created in the
structure of Dovecot at first login. 

Is there a easy way to delete a user ?

Thank you.


-- 
Atenciosamente,

Thiago Henrique
(21)2233-5950 ramal 27
Infra Estrutura Linux
Hostnet Internet - www.hostnet.com.br
Digirati Telecomunicações - www.digirati.com.br 





[Dovecot] Auto delete older messages in SPAM folder

2010-08-02 Thread Thiago Henrique
Hello,

I use Cyrus in my mailservers and I intend to migrate it to Dovecot.

Cyrus has a setting that purge the emails from a mailbox under a
pre-defined criteria. For example:

EVENTS {
 ...
  # At 12:01 delete messages older than 60 days in SPAM folder
  deletespam cmd=ipurge -d 60 -f user/*/SPAM at=1201
}

Is there in Dovecot any setting like this ?

Thank you.
--
[]'s
Thiago Henrique
Network Administration
Digirati Networks
K8 Networks



Re: [Dovecot] Dinamic 'mail_location' for each user

2010-07-20 Thread Thiago Henrique
Hello,

I understand your argument, although it's not good for me :)

 But you can do that yourself when storing the path to database. Build a
 script that hashes the username path in a way you want, and store that.

I wouldn't like to do this. I have a lot of users and I can't
to migrate everything at once. So I can't to make big changes in my code.

 I'm still not sure if you mean what I thought you mean. If you mean that
 % variables would be expanded when they're coming out of userdb then no,
 it would not be accepted. It would break people's setup who actually
 have % characters in paths.

You understand correctly, sorry for my poor English.
Anyway, we know that things changes in new versions. Otherwise, would never be
released new variables. I understand your point, but ask you think about   
it, so it can be useful for many people.
Thanks

--
[]'s
Thiago Henrique
Network Administration
Digirati Networks
K8 Networks



[Dovecot] Dinamic 'mail_location' for each user

2010-07-15 Thread Thiago Henrique
Hello,

I have a lot of domains in a mail server, so I make a balanced
allocation of mailboxes in the storage disks. That improves performance
of access to records. Therefore, I want to overwrite 'mail_location'
directive for each user. But I also want to use the modifier 'H' to
spray the mailboxes of the same partition in a hash.

Then, each user has your own 'mail_location' that I would like load from
database. Like this:

mdbox:/var/spool/imap/partition1/%256HRu/%u:INDEX=/var/lib/imap/user/%
256HRu/%u
 
partition1 is in range [partition1 .. partiton7]
 
In my tests the '%256HRu/%u' kind of 'mail_location' is not being
interpreted by Dovecot.

 Can Dovecot to interpret 'mail_location' load from database ?

Thank you.
--
[]'s
Thiago Henrique
Network Administration
Digirati Networks
K8 Networks



[Dovecot] IMAP super user

2010-07-15 Thread Thiago Henrique
Hello,

Is there any directive in Dovecot similar to 'imap_admins' of Cyrus?

I plan to migrate from Cyrus to Dovecot. But I need a admin user
which is able to obtain information about the quotas of common users.


Thank you.
--
[]'s
Thiago Henrique
Network Administration
Digirati Networks
K8 Networks



Re: [Dovecot] Dinamic 'mail_location' for each user

2010-07-15 Thread Thiago Henrique

Em Qui, 2010-07-15 às 20:45 +0100, Timo Sirainen escreveu:
 
 You mean your userdb is returning a mail field that contains those %
 variables? No, that won't work. 

It is important for me to spread the mailboxes inside the partition. Use
the 'H' modifier for it would be perfect. A patch for this would be
accepted?

Thank you.
--
[]'s
Thiago Henrique
Network Administration
Digirati Networks
K8 Networks



[Dovecot] Dovecot + OCFS2

2010-07-12 Thread Thiago Henrique

Hello,

I intend to make a cluster with Dovecot + OCFS2. The tests are working
with the default settings of the Dovecot. But it seems too easy to be
true.

Is there any special configuration of Dovecot to implement it?--
Thank you


--
[]'s
Thiago Henrique
Network Administration
Digirati Networks
K8 Networks




[Dovecot] Dovecot 2.0 with LMTP

2010-07-07 Thread Thiago Henrique
Hello,

I'm testing Dovecot 2.0.

I plan to use Dovecot 2.0 with thousands of domains per server. My user
base is under virtual MySQL.

Is there a way to make the LMTP not make query to MySQL for each message
delivered ? I'm afraid that the MySQL server does not support the load.


Best Regards
--
[]'s
Thiago Henrique
Network Administration
Digirati Networks
K8 Networks