Re[2]: Iteration for ldap userdb does not work

2017-10-19 Thread Holger A. Brinkhaus

HI Steffen,

thanks for your reply. I've performed ldapsearch over all users (even 
without person filter) without problems. There are less than 10 persons 
in the directory.


Best regards
  Holger

-- Originalnachricht --
Von: "Steffen Kaiser" 
An: "Holger A. Brinkhaus" 
Cc: dovecot@dovecot.org
Gesendet: 20.10.2017 07:12:53
Betreff: Re: Iteration for ldap userdb does not work


Signatur hat Probleme
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, 19 Oct 2017, Holger A. Brinkhaus wrote:

> I have a working ldap authentification for dovecot (with ldap based 
userdb
> query) for my Active Directory but iterations by doveadm -A runs in 
timeout.

>
> I tried now for three days and get it not to work.

Did you verified that ldapsearch runs through? Depending on the number 
of

users AD times out easily by default in my experience.

- --
Steffen Kaiser
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEVAwUBWemF1Xz1H7kL/d9rAQIGbQf/a9opFEJnAOkPZI2gNmorTbCn7aaovHcK
APg1MshnoUuQE2suHAQpLaEd0ZhiXfiaJoV/jGGj1qYmUshQA6OxgjWqvNHU6d9S
OotsM/YgbdQAZwSQE41Qljr3S4dlpqIfTXcae9xgO4EKvIgMPToM2bvJEtjDj9v0
nW7EFSo9Nk2n0pK4Ey3dtZ7gh5zWMFJezQ06hAv7oR11foYYgkZWwShHCgFrRgo/
SAWrpvMVoBuxDvUuzLMGJsZoVlBtDadpfNC5vcIurg8Fo/e4WBdCPeSkuKDd+9vV
phbeeQmSUb6t5C/wPtS+oS3x3DX2pKkzL8wo0SJy/Kaz3jvr4ca6yQ==
=oHda
-END PGP SIGNATURE-


Re: quota only for oungoing

2017-10-19 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, 19 Oct 2017, Aidar Kamalov wrote:


Hello! I setup quota and quota warnings for my mail system(dovecot+exim).
By I want to reject only outgoing messages if quota exceeded.


Oh, how do you do that?


Is it possible to congi dovecot to not reject incoming messages? I use
dovecot-lda for mail delivery.


If you remove the "quota" plugin from mail_plugins of the lda section, 
quota is not calculated anymore, I guess. So, I suppose, you need to give 
unlimited quota for service LDA. How do you configure the quota?


- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEVAwUBWemIE3z1H7kL/d9rAQLFDAf/VmEMBBYR2lCwrmNs08ReM/XTs0PjXMJo
LVH9jKSVJi4PmLqHtiiz99OmmZUWxdTqhOeOGlgh0mCU37EVozRHI3IT+jjEp2mq
lJlIG2PlpKns2xxWhLafmnwMnB2FE+B/a516BV1gKjzEagAIYElVc1So0ZrAy2As
eYgLMQsatG/Kb3TE10UYVgsC0eN5ev2x89Z3qbKEzpMzMITrv/8x007cFMY8UcoI
GWQ4mDrzYpxt4GZ9K1pipAK9DrcBwoClbgLHkHuXqoLeiO/TNWneBmRHSKiSrd0z
wfK+C172XHA+E87+u+b+5LSWEzhKi13rK4E3fN9hsgaa5Cokayz9cw==
=dPdG
-END PGP SIGNATURE-


Re: Iteration for ldap userdb does not work

2017-10-19 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, 19 Oct 2017, Holger A. Brinkhaus wrote:

I have a working ldap authentification for dovecot (with ldap based userdb 
query) for my Active Directory but iterations by doveadm -A runs in timeout.


I tried now for three days and get it not to work.


Did you verified that ldapsearch runs through? Depending on the number of 
users AD times out easily by default in my experience.


- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEVAwUBWemF1Xz1H7kL/d9rAQIGbQf/a9opFEJnAOkPZI2gNmorTbCn7aaovHcK
APg1MshnoUuQE2suHAQpLaEd0ZhiXfiaJoV/jGGj1qYmUshQA6OxgjWqvNHU6d9S
OotsM/YgbdQAZwSQE41Qljr3S4dlpqIfTXcae9xgO4EKvIgMPToM2bvJEtjDj9v0
nW7EFSo9Nk2n0pK4Ey3dtZ7gh5zWMFJezQ06hAv7oR11foYYgkZWwShHCgFrRgo/
SAWrpvMVoBuxDvUuzLMGJsZoVlBtDadpfNC5vcIurg8Fo/e4WBdCPeSkuKDd+9vV
phbeeQmSUb6t5C/wPtS+oS3x3DX2pKkzL8wo0SJy/Kaz3jvr4ca6yQ==
=oHda
-END PGP SIGNATURE-


Re: dovecot-2.3 (-git) Warning and Fatal Compile Error

2017-10-19 Thread Reuben Farrelly

On 18/10/2017 11:40 PM, Timo Sirainen wrote:

On 18 Oct 2017, at 6.34, Reuben Farrelly  wrote:


I haven't been tracking dovecot-2.3 until now, but I've just given it a quick 
run, and there are a few things that may need some attention.

/usr/include/features.h:376:4: warning: #warning _FORTIFY_SOURCE requires 
compiling with optimization (-O) [-Wcpp]
#  warning _FORTIFY_SOURCE requires compiling with optimization (-O)


Don't use -O0 or use configure --disable-hardening or just ignore it.


The build then fails entirely with this:

DMODULEDIR=\""/usr/lib64/dovecot"\"   -O0 -g -pipe -march=native -mtune=native 
-ggdb -c -o realpath.lo realpath.c
edit-mail.c: In function ‘edit_mail_wrap’:
edit-mail.c:235:14: error: too few arguments to function 
‘mailbox_transaction_begin’
  raw_trans = mailbox_transaction_begin(raw_box, 0);


I don't think your pigeonhole is from git master.


Thanks.  That was it...

Now onto 2.3 -git, there is a repeatable crash occurring in lmtp.  In 
fact it looks like there could be more than one problem, because even 
invoking lmtp (with gdb) and no arguments results in a gdb error about 
an unaddressable byte.


However when lmtp is used normally within dovecot it crashes out on a 
few but not all mails.


The full gdb output looks like this:

Oct 20 12:59:21 thunderstorm.reub.net dovecot: master: Dovecot 
v2.3.devel (c398eca6b) starting up for imap, lmtp, sieve
Oct 20 12:59:30 thunderstorm.reub.net postfix/qmgr[5057]: 9A25122B50: 
from=, size=18515, nrcpt=1 (queue active)
Oct 20 12:59:30 thunderstorm.reub.net postfix/qmgr[5057]: 32D0722B4B: 
from=, size=27030, nrcpt=1 (queue active)
Oct 20 12:59:31 thunderstorm.reub.net dovecot: lmtp: Error: ==28006== 
Syscall param epoll_pwait(sigmask) points to unaddressable byte(s)
Oct 20 12:59:31 thunderstorm.reub.net dovecot: lmtp: Error: ==28006== 
at 0x58A7705: epoll_pwait (epoll_pwait.c:42)
Oct 20 12:59:31 thunderstorm.reub.net dovecot: lmtp: Error: ==28006== 
by 0x5504697: io_loop_handler_run_internal (ioloop-epoll.c:182)
Oct 20 12:59:31 thunderstorm.reub.net dovecot: lmtp: Error: ==28006== 
by 0x5501C4F: io_loop_handler_run (ioloop.c:666)
Oct 20 12:59:31 thunderstorm.reub.net dovecot: lmtp: Error: ==28006== 
by 0x5501B2E: io_loop_run (ioloop.c:639)
Oct 20 12:59:31 thunderstorm.reub.net dovecot: lmtp: Error: ==28006== 
by 0x5449F05: master_service_run (master-service.c:733)
Oct 20 12:59:31 thunderstorm.reub.net dovecot: lmtp: Error: ==28006== 
by 0x10D8E8: main (main.c:139)
Oct 20 12:59:31 thunderstorm.reub.net dovecot: lmtp: Error: ==28006== 
Address 0x0 is not stack'd, malloc'd or (recently) free'd

