Re: [Dovecot] Listen on multiple ports possible using same protocol?

2012-08-17 Thread Benny Pedersen

Den 2012-08-15 00:12, Michael Durket skrev:


for example.  Or is this more preferably done by pointing dovecot at
different configuration files?


listen = wan-ip:143
listen = 127.0.0.2:143
ssl_listen = wan-ip:993
ssl_listen = 127.0.0.3:993

just examples since it dont understand what you like to test :)





Re: [Dovecot] doveadm director move behaviour

2012-08-17 Thread Daniel Parthey
Timo Sirainen wrote:
> On 1.8.2012, at 21.09, Daniel Parthey wrote:
> 
> http://wiki2.dovecot.org/Director#Other_settings
> 
> doveadm director move needs to be able to connect to the ipc socket. Make 
> sure the director process can do it.
> 
> service ipc {
>  unix_listener ipc {
>user = dovecot
>  }
> }
> 
> director instance needs access to director instance.

With the above configuration, ipc works correctly
between our directors and kicks the moved users
which had been connected via proxy.

Thanks a lot!

Regards
Daniel
-- 
https://plus.google.com/103021802792276734820


Re: [Dovecot] Hostname Based forwarding

2012-08-17 Thread Joseph Tam

Merrickville  writes:


Is there a way to proxy based on the host name the client has configured in
his/her email client?  (Like Apache VirtualHosts)


I doubt it; the virtual name is not part of the IMAP protocol as it is
in HTTP.  The IMAP server is not told which hostname was mapped to its IP.

You'll either have to add the @domain, or perhaps multi-home your host,
remap one of your domains to the new IP, and add another running instance
of dovecot to listen on that interface.

Joseph Tam 


Re: [Dovecot] problem with virtual plugin/index files?

2012-08-17 Thread Lutz Preßler
Hello Timo,

virtual file with "inthread/younger" (other dynamic searches?) in it
and indexes leading to too many (or too few?) search results.

On Do, 02 Dez 2010, Timo Sirainen wrote:

> On Thu, 2010-12-02 at 11:08 +0100, Lutz Preßler wrote:
> 
> >  inthread refs younger 604800
> > 
> > This works as expected for the first time. But later on, also older 
> > messages/
> > threads are included until I delete the virtual/.week/dovecot.index*.
> 
> I know there are problems related to this with INTHREAD, but they aren't
> very easy to solve and for now I've more important things to do.. If it
> seemed to work before, it was due to luck or due to some bug causing an
> unnecessary index rebuild. You could set :INDEX=MEMORY to work around
> this, but I don't know how much worse the performance would become. Or
> you could just manually delete the virtual indexes once a week.
Situation with latest 2.1 is unchanged. But maybe it's easier to fix/
enhance now? Any estimate how much effort it would be?

Thanks again for your work,
  Lutz



[Dovecot] Problem use localized prefix in namespace

2012-08-17 Thread (Dovecot) Sergey Sidlyarenko

dovecot --version
2.1.7

uname -a
Linux ns 3.2.0-2-amd64 #1 SMP Mon Jun 11 17:24:18 UTC 2012 x86_64 
GNU/Linux

Debian sid

Problem with localized prefix in namespace.
Create namespace

namespace {
  hidden = no
  ignore_on_failure = no
  inbox = no
  list = yes
  location = 
maildir:/var/mail/%d%n/test1:LAYOUT=fs:DIRNAME=maildirfolder:UTF-8

  mailbox next {
auto = subscribe
special_use =
  }
  prefix = Тест1/
  separator = /
  subscriptions = yes
  type = private
}
namespace {
  hidden = no
  ignore_on_failure = no
  inbox = no
  list = yes
  location = 
maildir:/var/mail/%d%n/test2:LAYOUT=fs:DIRNAME=maildirfolder:UTF-8

  mailbox next {
auto = subscribe
special_use =
  }
  prefix = &BCIENQRBBEI-2/
  separator = /
  subscriptions = yes
  type = private
}

result

A0002 NAMESPACE
* NAMESPACE (("" "/")("links/" "/")({10}
Тест1/ "/")("&BCIENQRBBEI-2/" "/")) NIL NIL
A0002 OK Namespace completed.

