Re: [Dovecot] When the subject portion of an e-mail contains a control character, dovecot.sieve terminates unexpectatedly.

2014-05-21 Thread Stephan Bosch
On 5/22/2014 7:28 AM, Atsuko Tanaka wrote:
> We were able to solve the problem,
> "When a control character is included in the subject of an e-mail,
> dovecot exits with a fatal error" using the following information:

Did you try the latest versions? We made a few changes that should
resolve this already.

Regards,

Stephan.


[Dovecot] Copies of outgoing emails in the Sent folder

2014-05-21 Thread Dmitry Podkovyrkin

Hi!

My mail server works in tandem: Dovecot (IMAP) + Postfix.
How can I configure in Gmail: Outgoing email copied to the Sent folder 
using postfix without mail client? This question is for the mailing list 
for Postfix?
Mail client itself copies outgoing messages in the folder Sent, but the 
messages are large, and the server is far away. And to transmit email 
twice for sending and copying is not effective.


Sorry for my English ).

--
Regards
Dmitry Podkovyrkin
mobile: +7 922 20 56 756
email: dmirty@rutelecom.company
skype: dmitryrw


Re: [Dovecot] When the subject portion of an e-mail contains a control character, dovecot.sieve terminates unexpectatedly.

2014-05-21 Thread Atsuko Tanaka
We were able to solve the problem,
"When a control character is included in the subject of an e-mail,
dovecot exits with a fatal error" using the following information:


1. We added the following field to the sieve setting file:

/etc/dovecot/conf.d/90-sieve.conf
-
sieve_editheader_rfc2822_check = yes
-
This is a switch for whether or not to check if a file is RFC2822 or not.
When it's set to yes, it works the exact same as before changes were made.
The default is yes.

2. When the sieve_editheader_rfc2822_check setting is set to no, we make
sure not to check for RFC2822.


Version: dovecot-2.2-pigeonhole-0.4.2

The patch is listed as below:
-
diff -Nur 
dovecot-2.2-pigeonhole-0.4.2_org/src/lib-sieve/plugins/editheader/cmd-addheader.c
 dovecot-2.2-pigeonhole-0.4.2/src/lib-sieve/plugins/editheader/cmd-addheader.c
--- 
dovecot-2.2-pigeonhole-0.4.2_org/src/lib-sieve/plugins/editheader/cmd-addheader.c
   2014-05-14 15:17:52.586774630 +0900
+++ 
dovecot-2.2-pigeonhole-0.4.2/src/lib-sieve/plugins/editheader/cmd-addheader.c   
2014-05-14 15:22:12.536780572 +0900
@@ -281,7 +281,8 @@
return SIEVE_EXEC_OK;
}
 