Oct 20 12:59:31 thunderstorm.reub.net dovecot: lmtp: Error: ==28006==
Oct 20 12:59:32 thunderstorm.reub.net dovecot: lmtp(28006): Connect from 
local
Oct 20 12:59:33 thunderstorm.reub.net dovecot: lmtp: Error: ==28009== 
Syscall param epoll_pwait(sigmask) points to unaddressable byte(s)
Oct 20 12:59:33 thunderstorm.reub.net dovecot: lmtp: Error: ==28009== 
at 0x58A7705: epoll_pwait (epoll_pwait.c:42)
Oct 20 12:59:33 thunderstorm.reub.net dovecot: lmtp: Error: ==28009== 
by 0x5504697: io_loop_handler_run_internal (ioloop-epoll.c:182)
Oct 20 12:59:33 thunderstorm.reub.net dovecot: lmtp: Error: ==28009== 
by 0x5501C4F: io_loop_handler_run (ioloop.c:666)
Oct 20 12:59:33 thunderstorm.reub.net dovecot: lmtp: Error: ==28009== 
by 0x5501B2E: io_loop_run (ioloop.c:639)
Oct 20 12:59:33 thunderstorm.reub.net dovecot: lmtp: Error: ==28009== 
by 0x5449F05: master_service_run (master-service.c:733)
Oct 20 12:59:33 thunderstorm.reub.net dovecot: lmtp: Error: ==28009== 
by 0x10D8E8: main (main.c:139)
Oct 20 12:59:33 thunderstorm.reub.net dovecot: lmtp: Error: ==28009== 
Address 0x0 is not stack'd, malloc'd or (recently) free'd

Oct 20 12:59:33 thunderstorm.reub.net dovecot: lmtp: Error: ==28009==
Oct 20 12:59:33 thunderstorm.reub.net dovecot: lmtp(28009): Connect from 
local
Oct 20 12:59:34 thunderstorm.reub.net dovecot: 
lmtp(liam)<28006>: aFFxDIRY6VlmbQAAzkCIew: 
sieve: msgid=<001a114bd6f6d2fc86055be25...@google.com>: stored mail into 
mailbox 'INBOX'
Oct 20 12:59:34 thunderstorm.reub.net dovecot: 
indexer-worker(liam)<28026>: 
Indexed 1 messages in INBOX (UIDs 634..634)
Oct 20 12:59:35 thunderstorm.reub.net dovecot: lmtp: Error: ==28006== 
Invalid read of size 8
Oct 20 12:59:35 thunderstorm.reub.net dovecot: lmtp: Error: ==28006== 
at 0x543AECB: smtp_submit_session_init (smtp-submit.c:61)
Oct 20 12:59:35 thunderstorm.reub.net dovecot: lmtp: Error: ==28006== 
by 0x543B05B: smtp_submit_init_simple (smtp-submit.c:100)
Oct 20 12:59:35 thunderstorm.reub.net dovecot: lmtp: Error: ==28006== 
by 0xAA8BC4B: lda_sieve_smtp_start (lda-sieve-plugin.c:77)
Oct 20 12:59:35 thunderstorm.reub.net dovecot: lmtp: Error: ==28006== 
by 0xACBF4C0: sieve_smtp_start (sieve-smtp.c:31)
Oct 20 12:59:35 thunderstorm.reub.net dovecot: lmtp: Error: ==28006== 
by 0xACBF679: 

Iteration for ldap userdb does not work

2017-10-19 Thread Holger A. Brinkhaus

Hi,