A0003 LIST "" "*"
... cut
* LIST (\Noselect \HasChildren) "/" "&BCIENQRBBEI-1"
* LIST (\HasNoChildren) "/" "&BCIENQRBBEI-1/next"
* LIST (\Noselect \HasChildren) "/" "&-BCIENQRBBEI-2"
* LIST (\HasNoChildren) "/" "&-BCIENQRBBEI-2/next"
* LIST (\HasNoChildren) "/" "&BCIENQRBBEI-1/next"
* LIST (\HasNoChildren) "/" "&-BCIENQRBBEI-2/next"
A0002 OK List completed.

A0003 LSUB "" "*"
... cut
* LSUB () "/" "&-BCIENQRBBEI-2/next"
* LSUB () "/" "&BCIENQRBBEI-1/next"
* LSUB () "/" "&BCIENQRBBEI-1/next"
* LSUB () "/" "&-BCIENQRBBEI-2/next"
A0003 OK Lsub completed.

A0004 SELECT "&BCIENQRBBEI-1/next"
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] 
Flags permitted.

* 0 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1344240572] UIDs valid
* OK [UIDNEXT 1] Predicted next UID
* OK [NOMODSEQ] No permanent modsequences
A0004 OK [READ-WRITE] Select completed.


A0005 SELECT "&BCIENQRBBEI-2/next"
Connection closed by foreign host.

in error log

2012-08-17 22:19:17 imap(ad...@lefoyer.ru): Panic: file mail-storage.c: 
line 791 (mailbox_check_mismatching_separators): assertion failed: 
(strncmp(vname, ns->prefix, ns->prefix_len-1) == 0)
2012-08-17 22:19:17 imap(ad...@lefoyer.ru): Error: Raw backtrace: 
/usr/lib/dovecot/libdovecot.so.0(+0x4413a) [0x7f8d6bcc613a] -> 
/usr/lib/dovecot/libdovecot.so.0(+0x4417e) [0x7f8d6bcc617e] -> 
/usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7f8d6bc9d82a] -> 
/usr/lib/dovecot/libdovecot-storage.so.0(+0x7e506) [0x7f8d6bf8e506] -> 
/usr/lib/dovecot/libdovecot-storage.so.0(mailbox_open+0x18) 
[0x7f8d6bf8e538] -> dovecot/imap(cmd_select_full+0x13e) [0x40ddbe] -> 
dovecot/imap(command_exec+0x3c) [0x4118dc] -> dovecot/imap() [0x4109ae] 
-> dovecot/imap() [0x410a5a] -> dovecot/imap(client_handle_input+0x11d) 
[0x410cad] -> dovecot/imap(client_input+0x62) [0x411552] -> 
/usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x36) [0x7f8d6bcd2ff6] 
-> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0xa7) 
[0x7f8d6bcd3ca7] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x28) 
[0x7f8d6bcd2a08] -> 
/usr/lib/dovecot/libdovecot.so.0(master_service_run+0x13) 
[0x7f8d6bcbf483] -> dovecot/imap(main+0x285) [0x409265] -> 
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7f8d6b919ead] 
-> dovecot/imap() [0x4093d5]
2012-08-17 22:19:17 imap(ad...@lefoyer.ru): Fatal: master: 
service(imap): child 20040 killed with signal 6 (core dumps disabled)



--
Best regards, Sidlyarenko Sergey Aleksandrovish
+7(495)509-42-07
tresh_dove...@lefoyer.rumailto:tresh_dove...@lefoyer.ru


Re: [Dovecot] Expire-tool does not delete duplicate messages (dovecot-1.2.17)

2012-08-17 Thread Timo Sirainen
On 17.8.2012, at 14.24, Oleksii Krykun wrote:

> Trying to implement expire plugin.
> expire-tool works fine. This delete expunged messages but not all of them.
> I have duplicate messages in appropriate folder. These messages are from
> expanding postfix aliases (e.g. postmaster@, hostmaster@, abuse@ etc.
> points to same mailbox and spam often sent to all of them.
> If duplicate message is received only one entry in dovecot-uidlist is
> created and only first of duplicates is deleted with expire-tool. Rest of
> duolicates are not deleted.
> 
> Any suggestions.

No idea, but if it's a bug, it won't be fixed anymore in v1.2. The whole thing 
has been rewritten in v2.x. I suggest upgrade.



[Dovecot] Expire-tool does not delete duplicate messages (dovecot-1.2.17)

2012-08-17 Thread Oleksii Krykun
Trying to implement expire plugin.
expire-tool works fine. This delete expunged messages but not all of them.
I have duplicate messages in appropriate folder. These messages are from
expanding postfix aliases (e.g. postmaster@, hostmaster@, abuse@ etc.
points to same mailbox and spam often sent to all of them.
If duplicate message is received only one entry in dovecot-uidlist is
created and only first of duplicates is deleted with expire-tool. Rest of
duolicates are not deleted.

Any suggestions.

Thanks,
Kryol


[Dovecot] No status for INBOX/* in mbox NS (2.1.6)

2012-08-17 Thread Jost Krieger
Maybe it's fixed, but the last "interesting" text in the Changelog was
before 2.1.6.

Most of our users still have mboxes in the classical layout, so you
can't have subfolders and messages in the same folder, *except for the
INBOX*, as it is physically separate.

Someone complained that he saw subfolders in roundcube he couldn't
delete, because they didn't show up in the subscription view.

Before hitting on roundcube, I mperformed a few checks and got the
following:

root@cx-y-z qmail # doveadm mailbox status -u usera messages 'INBOX/*'
root@cx-y-z qmail # doveadm mailbox status -u usera messages 'INBOX/test1'
INBOX/test1 messages=0

This is mysterious.

It doesn't happen with my account, that is in a mdbox:
root@cx-y-z qmail # doveadm mailbox status -u kriegjcb messages 'INBOX/*'
INBOX/test1 messages=1

Our setup is a bit complicated, but most of it shouldn't be relevant to
the problem.


# 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) 
auth_first_valid_uid = 100
auth_master_user_separator = *
dict {
  quota = mysql:/usr/local/dovecot/etc/dovecot-dict-mysql.conf
}
disable_plaintext_auth = no
first_valid_uid = 100
lda_mailbox_autocreate = yes
log_path = /dev/stderr
log_timestamp = 
mail_access_groups = nofiles
mail_location = mbox:~/Mail:INBOX=~/Mailbox:INDEX=~/Index
mail_plugins = " quota zlib mail_log notify virtual stats"
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
}
namespace {
  hidden = yes
  list = no
  location = virtual:~/Maildir/Virtual
  prefix = Virtual/
  separator = /
  type = private
}
namespace {
  hidden = yes
  list = no
  location = virtual:/usr/local/dovecot/etc/virtuell:INDEX=~/Virtuell
  prefix = Virtuell/
  separator = /
  subscriptions = no
  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 = dict:User quota::proxy::quota
  quota2 = fs:Disk quota
  stats_refresh = 30 secs
  stats_track_cmds = yes
}
protocols = pop3 imap
service auth {
  client_limit = 4300
  user = root
}
service dict {
  unix_listener dict {
group = nofiles
mode = 0666
  }
}
service doveadm {
  inet_listener {
port = 542
  }
}
service imap-login {
  inet_listener imap {
address = 134.147.64.38
port = 143
  }
  service_count = 0
}
service imap {
  drop_priv_before_exec = yes
  process_limit = 2048
  vsz_limit = 1 G
}
service pop3-login {
  inet_listener pop3 {
address = 134.147.64.38
port = 110
  }
  service_count = 0
}
service pop3 {
  drop_priv_before_exec = yes
  process_limit = 2048
  vsz_limit = 512 M
}
service stats {
  fifo_listener stats-mail {
mode = 0666
user = dovenull
  }
}
ssl = no
stats_command_min_time = 5 mins
stats_domain_min_time = 1 hours
stats_ip_min_time = 1 hours
stats_memory_limit = 64 M
userdb {
  args = /usr/local/dovecot/etc/dovecot-mysql.conf
  driver = sql
}
userdb {
  driver = passwd
}
protocol imap {
  mail_max_userip_connections = 50
  mail_plugins = " quota zlib mail_log notify virtual stats imap_quota 
imap_zlib imap_stats"
}


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 |


[Dovecot] antispam_plugin prevents IMAP login (error 3) [Dovecot 2.0.19]

2012-08-17 Thread dof

Hi everybody,

trying to get the Dovecot antispam_plugin to work and I must be doing 
something wrong, because as soon as it is enabled with a certain 
backend, imap logins do not work anymore (the session is immediately 
closed after a successful login). Interestingly, pipe and spool2dir are 
working (that is, the session won't be closed), dspam-exec and 
crm114-exec are not. If this happens, mail_debug output is as follows:


  imap-login: Login: user=, method=PLAIN, rip=127.0.0.1, 
lip=127.0.0.1, mpid=10420, secured

  imap: Debug: Loading modules from directory: /usr/lib/dovecot/modules
  imap: Debug: Module loaded: 
/usr/lib/dovecot/modules/lib20_autocreate_plugin.so
  imap: Debug: Module loaded: 
/usr/lib/dovecot/modules/lib20_fts_plugin.so
  imap: Debug: Module loaded: 
/usr/lib/dovecot/modules/lib21_fts_squat_plugin.so
  imap: Debug: Module loaded: 
/usr/lib/dovecot/modules/lib90_antispam_plugin.so
  imap(dof): Debug: Effective uid=23244, gid=8, 
home=/var/spool/dovecot/userdata/dof

  imap(dof): Debug: Home dir not found: /var/spool/dovecot/userdata/dof
  master: Error: service(imap): child 10420 returned error 3

Without the plugin I get:

  imap-login: Login: user=, method=PLAIN, rip=127.0.0.1, 
lip=127.0.0.1, mpid=10469, secured

  imap: Debug: Loading modules from directory: /usr/lib/dovecot/modules
  imap: Debug: Module loaded: 
/usr/lib/dovecot/modules/lib20_autocreate_plugin.so
  imap: Debug: Module loaded: 
/usr/lib/dovecot/modules/lib20_fts_plugin.so
  imap: Debug: Module loaded: 
/usr/lib/dovecot/modules/lib21_fts_squat_plugin.so
  imap(dof): Debug: Effective uid=23244, gid=8, 
home=/var/spool/dovecot/userdata/dof

  imap(dof): Debug: Home dir not found: /var/spool/dovecot/userdata/dof
  imap(dof): Debug: fs: root=/var/spool/dovecot/mail/dof, index=, 
control=, inbox=/var/spool/dovecot/mail/dof/INBOX, alt=
  imap(dof): Debug: Namespace : Using permissions from 
/var/spool/dovecot/mail/dof: mode=0755 gid=-1



Hopefully this is just a configuration problem. I tried the plugin in 
the Ubuntu repository (I'm using LTS 12.04) and even checked out the 
source from git and compiled it myself, but to no avail.



Thanks a lot in advance and best regards,
Florian


---

dovecot -n output:

auth_cache_size = 128 k
auth_cache_ttl = 20 mins
auth_failure_delay = 10 secs
auth_mechanisms = plain login
disable_plaintext_auth = no
login_greeting = Projektfabrik IMAP ready.
mail_gid = mail
mail_home = /var/spool/dovecot/userdata/%u
mail_location = 
maildir:/var/spool/dovecot/mail/%u:INBOX=/var/spool/dovecot/mail/%u/INBOX:LAYOUT=fs

mail_uid = dovemail
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 = /etc/dovecot/dovecot-ldap.conf
  driver = ldap
}
plugin {
  antispam_backend = dspam-exec
  antispam_dspam_binary = /usr/bin/dspam
  antispam_signature = X-DSPAM-Signature
  antispam_signature_missing = error
  antispam_spam = Spam
  antispam_trash = trash;Trash;Deleted Items; Deleted Messages
  autocreate = INBOX/Sent Mail
  autocreate2 = INBOX/Spam
  autocreate3 = INBOX/Trash
  autosubscribe = INBOX/Sent Mail
  autosubscribe2 = INBOX/Spam
  autosubscribe3 = INBOX/Trash
  fts = squat
  sieve = /var/spool/dovecot/sieve/%u/defaultbc
  sieve_before = /etc/dovecot/sieve/spam.sieve
  sieve_dir = /var/spool/dovecot/sieve/%u
}
protocols = imap pop3 sieve
service auth {
  unix_listener /var/spool/postfix/private/dovecot-auth {
group = postfix
mode = 0600
user = postfix
  }
  unix_listener auth-userdb {
mode = 0600
user = dovemail
  }
  user = dovenull
}
service imap-login {
  inet_listener imap {
address = localhost
port = 143
  }
  inet_listener imaps {
address = localhost XX.XXX.XX.XXX
port = 993
  }
  service_count = 1
  user = dovenull
}
service managesieve-login {
  inet_listener sieve {
address = localhost
port = 2000
  }
  service_count = 1
  user = dovenull
}
service pop3-login {
  inet_listener pop3 {
address = localhost
port = 110
  }
  inet_listener pop3s {
address = XX.XXX.XX.XXX
port = 995
  }
  service_count = 1
  user = dovenull
}
ssl_ca =