-   if ( !rfc2822_header_field_body_verify
+   if ( this_ext->svinst->chk_rfc2822 == TRUE &&
+ !rfc2822_header_field_body_verify
(str_c(value), str_len(value), TRUE, TRUE) ) {
sieve_runtime_error(renv, NULL, "addheader action: "
"specified value `%s' is invalid",
diff -Nur dovecot-2.2-pigeonhole-0.4.2_org/src/lib-sieve/sieve-common.h 
dovecot-2.2-pigeonhole-0.4.2/src/lib-sieve/sieve-common.h
--- dovecot-2.2-pigeonhole-0.4.2_org/src/lib-sieve/sieve-common.h   
2014-05-14 15:17:52.593774606 +0900
+++ dovecot-2.2-pigeonhole-0.4.2/src/lib-sieve/sieve-common.h   2014-05-14 
15:23:57.584775286 +0900
@@ -189,6 +189,9 @@
size_t max_script_size;
unsigned int max_actions;
unsigned int max_redirects;
+
+/* Check */
+bool chk_rfc2822;
 };
 
 #endif /* __SIEVE_COMMON_H */
diff -Nur dovecot-2.2-pigeonhole-0.4.2_org/src/lib-sieve/sieve.c 
dovecot-2.2-pigeonhole-0.4.2/src/lib-sieve/sieve.c
--- dovecot-2.2-pigeonhole-0.4.2_org/src/lib-sieve/sieve.c  2014-05-14 
15:17:52.583774672 +0900
+++ dovecot-2.2-pigeonhole-0.4.2/src/lib-sieve/sieve.c  2014-05-14 
15:19:39.628771207 +0900
@@ -51,6 +51,7 @@
size_t size_setting;
const char  *domain;
pool_t pool;
+bool bool_setting;
 
/* Create Sieve engine instance */
pool = pool_alloconly_create("sieve", 8192);
@@ -118,6 +119,15 @@
svinst->max_redirects = (unsigned int) uint_setting;
}
 
+   /* Check RFC2822 from configuration */
+
+svinst->chk_rfc2822 = TRUE;
+
+if (sieve_setting_get_bool_value
+   (svinst, "sieve_editheader_rfc2822_check", &bool_setting) ) {
+svinst->chk_rfc2822 = bool_setting;
+}
+
/* Initialize extensions */
if ( !sieve_extensions_init(svinst) ) {
sieve_deinit(&svinst);
-


> 1) When an e-mail's subject contains control characters like
> [Ctrl+V|^V], dovecot.sieve terminates with an error and an e-mail is not
> able to be sent. When a MIME encoded Subject like [TEST^VMAIL] is sent
> we're not able to edit the subject and dovecot ends with an error.
> 
> This is a sample of the data that was used in testing.
> Subject: =?ISO-2022-JP?B?GyRCI1QjRSNTI1QbKEIWGyRCI00jQSNJI0wbKEI=?=
> X-Spam-Score: 100.00%
> ↓
> Subject: =?ISO-2022-JP?B?GyRCI1QjRSNTI1QbKEIWGyRCI00jQSNJI0wbKEI=?=
> X-Spam-Score: 100.00%
> 
> This is the log generated by the data above.
> --
> sieve: info: started log at May 02 10:46:22.
> main script: line 14: error: addheader action: specified value `[SPAM]
> TEST?・・' is invalid.
> --
> 
> Aside from [Ctrl + V] the following control charcters also cause errors:
> backspace
> Ctrl + A
> Ctrl + C
> Ctrl + [
> Ctrl + X
> Ctrl + Y


Atsuko Tanaka


Re: [Dovecot] Dovecot ontop of glusterfs issue.

2014-05-21 Thread Murray Trainer
Hi Eliezer,

We had the same errors a few weeks ago.  Turned out the time on our NFS
server was out by over 30 secs as NTP wasn't setup correctly .  Looks like
the time on one of yours is out by about 250 secs (361-105).

Murray

-Original Message-
From: dovecot [mailto:dovecot-boun...@dovecot.org] On Behalf Of Eliezer
Croitoru
Sent: Wednesday, 21 May 2014 4:38 PM
To: dovecot@dovecot.org
Subject: [Dovecot] Dovecot ontop of glusterfs issue.

Hey,

I am testing Glusterfs as a storage backend for dovecot as a LDA and imap
server.
I have seen similar lines in the logs to these:
May 21 10:46:01 mailgw dovecot: imap(elie...@ngtech.co.il): Warning: 
Created dotlock file's timestamp is different than current time
(1400658105 vs 1400658361): 
/home/vmail/ngtech.co.il/eliezer/Maildir/.Mailing_lists.ceph_users/dovecot-u
idlist
May 21 10:46:01 mailgw dovecot: imap(elie...@ngtech.co.il): Error: 
Transaction log
/home/vmail/ngtech.co.il/eliezer/Maildir/dovecot.index.log: duplicate
transaction log sequence (2713)

The volume is mounted only by one server with ubutntu 14.04.
I have seen threads and posts about similar issue with nfs.
I want to try to debug the issue but note that with the same settings of the
server nfs worked fine but slower.
dovecot -n output:
http://pastebin.centos.org/9626/

The glusterfs is a replicated volume constructed of two bricks which is
mounted only on one dovecot server.
All three servers are using the same ntp pool and are synced.

Any direction is better then the state I am now.

Thanks,
Eliezer


Re: [Dovecot] TLS/SSL for Win8 & Outlook

2014-05-21 Thread Robert Schetterer
Am 21.05.2014 19:47, schrieb Sebastian Goodrick:
> 
>> every "official" up2date ssl crt should work, also dont forget to
>> include intermediate crt/pem in your ssl dove chain
> 
> I just installed the (rapid-ssl) certificate and it works now.
> Needless to say that I don't understand it. The old certificate worked
> with all other clients but win8/outlook, plus the old dovecot install
> worked with win8/outlook as well.
> 
> Regards, Sebastian
> 

endless speculation is now possible

there where some bugfixes with certificates ( windows )
but that should not impact brand new installs with full recent patch level

however good to hear you got it work


Best Regards
MfG Robert Schetterer

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein


[Dovecot] Dovecot pam

2014-05-21 Thread Tommy Berglund

Hello!
How can I disable passdb { driver = pam }
in /etc/dovecot/conf.d/auth-system.conf.ext
from file /etc/dovecot/local.conf.

I have postfix and dovecot set up to only use virtual users.
I'd rather do all the configuration in local.conf if possible.

My doveconf-n

# 2.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 3.13.0-24-generic x86_64 Ubuntu 14.04 LTS
auth_failure_delay = 5 secs
auth_mechanisms = plain login cram-md5
listen = *
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_home = /var/vmail/%d/%n
mail_location = mdbox:~/
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 {
  inbox = 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
  }
  prefix =
}
passdb {
  args = scheme=cram-md5 /etc/dovecot/passwd
  driver = passwd-file
}
plugin {
  sieve = /vmail/%d/%n/.dovecot.sieve
  sieve_dir = /vmail/%d/%n/sieve
  sieve_global_path = /vmail/dovecot/sieve/default.sieve
}
protocols = imap lmtp sieve
service auth {
  executable = /usr/lib/dovecot/auth
  unix_listener /var/spool/postfix/private/auth-client {
group = postfix
mode = 0660
user = postfix
  }
  user = root
}
service imap-login {
  inet_listener imaps {
port = 993
ssl = yes
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
  }
  user = vmail
}
ssl_cert = 

Re: [Dovecot] TLS/SSL for Win8 & Outlook

2014-05-21 Thread Sebastian Goodrick
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


> every "official" up2date ssl crt should work, also dont forget to 
> include intermediate crt/pem in your ssl dove chain

I just installed the (rapid-ssl) certificate and it works now.
Needless to say that I don't understand it. The old certificate worked
with all other clients but win8/outlook, plus the old dovecot install
worked with win8/outlook as well.

Regards, Sebastian
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlN85ssACgkQR7+YB0Qzbnpp7QCfWajiArksReRecfnBO+9++/pe
SmkAn3W4UWmGYrVmAE4gSvEZimf5vWon
=u6AH
-END PGP SIGNATURE-


Re: [Dovecot] Sieve fileinto extension and redirect action

2014-05-21 Thread Robert Schetterer
Am 21.05.2014 16:04, schrieb FUSTE Emmanuel:
> "redirect" is forbidden by my organization policy.

if your users do edit sieve via webmail plugin only ,like in horde ,
squirrelmail , roundcube etc you may modify their setup or code to make
it impossible to create redirect with/in sieve


Best Regards
MfG Robert Schetterer

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein


Re: [Dovecot] Sieve fileinto extension and redirect action

2014-05-21 Thread FUSTE Emmanuel
Le 21/05/2014 17:49, Daniel Parthey a écrit :
> Hi Emmanuel
>
> Am 21.05.2014 16:04, schrieb FUSTE Emmanuel:
>> Is there any way to limit the use of the "redirect" action (local user
>> only or silent ignore) as provisioned by the RFC in the Pigeonhole
>> implementation?
>> The only way I found for the moment is to completely disable the
>> fileinto extension which hardly beat the users experience.
>> "redirect" is forbidden by my organization policy.
> Dovecot injects redirected messages through sendmail or smtp (depending on 
> your config).
>
> You might change the dovecot option "sendmail_path" to something different 
> than sendmail:
>
> before:
> sendmail_path = /usr/sbin/sendmail
>
> after:
> sendmail_path = /usr/local/sbin/your-mail-handler
>
> If you are using SMTP, then have a look at dovecot option "submission_host".
>
> Kind regards
> Daniel
Thank you Daniel.

Looking at the code, it seems that it could be addressed  with a config 
parametter:

sieve_max_redirects = 0

And now looking at the config examples files, it is there .

Regards,
Emmanuel.


Re: [Dovecot] Sieve fileinto extension and redirect action

2014-05-21 Thread Daniel Parthey

Hi Emmanuel

Am 21.05.2014 16:04, schrieb FUSTE Emmanuel:

Is there any way to limit the use of the "redirect" action (local user
only or silent ignore) as provisioned by the RFC in the Pigeonhole
implementation?
The only way I found for the moment is to completely disable the
fileinto extension which hardly beat the users experience.
"redirect" is forbidden by my organization policy.


Dovecot injects redirected messages through sendmail or smtp (depending on your 
config).

You might change the dovecot option "sendmail_path" to something different than 
sendmail:

before:
sendmail_path = /usr/sbin/sendmail

after:
sendmail_path = /usr/local/sbin/your-mail-handler

If you are using SMTP, then have a look at dovecot option "submission_host".

Kind regards
Daniel
--
Dipl.-Inf. Daniel Parthey
System Engineer
Metaways Infosystems GmbH
Pickhuben 2, D-20457 Hamburg

E-Mail: d.part...@metaways.de
Web:http://www.metaways.de

Metaways Infosystems GmbH - Sitz: D-22967 Tremsbüttel
Handelsregister: Amtsgericht Lübeck HRB 4508 AH
Geschäftsführung: Hermann Thaele, Lüder-H.Thaele


Re: [Dovecot] LMTP hostname ignoring ENV variables

2014-05-21 Thread Thomas Leuxner
* G H  2014.05.21 17:02:

>     Received: from mail.mailorxyz.de
>        by mailtest1.atest.qq (Dovecot) with LMTP id sreUK1+sfFOseQAAPYI4hw
>        for ; Wed, 21 May 2014 13:39:03 +
>     Received: by mail.mailorxyz.de (Postfix, from userid 97)
>        id CC743116AB5; Wed, 21 May 2014 13:39:03 + (UTC)

It can be set in 15-lda.conf:

# Hostname to use in various parts of sent mails (e.g. in Message-Id) and
# in LMTP replies. Default is the system's real hostname@domain.
#hostname =

Regards
Thomas


signature.asc
Description: Digital signature


[Dovecot] LMTP hostname ignoring ENV variables

2014-05-21 Thread G H
I am having an issue with LMTP appending the local hostname to received mail 
from Postfix. I either want to append localhost, a custom string, or nothing at 
all. Looking through the source code, I believe I should be able to set "export 
DOVECOT_HOSTNAME" and "export DOVECOT_HOSTDOMAIN" in my initscript to override 
the hostname set in lmtp/commands.c, client_get_added_headers()

I'm using Centos 5; my hostname is mailtest1.atest.qq -- it is not defined in 
/etc/hosts.

The added header is below:


    Received: from mail.mailorxyz.de
       by mailtest1.atest.qq (Dovecot) with LMTP id sreUK1+sfFOseQAAPYI4hw
       for ; Wed, 21 May 2014 13:39:03 +
    Received: by mail.mailorxyz.de (Postfix, from userid 97)
       id CC743116AB5; Wed, 21 May 2014 13:39:03 + (UTC)

I have the following defined in /etc/init.d/dovecot:


export DOVECOT_HOSTDOMAIN=dovecot.mailorxyz.de
export DOVECOT_HOSTNAME=dovecot.mailorxyz.de


Am I missing something or did I misunderstand the source code?

Thanks.


[Dovecot] Sieve fileinto extension and redirect action

2014-05-21 Thread FUSTE Emmanuel
Hello,

Is there any way to limit the use of the "redirect" action (local user 
only or silent ignore) as provisioned by the RFC in the Pigeonhole 
implementation ?
The only way I found for the moment is to completely disable the 
fileinto extension which hardly beat the users experience.
"redirect" is forbidden by my organization policy.

Regards,
Emmanuel.


Re: [Dovecot] Per-user Sieve script location question

2014-05-21 Thread Selcuk Yazar
Hi Again,

we have one domain, i suppose we don't have any problem with %n parameter.

our mail server has mapped LUN Storage disk , we have some empty space
problems, so i think it's better keep user things in storage for backup etc.
we have totally 40K users(most of students) but i think at most 50 of them
use this filter, autorespond etc. :)

thank you for your reply.

Selçuk


On Wed, May 21, 2014 at 3:15 PM, Steffen Kaiser <
skdove...@smail.inf.fh-brs.de> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On Wed, 21 May 2014, Selcuk Yazar wrote:
>
> Hi Selcuk,
>
>
>  i changed my 90-sieve.conf
>>
>> to
>>
>> sieve = /var/sieve-scripts/%u.sieve
>> sieve_dir = /home/vmail/domains/sieve/%n/.sieve
>>
>
> Yeah, looks good. However, do you host multiple domains? In your config
> you differ domains:
>
>  mail_location = mbox:/home/vmail/domains/%d/%u
>
> with sieve = /var/sieve-scripts/%u.sieve , too, but
> with sieve_dir = /home/vmail/domains/sieve/%n/.sieve you do not.
>
> http://wiki2.dovecot.org/Variables
>  %u user full username (e.g. user@domain)
>  %n username user part in user@domain, same as %u if there's no domain
>  %d domain   domain part in user@domain, empty if user with no domain
>
> I suppose, you should use:
>
> sieve_dir = /home/vmail/domains/sieve/%u/.sieve
>
> otherwise i...@example.org and info@localhost share the same Sieve dir.
>
> BTW: Because you have an unique directory per user now anyway, why not use
> is that as home directory? I'm not sure, what other things use the home
> for. E.g. use
>
> mail_home = /home/vmail/domains/home/%d/%u
>
> and keep the home-relative paths for Sieve: ~/...
>
>
>  On Wed, May 21, 2014 at 12:10 PM, Steffen Kaiser <
>> skdove...@smail.inf.fh-brs.de> wrote:
>>
>>  -BEGIN PGP SIGNED MESSAGE-
>>> Hash: SHA1
>>>
>>> On Wed, 21 May 2014, Selcuk Yazar wrote:
>>>
>>>  my dovecot conf is
>>>

 doveconf -n
 # 2.0.9: /etc/dovecot/dovecot.conf

  [...]
>>>
>>>  mail_location = mbox:/home/vmail/domains/%d/%u

  [...]
>>>
>>>  userdb {
  args = /etc/dovecot/conf.d/dovecot-ldap.conf.ext
  driver = ldap
 }

 you're right we have mail_location ,

 should i add mail_home value


>>> That depends on if your LDAP configuration contains a (for the mailserver
>>> usable) home for the individual user.
>>>
>>>  mail_home =  /home/vmail/domains/%d/%u
>>>


>>> The value shows that you did not followed my advice from the last
>>> response: "Read the link above about why not store Sieve files below an
>>> user's mail location." maybe because you missed it because you toppost.
>>>
>>>  to 10-mail.conf file ?
>>>


>>> never use the same dir for mail location and user's home.
>>>
>>>
>>>  On Wed, May 21, 2014 at 11:43 AM, Steffen Kaiser <
>>>
 skdove...@smail.inf.fh-brs.de> wrote:

  -BEGIN PGP SIGNED MESSAGE-

>
>
   On Wed, 21 May 2014, Selcuk Yazar wrote:
>>>

>  our users stored OpenLdap and users home folder like below:
>
>
>>
>>  without seeing your current doveconf -n output and the ldap
> configuration
> file, I would guess that your users have no home directory:
> http://wiki2.dovecot.org/VirtualUsers/Home
>
>
>
>  /home/vmail/domains/domainname.edu.tr/username/...
>
>>
>> now when i used default settings for dovecot sieve
>>
>> sieve = ~/.dovecot.sieve
>> sieve_dir = ~/sieve
>>
>> sieve script write and work globaly and stored,
>> /home/vmail/domains/sieve
>>
>> i looked up Dovecot docs for per user but i don't understand clearly
>>
>> can i replace sieve parameters like
>>
>> sieve = /home/vmail/domains/..edu.tr/%n/.dovecot.
>> sieve
>> sieve_dir = /home/vmail/domains/.edu.tr/%n/.
>> sieve
>>
>> for per user scirpt.
>>
>>
>>  Read the link above about why not store Sieve files below an user's
> mail
> location.
>
>
  - -- Steffen Kaiser
>>> -BEGIN PGP SIGNATURE-
>>> Version: GnuPG v1.4.11 (GNU/Linux)
>>>
>>> iQEVAwUBU3xtn3z1H7kL/d9rAQIu1wf/XMXuEC1O1PQssoU1uHfTM5jOHpH1KHis
>>> yUL1z2/WV8c7engx+CNtGPxnRewC1UFKBZcHaAyXHNxQM+jsYf+NkUo4PDlKkzfi
>>> /JIn+SGOlwZKJUYarnAJbt0CdZG7f8auvMLsoovR8iNitSAdyH5AkRt9i25YFndW
>>> Nm0lYO1CPJzKp3CVhDS0Lxs6sSD21xsMvuauzMmS4ZpYhXXEdOf4jqNkIYdJbSHz
>>> nBHx8sjlJaKNKO3OWs1S5T7DxlRz+VYGw1IZ1BUgpBBD3LxDIOwTLG7NNjWRG2lB
>>> nTB+WK02fvh0T+oJORVuKmgoXG5WKvZjFOa4oVqdbbzM6V4ZJSx9Sw==
>>> =bLQp
>>> -END PGP SIGNATURE-
>>>
>>>
>>
>>
>>
>>
> - -- Steffen Kaiser
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.11 (GNU/Linux)
>
> iQEVAwUBU3yY9Hz1H7kL/d9rAQIIpwf/bfNNbI3zCEuJs3xYq5Nl+Td2QGX0uUzk
> 8PA4taMNrq00W3jBtTi8J4/ZlqT+l15r5nDr6O/VSgffymi9l0JmRMRIfUyzfjBy
> IThSQTrbjx9t+gCJa15Q2JISYEhXC0WYDpseEZle5vFyIKxWT01FYH5cJe45n9ci
> LcY3QmCdrQ4JYuYPiECfOx5rFw7dvZBnS4YDLg/A/O3dUzx7BV6V+cSepAecpoom
> 4U5ud

Re: [Dovecot] Per-user Sieve script location question

2014-05-21 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 21 May 2014, Selcuk Yazar wrote:

Hi Selcuk,


i changed my 90-sieve.conf

to

sieve = /var/sieve-scripts/%u.sieve
sieve_dir = /home/vmail/domains/sieve/%n/.sieve


Yeah, looks good. However, do you host multiple domains? In your config 
you differ domains:


 mail_location = mbox:/home/vmail/domains/%d/%u

with sieve = /var/sieve-scripts/%u.sieve , too, but
with sieve_dir = /home/vmail/domains/sieve/%n/.sieve you do not.

http://wiki2.dovecot.org/Variables
 %u user full username (e.g. user@domain)
 %n username user part in user@domain, same as %u if there's no domain
 %d domain   domain part in user@domain, empty if user with no domain

I suppose, you should use:

sieve_dir = /home/vmail/domains/sieve/%u/.sieve

otherwise i...@example.org and info@localhost share the same Sieve dir.

BTW: Because you have an unique directory per user now anyway, why not 
use is that as home directory? I'm not sure, what other things use the 
home for. E.g. use


mail_home = /home/vmail/domains/home/%d/%u

and keep the home-relative paths for Sieve: ~/...


On Wed, May 21, 2014 at 12:10 PM, Steffen Kaiser <
skdove...@smail.inf.fh-brs.de> wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 21 May 2014, Selcuk Yazar wrote:

 my dovecot conf is


doveconf -n
# 2.0.9: /etc/dovecot/dovecot.conf


[...]


mail_location = mbox:/home/vmail/domains/%d/%u


[...]


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

you're right we have mail_location ,

should i add mail_home value



That depends on if your LDAP configuration contains a (for the mailserver
usable) home for the individual user.

 mail_home =  /home/vmail/domains/%d/%u




The value shows that you did not followed my advice from the last
response: "Read the link above about why not store Sieve files below an
user's mail location." maybe because you missed it because you toppost.

 to 10-mail.conf file ?




never use the same dir for mail location and user's home.


 On Wed, May 21, 2014 at 11:43 AM, Steffen Kaiser <

skdove...@smail.inf.fh-brs.de> wrote:

 -BEGIN PGP SIGNED MESSAGE-





 On Wed, 21 May 2014, Selcuk Yazar wrote:


 our users stored OpenLdap and users home folder like below:





without seeing your current doveconf -n output and the ldap configuration
file, I would guess that your users have no home directory:
http://wiki2.dovecot.org/VirtualUsers/Home



 /home/vmail/domains/domainname.edu.tr/username/...


now when i used default settings for dovecot sieve

sieve = ~/.dovecot.sieve
sieve_dir = ~/sieve

sieve script write and work globaly and stored,
/home/vmail/domains/sieve

i looked up Dovecot docs for per user but i don't understand clearly

can i replace sieve parameters like

sieve = /home/vmail/domains/..edu.tr/%n/.dovecot.sieve
sieve_dir = /home/vmail/domains/.edu.tr/%n/.
sieve

for per user scirpt.



Read the link above about why not store Sieve files below an user's mail
location.




- -- Steffen Kaiser
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBU3xtn3z1H7kL/d9rAQIu1wf/XMXuEC1O1PQssoU1uHfTM5jOHpH1KHis
yUL1z2/WV8c7engx+CNtGPxnRewC1UFKBZcHaAyXHNxQM+jsYf+NkUo4PDlKkzfi
/JIn+SGOlwZKJUYarnAJbt0CdZG7f8auvMLsoovR8iNitSAdyH5AkRt9i25YFndW
Nm0lYO1CPJzKp3CVhDS0Lxs6sSD21xsMvuauzMmS4ZpYhXXEdOf4jqNkIYdJbSHz
nBHx8sjlJaKNKO3OWs1S5T7DxlRz+VYGw1IZ1BUgpBBD3LxDIOwTLG7NNjWRG2lB
nTB+WK02fvh0T+oJORVuKmgoXG5WKvZjFOa4oVqdbbzM6V4ZJSx9Sw==
=bLQp
-END PGP SIGNATURE-








- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBU3yY9Hz1H7kL/d9rAQIIpwf/bfNNbI3zCEuJs3xYq5Nl+Td2QGX0uUzk
8PA4taMNrq00W3jBtTi8J4/ZlqT+l15r5nDr6O/VSgffymi9l0JmRMRIfUyzfjBy
IThSQTrbjx9t+gCJa15Q2JISYEhXC0WYDpseEZle5vFyIKxWT01FYH5cJe45n9ci
LcY3QmCdrQ4JYuYPiECfOx5rFw7dvZBnS4YDLg/A/O3dUzx7BV6V+cSepAecpoom
4U5udqoWRF1pDgKywn0elB0WorEbgnyOHLSrd5uPOuQuP9aW2bcWJGSpr1/j5tQk
tOYd/czhNhpPEKbzH/MJyn6mbhu4F3DGMAfuD9tweIAD25A41HgVpQ==
=6w4r
-END PGP SIGNATURE-


Re: [Dovecot] Per-user Sieve script location question

2014-05-21 Thread Selcuk Yazar
Hi, Steffen

i changed my 90-sieve.conf

to

 sieve = /var/sieve-scripts/%u.sieve
 sieve_dir = /home/vmail/domains/sieve/%n/.sieve

and it works.

thank you.



On Wed, May 21, 2014 at 12:10 PM, Steffen Kaiser <
skdove...@smail.inf.fh-brs.de> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On Wed, 21 May 2014, Selcuk Yazar wrote:
>
>  my dovecot conf is
>>
>> doveconf -n
>> # 2.0.9: /etc/dovecot/dovecot.conf
>>
> [...]
>
>> mail_location = mbox:/home/vmail/domains/%d/%u
>>
> [...]
>
>> userdb {
>>  args = /etc/dovecot/conf.d/dovecot-ldap.conf.ext
>>  driver = ldap
>> }
>>
>> you're right we have mail_location ,
>>
>> should i add mail_home value
>>
>
> That depends on if your LDAP configuration contains a (for the mailserver
> usable) home for the individual user.
>
>  mail_home =  /home/vmail/domains/%d/%u
>>
>
> The value shows that you did not followed my advice from the last
> response: "Read the link above about why not store Sieve files below an
> user's mail location." maybe because you missed it because you toppost.
>
>  to 10-mail.conf file ?
>>
>
> never use the same dir for mail location and user's home.
>
>
>  On Wed, May 21, 2014 at 11:43 AM, Steffen Kaiser <
>> skdove...@smail.inf.fh-brs.de> wrote:
>>
>>  -BEGIN PGP SIGNED MESSAGE-
>>>
>>
>  On Wed, 21 May 2014, Selcuk Yazar wrote:
>>>
>>>  our users stored OpenLdap and users home folder like below:
>>>


>>> without seeing your current doveconf -n output and the ldap configuration
>>> file, I would guess that your users have no home directory:
>>> http://wiki2.dovecot.org/VirtualUsers/Home
>>>
>>>
>>>
>>>  /home/vmail/domains/domainname.edu.tr/username/...

 now when i used default settings for dovecot sieve

 sieve = ~/.dovecot.sieve
 sieve_dir = ~/sieve

 sieve script write and work globaly and stored,
 /home/vmail/domains/sieve

 i looked up Dovecot docs for per user but i don't understand clearly

 can i replace sieve parameters like

 sieve = /home/vmail/domains/..edu.tr/%n/.dovecot.sieve
 sieve_dir = /home/vmail/domains/.edu.tr/%n/.
 sieve

 for per user scirpt.


>>> Read the link above about why not store Sieve files below an user's mail
>>> location.
>>>
>>
> - -- Steffen Kaiser
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.11 (GNU/Linux)
>
> iQEVAwUBU3xtn3z1H7kL/d9rAQIu1wf/XMXuEC1O1PQssoU1uHfTM5jOHpH1KHis
> yUL1z2/WV8c7engx+CNtGPxnRewC1UFKBZcHaAyXHNxQM+jsYf+NkUo4PDlKkzfi
> /JIn+SGOlwZKJUYarnAJbt0CdZG7f8auvMLsoovR8iNitSAdyH5AkRt9i25YFndW
> Nm0lYO1CPJzKp3CVhDS0Lxs6sSD21xsMvuauzMmS4ZpYhXXEdOf4jqNkIYdJbSHz
> nBHx8sjlJaKNKO3OWs1S5T7DxlRz+VYGw1IZ1BUgpBBD3LxDIOwTLG7NNjWRG2lB
> nTB+WK02fvh0T+oJORVuKmgoXG5WKvZjFOa4oVqdbbzM6V4ZJSx9Sw==
> =bLQp
> -END PGP SIGNATURE-
>



-- 
Selçuk YAZAR
http://www.selcukyazar.blogspot.com


Re: [Dovecot] dovecot auth ldap attributes - unused?

2014-05-21 Thread Andreas Schulze

Maciej Uhlig:


Please explain the following dovecot (2.2.13) behaviour: I run dovecot
in ldap auth debug mode and log file excerpt follows:

filter=(&(objectClass=MailAccount)(accountActive=TRUE)(mail=user@domain))  
fields=mail,quota,mailbox


Hello,

no solution but a comment:

ldap.conf define two ldap queries. pass_filter and user_filter

when debugging authentication I use to change my ldap filter:

pass_filter = (whatever) vs. pass_filter = (|(PASSDB=1)(whatever))
user_filter = (whatever) vs. user_filter = (|(USERDB=1)(whatever))

The result is the same, but the debug log is easier to understand.

Andreas


Re: [Dovecot] allow_nets + default + ldap

2014-05-21 Thread Andreas Schulze


Timo,

thanks for having a look at my message...


This looks scary, wouldn't it work without it? : request->failed = FALSE;

I simply copied the logic from existing code in the same function.



Also, don't these work already?
any = 0.0.0.0/0
none = 0.0.0.0/32

Or I'm not sure if the 0.0.0.0/0 matches IPv6, maybe that's a problem..

Right, thats one problem as I remember. This is in my ldap.conf:

pass_filter = (uid=%Lu)
pass_attrs = =user=%{ldap:uid}, \
 =allow_nets=%{ldap:allownets:ALL}, \
 =userdb_uid=%{ldap:uidNumber:1000}, \
 =userdb_gid=%{ldap:gidNumber:1000},\
 =userdb_home=%{ldap:homeDirectory:/mail/%Ln}

I have to declare a default value for "allow_nets" for accounts  
without specifies LDAP attribute "allownets".

0.0.0.0/0 will work, but the comma fail. Also only an IPv6 is impossible ":"

For this reasons I came up with my patch solution. The other  
possibility is to explicit allaw all requests
if the variable networks in  
src/auth/auth-request.c/auth_request_validate_networks is empty.


Also I don't really like to use uppercase values, strcasecmp() would  
be better I think.

there is no strong need for uppercase.

As I said, the solution may be not optimal.

Andreas


Re: [Dovecot] Per-user Sieve script location question

2014-05-21 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 21 May 2014, Selcuk Yazar wrote:


my dovecot conf is

doveconf -n
# 2.0.9: /etc/dovecot/dovecot.conf

[...]

mail_location = mbox:/home/vmail/domains/%d/%u

[...]

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

you're right we have mail_location ,

should i add mail_home value


That depends on if your LDAP configuration contains a (for the 
mailserver usable) home for the individual user.



mail_home =  /home/vmail/domains/%d/%u


The value shows that you did not followed my advice from the last 
response: "Read the link above about why not store Sieve files below an user's 
mail location." maybe because you missed it because you toppost.



to 10-mail.conf file ?


never use the same dir for mail location and user's home.


On Wed, May 21, 2014 at 11:43 AM, Steffen Kaiser <
skdove...@smail.inf.fh-brs.de> wrote:


-BEGIN PGP SIGNED MESSAGE-



On Wed, 21 May 2014, Selcuk Yazar wrote:

 our users stored OpenLdap and users home folder like below:




without seeing your current doveconf -n output and the ldap configuration
file, I would guess that your users have no home directory:
http://wiki2.dovecot.org/VirtualUsers/Home




/home/vmail/domains/domainname.edu.tr/username/...

now when i used default settings for dovecot sieve

sieve = ~/.dovecot.sieve
sieve_dir = ~/sieve

sieve script write and work globaly and stored, /home/vmail/domains/sieve

i looked up Dovecot docs for per user but i don't understand clearly

can i replace sieve parameters like

sieve = /home/vmail/domains/..edu.tr/%n/.dovecot.sieve
sieve_dir = /home/vmail/domains/.edu.tr/%n/.sieve

for per user scirpt.



Read the link above about why not store Sieve files below an user's mail
location.


- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBU3xtn3z1H7kL/d9rAQIu1wf/XMXuEC1O1PQssoU1uHfTM5jOHpH1KHis
yUL1z2/WV8c7engx+CNtGPxnRewC1UFKBZcHaAyXHNxQM+jsYf+NkUo4PDlKkzfi
/JIn+SGOlwZKJUYarnAJbt0CdZG7f8auvMLsoovR8iNitSAdyH5AkRt9i25YFndW
Nm0lYO1CPJzKp3CVhDS0Lxs6sSD21xsMvuauzMmS4ZpYhXXEdOf4jqNkIYdJbSHz
nBHx8sjlJaKNKO3OWs1S5T7DxlRz+VYGw1IZ1BUgpBBD3LxDIOwTLG7NNjWRG2lB
nTB+WK02fvh0T+oJORVuKmgoXG5WKvZjFOa4oVqdbbzM6V4ZJSx9Sw==
=bLQp
-END PGP SIGNATURE-


Re: [Dovecot] Per-user Sieve script location question

2014-05-21 Thread Selcuk Yazar
Hi

my dovecot conf is

 doveconf -n
# 2.0.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-131.6.1.el6.x86_64 x86_64 Red Hat Enterprise Linux
Server release 6.0 (Santiago) ext4
auth_debug = yes
auth_debug_passwords = yes
auth_default_realm = hostname.domainname.edu.tr
auth_mechanisms = plain login
auth_verbose = yes
debug_log_path = /var/log/dovecot.debug
disable_plaintext_auth = no
first_valid_uid = 97
info_log_path = /var/log/dovecot.info
last_valid_uid = 5000
mail_debug = yes
mail_gid = 1001
mail_location = mbox:/home/vmail/domains/%d/%u
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
mbox_write_locks = fcntl
passdb {
  args = /etc/dovecot/conf.d/dovecot-ldap.conf.ext
  driver = ldap
}
plugin {
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
protocols = imap pop3 lmtp sieve
service auth {
  unix_listener auth-userdb {
mode = 0600
user = vmail
  }
}
service managesieve-login {
  inet_listener sieve {
port = 4190
  }
  inet_listener sieve_deprecated {
port = 2000
  }
}
ssl = no
ssl_cert =  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
> On Wed, 21 May 2014, Selcuk Yazar wrote:
>
>  our users stored OpenLdap and users home folder like below:
>>
>
> without seeing your current doveconf -n output and the ldap configuration
> file, I would guess that your users have no home directory:
> http://wiki2.dovecot.org/VirtualUsers/Home
>
>
>
>> /home/vmail/domains/domainname.edu.tr/username/...
>>
>> now when i used default settings for dovecot sieve
>>
>> sieve = ~/.dovecot.sieve
>> sieve_dir = ~/sieve
>>
>> sieve script write and work globaly and stored, /home/vmail/domains/sieve
>>
>> i looked up Dovecot docs for per user but i don't understand clearly
>>
>> can i replace sieve parameters like
>>
>> sieve = /home/vmail/domains/..edu.tr/%n/.dovecot.sieve
>> sieve_dir = /home/vmail/domains/.edu.tr/%n/.sieve
>>
>> for per user scirpt.
>>
>
> Read the link above about why not store Sieve files below an user's mail
> location.
>
> - -- Steffen Kaiser
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.11 (GNU/Linux)
>
> iQEVAwUBU3xnMHz1H7kL/d9rAQIiRAgAmZYxZo1fn/5Iw0WHB2v3FpF1snq1VH4t
> tvyhS/ISj3snMB7dbViUkjvYhzaIsWQKP9eXM3YtOmwpSdlwozqwq/5PvckQgAkU
> cI8UIyXCErsdsvp7/aod/n+Qd+tnjf91b3PY9R7xYd6Qjf/8H7lSmX/xBMBltu7N
> AVqwgHTivR9dwsDyTkIqQIfULWvwcWf5eXbKzP1YxamYzF+lMk6ippK7RebMrspe
> CTg1BLCCLiHMTdSQrOrnfmNjgS/rAZctOEyc3/M98U8HxmEhT6ZFpTjQ4i0T0/17
> +9DQovMUi2/bZ1IhgBpS9u+YkPeuu+y4vAhMqCAT+fcEW1+MgfK2Lg==
> =Sc/m
> -END PGP SIGNATURE-
>



-- 
Selçuk YAZAR
http://www.selcukyazar.blogspot.com


Re: [Dovecot] Per-user Sieve script location question

2014-05-21 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 21 May 2014, Selcuk Yazar wrote:


our users stored OpenLdap and users home folder like below:


without seeing your current doveconf -n output and the ldap configuration 
file, I would guess that your users have no home directory:

http://wiki2.dovecot.org/VirtualUsers/Home



/home/vmail/domains/domainname.edu.tr/username/...

now when i used default settings for dovecot sieve

sieve = ~/.dovecot.sieve
sieve_dir = ~/sieve

sieve script write and work globaly and stored, /home/vmail/domains/sieve

i looked up Dovecot docs for per user but i don't understand clearly

can i replace sieve parameters like

sieve = /home/vmail/domains/..edu.tr/%n/.dovecot.sieve
sieve_dir = /home/vmail/domains/.edu.tr/%n/.sieve

for per user scirpt.


Read the link above about why not store Sieve files below an user's mail 
location.


- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBU3xnMHz1H7kL/d9rAQIiRAgAmZYxZo1fn/5Iw0WHB2v3FpF1snq1VH4t
tvyhS/ISj3snMB7dbViUkjvYhzaIsWQKP9eXM3YtOmwpSdlwozqwq/5PvckQgAkU
cI8UIyXCErsdsvp7/aod/n+Qd+tnjf91b3PY9R7xYd6Qjf/8H7lSmX/xBMBltu7N
AVqwgHTivR9dwsDyTkIqQIfULWvwcWf5eXbKzP1YxamYzF+lMk6ippK7RebMrspe
CTg1BLCCLiHMTdSQrOrnfmNjgS/rAZctOEyc3/M98U8HxmEhT6ZFpTjQ4i0T0/17
+9DQovMUi2/bZ1IhgBpS9u+YkPeuu+y4vAhMqCAT+fcEW1+MgfK2Lg==
=Sc/m
-END PGP SIGNATURE-


[Dovecot] Dovecot ontop of glusterfs issue.

2014-05-21 Thread Eliezer Croitoru

Hey,

I am testing Glusterfs as a storage backend for dovecot as a LDA and 
imap server.

I have seen similar lines in the logs to these:
May 21 10:46:01 mailgw dovecot: imap(elie...@ngtech.co.il): Warning: 
Created dotlock file's timestamp is different than current time 
(1400658105 vs 1400658361): 
/home/vmail/ngtech.co.il/eliezer/Maildir/.Mailing_lists.ceph_users/dovecot-uidlist
May 21 10:46:01 mailgw dovecot: imap(elie...@ngtech.co.il): Error: 
Transaction log 
/home/vmail/ngtech.co.il/eliezer/Maildir/dovecot.index.log: duplicate 
transaction log sequence (2713)


The volume is mounted only by one server with ubutntu 14.04.
I have seen threads and posts about similar issue with nfs.
I want to try to debug the issue but note that with the same settings of 
the server nfs worked fine but slower.

dovecot -n output:
http://pastebin.centos.org/9626/

The glusterfs is a replicated volume constructed of two bricks which is 
mounted only on one dovecot server.

All three servers are using the same ntp pool and are synced.

Any direction is better then the state I am now.

Thanks,
Eliezer


[Dovecot] Per-user Sieve script location question

2014-05-21 Thread Selcuk Yazar
Hi,

after some problems, i successfuly ran my dovecot delivery and pigeonhole
service in redhat EL 6.

our users stored OpenLdap and users home folder like below:

/home/vmail/domains/domainname.edu.tr/username/...

now when i used default settings for dovecot sieve

 sieve = ~/.dovecot.sieve
 sieve_dir = ~/sieve

sieve script write and work globaly and stored, /home/vmail/domains/sieve

i looked up Dovecot docs for per user but i don't understand clearly

can i replace sieve parameters like

sieve = /home/vmail/domains/..edu.tr/%n/.dovecot.sieve
sieve_dir = /home/vmail/domains/.edu.tr/%n/.sieve

for per user scirpt.

thanks in advance.


-- 
Selçuk YAZAR


[Dovecot] dovecot auth ldap attributes - unused?

2014-05-21 Thread Maciej Uhlig
Please explain the following dovecot (2.2.13) behaviour: I run dovecot
in ldap auth debug mode and log file excerpt follows:

2014-05-21T08:22:01+02:00 dovecot/ip dovecot: auth: Debug:
ldap(user@domain,pcip,): bind search:
base=o=tree,dc=do,dc=ma,dc=in
filter=(&(objectClass=MailAccount)(accountActive=TRUE)(mail=user@domain))
2014-05-21T08:22:01+02:00 dovecot/ip dovecot: auth: Debug:
ldap(user@domain,pcip,): result: mail=user@domain;
mail unused
2014-05-21T08:22:01+02:00 dovecot/ip dovecot: auth: Debug:
ldap(user@domain,pcip,): result: mail=user@domain
2014-05-21T08:22:01+02:00 dovecot/ip dovecot: auth: Debug: client passdb
out: OK   24  user=user@domain

2014-05-21T08:22:01+02:00 dovecot/ip dovecot: auth: Debug:
ldap(user@domain,pcip,): user search:
base=o=tree,dc=do,dc=ma,dc=in scope=subtree
filter=(&(objectClass=MailAccount)(accountActive=TRUE)(mail=user@domain)) 
fields=mail,quota,mailbox
2014-05-21T08:22:01+02:00 dovecot/ip dovecot: auth: Debug:
ldap(user@domain,pcip,): result:
mailbox=maildir:/mail/domain/user/mail/ quota=1G mail=user@domain;
mail,mailbox,quota unused
2014-05-21T08:22:01+02:00 dovecot/ip dovecot: auth: Debug:
ldap(user@domain,pcip,): result:
mailbox=maildir:/mail/domain/user/mail/ quota=1G mail=user@domain
2014-05-21T08:22:01+02:00 dovecot/ip dovecot: auth: Debug: master userdb
out: USER 3606315009  user@domain  quota_rule=*:bytes=1G  
mail=maildir:/mail/domain/user/mail/   home=/mail/domain/user

Question: why are there two ldap result log lines while the first line
shows unused attributes and the second doesn't. Does the first occurence
show some code being excessive somehow?

Thanks.

MU




smime.p7s
Description: Kryptograficzna sygnatura S/MIME