I have a working ldap authentification for dovecot (with ldap based 
userdb query) for my Active Directory but iterations by doveadm -A runs 
in timeout.


I tried now for three days and get it not to work.

Best regards
  Holger

/etc/dovecot/dovecot-ldap-userdb.conf  is symlink to
/etc/doveconf/doveconf-ldap.conf

debug_level = 0
uris = ldaps://server1.office.hb-os.de:636
dn = cn=BINDUSER,cn=Users,dc=SUBDOM,dc=DOM,dc=de
dnpass = MYPASSWORD
auth_bind = yes
ldap_version = 3
deref = never
base = cn=Users,dc=SUBDOM,dc=DOM,dc=de
scope = subtree
user_attrs = =home=/usr/data/vmail/%d/%n, 
=mail=maildir:/usr/data/vmail/%d/%n/Maildir

user_filter = (&(objectClass=person)(mail=%u))
pass_filter = (&(objectClass=person)(mail=%u))
iterate_attrs = mail=user
iterate_filter = (objectClass=person)


doveconf -n

# 2.2.13: /etc/dovecot/dovecot.conf
# OS: Linux 3.16.0-4-amd64 x86_64 Debian 8.9
auth_mechanisms = plain login
base_dir = /var/run/dovecot/
default_vsz_limit = 512 M
dict {
  expire = mysql:/etc/dovecot/dovecot-dict-expire.conf.ext
}
first_valid_uid = 100
imap_idle_notify_interval = 16 mins
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
log_path = /var/log/dovecot.log
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_gid = vmail
mail_home = /usr/data/vmail/%d/
mail_location = maildir:~/Maildir:LAYOUT=fs
mail_plugins = expire
mail_privileged_group = vmail
mail_uid = 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 {
  inbox = 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 =
}
passdb {
  args = /etc/dovecot/dovecot-ldap.conf
  driver = ldap
}
plugin {
  antispam_backend = pipe
  antispam_debug_target = syslog
  antispam_pipe_program = /usr/data/vmail/spampipe.sh
  antispam_pipe_program_notspam_arg = --ham
  antispam_pipe_program_spam_arg = --spam
  antispam_pipe_tmp_dir = /tmp
  antispam_spam = Junk;SPAM;Spam
  antispam_trash = Trash
  expire = Trash
  expire2 = Trash/*
  expire3 = Junk
  expire_dict = proxy::expire
  sieve = /usr/data/vmail/%u/sieve/active-script.sieve
  sieve_before = /usr/data/vmail/sieve/spam-global.sieve
  sieve_dir = /usr/data/vmail/%d/%n/sieve/scripts/
  sieve_max_redirects = 4
  sieve_max_script_size = 1M
  sieve_quota_max_scripts = 128
}
postmaster_address = m...@domain.de
protocols = imap lmtp sieve
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
  unix_listener auth-userdb {
group = postfix
mode = 0600
user = postfix
  }
  user = vmail
}
service dict {
  unix_listener dict {
group = vmail
mode = 0600
user = vmail
  }
}
service imap-login {
  inet_listener imap {
port = 143
  }
  inet_listener imaps {
port = 993
ssl = yes
  }
  process_min_avail = 10
  service_count = 1
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
  }
}
ssl_cert = 

quota only for oungoing

2017-10-19 Thread Aidar Kamalov
Hello! I setup quota and quota warnings for my mail system(dovecot+exim).
By I want to reject only outgoing messages if quota exceeded.
Is it possible to congi dovecot to not reject incoming messages? I use
dovecot-lda for mail delivery.

ldap_delivery:
  driver = pipe
  command = /usr/lib/dovecot/deliver -d "${lookup ldap{user=**))(mai
-f $sender_address -a $original_local_part@$original_domain
  message_prefix =
  message_suffix =
  delivery_date_add
  envelope_to_add
  return_path_add
  log_output
  return_output
  user = mail
  group = mail
  temp_errors = 64 : 69 : 70: 71 : 72 : 73 : 74 : 75 : 78


-- 
Aydar A. Kamalov