Re: PROXY protocol

2015-08-19 Thread Stephan Bosch



Op 19-8-2015 om 16:36 schreef Nikolaos Milas:

On 12/1/2015 10:29 μμ, Francisco Wagner C. Freire wrote:


+1

On Fri, Jan 9, 2015 at 3:49 PM, Hoggins! fucks...@wheres5.com wrote:


Hello folks,

Any plans on implementing the PROXY protocol to allow Dovecot being
behind a TCP proxy, and still logging the real IP address of the 
users ?

See : http://blog.haproxy.com/haproxy/proxy-protocol/

Thanks !




Any news on that?

In a lot of scenarios the haproxy PROXY protocol will be important.

Please let us know if it is in the roadmap.

Can you please let us know of any alternative solution(s) to pass to 
dovecot real client info through a haproxy server (services imap, 
imaps, pop3, pop3s)?


Well...

http://hg.dovecot.org/dovecot-2.2/rev/4d7a83ddb644

Regards,

Stephan.


Re: Error: User initialization failed

2015-08-19 Thread @lbutlr

 On 17 Aug 2015, at 00:54, Steffen Kaiser skdove...@smail.inf.fh-brs.de 
 wrote:
 
 userdb {
 args = /etc/dovecot/dovecot-sql.conf.ext
 default_fields = uid=vpopmail gid=vchkpw mail_location=/usr/local/virtual/%u 
 mail=maildir:/usr/local/virtual/%u
 
 looks like this mail_location is confusing Dovecot. If you wanted to specify 
 home here, be aware that home and mail location should (aka must) be 
 separate directories.

No, the problem is that dovecot does not create the root directory for virtual 
users. 

Virtual users do not have a “home” directory.

So, when adding a virtual user I have to remember to go to /usr/local/virtual 
and maildirmake u...@domain.tld for each user.

-- 
I listen to the wind, to the wind of my soul


Re: PROXY protocol

2015-08-19 Thread Nikolaos Milas

On 12/1/2015 10:29 μμ, Francisco Wagner C. Freire wrote:


+1

On Fri, Jan 9, 2015 at 3:49 PM, Hoggins! fucks...@wheres5.com wrote:


Hello folks,

Any plans on implementing the PROXY protocol to allow Dovecot being
behind a TCP proxy, and still logging the real IP address of the users ?
See : http://blog.haproxy.com/haproxy/proxy-protocol/

Thanks !




Any news on that?

In a lot of scenarios the haproxy PROXY protocol will be important.

Please let us know if it is in the roadmap.

Can you please let us know of any alternative solution(s) to pass to 
dovecot real client info through a haproxy server (services imap, imaps, 
pop3, pop3s)?


Thanks in advance,
Nick


Re: Delivering email to Maildir PreINBOX

2015-08-19 Thread Paulo Matos

On 19/08/15 22:11, Pascal Volk wrote:

On 08/19/2015 10:45 PM, Paulo Matos wrote:


Hi all,

I have a running dovecot with:
$ dovecot -n
# 2.2.18: /etc/dovecot/dovecot.conf
[...]
I started to filter my email with imapfilter running on the same host as
dovecot. I would therefore like to deliver email to a folder called
PreINBOX so that imapfilter then sorts the email and ends up delivering
only the useful email to INBOX.

How can I change the name of the inbox dovecot delivers to?

Best,



You can't change the name of the INBOX - the INBOX is always the INBOX.
But you can choose the name of the target mailbox.



How do I do that?


I don't know imapfilter.
I'd use http://wiki2.dovecot.org/Pigeonhole/Sieve for mail filtering.



Thanks, I will take a look at Sieve.

Regards,
Paulo



Regards,
Pascal



segfault when using zlib module with glibc 2.22

2015-08-19 Thread Florian Pritz
Hi,

I'm seeing the following segfault when I run `doveadm search
mailbox inbox` with the zlib module enabled with dovecot 2.18 and glibc
2.22 on Arch Linux. It does not happen with glibc 2.21.

I've noticed that when I remove zlib from the mail_plugins line at
the beginning of the config file the segfault goes away. I've also
tested hg tip and the problem does not appear to be fixed yet.

The segfault also happens with other commands like `doveadm purge`.

Do you need any more information to reproduce and fix this?

Florian

backtrace:

 0x75eaf1e0 in pthread_mutex_unlock () from /usr/lib/libpthread.so.0
 #0  0x75eaf1e0 in pthread_mutex_unlock () from 
 /usr/lib/libpthread.so.0
 #1  0x77def753 in _dl_close_worker () from /lib64/ld-linux-x86-64.so.2
 #2  0x77defede in _dl_close () from /lib64/ld-linux-x86-64.so.2
 #3  0x77dea124 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
 #4  0x76d235e1 in ?? () from /usr/lib/libdl.so.2
 #5  0x76d230bf in dlclose () from /usr/lib/libdl.so.2
 #6  0x7739326a in module_free (module=0x69da20) at module-dir.c:67
 #7  0x77394882 in module_dir_unload (modules=0x68b680 
 mail_storage_service_modules) at module-dir.c:593
 #8  0x7765376b in mail_storage_service_deinit (_ctx=0x6a05d0) at 
 mail-storage-service.c:1475
 #9  0x00425ac2 in doveadm_mail_cmd (cmd=0x69f780, argc=3, 
 argv=0x6943a0) at doveadm-mail.c:631
 #10 0x00425dcb in doveadm_mail_try_run (cmd_name=0x6943c9 search, 
 argc=3, argv=0x694398) at doveadm-mail.c:711
 #11 0x00433e1f in main (argc=3, argv=0x694398) at doveadm.c:346

dovecot.conf:

 # 2.0.0: dovecot.conf.orig
 # OS: Linux 2.6.35-ARCH x86_64 Arch Linux 
 auth_mechanisms = plain login
 disable_plaintext_auth = yes
 mail_location = mdbox:~/.mdbox
 mdbox_rotate_size = 10m
 mail_plugins = $mail_plugins zlib notify mail_log
 
 # enable imap notify
 mailbox_list_index=yes
 
 # remove domain part from username and lowercase it
 # needed for lmtp delivery to system users
 auth_username_format = %Ln
 
 namespace inbox {
   hidden = no
   inbox = yes
   list = yes
   location = 
   prefix = 
   separator = .
   type = private
   mailbox Trash {
   auto = subscribe
   special_use = \Trash
   }
   mailbox Drafts {
   auto = subscribe
   special_use = \Drafts
   }
   mailbox Sent {
   auto = subscribe # autocreate, autosubscribe
   special_use = \Sent
   }
   mailbox Junk {
   auto = subscribe
   special_use = \Junk
   }
 }
 
 passdb {
   driver = pam
 }
 plugin {
   sieve = ~/.dovecot.sieve
   sieve_dir = ~/.sieve
   sieve_global_dir = /etc/dovecot/sieve/global/
   sieve_global_path = /etc/dovecot/sieve/default.sieve
 
   mail_log_events = delete undelete expunge copy mailbox_delete 
 mailbox_rename
   mail_log_fields = uid box msgid size
 }
 protocols = imap pop3 sieve lmtp
 service auth {
   unix_listener auth-client {
   group = postfix
   mode = 0660
   user = postfix
   }
   user = root
 }
 service imap-login {
   process_limit = 400
   process_min_avail = 5
   #executable = imap-login -D
   #chroot =
 }
 
 service managesieve-login {
   inet_listener sieve {
 #port = 4190
   }
   inet_listener sieve-obsolete {
   port = 2000
   }
 }
 service managesieve {
 }
 service lmtp {
   unix_listener /var/spool/postfix/private/dovecot-lmtp {
   group = postfix
   mode = 0660
   user = postfix
   }
 }
 
 #service imap {
 #  executable = imap postlogin
 #}
 #
 #service postlogin {
 #  executable = script-login -d rawlog
 #  unix_listener postlogin {
 #  }
 #}
 
 login_log_format_elements = user=%u method=%m rip=%r lip=%l mpid=%e %c %k
 imap_id_log = *
 
 ssl_cert = /etc/ssl/my-certs/mail.pem
 ssl_key = /etc/ssl/private/server.key
 ssl_prefer_server_ciphers = yes
 
 ssl_protocols = !SSLv2 !SSLv3
 ssl_options = no_compression
 
 #ssl_cipher_list = 
 DHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-ECDSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:DHE-ECDSA-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-SHA256:ECDHE-RSA-AES256-SHA256:DHE-ECDSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:EDH-RSA-DES-CBC3-SHA:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ALL:!LOW:!SSLv2:!EXP:!aNULL
 ssl_cipher_list = 
 

Delivering email to Maildir PreINBOX

2015-08-19 Thread Paulo Matos


Hi all,

I have a running dovecot with:
$ dovecot -n
# 2.2.18: /etc/dovecot/dovecot.conf
# OS: Linux 4.1.0-x86_64-linode59 x86_64 Fedora release 22 (Twenty Two) ext4
auth_debug = yes
auth_mechanisms = plain login digest-md5 cram-md5
auth_verbose = yes
auth_verbose_passwords = yes
default_internal_user = root
imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
mail_debug = yes
mail_location = maildir:/home/vmail/%d/%n/Maildir
maildir_very_dirty_syncs = yes
mbox_write_locks = fcntl
namespace {
  inbox = yes
  location =
  prefix = INBOX.
  separator = .
  type = private
}
namespace inbox {
  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 =
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
postmaster_address = pmatos
protocols = imap
quota_full_tempfail = yes
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
  }
  unix_listener auth-master {
mode = 0600
user = vmail
  }
  user = $default_internal_user
}
ssl = required
ssl_cert = /etc/pki/dovecot/certs/dovecot.pem
ssl_key = /etc/pki/dovecot/private/dovecot.pem
userdb {
  args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes
  driver = static
}
protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  deliver_log_format = msgid=%m: %$
  log_path = /home/vmail/dovecot-deliver.log
}
protocol imap {
  mail_max_userip_connections = 100
}

I started to filter my email with imapfilter running on the same host as 
dovecot. I would therefore like to deliver email to a folder called 
PreINBOX so that imapfilter then sorts the email and ends up delivering 
only the useful email to INBOX.


How can I change the name of the inbox dovecot delivers to?

Best,

--
Paulo Matos


Re: Delivering email to Maildir PreINBOX

2015-08-19 Thread Pascal Volk
On 08/19/2015 10:45 PM, Paulo Matos wrote:
 
 Hi all,
 
 I have a running dovecot with:
 $ dovecot -n
 # 2.2.18: /etc/dovecot/dovecot.conf
 [...]
 I started to filter my email with imapfilter running on the same host as
 dovecot. I would therefore like to deliver email to a folder called
 PreINBOX so that imapfilter then sorts the email and ends up delivering
 only the useful email to INBOX.
 
 How can I change the name of the inbox dovecot delivers to?
 
 Best,
 

You can't change the name of the INBOX - the INBOX is always the INBOX.
But you can choose the name of the target mailbox.

I don't know imapfilter.
I'd use http://wiki2.dovecot.org/Pigeonhole/Sieve for mail filtering.


Regards,
Pascal