dovecot lmtp delivery fails with compression enabled and mailbox stored under different os users

2024-09-20 Thread jonas--- via dovecot
# dovecot --version
2.3.21.1 (d492236fa0)


Error itself(I've replaced some data like original domains/and usernames):

Sep 20 14:24:08 lmtp(l...@forwardusr.org)<486449><+IvZKVhb7WYxbAcAZOUKzw>: 
Debug: auth-master: userdb lookup(l...@forwardusr.org): Started userdb lookup
Sep 20 14:24:08 lmtp(l...@forwardusr.org)<486449><+IvZKVhb7WYxbAcAZOUKzw>: 
Debug: auth-master: userdb lookup(l...@forwardusr.org): auth USER input: 
l...@forwardusr.org uid=1006 gid=12 
home=/home/forwardusr/imap/forwardusr.org/lxc quota_rule=*:bytes=50M
Sep 20 14:24:08 lmtp(l...@forwardusr.org)<486449><+IvZKVhb7WYxbAcAZOUKzw>: 
Debug: auth-master: userdb lookup(l...@forwardusr.org): Finished userdb lookup 
(username=l...@forwardusr.org uid=1006 gid=12 
home=/home/forwardusr/imap/forwardusr.org/lxc quota_rule=*:bytes=50M)
Sep 20 14:24:08 lmtp(l...@forwardusr.org)<486449><+IvZKVhb7WYxbAcAZOUKzw>: 
Debug: lmtp-server: conn unix:pid=492384,uid=8 [4]: rcpt l...@forwardusr.org: 
Added userdb setting: plugin/quota_rule=*:bytes=50M
Sep 20 14:24:08 lmtp(l...@forwardusr.org)<486449><+IvZKVhb7WYxbAcAZOUKzw>: 
Debug: Effective uid=1006, gid=12, home=/home/forwardusr/imap/forwardusr.org/lxc
Sep 20 14:24:08 lmtp(l...@forwardusr.org)<486449><+IvZKVhb7WYxbAcAZOUKzw>: 
Debug: Quota root: name= backend=maildir args=
Sep 20 14:24:08 lmtp(l...@forwardusr.org)<486449><+IvZKVhb7WYxbAcAZOUKzw>: 
Debug: Quota rule: root= mailbox=* bytes=52428800 messages=0
Sep 20 14:24:08 lmtp(l...@forwardusr.org)<486449><+IvZKVhb7WYxbAcAZOUKzw>: 
Debug: Quota grace: root= bytes=5242880 (10%)
Sep 20 14:24:08 lmtp(l...@forwardusr.org)<486449><+IvZKVhb7WYxbAcAZOUKzw>: 
Debug: Namespace inbox: type=private, prefix=, sep=., inbox=yes, hidden=no, 
list=yes, subscriptions=yes location=maildir:~/Maildir
Sep 20 14:24:08 lmtp(l...@forwardusr.org)<486449><+IvZKVhb7WYxbAcAZOUKzw>: 
Debug: maildir++: root=/home/forwardusr/imap/forwardusr.org/lxc/Maildir, 
index=, indexpvt=, control=, 
inbox=/home/forwardusr/imap/forwardusr.org/lxc/Maildir, alt=
Sep 20 14:24:08 lmtp(l...@forwardusr.org)<486449><+IvZKVhb7WYxbAcAZOUKzw>: 
Debug: quota: quota_over_flag check: quota_over_script unset - skipping
Sep 20 14:24:08 lmtp(l...@forwardusr.org)<486449><+IvZKVhb7WYxbAcAZOUKzw>: 
Debug: User session is finished
Sep 20 14:24:08 lmtp(l...@site.edu)<486449><+IvZKVhb7WYxbAcAZOUKzw:R2>: Debug: 
auth-master: userdb lookup(l...@site.edu): Started userdb lookup
Sep 20 14:24:08 lmtp(l...@site.edu)<486449><+IvZKVhb7WYxbAcAZOUKzw:R2>: Debug: 
auth-master: userdb lookup(l...@site.edu): auth USER input: l...@site.edu 
uid=1002 gid=12 home=/home/siteowner/imap/site.edu/lxc quota_rule=*:bytes=50M
Sep 20 14:24:08 lmtp(l...@site.edu)<486449><+IvZKVhb7WYxbAcAZOUKzw:R2>: Debug: 
auth-master: userdb lookup(l...@site.edu): Finished userdb lookup 
(username=l...@site.edu uid=1002 gid=12 home=/home/siteowner/imap/site.edu/lxc 
quota_rule=*:bytes=50M)
Sep 20 14:24:08 lmtp(l...@site.edu)<486449><+IvZKVhb7WYxbAcAZOUKzw:R2>: Debug: 
lmtp-server: conn unix:pid=492384,uid=8 [4]: rcpt l...@site.edu: Added userdb 
setting: plugin/quota_rule=*:bytes=50M
Sep 20 14:24:08 lmtp(l...@site.edu)<486449><+IvZKVhb7WYxbAcAZOUKzw:R2>: Debug: 
Effective uid=1002, gid=12, home=/home/siteowner/imap/site.edu/lxc
Sep 20 14:24:08 lmtp(l...@site.edu)<486449><+IvZKVhb7WYxbAcAZOUKzw:R2>: Debug: 
Quota root: name= backend=maildir args=
Sep 20 14:24:08 lmtp(l...@site.edu)<486449><+IvZKVhb7WYxbAcAZOUKzw:R2>: Debug: 
Quota rule: root= mailbox=* bytes=52428800 messages=0
Sep 20 14:24:08 lmtp(l...@site.edu)<486449><+IvZKVhb7WYxbAcAZOUKzw:R2>: Debug: 
Quota grace: root= bytes=5242880 (10%)
Sep 20 14:24:08 lmtp(l...@site.edu)<486449><+IvZKVhb7WYxbAcAZOUKzw:R2>: Debug: 
Namespace inbox: type=private, prefix=, sep=., inbox=yes, hidden=no, list=yes, 
subscriptions=yes location=maildir:~/Maildir
Sep 20 14:24:08 lmtp(l...@site.edu)<486449><+IvZKVhb7WYxbAcAZOUKzw:R2>: Debug: 
maildir++: root=/home/siteowner/imap/site.edu/lxc/Maildir, index=, indexpvt=, 
control=, inbox=/home/siteowner/imap/site.edu/lxc/Maildir, alt=
Sep 20 14:24:08 lmtp(l...@site.edu)<486449><+IvZKVhb7WYxbAcAZOUKzw:R2>: Debug: 
quota: quota_over_flag check: quota_over_script unset - skipping
Sep 20 14:24:08 lmtp(l...@site.edu)<486449><+IvZKVhb7WYxbAcAZOUKzw:R2>: Debug: 
User session is finished
Sep 20 14:24:08 lmtp(l...@forwardusr.org)<486449><+IvZKVhb7WYxbAcAZOUKzw>: 
Debug: Effective uid=1006, gid=12, home=/home/forwardusr/imap/forwardusr.org/lxc
Sep 20 14:24:08 lmtp(l...@forwardusr.org)<486449><+IvZKVhb7WYxbAcAZOUKzw>: 
Debug: Quota root: name= backend=maildir args=
Sep 20 14:24:08 lmtp(l...@forwardusr.org)<486449><+IvZKVhb7WYxbAcAZOUKzw>: 
Debug: Quota rule: root= mailbox=* bytes=52428800 messages=0
Sep 20 14:24:08 lmtp(l...@forwardusr.org)<486449><+IvZKVhb7WYxbAcAZOUKzw>: 
Debug: Quota grace: root= bytes=5242880 (10%)
Sep 20 14:24:08 lmtp(l...@forwardusr.org)<486449><+IvZKVhb7WYxbAcAZOUKzw>: 
Debug: Namespace inbox: type=private, prefix=, sep=., inbox=yes, hidden=no, 
list=yes, subscriptions=yes 

Re: dovecot lmtp and smtputf8

2023-10-24 Thread Kamil Jońca
"k v"  writes:

> Using the changes described in this pull request 
> https://github.com/dovecot/core/pull/190, you can add SMTPUTF8 capability to 
> the Dovecot LMTP server. Work on the patch is still in progress, and UTF8 
> support is not complete. However, you can use the following trick:
>
> Enable SMTPUTF8 support in Postfix, but make emails with UTF8
> characters as aliases so that the final recipient doesn't have UTF8
> characters. Even in this case, on the LMTP side, you need to announce
> the UTF8 capability, which will be possible if you apply the changes
> from the pull request.

So in short: no, dovecot lmtp does not handle smtputf8.
Thanks for confirmation.
KJ
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: dovecot lmtp and smtputf8

2023-10-24 Thread k v
Using the changes described in this pull request 
https://github.com/dovecot/core/pull/190, you can add SMTPUTF8 capability to 
the Dovecot LMTP server. Work on the patch is still in progress, and UTF8 
support is not complete. However, you can use the following trick:

Enable SMTPUTF8 support in Postfix, but make emails with UTF8 characters as 
aliases so that the final recipient doesn't have UTF8 characters. Even in this 
case, on the LMTP side, you need to announce the UTF8 capability, which will be 
possible if you apply the changes from the pull request.
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


dovecot lmtp and smtputf8

2023-10-23 Thread Kamil Jońca


Does dovecot handle smtputf8?
Last articles regarding this are several years old.
Anything changed?
KJ
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: postfix connects to dovecot lmtp socket, but nothing is delivered

2023-01-05 Thread Benny Pedersen

Gerben Wierda skrev den 2023-01-05 21:34:

Hmm: according to the documentation, the default is "imap pop3 lmtp"

But my installation (2.3.20, Alpine apk) for some reason only ran
"imap" by default


and now you know there is no defaults ?

in case of not working a doveconf -n would be helpfull on maillists

if you use precompiled software blame them for there maybe changed 
defaults


Re: postfix connects to dovecot lmtp socket, but nothing is delivered

2023-01-05 Thread Gerben Wierda
Hmm: according to the documentation, the default is "imap pop3 lmtp"

But my installation (2.3.20, Alpine apk) for some reason only ran "imap" by 
default

G

> On 5 Jan 2023, at 21:27, Gerben Wierda  wrote:
> 
> Boy do I feel stupid.
> 
> protocols was not set in the new version's dovecot.conf. And default it only 
> contains imap. My old server had an override in dovecot.conf and I copied 
> conf.d over but started with afresh dovecot.conf, so lmtp was missing.
> 
> G
> 
>> On 5 Jan 2023, at 18:39, Gerben Wierda > <mailto:gerben.wie...@rna.nl>> wrote:
>> 
>>> On 5 Jan 2023, at 18:17, dove...@ptld.com <mailto:dove...@ptld.com> wrote:
>>> 
>>>> service lmtp {
>>>> inet_listener lmtp {
>>>> address = 127.0.0.1
>>>> port = 24
>>>> }
>>> 
>>>> unix_listener /var/spool/postfix/private/lmtp {
>>>> mode = 0660
>>>> user = postfix
>>>> group = postfix
>>>> }
>>> 
>>> 
>>> Looks like you are activating both a socket and a port. Im not sure what 
>>> dovecot does, does it bind to both or does it pick one and ignore the 
>>> other. You only need to use one or the other.
>>> 
>>> And what does your postfix side look like? Where is postfix trying to 
>>> connect? To the socket or the port? For using a socket postfix would look 
>>> something like:
>>> 
>>>virtual_transport = lmtp:unix:private/lmtp
>>> 
>> 
>> I removed the tcp port for now.
>> 
>> / # doveconf service/lmtp
>> service lmtp {
>>   chroot = 
>>   client_limit = 1
>>   drop_priv_before_exec = no
>>   executable = lmtp
>>   extra_groups = $default_internal_group
>>   group = 
>>   idle_kill = 0
>>   privileged_group = 
>>   process_limit = 0
>>   process_min_avail = 0
>>   protocol = lmtp
>>   service_count = 0
>>   type = 
>>   unix_listener /var/spool/postfix/private/dovecot-lmtp {
>> group = mail
>> mode = 0660
>> user = postfix
>>   }
>>   unix_listener lmtp {
>>     group = 
>> mode = 0666
>> user = 
>>   }
>>   user = 
>>   vsz_limit = 18446744073709551615 B
>> }
>> 
>> postfix config:
>> 
>> mailbox_transport = lmtp:unix:private/dovecot-lmtp
>> virtual_transport = lmtp:unix:private/dovecot-lmtp
>> 
>> I had confused postfix's own lmtp socket with dovecot's, which was 
>> originally named dovecot-lmtp but when it wasn't created I though my config 
>> was wrong.
>> 
>> What seems to happen is that /var/spool/postfix/private/dovecot-lmtp isn't 
>> created by dovecot at launch, but /var/spool/postfix/private/auth is
>> 
>> G
> 



Re: postfix connects to dovecot lmtp socket, but nothing is delivered

2023-01-05 Thread Gerben Wierda
Boy do I feel stupid.

protocols was not set in the new version's dovecot.conf. And default it only 
contains imap. My old server had an override in dovecot.conf and I copied 
conf.d over but started with afresh dovecot.conf, so lmtp was missing.

G

> On 5 Jan 2023, at 18:39, Gerben Wierda  wrote:
> 
>> On 5 Jan 2023, at 18:17, dove...@ptld.com <mailto:dove...@ptld.com> wrote:
>> 
>>> service lmtp {
>>> inet_listener lmtp {
>>> address = 127.0.0.1
>>> port = 24
>>> }
>> 
>>> unix_listener /var/spool/postfix/private/lmtp {
>>> mode = 0660
>>> user = postfix
>>> group = postfix
>>> }
>> 
>> 
>> Looks like you are activating both a socket and a port. Im not sure what 
>> dovecot does, does it bind to both or does it pick one and ignore the other. 
>> You only need to use one or the other.
>> 
>> And what does your postfix side look like? Where is postfix trying to 
>> connect? To the socket or the port? For using a socket postfix would look 
>> something like:
>> 
>>virtual_transport = lmtp:unix:private/lmtp
>> 
> 
> I removed the tcp port for now.
> 
> / # doveconf service/lmtp
> service lmtp {
>   chroot = 
>   client_limit = 1
>   drop_priv_before_exec = no
>   executable = lmtp
>   extra_groups = $default_internal_group
>   group = 
>   idle_kill = 0
>   privileged_group = 
>   process_limit = 0
>   process_min_avail = 0
>   protocol = lmtp
>   service_count = 0
>   type = 
>   unix_listener /var/spool/postfix/private/dovecot-lmtp {
>     group = mail
> mode = 0660
> user = postfix
>   }
>   unix_listener lmtp {
> group = 
> mode = 0666
> user = 
>   }
>   user = 
>   vsz_limit = 18446744073709551615 B
> }
> 
> postfix config:
> 
> mailbox_transport = lmtp:unix:private/dovecot-lmtp
> virtual_transport = lmtp:unix:private/dovecot-lmtp
> 
> I had confused postfix's own lmtp socket with dovecot's, which was originally 
> named dovecot-lmtp but when it wasn't created I though my config was wrong.
> 
> What seems to happen is that /var/spool/postfix/private/dovecot-lmtp isn't 
> created by dovecot at launch, but /var/spool/postfix/private/auth is
> 
> G



Re: postfix connects to dovecot lmtp socket, but nothing is delivered

2023-01-05 Thread Gerben Wierda
> On 5 Jan 2023, at 18:17, dove...@ptld.com wrote:
> 
>> service lmtp {
>> inet_listener lmtp {
>> address = 127.0.0.1
>> port = 24
>> }
> 
>> unix_listener /var/spool/postfix/private/lmtp {
>> mode = 0660
>> user = postfix
>> group = postfix
>> }
> 
> 
> Looks like you are activating both a socket and a port. Im not sure what 
> dovecot does, does it bind to both or does it pick one and ignore the other. 
> You only need to use one or the other.
> 
> And what does your postfix side look like? Where is postfix trying to 
> connect? To the socket or the port? For using a socket postfix would look 
> something like:
> 
>virtual_transport = lmtp:unix:private/lmtp
> 

I removed the tcp port for now.

/ # doveconf service/lmtp
service lmtp {
  chroot = 
  client_limit = 1
  drop_priv_before_exec = no
  executable = lmtp
  extra_groups = $default_internal_group
  group = 
  idle_kill = 0
  privileged_group = 
  process_limit = 0
  process_min_avail = 0
  protocol = lmtp
  service_count = 0
  type = 
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = mail
mode = 0660
user = postfix
  }
  unix_listener lmtp {
group = 
mode = 0666
user = 
  }
  user = 
  vsz_limit = 18446744073709551615 B
}

postfix config:

mailbox_transport = lmtp:unix:private/dovecot-lmtp
virtual_transport = lmtp:unix:private/dovecot-lmtp

I had confused postfix's own lmtp socket with dovecot's, which was originally 
named dovecot-lmtp but when it wasn't created I though my config was wrong.

What seems to happen is that /var/spool/postfix/private/dovecot-lmtp isn't 
created by dovecot at launch, but /var/spool/postfix/private/auth is

G

Re: postfix connects to dovecot lmtp socket, but nothing is delivered

2023-01-05 Thread Gerben Wierda


> On 5 Jan 2023, at 18:17, dove...@ptld.com wrote:
> 
>> service lmtp {
>> inet_listener lmtp {
>> address = 127.0.0.1
>> port = 24
>> }
> 
>> unix_listener /var/spool/postfix/private/lmtp {
>> mode = 0660
>> user = postfix
>> group = postfix
>> }
> 
> 
> Looks like you are activating both a socket and a port. Im not sure what 
> dovecot does, does it bind to both or does it pick one and ignore the other. 
> You only need to use one or the other.
> 
> And what does your postfix side look like? Where is postfix trying to 
> connect? To the socket or the port? For using a socket postfix would look 
> something like:
> 
>virtual_transport = lmtp:unix:private/lmtp

Ha, my mistake. As dovecot had not created the socket I assumed th elmtp socket 
was the one the new config had created, so I changed the config to use that one.

Now I only have to find out why dovecot doesn't create the 
/var/spool/postfix/private/dovecot-lmtp socket

The inet_listener was added to see if I could work around this.

G

Re: postfix connects to dovecot lmtp socket, but nothing is delivered

2023-01-05 Thread Aki Tuomi


> On 05/01/2023 19:17 EET dove...@ptld.com wrote:
> 
>  
> > service lmtp {
> > inet_listener lmtp {
> > address = 127.0.0.1
> > port = 24
> > }
> 
> > unix_listener /var/spool/postfix/private/lmtp {
> > mode = 0660
> > user = postfix
> > group = postfix
> > }
> 
> 
> Looks like you are activating both a socket and a port. Im not sure what 
> dovecot does, does it bind to both or does it pick one and ignore the other. 
> You only need to use one or the other.
> 
> And what does your postfix side look like? Where is postfix trying to 
> connect? To the socket or the port? For using a socket postfix would look 
> something like:
> 
>  virtual_transport = lmtp:unix:private/lmtp

This is a rare case where one should look at

`doveconf service/lmtp`

to see what the default listeners are.

Aki


Re: postfix connects to dovecot lmtp socket, but nothing is delivered

2023-01-05 Thread dovecot

service lmtp {
inet_listener lmtp {
address = 127.0.0.1
port = 24
}



unix_listener /var/spool/postfix/private/lmtp {
mode = 0660
user = postfix
group = postfix
}



Looks like you are activating both a socket and a port. Im not sure what 
dovecot does, does it bind to both or does it pick one and ignore the other. 
You only need to use one or the other.

And what does your postfix side look like? Where is postfix trying to connect? 
To the socket or the port? For using a socket postfix would look something like:

virtual_transport = lmtp:unix:private/lmtp



Re: postfix connects to dovecot lmtp socket, but nothing is delivered

2023-01-05 Thread Aki Tuomi


> On 05/01/2023 18:38 EET Gerben Wierda  wrote:
> 
> 
> I am setting up a new server combination (postfix + dovecot). dovecot's auth 
> service works for postfix. Just lmtp does not and I need to find out why. I 
> don't see anything in the dovecot logging, but I see this on the postfix side 
> (debug)
> 
> Jan 05 16:11:59 snape postfix/lmtp[127]: connection established
> Jan 05 16:11:59 snape postfix/lmtp[127]: master_notify: status 0
> Jan 05 16:11:59 snape postfix/lmtp[127]: deliver_request_initial: send 
> initial response
> Jan 05 16:11:59 snape postfix/lmtp[127]: send attr protocol = 
> delivery_request_protocol
> Jan 05 16:16:59 snape postfix/lmtp[126]: smtp_get: timeout
> Jan 05 16:16:59 snape postfix/lmtp[126]: connect to subsystem private/defer
> Jan 05 16:16:59 snape postfix/lmtp[126]: private/defer socket: wanted 
> attribute: protocol
> Jan 05 16:16:59 snape postfix/lmtp[126]: input attribute name: protocol
> Jan 05 16:16:59 snape postfix/lmtp[126]: input attribute value: 
> delivery_status_protocol
> Jan 05 16:16:59 snape postfix/lmtp[126]: private/defer socket: wanted 
> attribute: (list terminator)
> Jan 05 16:16:59 snape postfix/lmtp[126]: input attribute name: (end)
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr nrequest = 0
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr flags = 0
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr queue_id = C71B3D1262
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr original_recipient = 
> sy...@rna.nl
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr recipient = sy...@rna.nl
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr offset = 
> 18446744073709551615
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr dsn_orig_rcpt = 
> rfc822;sy...@rna.nl
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr notify_flags = 0
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr status = 4.4.2
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr diag_type =
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr diag_text =
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr mta_type =
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr mta_mname =
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr action = delayed
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr reason = conversation with 
> snape.rna.nl (http://snape.rna.nl)[private/lmtp] timed out while receiving 
> the initial server greeting
> Jan 05 16:16:59 snape postfix/lmtp[126]: private/defer socket: wanted 
> attribute: status
> Jan 05 16:16:59 snape postfix/lmtp[126]: input attribute name: status
> Jan 05 16:16:59 snape postfix/lmtp[126]: input attribute value: 0
> Jan 05 16:16:59 snape postfix/lmtp[126]: private/defer socket: wanted 
> attribute: (list terminator)
> Jan 05 16:16:59 snape postfix/lmtp[126]: input attribute name: (end)
> Jan 05 16:16:59 snape postfix/lmtp[126]: C71B3D1262: to=, 
> relay=snape.rna.nl (http://snape.rna.nl)[private/lmtp], delay=300, 
> delays=0.02/0/300/0, dsn=4.4.2, status=deferred (conversation with 
> snape.rna.nl (http://snape.rna.nl)[private/lmtp] timed out while receiving 
> the initial server greeting)
> Jan 05 16:16:59 snape postfix/lmtp[126]: flush_add: site rna.nl 
> (http://rna.nl) id C71B3D1262
> Jan 05 16:16:59 snape postfix/lmtp[126]: match_list_match: rna.nl 
> (http://rna.nl): no match
> Jan 05 16:16:59 snape postfix/lmtp[126]: flush_add: site rna.nl 
> (http://rna.nl) id C71B3D1262 status 4
> Jan 05 16:16:59 snape postfix/lmtp[126]: deliver_request_final: send: 
> "conversation with snape.rna.nl (http://snape.rna.nl)[private/lmtp] timed out 
> while receiving the initial server greeting" -1
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr status = 4.4.2
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr diag_type =
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr diag_text =
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr mta_type =
> Jan 05 16:16:59 snape postfix/lmtp[127]: master_notify: status 1
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr mta_mname =
> Jan 05 16:16:59 snape postfix/lmtp[127]: connection closed
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr action =
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr reason = conversation with 
> snape.rna.nl (http://snape.rna.nl)[private/lmtp] timed out while receiving 
> the initial server greeting
> Jan 05 16:16:59 snape postfix/lmtp[126]: send attr status = 4294967295
> Jan 05 16:16:59 snape postfix/lmtp[126]: master_notify: status 1
> Jan 05 16:16:59 snape postfix/lmtp[126]: connection closed
> 
> It seems dovecot doesn't react to whatever postfix is doing on the socket. 
> Another possibility is that the socket doesn't really work and dovecot never 
> gets a connection request. How can I debug this?
> 
> Might I test if the socket is the problem by running lmtp on the dovecot side 
> on TCP on 127.0.0.1 and have postfix use that? Just to see if it works? If 
> so, how do I tell postfix to do that? In dovecot I have added the tcp:
> 
> ser

postfix connects to dovecot lmtp socket, but nothing is delivered

2023-01-05 Thread Gerben Wierda
I am setting up a new server combination (postfix + dovecot). dovecot's auth 
service works for postfix. Just lmtp does not and I need to find out why. I 
don't see anything in the dovecot logging, but I see this on the postfix side 
(debug)

Jan 05 16:11:59 snape postfix/lmtp[127]: connection established
Jan 05 16:11:59 snape postfix/lmtp[127]: master_notify: status 0
Jan 05 16:11:59 snape postfix/lmtp[127]: deliver_request_initial: send initial 
response
Jan 05 16:11:59 snape postfix/lmtp[127]: send attr protocol = 
delivery_request_protocol
Jan 05 16:16:59 snape postfix/lmtp[126]: smtp_get: timeout
Jan 05 16:16:59 snape postfix/lmtp[126]: connect to subsystem private/defer
Jan 05 16:16:59 snape postfix/lmtp[126]: private/defer socket: wanted 
attribute: protocol
Jan 05 16:16:59 snape postfix/lmtp[126]: input attribute name: protocol
Jan 05 16:16:59 snape postfix/lmtp[126]: input attribute value: 
delivery_status_protocol
Jan 05 16:16:59 snape postfix/lmtp[126]: private/defer socket: wanted 
attribute: (list terminator)
Jan 05 16:16:59 snape postfix/lmtp[126]: input attribute name: (end)
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr nrequest = 0
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr flags = 0
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr queue_id = C71B3D1262
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr original_recipient = 
sy...@rna.nl
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr recipient = sy...@rna.nl
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr offset = 18446744073709551615
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr dsn_orig_rcpt = 
rfc822;sy...@rna.nl
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr notify_flags = 0
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr status = 4.4.2
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr diag_type = 
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr diag_text = 
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr mta_type = 
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr mta_mname = 
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr action = delayed
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr reason = conversation with 
snape.rna.nl[private/lmtp] timed out while receiving the initial server greeting
Jan 05 16:16:59 snape postfix/lmtp[126]: private/defer socket: wanted 
attribute: status
Jan 05 16:16:59 snape postfix/lmtp[126]: input attribute name: status
Jan 05 16:16:59 snape postfix/lmtp[126]: input attribute value: 0
Jan 05 16:16:59 snape postfix/lmtp[126]: private/defer socket: wanted 
attribute: (list terminator)
Jan 05 16:16:59 snape postfix/lmtp[126]: input attribute name: (end)
Jan 05 16:16:59 snape postfix/lmtp[126]: C71B3D1262: to=, 
relay=snape.rna.nl[private/lmtp], delay=300, delays=0.02/0/300/0, dsn=4.4.2, 
status=deferred (conversation with snape.rna.nl[private/lmtp] timed out while 
receiving the initial server greeting)
Jan 05 16:16:59 snape postfix/lmtp[126]: flush_add: site rna.nl id C71B3D1262
Jan 05 16:16:59 snape postfix/lmtp[126]: match_list_match: rna.nl: no match
Jan 05 16:16:59 snape postfix/lmtp[126]: flush_add: site rna.nl id C71B3D1262 
status 4
Jan 05 16:16:59 snape postfix/lmtp[126]: deliver_request_final: send: 
"conversation with snape.rna.nl[private/lmtp] timed out while receiving the 
initial server greeting" -1
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr status = 4.4.2
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr diag_type = 
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr diag_text = 
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr mta_type = 
Jan 05 16:16:59 snape postfix/lmtp[127]: master_notify: status 1
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr mta_mname = 
Jan 05 16:16:59 snape postfix/lmtp[127]: connection closed
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr action = 
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr reason = conversation with 
snape.rna.nl[private/lmtp] timed out while receiving the initial server greeting
Jan 05 16:16:59 snape postfix/lmtp[126]: send attr status = 4294967295
Jan 05 16:16:59 snape postfix/lmtp[126]: master_notify: status 1
Jan 05 16:16:59 snape postfix/lmtp[126]: connection closed

It seems dovecot doesn't react to whatever postfix is doing on the socket. 
Another possibility is that the socket doesn't really work and dovecot never 
gets a connection request. How can I debug this?

Might I test if the socket is the problem by running lmtp on the dovecot side 
on TCP on 127.0.0.1 and have postfix use that? Just to see if it works? If so, 
how do I tell postfix to do that? In dovecot I have added the tcp:

service lmtp {
  inet_listener lmtp {
address = 127.0.0.1
port = 24
  }
  unix_listener /var/spool/postfix/private/lmtp {
mode = 0660
user = postfix
group = postfix
  }
}
service lmtp {
   executable = lmtp -L
}
protocol lmtp {
   info_log_path = /var/log/mail/dovecot-lmtp.log
}


Any other tips?

Gerben Wierda (LinkedIn )

Re: dovecot-lmtp crashing when setting lmtp_proxy=yes

2021-07-19 Thread Camilo Sperberg
Your solution did work perfectly, although I had to enable an inet-listener
because I had only a socket connection configured. In hindsight the problem
was pretty obvious but the segfault threw me off a bit.

Thanks for the answer!

Greetings,
Camilo Sperberg

On Fri, Jul 16, 2021 at 8:10 AM Aki Tuomi 
wrote:

>
> > On 15/07/2021 18:37 Camilo Sperberg  wrote:
> >
> >
> > Hi all:
> >
> > We are currently in the process of setting up dovecot proxy so that we
> can deploy multiple machines in order to keep growing.
> >
> > We are trying now to create an entry point, and from there send the
> traffic to either the same machine or another node.
> > For this, we are using a MySQL database with information about which
> server hosts which mailboxes, which turns out to be working great for
> sending out mail and general authentification. This was really simple to
> set up, kudos for that!
> >
> >
> > However, whenever I want to *receive* email, I just have to enable the
> lmtp_proxy setting which makes the lmtp process segfault.
> >
> > This happens everytime as I can reliable reproduce it + get a stack
> trace of it. The process will crash on every incoming email.
> >
> >
> > I have attached:
> > - Complete output of dovecot-sysreport
> > - A core dump of the crashed process
> >
> > Main information:
> > Using dovecot v2.3.14 (cee3cbc0d) on Ubuntu 18.04 LTS: Linux
> 5.4.0-1046-gcp x86_64 Ubuntu 18.04.5 LTS. Our MTA is postfix.
> >
> > Logs around the crashed process:
> > Jul 15 14:53:21 server postfix/postscreen[19402]: CONNECT from >
> >
> > Am I missing something in the conf? Did I encounter a bug? If you need
> more information, please let me know.
> >
> > Greetings,
> > Camilo Sperberg
> >
>
> Hi!
>
> Try returning port for the LMTP connection in your passdb query.
>
> Aki
>


Re: dovecot-lmtp crashing when setting lmtp_proxy=yes

2021-07-15 Thread Aki Tuomi


> On 15/07/2021 18:37 Camilo Sperberg  wrote:
> 
> 
> Hi all:
> 
> We are currently in the process of setting up dovecot proxy so that we can 
> deploy multiple machines in order to keep growing.
> 
> We are trying now to create an entry point, and from there send the traffic 
> to either the same machine or another node.
> For this, we are using a MySQL database with information about which server 
> hosts which mailboxes, which turns out to be working great for sending out 
> mail and general authentification. This was really simple to set up, kudos 
> for that!
> 
> 
> However, whenever I want to *receive* email, I just have to enable the 
> lmtp_proxy setting which makes the lmtp process segfault.
> 
> This happens everytime as I can reliable reproduce it + get a stack trace of 
> it. The process will crash on every incoming email.
> 
> 
> I have attached:
> - Complete output of dovecot-sysreport
> - A core dump of the crashed process
> 
> Main information:
> Using dovecot v2.3.14 (cee3cbc0d) on Ubuntu 18.04 LTS: Linux 5.4.0-1046-gcp 
> x86_64 Ubuntu 18.04.5 LTS. Our MTA is postfix.
> 
> Logs around the crashed process:
> Jul 15 14:53:21 server postfix/postscreen[19402]: CONNECT from > 
> 
> Am I missing something in the conf? Did I encounter a bug? If you need more 
> information, please let me know.
> 
> Greetings,
> Camilo Sperberg
>

Hi!

Try returning port for the LMTP connection in your passdb query.

Aki


Dovecot LMTP Process Hung

2021-07-01 Thread Miguel Ângelo Santos Pereira
Hey there guys,

Here's what I found in the logs:

Jul 1 08:10:27 tango dovecot: imap-login: Warning: Event 0x564fff5fcb20
leaked (parent=(nil)): client-common.c:217
Jul 1 08:10:27 tango dovecot: master: Warning: Sent SIGTERM to 1 auth
processes
Jul 1 08:10:27 tango dovecot: master: Warning: Processes aren't dying after
reload, sent SIGTERM to 12 processes.
Jul 1 08:10:27 tango dovecot: pop3-login: Warning: Event 0x5567deff4a00
leaked (parent=(nil)): client-common.c:217
Jul 1 08:10:27 tango dovecot: pop3-login: Warning: Event 0x5562c9058d40
leaked (parent=(nil)): client-common.c:217
Jul 1 08:10:27 tango dovecot: imap-login: Warning: Event 0x5571f845a200
leaked (parent=(nil)): client-common.c:217
Jul 1 08:10:27 tango dovecot: imap-login: Warning: Event 0x5571f84593d0
leaked (parent=(nil)): client-common.c:217
Jul 1 08:10:27 tango dovecot: imap-login: Warning: Event 0x5571f841bf60
leaked (parent=(nil)): client-common.c:217
Jul 1 08:10:27 tango dovecot: imap-login: Warning: Event 0x5571f83f48d0
leaked (parent=(nil)): client-common.c:217
Jul 1 08:10:27 tango dovecot: imap-login: Warning: Event 0x5571f83f4060
leaked (parent=(nil)): client-common.c:217
Jul 1 08:10:27 tango dovecot: imap-login: Warning: Event 0x564fff5fcb20
leaked (parent=(nil)): client-common.c:217
Jul 1 08:10:27 tango dovecot: imap-login: Warning: Event 0x564fff5e0c50
leaked (parent=(nil)): client-common.c:217
Jul 1 08:10:27 tango dovecot: imap-login: Warning: Event 0x564fff5c1c00
leaked (parent=(nil)): client-common.c:217
Jul 1 08:10:27 tango dovecot: imap-login: Warning: Event 0x564fff59f330
leaked (parent=(nil)): client-common.c:217
Jul 1 08:10:27 tango dovecot: imap-login: Warning: Event 0x564fff4db1f0
leaked (parent=(nil)): client-common.c:217
Jul 1 08:09:59 tango dovecot: master: Warning: Sent SIGTERM to 1 stats
processes
Jul 1 08:09:59 tango dovecot: master: Warning: Sent SIGTERM to 1 pop3-login
processes
Jul 1 08:09:59 tango dovecot: master: Warning: Sent SIGTERM to 5 imap
processes
Jul 1 08:09:59 tango dovecot: master: Warning: Sent SIGTERM to 1 imap-login
processes
Jul 1 08:09:59 tango dovecot: master: Warning: Sent SIGTERM to 1 config
processes
Jul 1 08:09:59 tango dovecot: master: Warning: Sent SIGTERM to 1 auth
processes
Jul 1 08:09:59 tango dovecot: master: Warning: Processes aren't dying after
reload, sent SIGTERM to 10 processes.
Jul 1 08:09:59 tango dovecot: stats: Warning: Killed with signal 15 (by
pid=28266 uid=0 code=kill)
Jul 1 08:09:59 tango dovecot: imap: Warning: Killed with signal 15 (by
pid=28266 uid=0 code=kill)
Jul 1 08:09:59 tango dovecot: imap: Warning: Killed with signal 15 (by
pid=28266 uid=0 code=kill)
Jul 1 08:09:59 tango dovecot: imap: Warning: Killed with signal 15 (by
pid=28266 uid=0 code=kill)
Jul 1 08:09:59 tango dovecot: imap: Warning: Killed with signal 15 (by
pid=28266 uid=0 code=kill)

--

We noticed this as the server wouldn't stop overloading, reaching 150+
load, we had to reboot it. It's not the first time we see this, and kill -9
PID wouldn't do anything to the processes, at all.

Any idea guys? We're stuck here.
I've tried to increase the RAM allocation for dovecot, hope it helps.

-- 
*Com os meus melhores cumprimentos,*
*Best Regards,*

*Miguel Ângelo Santos Pereira*


Re: dovecot: lmtp: Error: fatal error: failed to reserve page summary memory

2020-10-08 Thread Roman Vasilyev
Yes, I did. And it works. Finally rewrote in RUST and it works. Seems like
golang exceeds the memory limit on start.

On Thu, Oct 8, 2020 at 2:56 AM Stephan Bosch  wrote:

>
>
> On 17/09/2020 11:20, Roman Vasilyev wrote:
> > Sorry for offtopic, don't know where to ask it
> > after updating from `ubuntu` 18 to 20
> > started getting this on running golang binary from sieve rules file
> > ```
> > Sep 17 08:54:00 lonjemail spamd[3231]: spamd: connection from ::1
> > [::1]:57844 to port 783, fd 5
> > Sep 17 08:54:00 lonjemail spamd[3231]: spamd: setuid to Debian-exim
> > succeeded
> > Sep 17 08:54:00 lonjemail spamd[3231]: spamd: processing message
> >  > <mailto:pf95pxus...@mail.gmail.com>> for Debian-exim:114
> > Sep 17 08:54:00 lonjemail systemd-resolved[527]: Server returned error
> > NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying
> > transaction with reduced feature level UDP.
> > Sep 17 08:54:00 lonjemail systemd-resolved[527]: message repeated 8
> > times: [ Server returned error NXDOMAIN, mitigating potential DNS
> > violation DVE-2018-0001, retrying transaction with reduced feature
> > level UDP.]
> > Sep 17 08:54:00 lonjemail spamd[3231]: spamd: clean message (1.1/5.0)
> > for Debian-exim:114 in 0.3 seconds, 2760 bytes.
> > Sep 17 08:54:00 lonjemail spamd[3231]: spamd: result: . 1 -
> >
> DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,RDNS_NONE,SPF_HELO_NONE,SPF_PASS
>
> >
> scantime=0.3,size=2760,user=Debian-exim,uid=114,required_score=5.0,rhost=::1,raddr=::1,rport=57844,mid= pf95pxus...@mail.gmail.com
> > <mailto:pf95pxus...@mail.gmail.com>>,autolearn=no autolearn_force=no
> > Sep 17 08:54:00 lonjemail dovecot: lmtp(4254): Connect from local
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: fatal error: failed to
> > reserve page summary memory
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: runtime stack:
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > runtime.throw(0x1a48db5, 0x25)
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > #011/usr/local/go/src/runtime/panic.go:1116 +0x72 fp=0x7ffe160d5860
> > sp=0x7ffe160d5830 pc=0x4ce5d2
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > runtime.(*pageAlloc).sysInit(0x232c268)
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > #011/usr/local/go/src/runtime/mpagealloc_64bit.go:80 +0x185
> > fp=0x7ffe160d58f0 sp=0x7ffe160d5860 pc=0x4c4e25
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > runtime.(*pageAlloc).init(0x232c268, 0x232c260, 0x25cb8d8)
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > #011/usr/local/go/src/runtime/mpagealloc.go:317 +0x75
> > fp=0x7ffe160d5918 sp=0x7ffe160d58f0 pc=0x4c2815
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > runtime.(*mheap).init(0x232c260)
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > #011/usr/local/go/src/runtime/mheap.go:743 +0x24b fp=0x7ffe160d5940
> > sp=0x7ffe160d5918 pc=0x4bf84b
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: runtime.mallocinit()
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > #011/usr/local/go/src/runtime/malloc.go:480 +0x109 fp=0x7ffe160d5968
> > sp=0x7ffe160d5940 pc=0x4a4c49
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: runtime.schedinit()
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > #011/usr/local/go/src/runtime/proc.go:563 +0x65 fp=0x7ffe160d59c0
> > sp=0x7ffe160d5968 pc=0x4d1f25
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > runtime.rt0_go(0x7ffe160d5ad8, 0x2, 0x7ffe160d5ad8, 0x1813580,
> > 0x7fd3cc8a80b3, 0x7fd3cca6cb80, 0x7ffe160d5ad8, 0x200011c00, 0x501080,
> > 0x1813580, ...)
> > Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
> > #011/usr/local/go/src/runtime/asm_amd64.s:214 +0x125 fp=0x7ffe160d59c8
> > sp=0x7ffe160d59c0 pc=0x5011c5
> > Sep 17 08:54:00 lonjemail dovecot:
> > lmtp(roman)<4254>: program
> > exec:/usr/lib/dovecot/sieve-execute/smtp (4255): Terminated with
> > non-zero exit code 2
>
> This tells me this is not Dovecot failing. Did you try executing the
> "smtp" script manually outside Dovecot with the same parameters?
>
> > Sep 17 08:54:00 lonjemail dovecot:
> > lmtp(roman)<4254>: sieve:
> > msgid= pf95pxus...@mail.gmail.com
> > <mailto:pf95pxus...@mail.gmail.com>>: stored mail into mailbox
> > 'Unsubscribe.Neighbors'
> > Sep 17 08:54:00 lonjemail dovecot: lmtp(4254): Disconnect from local:
> > Client has quit the connection (state=READY)
> > Sep 17 08:55:01 lonjemail CRON[4257]: (root) CMD (command -v
> > debian-sa1 > /dev/null && debian-sa1 1 1)
> > ```
>
>

-- 
Regards


Re: dovecot: lmtp: Error: fatal error: failed to reserve page summary memory

2020-10-08 Thread Stephan Bosch




On 17/09/2020 11:20, Roman Vasilyev wrote:

Sorry for offtopic, don't know where to ask it
after updating from `ubuntu` 18 to 20
started getting this on running golang binary from sieve rules file
```
Sep 17 08:54:00 lonjemail spamd[3231]: spamd: connection from ::1 
[::1]:57844 to port 783, fd 5
Sep 17 08:54:00 lonjemail spamd[3231]: spamd: setuid to Debian-exim 
succeeded
Sep 17 08:54:00 lonjemail spamd[3231]: spamd: processing message 
<mailto:pf95pxus...@mail.gmail.com>> for Debian-exim:114
Sep 17 08:54:00 lonjemail systemd-resolved[527]: Server returned error 
NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying 
transaction with reduced feature level UDP.
Sep 17 08:54:00 lonjemail systemd-resolved[527]: message repeated 8 
times: [ Server returned error NXDOMAIN, mitigating potential DNS 
violation DVE-2018-0001, retrying transaction with reduced feature 
level UDP.]
Sep 17 08:54:00 lonjemail spamd[3231]: spamd: clean message (1.1/5.0) 
for Debian-exim:114 in 0.3 seconds, 2760 bytes.
Sep 17 08:54:00 lonjemail spamd[3231]: spamd: result: . 1 - 
DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,RDNS_NONE,SPF_HELO_NONE,SPF_PASS 
scantime=0.3,size=2760,user=Debian-exim,uid=114,required_score=5.0,rhost=::1,raddr=::1,rport=57844,mid=<mailto:pf95pxus...@mail.gmail.com>>,autolearn=no autolearn_force=no

Sep 17 08:54:00 lonjemail dovecot: lmtp(4254): Connect from local
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: fatal error: failed to 
reserve page summary memory

Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: runtime stack:
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
runtime.throw(0x1a48db5, 0x25)
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
#011/usr/local/go/src/runtime/panic.go:1116 +0x72 fp=0x7ffe160d5860 
sp=0x7ffe160d5830 pc=0x4ce5d2
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
runtime.(*pageAlloc).sysInit(0x232c268)
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
#011/usr/local/go/src/runtime/mpagealloc_64bit.go:80 +0x185 
fp=0x7ffe160d58f0 sp=0x7ffe160d5860 pc=0x4c4e25
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
runtime.(*pageAlloc).init(0x232c268, 0x232c260, 0x25cb8d8)
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
#011/usr/local/go/src/runtime/mpagealloc.go:317 +0x75 
fp=0x7ffe160d5918 sp=0x7ffe160d58f0 pc=0x4c2815
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
runtime.(*mheap).init(0x232c260)
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
#011/usr/local/go/src/runtime/mheap.go:743 +0x24b fp=0x7ffe160d5940 
sp=0x7ffe160d5918 pc=0x4bf84b

Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: runtime.mallocinit()
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
#011/usr/local/go/src/runtime/malloc.go:480 +0x109 fp=0x7ffe160d5968 
sp=0x7ffe160d5940 pc=0x4a4c49

Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: runtime.schedinit()
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
#011/usr/local/go/src/runtime/proc.go:563 +0x65 fp=0x7ffe160d59c0 
sp=0x7ffe160d5968 pc=0x4d1f25
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
runtime.rt0_go(0x7ffe160d5ad8, 0x2, 0x7ffe160d5ad8, 0x1813580, 
0x7fd3cc8a80b3, 0x7fd3cca6cb80, 0x7ffe160d5ad8, 0x200011c00, 0x501080, 
0x1813580, ...)
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: 
#011/usr/local/go/src/runtime/asm_amd64.s:214 +0x125 fp=0x7ffe160d59c8 
sp=0x7ffe160d59c0 pc=0x5011c5
Sep 17 08:54:00 lonjemail dovecot: 
lmtp(roman)<4254>: program 
exec:/usr/lib/dovecot/sieve-execute/smtp (4255): Terminated with 
non-zero exit code 2


This tells me this is not Dovecot failing. Did you try executing the 
"smtp" script manually outside Dovecot with the same parameters?


Sep 17 08:54:00 lonjemail dovecot: 
lmtp(roman)<4254>: sieve: 
msgid=<mailto:pf95pxus...@mail.gmail.com>>: stored mail into mailbox 
'Unsubscribe.Neighbors'
Sep 17 08:54:00 lonjemail dovecot: lmtp(4254): Disconnect from local: 
Client has quit the connection (state=READY)
Sep 17 08:55:01 lonjemail CRON[4257]: (root) CMD (command -v 
debian-sa1 > /dev/null && debian-sa1 1 1)

```




dovecot: lmtp: Error: fatal error: failed to reserve page summary memory

2020-09-17 Thread Roman Vasilyev
Sorry for offtopic, don't know where to ask it
after updating from `ubuntu` 18 to 20
started getting this on running golang binary from sieve rules file
```
Sep 17 08:54:00 lonjemail spamd[3231]: spamd: connection from ::1
[::1]:57844 to port 783, fd 5
Sep 17 08:54:00 lonjemail spamd[3231]: spamd: setuid to Debian-exim
succeeded
Sep 17 08:54:00 lonjemail spamd[3231]: spamd: processing message
 for
Debian-exim:114
Sep 17 08:54:00 lonjemail systemd-resolved[527]: Server returned error
NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying
transaction with reduced feature level UDP.
Sep 17 08:54:00 lonjemail systemd-resolved[527]: message repeated 8 times:
[ Server returned error NXDOMAIN, mitigating potential DNS violation
DVE-2018-0001, retrying transaction with reduced feature level UDP.]
Sep 17 08:54:00 lonjemail spamd[3231]: spamd: clean message (1.1/5.0) for
Debian-exim:114 in 0.3 seconds, 2760 bytes.
Sep 17 08:54:00 lonjemail spamd[3231]: spamd: result: . 1 -
DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,RDNS_NONE,SPF_HELO_NONE,SPF_PASS
scantime=0.3,size=2760,user=Debian-exim,uid=114,required_score=5.0,rhost=::1,raddr=::1,rport=57844,mid=,autolearn=no autolearn_force=no
Sep 17 08:54:00 lonjemail dovecot: lmtp(4254): Connect from local
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: fatal error: failed to
reserve page summary memory
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: runtime stack:
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: runtime.throw(0x1a48db5,
0x25)
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
#011/usr/local/go/src/runtime/panic.go:1116 +0x72 fp=0x7ffe160d5860
sp=0x7ffe160d5830 pc=0x4ce5d2
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
runtime.(*pageAlloc).sysInit(0x232c268)
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
#011/usr/local/go/src/runtime/mpagealloc_64bit.go:80 +0x185
fp=0x7ffe160d58f0 sp=0x7ffe160d5860 pc=0x4c4e25
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
runtime.(*pageAlloc).init(0x232c268, 0x232c260, 0x25cb8d8)
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
#011/usr/local/go/src/runtime/mpagealloc.go:317 +0x75 fp=0x7ffe160d5918
sp=0x7ffe160d58f0 pc=0x4c2815
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
runtime.(*mheap).init(0x232c260)
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
#011/usr/local/go/src/runtime/mheap.go:743 +0x24b fp=0x7ffe160d5940
sp=0x7ffe160d5918 pc=0x4bf84b
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: runtime.mallocinit()
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
#011/usr/local/go/src/runtime/malloc.go:480 +0x109 fp=0x7ffe160d5968
sp=0x7ffe160d5940 pc=0x4a4c49
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error: runtime.schedinit()
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
#011/usr/local/go/src/runtime/proc.go:563 +0x65 fp=0x7ffe160d59c0
sp=0x7ffe160d5968 pc=0x4d1f25
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
runtime.rt0_go(0x7ffe160d5ad8, 0x2, 0x7ffe160d5ad8, 0x1813580,
0x7fd3cc8a80b3, 0x7fd3cca6cb80, 0x7ffe160d5ad8, 0x200011c00, 0x501080,
0x1813580, ...)
Sep 17 08:54:00 lonjemail dovecot: lmtp: Error:
#011/usr/local/go/src/runtime/asm_amd64.s:214 +0x125 fp=0x7ffe160d59c8
sp=0x7ffe160d59c0 pc=0x5011c5
Sep 17 08:54:00 lonjemail dovecot:
lmtp(roman)<4254>: program
exec:/usr/lib/dovecot/sieve-execute/smtp (4255): Terminated with non-zero
exit code 2
Sep 17 08:54:00 lonjemail dovecot:
lmtp(roman)<4254>: sieve:
msgid=:
stored mail into mailbox 'Unsubscribe.Neighbors'
Sep 17 08:54:00 lonjemail dovecot: lmtp(4254): Disconnect from local:
Client has quit the connection (state=READY)
Sep 17 08:55:01 lonjemail CRON[4257]: (root) CMD (command -v debian-sa1 >
/dev/null && debian-sa1 1 1)
```

here is sieve rules:
```
require ["variables", "fileinto", "mailbox", "vnd.dovecot.execute"];
if address :matches "from" "*" { set "from" "${1}"; }

if anyof ( header :contains "subject" "unsubscribe neighbours",
header :contains "subject" "unsubscribe neighbors") {
  execute "smtp" "-neighbors=${from}";
  fileinto :create "Unsubscribe.Neighbors";
} elsif address :contains "from" ["mailer-daemon", "postmaster", "internet
mail delivery"] {
  if header :matches "X-Failed-Recipients" "*" {
execute "smtp" "-email=${1}";
fileinto :create "Mail Delivery System";
  } else {
fileinto :create "Mail Delivery System.Warning";
  }
} else {
  # The rest goes into INBOX
  # default is "implicit keep", we do it explicitly here
  keep;
}
```
Attempted in `/etc/dovecot/conf.d/90-sieve.conf`  vsz_limit = 256M with no
luck
Can somebody help me in fixing it?


dovecot-lmtp dont see otherMailbox record?

2020-03-01 Thread pi0trek75
Hello  Postfix + LDAP , Samba as LDAP server, Dovecot   virtual_transport set 
in postfix to dovecot-lmtp ( for autoresponder support )   Users have their 
email aliases in the otherMailbox record  For example, 
account_test@example-domain user has an alias: test@exmaple-domain  Query from 
command line works fine:   postmap -q test@example-domain 
ldap://etc/postfix/ad_virtual_  account_test/Maildir/   (The filter in the 
query ad_virtual_mailbox_maps2.cf looks like this:  [cut]  scope = sub  
query_filter = (&(objectclass=person)(|(mail=  result_attribute= uid  
result_format = %u/Maildir/   )   However, sending an email to the alias 
test@example-domain ends:   Feb 28 12:31:40 mbox-01 postfix/lmtp[13474]: 
2367A6EF: to=<test@example-domain>, relay=mbox-01[private/dovecot- 
delay=0.05, delays=0.02/0/0.02, dsn=5.1.1, status=bounced (host 
mbox-01[private/dovecot-lmtp] said: 550 5.1.1 <test@example-domain> User 
doesn't exist: test@example-domain (in reply to RCPT TO command))   I 
modified dovecot-ldap.conf.ext:   I changed:   user_filter = 
(&(objectClass=person)(uid=%u)   to:   user_filter = 
(&(objectClass=person)(|(uid=%   but that didn't solve the problem. 
Where's the bug?  Any hint?   Below dovecot configuration:# 2.3.4.1 
(f79e8e7e4): /etc/dovecot/dovecot.conf  # Pigeonhole version 0.5.4 ()  # OS: 
Linux 4.19.0-6-amd64 x86_64 Debian 10.2  # Hostname: mbox-01  
auth_cache_negative_ttl = 0  auth_username_format = %Ln  disable_plaintext_auth 
= no  mail_gid = vmail  mail_location = mbox:~/mail:INBOX=/var/mailbox  
mail_privileged_group = mail  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 
index ihave duplicate mime foreverypart extracttext vacation-seconds  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 {    sieve = /var/mailbox-store/%u/.dovecot    sieve_dir = 
/var/mailbox-store/%u    sieve_extensions = +vacation-seconds    
sieve_trace_debug = yes    sieve_trace_dir = /tmp/sieve/    sieve_trace_level = 
matching    sieve_vacation_default_period = 10d    sieve_vacation_max_period = 
30d    sieve_vacation_min_period = 1h  }  protocols = " imap lmtp sieve 
pop3 sieve"  service auth {    unix_listener /var/spool/postfix/private/aut 
{      group = postfix      mode = 0666      user = postfix    }    
unix_listener auth-userdb {      mode = 0666      user = vmail    }  }  service 
lmtp {    unix_listener /var/spool/postfix/private/dov {      group = postfix   
   mode = 0600      user = postfix    }  }  service managesieve-login {    
inet_listener sieve {      port = 4190    }    process_min_avail = 0    
service_count = 1    vsz_limit = 64 M  }  service managesieve {    
process_limit = 1024  }  service stats {    unix_listener stats-reader {      
group = vmail      mode = 0660      user = vmail    }    unix_listener 
stats-writer {      group = vmail      mode = 0660      user = vmail    }  }  
ssl_cert = </etc/dovecot/private/dovecot.  ssl_client_ca_dir = 
/etc/ssl/certs  ssl_dh = # hidden, use -P to show it  ssl_key = # hidden, use 
-P to show it  userdb {    args = /etc/dovecot/dovecot-ldap.conf    driver = 
ldap  }  protocol lmtp {    mail_plugins = " sieve"  }  protocol lda {  
  info_log_path = /var/log/dovecot-lda.log    log_path = 
/var/log/dovecot-lda-errors.lo    mail_plugins = " sieve"  }   and  
dovecot-ldap.conf.ext:  [cut]  deref = never  scope = subtree  user_attrs = 
=mail=maildir:/var/mailbox-sto  user_filter = 
(&(objectClass=person)(|(uid=%  pass_attrs = uid=user,userPassword=password 
 pass_filter = (&(objectClass=person)(uid=%u)  default_pass_scheme = CRYPT


Re: socket dovecot-lmtp is not created anymore

2020-01-22 Thread ratatouille
Sami Ketola  schrieb am 22.01.20 um 21:07:24 Uhr:

> > This the setting in /etc/dovecot/conf.d/10-master.conf
> > 
> > service lmtp {
> > unix_listener /var/spool/postfix/private/dovecot-lmtp {
> >group = postfix
> >mode = 0600
> >user = postfix
> >  }
> > }
> > 
> > I searched nearly the whole system for lmtp but can't find the reason
> > why.
> > 
> > What can I do? Debug?  
> 
> And when you run doveconf -n you have also verified that your config files 
> are parset correctly.
> Ie. the setting is in the output?

Something modified dovecot.conf from
protocols = imap lmtp sieve
to
protocols = imap pop3
during my tests.

Everthing works as expected again.

  Andreas


Re: socket dovecot-lmtp is not created anymore

2020-01-22 Thread Sami Ketola



> On 22 Jan 2020, at 20.59, ratatouille  wrote:
> 
> Hello!
> 
> Since experiments on my testserver two days ago
> /var/spool/postfix/private/dovecot-lmtp
> is not created anymore.
> 
> This the setting in /etc/dovecot/conf.d/10-master.conf
> 
> service lmtp {
> unix_listener /var/spool/postfix/private/dovecot-lmtp {
>group = postfix
>mode = 0600
>user = postfix
>  }
> }
> 
> I searched nearly the whole system for lmtp but can't find the reason
> why.
> 
> What can I do? Debug?

And when you run doveconf -n you have also verified that your config files are 
parset correctly.
Ie. the setting is in the output?

Sami

socket dovecot-lmtp is not created anymore

2020-01-22 Thread ratatouille
Hello!

Since experiments on my testserver two days ago
/var/spool/postfix/private/dovecot-lmtp
is not created anymore.

This the setting in /etc/dovecot/conf.d/10-master.conf

service lmtp {
 unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
  }
}

I searched nearly the whole system for lmtp but can't find the reason
why.

What can I do? Debug?

  Andreas


Re: Case sensitive problem for vacation with dovecot lmtp pigeonhole

2019-09-11 Thread Stephan Bosch via dovecot




On 09/06/2019 16:07, kadafax--- via dovecot wrote:

Hi list,

This issue was raised here by John Fawcett on 12/02/19 but got no 
response.

So, as I'm facing the same issue, I would like to try again:

When using the vacation sieve extension, if I send an email to 
user.n...@mydomain.com it will work, but not to 
user.n...@mydomain.com. Is there a way to make the user part case 
insensitive so that the vacation auto-reply is fired whatever the way 
user part is written ?


We're looking into this. Tracking internally as DOP-1424.

Regards,

Stephan.



doveconf -n output:

# 2.3.5.1 (7ec6d0ade): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.5 (2483b085)
# OS: Linux 3.10.0-957.5.1.el7.x86_64 x86_64 CentOS Linux release 
7.6.1810 (Core)  ext4

# Hostname: myserver.mydomain.com
auth_master_user_separator = *
auth_username_chars = 
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@*

auth_verbose = yes
debug_log_path = /var/log/dovecot-debug.log
default_client_limit = 10640
default_process_limit = 2128
default_vsz_limit = 0
hostname = mydomain.com
info_log_path = /var/log/dovecot.log
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
listen = *
log_path = /var/log/dovecot-error.log
login_greeting = Welcome
mail_gid = vmail
mail_location = maildir:/var/vmail/%Ln
mail_plugins = quota fts fts_lucene
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 index ihave duplicate mime foreverypart 
extracttext

namespace inbox {
  inbox = yes
  location = maildir:/var/vmail/%Ln
  mailbox Drafts {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Sent {
    auto = subscribe
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    auto = subscribe
    special_use = \Trash
  }
  prefix =
  type = private
}
passdb {
  args = /usr/local/etc/dovecot/deny-users
  deny = yes
  driver = passwd-file
}
passdb {
  args = /usr/local/etc/dovecot/master-users
  driver = passwd-file
  master = yes
  pass = yes
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
plugin {
  fts = lucene
  fts_autoindex = yes
  fts_lucene = whitespace_chars=@.
  quota = maildir:User quota
  quota_rule = *:storage=30GB
  quota_rule2 = Trash:storage=+200M
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=80%% quota-warning 80 %u
  sieve = /var/sieve-scripts/%Ln.sieve
  sieve_dir = /var/vmail/%Ln/home/sieve
}
postmaster_address = postmas...@mydomain.com
protocols = imap pop3 lmtp sieve sieve
quota_full_tempfail = yes
service auth-worker {
  user = $default_internal_user
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    mode = 0777
    user = vmail
  }
}
service imap-login {
  inet_listener imaps {
    port = 993
    ssl = yes
  }
  process_min_avail = 10
}
service imap {
  process_limit = 2128
}
service lmtp {
  executable = lmtp -L
  process_min_avail = 15
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
}
service pop3-login {
  inet_listener pop3s {
    port = 995
    ssl = yes
  }
}
service quota-warning {
  executable = script /usr/local/bin/quota-warning.sh
  user = nobody
}
ssl_cert = 



Re: dovecot-lmtp and postfix

2019-08-11 Thread Coy Hile via dovecot

On 2019-08-11 18:40, Alexander Dalloz via dovecot wrote:

Am 11.08.2019 um 18:06 schrieb Coy Hile via dovecot:




Your Postfix configuration makes Postfix think gmail.com to be a
virtual(8) target domain. Thus it uses virtual_transport. So validate
your

virtual_alias_maps = 
pgsql:/opt/local/etc/postfix/postfix_virtual_aliases.cf
virtual_mailbox_domains = 
pgsql:/opt/local/etc/postfix/postfix_virtual_domains.cf


definitions.



That was exactly it! I was missing a WHERE domain='%s' in that query, so 
it returned something
(which is effectively "I am handled here" apparently) regardless of the 
domain.


Thank you,

--
Coy Hile
coy.h...@coyhile.com


Re: dovecot-lmtp and postfix

2019-08-11 Thread Alexander Dalloz via dovecot

Am 11.08.2019 um 18:06 schrieb Coy Hile via dovecot:

And in syslog I see:

2019-08-11T15:37:57+00:00 81716ec5-bca4-6d53-ed81-bd1a55d46b4f 
postfix/smtpd[56103]: [ID 197553 mail.info] 12327F13D: 
client=ns1.coyhile.com[172.17.64.25]
2019-08-11T15:38:40+00:00 81716ec5-bca4-6d53-ed81-bd1a55d46b4f 
postfix/cleanup[56365]: [ID 197553 mail.info] 12327F13D: message-id=<>
2019-08-11T15:38:40+00:00 81716ec5-bca4-6d53-ed81-bd1a55d46b4f postfix/qmgr[56018]: 
[ID 197553 mail.info] 12327F13D: from=, size=354, nrcpt=1 
(queue active)
2019-08-11T15:38:40+00:00 81716ec5-bca4-6d53-ed81-bd1a55d46b4f dovecot: [ID 
702911 mail.info] lmtp(50179): Connect from local
2019-08-11T15:38:40+00:00 81716ec5-bca4-6d53-ed81-bd1a55d46b4f postfix/lmtp[56821]: [ID 
197553 mail.info] 12327F13D: to=, 
relay=81716ec5-bca4-6d53-ed81-bd1a55d46b4f.localdomain[private/dovecot-lmtp], delay=55, 
delays=55/0.01/0/0.03, dsn=5.1.1, status=bounced (host 
81716ec5-bca4-6d53-ed81-bd1a55d46b4f.localdomain[private/dovecot-lmtp] said: 550 
5.1.1  User doesn't exist:coyh...@gmail.com  (in reply to RCPT TO 
command))

Given both of those configurations, shouldn’t it see that gmail address and 
send it off to the relay host?


Your Postfix configuration makes Postfix think gmail.com to be a 
virtual(8) target domain. Thus it uses virtual_transport. So validate your


> virtual_alias_maps = 
pgsql:/opt/local/etc/postfix/postfix_virtual_aliases.cf
> virtual_mailbox_domains = 
pgsql:/opt/local/etc/postfix/postfix_virtual_domains.cf


definitions.

Alexander


dovecot-lmtp and postfix

2019-08-11 Thread Coy Hile via dovecot
Hi all,

I’ve got postfix setup to use dovecot-lmtp for (virtual) user delivery, and 
things to users or aliases that Dovecot knows about now get delivered 
correctly. However, I’ve done something wrong with postfix and/or the LMTP 
configuration because upon RCPT TO, instead of forwarding the mail off to the 
configured smartest, somehow dovecot-lmtp is ending up in the mix. (Perhaps 
this is more a postfix question than a dovecot one, but, I’ll start here.)

Relevant postfix config:

[root@81716ec5-bca4-6d53-ed81-bd1a55d46b4f /opt/local/etc/postfix]# postconf -n
canonical_maps = hash:/opt/local/etc/postfix/canonical
command_directory = /opt/local/sbin
compatibility_level = 2
daemon_directory = /opt/local/libexec/postfix
data_directory = /var/db/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd 
$daemon_directory/$process_name $process_id & sleep 5
default_database_type = hash
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailbox_size_limit = 10240
mailq_path = /opt/local/bin/mailq
manpage_directory = /opt/local/man
message_size_limit = 5120
meta_directory = /opt/local/libexec/postfix
mynetworks = $myhostname, 127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12 192.168.0.0/16
newaliases_path = /opt/local/bin/newaliases
owner_request_special = no
queue_directory = /var/spool/postfix
queue_minfree = 7680
readme_directory = /opt/local/share/doc/postfix
recipient_canonical_maps = hash:/opt/local/etc/postfix/recipient_canonical
recipient_delimiter = +
relayhost = 
relay.svc.a4b01392-e48d-4cdf-cacf-f850d1800d45.basement.cns.coyhile.com
sample_directory = /opt/local/share/examples/postfix
sender_canonical_maps = hash:/opt/local/etc/postfix/sender_canonical
sendmail_path = /opt/local/sbin/sendmail
setgid_group = maildrop
shlib_directory = /opt/local/lib/postfix
smtpd_banner = $myhostname ESMTP
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated, 
reject_unknown_reverse_client_hostname
smtpd_data_restrictions = permit_mynetworks, reject_unauth_pipelining, 
permit_sasl_authenticated
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated, 
reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, 
reject_unlisted_recipient, reject_non_fqdn_recipient, 
reject_unauth_destination, reject_unknown_recipient_domain, 
check_recipient_access hash:/opt/local/etc/postfix/filtered_domains
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated, 
reject_unlisted_sender, reject_non_fqdn_sender, reject_unknown_sender_domain
smtputf8_enable = no
strict_rfc821_envelopes = yes
unknown_local_recipient_reject_code = 550
virtual_alias_maps = pgsql:/opt/local/etc/postfix/postfix_virtual_aliases.cf
virtual_mailbox_domains = 
pgsql:/opt/local/etc/postfix/postfix_virtual_domains.cf
virtual_transport = lmtp:unix:private/dovecot-lmtp
[root@81716ec5-bca4-6d53-ed81-bd1a55d46b4f /opt/local/etc/postfix]#

And the dovecot config:

doveconf -n
# 2.3.6 (7eab80676): /opt/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.6 (92dc263a)
doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -Pn 
> dovecot-new.conf
doveconf: Warning: Obsolete setting in 
/opt/local/etc/dovecot/conf.d/10-ssl.conf:80: ssl_dh_parameters_length is no 
longer needed
doveconf: Warning: Obsolete setting in 
/opt/local/etc/dovecot/conf.d/10-ssl.conf:81: ssl_protocols has been replaced 
by ssl_min_protocol
doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -Pn 
> dovecot-new.conf
doveconf: Warning: Obsolete setting in 
/opt/local/etc/dovecot/conf.d/10-ssl.conf:80: ssl_dh_parameters_length is no 
longer needed
doveconf: Warning: Obsolete setting in 
/opt/local/etc/dovecot/conf.d/10-ssl.conf:81: ssl_protocols has been replaced 
by ssl_min_protocol
doveconf: Warning: service auth { client_limit=840 } is lower than required 
under max. load (1524)
# OS: SunOS 5.11 i86pc
# Hostname: 81716ec5-bca4-6d53-ed81-bd1a55d46b4f.coyhile.com
auth_mechanisms = plain login
auth_socket_path = /var/run/dovecot/auth-userdb
imap_idle_notify_interval = 29 mins
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
mail_attachment_dir = /var/mail/attachments
mail_fsync = never
mail_location = mdbox:~/mdbox
mail_plugins = " acl"
mail_privileged_group = 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 index ihave duplicate 
mime foreverypart extracttext imapsieve vnd.dovecot.imapsieve
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
special_use = \Draft

Re: Dovecot LMTP mixing up users on multi-recipient mail

2019-07-03 Thread Timo Sirainen via dovecot
On 27 Jun 2019, at 14.21, Bernhard Schmidt via dovecot  
wrote:
> 
> Hi,
> 
> I've upgraded a mailstore from Debian Jessie (aka oldstable) with
> Dovecot 2.2.13 to Debian Buster (next stable) with Dovecot 2.3.4.1
> today. It worked pretty well, except that we're seeing error messages
> very similar to this old thread
> 
> https://dovecot.org/pipermail/dovecot/2015-July/101396.html
> 
> It appears to be happening when a mail with multiple recipients on this
> message store is getting delivered through lmtp.
> 
> Jun 27 11:47:36 lxmhs74 dovecot: 
> lmtp(user1)<47683>: Error: 
> open(/var/cache/dovecot/index/n/user2n/.INBOX/dovecot.index.cache) failed: 
> Permission denied (euid=3814520() egid=12(man) missing +x perm: 
> /var/cache/dovecot/index/n/user2, dir owned by 3391995:12 mode=0700)
> 
> user1 uid is 3814520, user2n uid is 3391995. Dovecot appears to be trying
> to deliver the message to user1 while using the index directory of user2n.

When delivering multiple mails with LMTP it first writes the mail to the first 
recipient. It then leaves this mail open and uses it to copy the mail to the 
next recipient. This allows the possibility of e.g. using hard links if the 
filesystem permissions are the same with both recipients, although that won't 
happen in your case. Anyway, apparently this copying attempts to update the 
first recipient's dovecot.index.cache for some reason. I'm not sure why exactly 
this is different in v2.2 and v2.3.

I wasn't able to reproduce this easily though, except with some special plugin 
it happened. This change helped with it:

diff --git a/src/lmtp/lmtp-local.c b/src/lmtp/lmtp-local.c
index e43f156d3..93848ef27 100644
--- a/src/lmtp/lmtp-local.c
+++ b/src/lmtp/lmtp-local.c
@@ -669,6 +669,9 @@ lmtp_local_deliver_to_rcpts(struct lmtp_local *local,
   will be unreferenced later on */
local->rcpt_user = NULL;
src_mail = local->first_saved_mail;
+   struct mail_private *pmail =
+   (struct mail_private *)src_mail;
+   pmail->v.set_uid_cache_updates(src_mail, TRUE);
first_uid = geteuid();
i_assert(first_uid != 0);
}

Dovecot LMTP mixing up users on multi-recipient mail

2019-06-27 Thread Bernhard Schmidt via dovecot
Hi,

I've upgraded a mailstore from Debian Jessie (aka oldstable) with
Dovecot 2.2.13 to Debian Buster (next stable) with Dovecot 2.3.4.1
today. It worked pretty well, except that we're seeing error messages
very similar to this old thread

https://dovecot.org/pipermail/dovecot/2015-July/101396.html

It appears to be happening when a mail with multiple recipients on this
message store is getting delivered through lmtp.

Jun 27 11:47:36 lxmhs74 dovecot: lmtp(user1)<47683>: 
Error: open(/var/cache/dovecot/index/n/user2n/.INBOX/dovecot.index.cache) 
failed: Permission denied (euid=3814520() egid=12(man) missing +x 
perm: /var/cache/dovecot/index/n/user2, dir owned by 3391995:12 mode=0700)

user1 uid is 3814520, user2n uid is 3391995. Dovecot appears to be trying
to deliver the message to user1 while using the index directory of user2n.

Further configuration:
- message store is on NFS
- cache directory is on local disk
- users are coming from LDAP, one UID per user
  user_attrs = cn=user,homeDirectory=home,uidNumber=uid,gidNumber=gid
- index directory is calculated from the username
  maildir:~/Maildir:INDEX=/var/cache/dovecot/index/%-1.1n/%n

Despite the error messages (which appear dozens of times per delivery
attempt) delivery seems to work. Workaround was to set

lmtp_destination_recipient_limit = 1

on the postfix in front of the message store. 

Despite the report linked above being quite old, I can't recall having
issues with 2.2.13.

=== doveconf -n ===

# OS: Linux 4.19.0-5-amd64 x86_64 Debian 10.0 
# Hostname: lxmhs74.srv.lrz.de
default_vsz_limit = 512 M
deliver_log_format = from=<%e>, size=%p, message-id=<%m>, status=%$
imap_id_log = *
imap_id_send = *
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
login_greeting = Dovecot ready.
login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c
session=<%{session}> cipher=<%k>
mail_gid = mstore
mail_location = maildir:~/Maildir:INDEX=/var/cache/dovecot/index/%-1.1n/%n
mail_plugins = quota listescape
mail_uid = mstore
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 index ihave
duplicate mime foreverypart extracttext
mmap_disable = yes
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 = INBOX.
  separator = .
  type = private
}
passdb {
  args = /etc/dovecot/dovecot-ldap.conf
  driver = ldap
}
plugin {
  quota = maildir
  quota_rule = *:storage=1024M
  quota_rule2 = INBOX.Trash:ignore
  quota_status_nouser = DUNNO
  quota_status_overquota = 452 4.2.2 Mailbox is full
  quota_status_success = DUNNO
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=90%% quota-warning 90 %u
  sieve = ~/currently-active-script.sieve
  sieve_dir = ~/sieve
}
pop3_uidl_format = %v-%u
protocols = imap lmtp sieve pop3
quota_full_tempfail = yes
service anvil {
  client_limit = 3000
  unix_listener anvil {
group = sudo
mode = 0660
  }
}
service auth {
  client_limit = 3000
  unix_listener auth-userdb {
group = mstore
mode = 0660
user = mstore
  }
}
service imap-login {
  client_limit = 1024
  inet_listener imap {
port = 143
  }
  inet_listener imaps {
port = 993
ssl = yes
  }
  process_limit = 2500
  process_min_avail = 4
  service_count = 0
}
service imap {
  process_limit = 8192
}
service lmtp {
  inet_listener lmtp {
port = 24
  }
}
service managesieve-login {
  inet_listener sieve {
port = 4190
  }
  inet_listener sieve_deprecated {
port = 2000
  }
  service_count = 1
}
service managesieve {
  process_limit = 1024
}
service pop3-login {
  inet_listener pop3 {
port = 110
  }
  inet_listener pop3s {
port = 995
ssl = yes
  }
}
service quota-status {
  client_limit = 20
  executable = quota-status -p postfix
  inet_listener {
port = 12340
  }
}
service quota-warning {
  executable = script /etc/dovecot/quotawarnmsg.sh
  unix_listener quota-warning {
group = mstore
mode = 0660
user = mstore
  }
  user = mstore
}
service stats {
  process_limit = 8192
}
ssl_cert = 

Re: Case sensitive problem for vacation with dovecot lmtp pigeonhole

2019-06-19 Thread Stephan Bosch via dovecot




On 09/06/2019 16:07, kadafax--- via dovecot wrote:

Hi list,

This issue was raised here by John Fawcett on 12/02/19 but got no 
response.

So, as I'm facing the same issue, I would like to try again:

When using the vacation sieve extension, if I send an email to 
user.n...@mydomain.com it will work, but not to 
user.n...@mydomain.com. Is there a way to make the user part case 
insensitive so that the vacation auto-reply is fired whatever the way 
user part is written ?




Hmm, I need to look into this.

Regards,

Stephan.


doveconf -n output:

# 2.3.5.1 (7ec6d0ade): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.5 (2483b085)
# OS: Linux 3.10.0-957.5.1.el7.x86_64 x86_64 CentOS Linux release 
7.6.1810 (Core)  ext4

# Hostname: myserver.mydomain.com
auth_master_user_separator = *
auth_username_chars = 
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@*

auth_verbose = yes
debug_log_path = /var/log/dovecot-debug.log
default_client_limit = 10640
default_process_limit = 2128
default_vsz_limit = 0
hostname = mydomain.com
info_log_path = /var/log/dovecot.log
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
listen = *
log_path = /var/log/dovecot-error.log
login_greeting = Welcome
mail_gid = vmail
mail_location = maildir:/var/vmail/%Ln
mail_plugins = quota fts fts_lucene
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 index ihave duplicate mime foreverypart 
extracttext

namespace inbox {
  inbox = yes
  location = maildir:/var/vmail/%Ln
  mailbox Drafts {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Sent {
    auto = subscribe
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    auto = subscribe
    special_use = \Trash
  }
  prefix =
  type = private
}
passdb {
  args = /usr/local/etc/dovecot/deny-users
  deny = yes
  driver = passwd-file
}
passdb {
  args = /usr/local/etc/dovecot/master-users
  driver = passwd-file
  master = yes
  pass = yes
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
plugin {
  fts = lucene
  fts_autoindex = yes
  fts_lucene = whitespace_chars=@.
  quota = maildir:User quota
  quota_rule = *:storage=30GB
  quota_rule2 = Trash:storage=+200M
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=80%% quota-warning 80 %u
  sieve = /var/sieve-scripts/%Ln.sieve
  sieve_dir = /var/vmail/%Ln/home/sieve
}
postmaster_address = postmas...@mydomain.com
protocols = imap pop3 lmtp sieve sieve
quota_full_tempfail = yes
service auth-worker {
  user = $default_internal_user
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    mode = 0777
    user = vmail
  }
}
service imap-login {
  inet_listener imaps {
    port = 993
    ssl = yes
  }
  process_min_avail = 10
}
service imap {
  process_limit = 2128
}
service lmtp {
  executable = lmtp -L
  process_min_avail = 15
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
}
service pop3-login {
  inet_listener pop3s {
    port = 995
    ssl = yes
  }
}
service quota-warning {
  executable = script /usr/local/bin/quota-warning.sh
  user = nobody
}
ssl_cert = 



Re: Dovecot LMTP rejecting mail from address with apostrophe

2019-06-18 Thread Michal Krzysztofowicz via dovecot

> 
> 
> 
> Have you tried setting 
> 
> auth_username_chars =
> abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@'
> 
> Aki

Hi Aki,

I have indeed. I’m still getting the same error in the logs: 

Jun 18 09:53:39 mail smtpd[95887]: 88142e1ef398de69 mda delivery 
evpid=27d472ffef86feb1 from= 
to= rcpt= user=validuser delay=0s 
result=PermFail stat=Error ("mail.lmtp: LMTP server error: 501 5.5.4 Invalid 
FROM: Invalid character in localpart”)

I didn’t think that auth_username_chars is used for testing if the sender email 
address is valid - I thought it was only used for authentication with dovecot. 

In addition, I’m not sure that LMTP should even be concerned about any 
validation of the sender address (and certainly, if it does the validation, it 
should ensure it allows for all cases conforming to the RFC5321, RFC5322 and 
generally as described in this Wiki article: 
https://en.wikipedia.org/wiki/Email_address). 

Thanks a lot for looking into this!

Best Regards,
Mike

-- 
Michal Krzysztofowicz
http://beautifulocean.org/



smime.p7s
Description: S/MIME cryptographic signature


Re: Dovecot LMTP rejecting mail from address with apostrophe

2019-06-17 Thread Aki Tuomi via dovecot


On 17.6.2019 14.07, Michal Krzysztofowicz wrote:
>
>> On 15 Jun 2019, at 21:09, Aki Tuomi  wrote:
>>
>>
>>> On 15 June 2019 10:56 Daniel Lange via dovecot  wrote:
>>>
>>>
>>> Am 15.06.19 um 00:36 schrieb Michal Krzysztofowicz via dovecot:
 Would you know if Dovecot project uses an issue tracker which is publicly 
 available, and which I can check?
>>> I am not aware of public access to the Open Exchange AG / Dovecot OY 
>>> issue tracker. I guess that is a perk that comes with buying commercial 
>>> support.
>> This issue is in our issue tracker. Michal, can you post your doveconf -n?
>>
>> Aki
> Hi Aki,
>
> Sorry for a delay in responding. Please find my config below. 
>
> #
> #
> #
>
> # 2.3.5.1 (7ec6d0ade): /etc/dovecot/dovecot.conf
> # Pigeonhole version 0.5.5 (2483b085)
> # OS: OpenBSD 6.5 amd64
> # Hostname: smtp.example.com



Have you tried setting 

auth_username_chars =
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@'

Aki



Re: Dovecot LMTP rejecting mail from address with apostrophe

2019-06-17 Thread Michal Krzysztofowicz via dovecot


> On 15 Jun 2019, at 21:09, Aki Tuomi  wrote:
> 
> 
>> On 15 June 2019 10:56 Daniel Lange via dovecot  wrote:
>> 
>> 
>> Am 15.06.19 um 00:36 schrieb Michal Krzysztofowicz via dovecot:
>>> Would you know if Dovecot project uses an issue tracker which is publicly 
>>> available, and which I can check?
>> 
>> I am not aware of public access to the Open Exchange AG / Dovecot OY 
>> issue tracker. I guess that is a perk that comes with buying commercial 
>> support.
> 
> This issue is in our issue tracker. Michal, can you post your doveconf -n?
> 
> Aki

Hi Aki,

Sorry for a delay in responding. Please find my config below. 

#
#
#

# 2.3.5.1 (7ec6d0ade): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.5 (2483b085)
# OS: OpenBSD 6.5 amd64
# Hostname: smtp.example.com
auth_cache_size = 10 M
auth_verbose = yes
base_dir = /var/dovecot/
default_vsz_limit = 128 M
first_valid_uid = 1000
hostname = mail.example.com
imap_client_workarounds = delay-newmail tb-extra-mailbox-sep tb-lsub-flags
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
lmtp_rcpt_check_quota = yes
lmtp_save_to_detail_mailbox = yes
login_greeting = Server Ready.
mail_attribute_dict = file:%h/.dovecot-attributes
mail_location = mbox:~/mail:INBOX=/var/mail/%u
mail_plugins = " quota"
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 index ihave duplicate 
mime foreverypart extracttext imapsieve vnd.dovecot.imapsieve
mbox_write_locks = fcntl
mmap_disable = yes
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox "Sent Messages" {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  mailbox postpond {
special_use = \Drafts
  }
  mailbox sent {
special_use = \Sent
  }
  prefix =
}
passdb {
  driver = bsdauth
}
plugin {
  imapsieve_mailbox1_before = 
file:/usr/local/lib/dovecot/sieve-pipe/report-spam.sieve
  imapsieve_mailbox1_causes = COPY APPEND
  imapsieve_mailbox1_name = Junk
  imapsieve_mailbox2_before = 
file:/usr/local/lib/dovecot/sieve-pipe/report-ham.sieve
  imapsieve_mailbox2_causes = COPY
  imapsieve_mailbox2_from = Junk
  imapsieve_mailbox2_name = *
  imapsieve_url = sieve://127.0.0.1:4190
  quota = fs:Disk quota
  sieve = file:~/sieve;active=~/.dovecot.sieve
  sieve_default = /var/dovecot/sieve/default.sieve
  sieve_global = /var/dovecot/sieve/
  sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment
  sieve_pipe_bin_dir = /usr/local/lib/dovecot/sieve-pipe
  sieve_plugins = sieve_imapsieve sieve_extprograms
}
postmaster_address = postmas...@example.com
protocols = imap pop3 lmtp sieve
quota_full_tempfail = yes
service imap-login {
  service_count = 1
}
service managesieve-login {
  inet_listener sieve {
port = 4190
  }
}
service pop3 {
  process_limit = 16
}
ssl_cert = http://beautifulocean.org/



smime.p7s
Description: S/MIME cryptographic signature


Re: Dovecot LMTP rejecting mail from address with apostrophe

2019-06-15 Thread Aki Tuomi via dovecot


> On 15 June 2019 10:56 Daniel Lange via dovecot  wrote:
> 
>  
> Am 15.06.19 um 00:36 schrieb Michal Krzysztofowicz via dovecot:
> > Would you know if Dovecot project uses an issue tracker which is publicly 
> > available, and which I can check?
> 
> I am not aware of public access to the Open Exchange AG / Dovecot OY 
> issue tracker. I guess that is a perk that comes with buying commercial 
> support.

This issue is in our issue tracker. Michal, can you post your doveconf -n?

Aki


Re: Dovecot LMTP rejecting mail from address with apostrophe

2019-06-15 Thread Daniel Lange via dovecot

Am 15.06.19 um 00:36 schrieb Michal Krzysztofowicz via dovecot:

Would you know if Dovecot project uses an issue tracker which is publicly 
available, and which I can check?


I am not aware of public access to the Open Exchange AG / Dovecot OY 
issue tracker. I guess that is a perk that comes with buying commercial 
support.


Re: Dovecot LMTP rejecting mail from address with apostrophe

2019-06-14 Thread Michal Krzysztofowicz via dovecot


> On 14 Jun 2019, at 17:01, Daniel Lange  wrote:
> 
> Am 14.06.19 um 16:20 schrieb Michal Krzysztofowicz via dovecot:
>> Jun 14 11:57:34 atlantic smtpd[42606]: 21749fd12ac76b57 mda delivery 
>> evpid=56aed6237d6444a0 from= 
>> to= rcpt= user=me delay=0s 
>> result=PermFail stat=Error ("mail.lmtp: LMTP server error: 501 5.5.4 Invalid 
>> FROM: Invalid character in localpart")
> 
> That's essentially the same bug as mentioned in 
> <6386018f-22b2-9562-b5a2-36e81cbe2...@debian.org> (bounces on invalid UTF-8 
> in localpart) that got assigned DOP-1045. Dovecot LDA and LMTP should just 
> not care about remote address validity when delivering locally. It's not the 
> LDA's business.

Ah, thanks a lot for that. I was trying to find any information about that, but 
couldn’t really (perhaps my google-fu isn’t that great)!

Would you know if Dovecot project uses an issue tracker which is publicly 
available, and which I can check? I didn’t see Issues section on the GitHub 
page with the repo..

Thanks again!
Best Regards,
mike

-- 
Michal Krzysztofowicz
http://beautifulocean.org/



smime.p7s
Description: S/MIME cryptographic signature


Re: Dovecot LMTP rejecting mail from address with apostrophe

2019-06-14 Thread Daniel Lange via dovecot

Am 14.06.19 um 16:20 schrieb Michal Krzysztofowicz via dovecot:

Jun 14 11:57:34 atlantic smtpd[42606]: 21749fd12ac76b57 mda delivery evpid=56aed6237d6444a0 
from= to= rcpt= 
user=me delay=0s result=PermFail stat=Error ("mail.lmtp: LMTP server error: 501 5.5.4 Invalid FROM: 
Invalid character in localpart")


That's essentially the same bug as mentioned in 
<6386018f-22b2-9562-b5a2-36e81cbe2...@debian.org> (bounces on invalid 
UTF-8 in localpart) that got assigned DOP-1045. Dovecot LDA and LMTP 
should just not care about remote address validity when delivering 
locally. It's not the LDA's business.


Dovecot LMTP rejecting mail from address with apostrophe

2019-06-14 Thread Michal Krzysztofowicz via dovecot
Hi,

I have an OpenSMTPD / Dovecot installation on an OpenBSD server. I recently 
came across an issue where Dovecot LMTP would reject a message sent to a local 
user from an address which contains a single apostrophe (e.g. 
firstname.o'lastn...@example.com). Apparently apostrophe, as well as a number 
of other special characters, are valid characters in the local part of the 
email address (that's everything to the left of the @ character). 

The message I get in the logs is: 

Jun 14 11:57:34 atlantic smtpd[42606]: 21749fd12ac76b57 mda delivery 
evpid=56aed6237d6444a0 from= 
to= rcpt= user=me delay=0s result=PermFail 
stat=Error ("mail.lmtp: LMTP server error: 501 5.5.4 Invalid FROM: Invalid 
character in localpart")

where example.com is external domain and example.org is a local one. 

The part of the message: LMTP server error: 501 5.5.4 Invalid FROM: Invalid 
character in localpart is returned by dovecot-lmtp. I’ve had a brief look at 
the source code, and it seems the responsible code is somewhere inside 
src/lib-smtp/smtp-address.c and, if I understand the code correctly, the 
address parsing in actually done in src/lib-smtp/smtp-parser.c. 

My question is is there a configuration option, similar to auth_username_chars 
which lists valid characters in the email address, to stop Dovecot LMTP from 
rejecting such emails? or maybe you know another way of getting it to accept an 
email from such address? 

My dovecot version is:

$ dovecot --version
2.3.5.1 (7ec6d0ade)

And in case that makes any difference, I'm running OpenBSD 6.5 patched to 
005_libssl. 

Thanks!
Mike

-- 
Michal Krzysztofowicz
http://beautifulocean.org/



smime.p7s
Description: S/MIME cryptographic signature


Case sensitive problem for vacation with dovecot lmtp pigeonhole

2019-06-09 Thread kadafax--- via dovecot

Hi list,

This issue was raised here by John Fawcett on 12/02/19 but got no response.
So, as I'm facing the same issue, I would like to try again:

When using the vacation sieve extension, if I send an email to 
user.n...@mydomain.com it will work, but not to user.n...@mydomain.com. 
Is there a way to make the user part case insensitive so that the 
vacation auto-reply is fired whatever the way user part is written ?


doveconf -n output:

# 2.3.5.1 (7ec6d0ade): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.5 (2483b085)
# OS: Linux 3.10.0-957.5.1.el7.x86_64 x86_64 CentOS Linux release 
7.6.1810 (Core)  ext4

# Hostname: myserver.mydomain.com
auth_master_user_separator = *
auth_username_chars = 
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@*

auth_verbose = yes
debug_log_path = /var/log/dovecot-debug.log
default_client_limit = 10640
default_process_limit = 2128
default_vsz_limit = 0
hostname = mydomain.com
info_log_path = /var/log/dovecot.log
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
listen = *
log_path = /var/log/dovecot-error.log
login_greeting = Welcome
mail_gid = vmail
mail_location = maildir:/var/vmail/%Ln
mail_plugins = quota fts fts_lucene
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 index ihave duplicate mime foreverypart extracttext

namespace inbox {
  inbox = yes
  location = maildir:/var/vmail/%Ln
  mailbox Drafts {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Sent {
    auto = subscribe
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    auto = subscribe
    special_use = \Trash
  }
  prefix =
  type = private
}
passdb {
  args = /usr/local/etc/dovecot/deny-users
  deny = yes
  driver = passwd-file
}
passdb {
  args = /usr/local/etc/dovecot/master-users
  driver = passwd-file
  master = yes
  pass = yes
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
plugin {
  fts = lucene
  fts_autoindex = yes
  fts_lucene = whitespace_chars=@.
  quota = maildir:User quota
  quota_rule = *:storage=30GB
  quota_rule2 = Trash:storage=+200M
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=80%% quota-warning 80 %u
  sieve = /var/sieve-scripts/%Ln.sieve
  sieve_dir = /var/vmail/%Ln/home/sieve
}
postmaster_address = postmas...@mydomain.com
protocols = imap pop3 lmtp sieve sieve
quota_full_tempfail = yes
service auth-worker {
  user = $default_internal_user
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    mode = 0777
    user = vmail
  }
}
service imap-login {
  inet_listener imaps {
    port = 993
    ssl = yes
  }
  process_min_avail = 10
}
service imap {
  process_limit = 2128
}
service lmtp {
  executable = lmtp -L
  process_min_avail = 15
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
}
service pop3-login {
  inet_listener pop3s {
    port = 995
    ssl = yes
  }
}
service quota-warning {
  executable = script /usr/local/bin/quota-warning.sh
  user = nobody
}
ssl_cert = 

Re: testing dovecot LMTP with postfix/spamassassin

2019-03-17 Thread Aki Tuomi via dovecot


 
 
  
   
  
  
   
On 17 March 2019 13:30 Eduardo M KALINOWSKI via dovecot <
dovecot@dovecot.org> wrote:
   
   

   
   

   
   
On 16/03/2019 11:49, Marek Kozlowski via dovecot wrote:
   
   

 Can I test local mail delivery by dovecot LMTP manually? I mean: to


 simulate "I'm the Postfix" and produce for some testing e-mail the


 same effect as postfix granting it via `local_transport' to dovecot?

   
   
You can probably use swaks for that, it has LMTP support.
   
   

   
   

   
   
--
   
   
You canna change the laws of physics, Captain; I've got to have thirty minutes!
   
   

   
   
Eduardo M KALINOWSKI
   
   
edua...@kalinowski.com.br
   
  
  
   socat stdio unix-connect:/path/to/socket
  
  
   ---
Aki Tuomi
   
 



Re: testing dovecot LMTP with postfix/spamassassin

2019-03-17 Thread Eduardo M KALINOWSKI via dovecot
On 16/03/2019 11:49, Marek Kozlowski via dovecot wrote:
> Can I test local mail delivery by dovecot LMTP manually? I mean: to
> simulate "I'm the Postfix" and produce for some testing e-mail the
> same effect as postfix granting it via `local_transport' to dovecot?
>
You can probably use swaks for that, it has LMTP support.


-- 
You canna change the laws of physics, Captain; I've got to have thirty minutes!

Eduardo M KALINOWSKI
edua...@kalinowski.com.br



Re: testing dovecot LMTP with postfix/spamassassin

2019-03-17 Thread Yassine Chaouche via dovecot

On 3/17/19 11:59 AM, Yassine Chaouche via dovecot wrote:

On 3/17/19 11:10 AM, Marek Kozlowski via dovecot wrote:


Thank you but...
Please mind that I'm planning to use dovecot LMTP rather than LDA.

Best regards,
Marek 


There's /usr/lib/dovecot/lmtp too

Yassine.


Here's a bad example :

root@messagerie[10.10.10.19] ~ # /usr/lib/dovecot/lmtp
220 messagerie.algerian-radio.dz Dovecot ready.
Info: Connect from local
EHLO
502 5.5.2 Unknown command
HELO
502 5.5.2 Unknown command
LHLO localhost
250-messagerie.algerian-radio.dz
250-8BITMIME
250-ENHANCEDSTATUSCODES
250 PIPELINING
TO:a.chaouche
502 5.5.2 Unknown command
MAIL FROM:ush...@us.gov
501 5.5.4 Invalid parameters
MAIL FROM:
250 2.1.0 OK
RCPT TO:a.chaou...@algerian-radio.dz
501 5.5.4 Invalid parameters
RCPT TO:
250 2.1.5 OK
DATA
354 OK
Subject: Just a test

This is the body of the mail

.
lmtp(11746, a.chaou...@algerian-radio.dz): Info: copy from : 
box=INBOX, uid=12210, msgid=, from=, subject=Just a test
lmtp(11746, a.chaou...@algerian-radio.dz): Info: dzRBHgkqjlziLQAArJM0yg: 
sieve: <>:Just a test stored mail into mailbox 'INBOX'

250 2.0.0  dzRBHgkqjlziLQAArJM0yg Saved


It's missing a lot of important fields I guess, but it made it to my 
inbox ^^'





Re: testing dovecot LMTP with postfix/spamassassin

2019-03-17 Thread Yassine Chaouche via dovecot

On 3/17/19 11:10 AM, Marek Kozlowski via dovecot wrote:


Thank you but...
Please mind that I'm planning to use dovecot LMTP rather than LDA.

Best regards,
Marek 


There's /usr/lib/dovecot/lmtp too

Yassine.



Re: testing dovecot LMTP with postfix/spamassassin

2019-03-17 Thread Marek Kozlowski via dovecot

:-)

On 3/17/19 10:22 AM, Yassine Chaouche via dovecot wrote:


On 3/16/19 3:49 PM, Marek Kozlowski via dovecot wrote:
Can I test local mail delivery by dovecot LMTP manually? I mean: to 
simulate "I'm the Postfix" and produce for some testing e-mail the 
same effect as postfix granting it via `local_transport' to dovecot?



You can use dovecot-lda like this :

cat <
[...]

Thank you but...
Please mind that I'm planning to use dovecot LMTP rather than LDA.

Best regards,
Marek



smime.p7s
Description: S/MIME Cryptographic Signature


Re: testing dovecot LMTP with postfix/spamassassin

2019-03-17 Thread Yassine Chaouche via dovecot



On 3/16/19 3:49 PM, Marek Kozlowski via dovecot wrote:
Can I test local mail delivery by dovecot LMTP manually? I mean: to 
simulate "I'm the Postfix" and produce for some testing e-mail the 
same effect as postfix granting it via `local_transport' to dovecot?


Best regards,
Marek


You can use dovecot-lda like this :

cat <

testing dovecot LMTP with postfix/spamassassin

2019-03-16 Thread Marek Kozlowski via dovecot

:-)
My postfix configuration is quite complex with a lot of special cases 
and rules. However I'd like to make an anti-spam configuration as simple 
and lightweight as possible (KISS).


/etc/postfix/master.cf

smtp  inet  n   -   n   -   -   smtpd
  -o content_filter=spamassassin

spamassassin unix - n   n   -   -   pipe
  user=nobody argv=/usr/bin/vendor_perl/spamc -e /usr/sbin/sendmail -oi 
-f ${sender} ${recipient}



then the simplest sieve rule I can think of:

require "fileinto";
if header :contains "X-Spam-Flag" "YES" {
  fileinto "Spam";
}


I'd like to make this rule active for only local deliveries via dovecot 
LMTP with sieve plugin and setting postfix `mailbox_transport' to 
dovecot LMTP.


I believe it is so simple it should work (am I wrong?). But...
It would be more convenient to do some tests before applying changes to 
a production environment config. The problem is: I have no separate 
testing environment with my strange configuration I'm able to test a 
spamassassin score for an e-mail manually. How about dovecot LMTP? Can I 
test local mail delivery by dovecot LMTP manually? I mean: to simulate 
"I'm the Postfix" and produce for some testing e-mail the same effect as 
postfix granting it via `local_transport' to dovecot?


Best regards,
Marek



smime.p7s
Description: S/MIME Cryptographic Signature


Fwd: dovecot/lmtp dumps core when proxying to multiple recipients via protocol=smtp

2019-02-19 Thread Piper Andreas via dovecot
Hello,

is there already any idea on this topic? Do you need additional information?

I would appreciate any input, as my migration scenario depends on this.

With many thanks and best regards,
Andreas

 Weitergeleitete Nachricht 
Betreff: dovecot/lmtp dumps core when proxying to multiple recipients
via protocol=smtp
Datum: Thu, 14 Feb 2019 13:53:07 +0100
Von: Piper Andreas via dovecot 
Antwort an: Piper Andreas 
An: dovecot@dovecot.org

Hello,

when trying to set up a migration scenario from my old mailbox-servers
to my new dovecot-cluster, I get a coredump from dovecot/lmtp when
proxying mail-delivery to more than one recipient on the old mailbox-server.

My setup:

3 director-hosts (Debian stretch) are proxying to a pair of
replicator-hosts and during migration also to the old mailbox-server.
For migration the not-migrated user-addresses are included via a
passwd-file with entries like:

grte...@hrz.uni-marburg.de:::director_tag=hrz protocol=smtp user=grtest1
grte...@hrz.uni-marburg.de:::director_tag=hrz protocol=smtp user=grtest2
...

The director_tag points to the old mailbox-server, with 'protocol=smtp'
SMTP is used for delivery, as the old machine is not capable of LMTP.

The setup works fine for imap-proxying and for mail-delivery to single
recipients. But if a mail is addressed to more than one recipient, lmtp
produces a coredump after delivering to all recipients.

The error-message in the log is:

Feb 14 12:15:05 vhrzxxx dovecot[63861]: lmtp(64663): Connect from 127.0.0.1
Feb 14 12:15:05 vhrzxxx dovecot[63861]: lmtp(64663):
206UIrlNZVyX/AAAGwthQA: Sent message to  at 137.248.xxx.yyy:25:
250 2.0.0 x1EBF5Ro016092 Message accepted for delivery (1/2 at 79 ms)
Feb 14 12:15:05 vhrzxxx dovecot[63861]: lmtp(64663):
206UIrlNZVyX/AAAGwthQA: Sent message to  at 137.248.xxx.yyy:25:
250 2.0.0 x1EBF5Ro016092 Message accepted for delivery (2/2 at 79 ms)
Feb 14 12:15:05 vhrzxxx dovecot[63861]: lmtp(64663): Fatal: master:
service(lmtp): child 64663 killed with signal 11 (core dumped)

The backtrace from the coredump is:

Reading symbols from /usr/lib/dovecot/lmtp...(no debugging symbols
found)...done.
[New LWP 64663]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `dovecot/lmtp'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x7f347fc7a2c0 in ?? () from /usr/lib/dovecot/libdovecot.so.0
(gdb) bt full
#0  0x7f347fc7a2c0 in ?? () from /usr/lib/dovecot/libdovecot.so.0
No symbol table info available.
#1  0x7f347fc77d73 in smtp_client_command_fail_reply () from
/usr/lib/dovecot/libdovecot.so.0
No symbol table info available.
#2  0x7f347fc77fbe in smtp_client_commands_list_fail_reply () from
/usr/lib/dovecot/libdovecot.so.0
No symbol table info available.
#3  0x7f347fc7c8dc in smtp_client_connection_disconnect () from
/usr/lib/dovecot/libdovecot.so.0
No symbol table info available.
#4  0x7f347fc7cf19 in smtp_client_connection_unref () from
/usr/lib/dovecot/libdovecot.so.0
No symbol table info available.
#5  0x7f347fc7e35d in ?? () from /usr/lib/dovecot/libdovecot.so.0
No symbol table info available.
#6  0x7f347fd1f5d5 in io_loop_call_io () from
/usr/lib/dovecot/libdovecot.so.0
No symbol table info available.
#7  0x7f347fd20fd9 in io_loop_handler_run_internal () from
/usr/lib/dovecot/libdovecot.so.0
No symbol table info available.
#8  0x7f347fd1f6e6 in io_loop_handler_run () from
/usr/lib/dovecot/libdovecot.so.0
No symbol table info available.
#9  0x7f347fd1f8f8 in io_loop_run () from
/usr/lib/dovecot/libdovecot.so.0
No symbol table info available.
#10 0x7f347fc93d43 in master_service_run () from
/usr/lib/dovecot/libdovecot.so.0
No symbol table info available.
#11 0x5613fcbc1f70 in main ()
No symbol table info available.
(gdb)

doveconf -n gives:

# 2.3.4.1 (3c0b8769e): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.4 (60b0f48d)
# OS: Linux 4.9.0-8-amd64 x86_64 Debian 9.7
# Hostname: vhrzxxx.HRZ.Uni-Marburg.DE
auth_cache_negative_ttl = 0
auth_cache_size = 10 M
auth_master_user_separator = *
auth_worker_max_count = 1024
base_dir = /var/run/dovecot/
default_vsz_limit = 1 G
director_mail_servers = 172.25.1.93 172.25.1.95 137.248.xxx.yyy@hrz
137.248.xxx.zzz@staff 137.248.aaa.bbb@students
director_servers = 172.25.1.42:9090 172.25.1.41:9090 172.25.1.92:9090
director_username_hash = %Ln@%Ld
doveadm_password = # hidden, use -P to show it
doveadm_port = 12345
imap_max_line_length = 640 k
lmtp_proxy = yes
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 index ihave duplicate mime foreverypart extracttext
passdb {
  args = /etc/dovecot.deny
  deny = yes
  driver = passwd-file
}
passdb {
  args = /etc/dovecot/private/pa

dovecot/lmtp dumps core when proxying to multiple recipients via protocol=smtp

2019-02-14 Thread Piper Andreas via dovecot
Hello,

when trying to set up a migration scenario from my old mailbox-servers
to my new dovecot-cluster, I get a coredump from dovecot/lmtp when
proxying mail-delivery to more than one recipient on the old mailbox-server.

My setup:

3 director-hosts (Debian stretch) are proxying to a pair of
replicator-hosts and during migration also to the old mailbox-server.
For migration the not-migrated user-addresses are included via a
passwd-file with entries like:

grte...@hrz.uni-marburg.de:::director_tag=hrz protocol=smtp user=grtest1
grte...@hrz.uni-marburg.de:::director_tag=hrz protocol=smtp user=grtest2
...

The director_tag points to the old mailbox-server, with 'protocol=smtp'
SMTP is used for delivery, as the old machine is not capable of LMTP.

The setup works fine for imap-proxying and for mail-delivery to single
recipients. But if a mail is addressed to more than one recipient, lmtp
produces a coredump after delivering to all recipients.

The error-message in the log is:

Feb 14 12:15:05 vhrzxxx dovecot[63861]: lmtp(64663): Connect from 127.0.0.1
Feb 14 12:15:05 vhrzxxx dovecot[63861]: lmtp(64663):
206UIrlNZVyX/AAAGwthQA: Sent message to  at 137.248.xxx.yyy:25:
250 2.0.0 x1EBF5Ro016092 Message accepted for delivery (1/2 at 79 ms)
Feb 14 12:15:05 vhrzxxx dovecot[63861]: lmtp(64663):
206UIrlNZVyX/AAAGwthQA: Sent message to  at 137.248.xxx.yyy:25:
250 2.0.0 x1EBF5Ro016092 Message accepted for delivery (2/2 at 79 ms)
Feb 14 12:15:05 vhrzxxx dovecot[63861]: lmtp(64663): Fatal: master:
service(lmtp): child 64663 killed with signal 11 (core dumped)

The backtrace from the coredump is:

Reading symbols from /usr/lib/dovecot/lmtp...(no debugging symbols
found)...done.
[New LWP 64663]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `dovecot/lmtp'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x7f347fc7a2c0 in ?? () from /usr/lib/dovecot/libdovecot.so.0
(gdb) bt full
#0  0x7f347fc7a2c0 in ?? () from /usr/lib/dovecot/libdovecot.so.0
No symbol table info available.
#1  0x7f347fc77d73 in smtp_client_command_fail_reply () from
/usr/lib/dovecot/libdovecot.so.0
No symbol table info available.
#2  0x7f347fc77fbe in smtp_client_commands_list_fail_reply () from
/usr/lib/dovecot/libdovecot.so.0
No symbol table info available.
#3  0x7f347fc7c8dc in smtp_client_connection_disconnect () from
/usr/lib/dovecot/libdovecot.so.0
No symbol table info available.
#4  0x7f347fc7cf19 in smtp_client_connection_unref () from
/usr/lib/dovecot/libdovecot.so.0
No symbol table info available.
#5  0x7f347fc7e35d in ?? () from /usr/lib/dovecot/libdovecot.so.0
No symbol table info available.
#6  0x7f347fd1f5d5 in io_loop_call_io () from
/usr/lib/dovecot/libdovecot.so.0
No symbol table info available.
#7  0x7f347fd20fd9 in io_loop_handler_run_internal () from
/usr/lib/dovecot/libdovecot.so.0
No symbol table info available.
#8  0x7f347fd1f6e6 in io_loop_handler_run () from
/usr/lib/dovecot/libdovecot.so.0
No symbol table info available.
#9  0x7f347fd1f8f8 in io_loop_run () from
/usr/lib/dovecot/libdovecot.so.0
No symbol table info available.
#10 0x7f347fc93d43 in master_service_run () from
/usr/lib/dovecot/libdovecot.so.0
No symbol table info available.
#11 0x5613fcbc1f70 in main ()
No symbol table info available.
(gdb)

doveconf -n gives:

# 2.3.4.1 (3c0b8769e): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.4 (60b0f48d)
# OS: Linux 4.9.0-8-amd64 x86_64 Debian 9.7
# Hostname: vhrzxxx.HRZ.Uni-Marburg.DE
auth_cache_negative_ttl = 0
auth_cache_size = 10 M
auth_master_user_separator = *
auth_worker_max_count = 1024
base_dir = /var/run/dovecot/
default_vsz_limit = 1 G
director_mail_servers = 172.25.1.93 172.25.1.95 137.248.xxx.yyy@hrz
137.248.xxx.zzz@staff 137.248.aaa.bbb@students
director_servers = 172.25.1.42:9090 172.25.1.41:9090 172.25.1.92:9090
director_username_hash = %Ln@%Ld
doveadm_password = # hidden, use -P to show it
doveadm_port = 12345
imap_max_line_length = 640 k
lmtp_proxy = yes
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 index ihave duplicate mime foreverypart extracttext
passdb {
  args = /etc/dovecot.deny
  deny = yes
  driver = passwd-file
}
passdb {
  args = /etc/dovecot/private/passwd.masterusers
  driver = passwd-file
  master = yes
}
passdb {
  args = /etc/dovecot/dovecot-ldap.staff.conf.ext
  driver = ldap
  result_success = continue-ok
}
passdb {
  args = /etc/dovecot/migration/migrate-staff
  driver = passwd-file
  name = passdb_staff_query
}
passdb {
  args = /etc/dovecot/dovecot-ldap.students.conf.ext
  driver = ldap
  result_success = continue-ok
}
passdb {
  args = /etc/dovecot/migration/migrate-students
  dr

Re: dovecot lmtp thinks that "disk quota exceeded" is "internal error"

2018-11-13 Thread Arkadiusz Miśkiewicz
On 13/11/2018 21:07, Aki Tuomi wrote:
> 
>> On 13 November 2018 at 22:06 Arkadiusz Miśkiewicz  wrote:
>>
>>
>> On 13/11/2018 15:54, Arkadiusz Miśkiewicz wrote:
>>>
>>> 2.2.36 (not migrated to 2.3 yet) reports such problem:
>>>
>>>> Nov 13 15:50:58 mbox dovecot: lmtp(xxx): session=, 
>>>> Error: open(/var/mail/xxx/mailboxes.lock1bf6ad16b7b8b703) failed: Disk 
>>>> quota exceeded
>>>> Nov 13 15:50:58 mbox dovecot: lmtp(xxx): session=, 
>>>> Error: Couldn't create mailbox list lock /var/mail/xxx/mailboxes.lock: 
>>>> file_create_locked(/var/mail/xxx/mailboxes.lock) failed: safe_mkstemp(/var
>>>> /mail/xxx/mailboxes.lock) failed: Disk quota exceeded
>>>> Nov 13 15:50:58 mbox dovecot: lmtp(xxx): session=, 
>>>> msgid=: save failed to open mailbox 
>>>> INBOX.Spam: Internal error occurred. Refer to server log for more informat
>>>> ion. [2018-11-13 15:50:58]
>>>
>>> Looks a bug to me since disk exceeded is not a internal error. Shouldn't
>>> lmtp return over quota info instead of error?
>>>
>>
>> Just to confirm - dovecot 2.3.3 - the same behaviour, internal error
>>
>> -- 
>> Arkadiusz Miśkiewicz, arekm / ( maven.pl | pld-linux.org )
> 
> Are you using quota:fs?

Yes.

I remember there was some similar problem and solution/workaround was to
keep CONTROL= files on non-quota parition.

> Aki


-- 
Arkadiusz Miśkiewicz, arekm / ( maven.pl | pld-linux.org )


Re: dovecot lmtp thinks that "disk quota exceeded" is "internal error"

2018-11-13 Thread Arkadiusz Miśkiewicz
On 13/11/2018 21:07, Sami Ketola wrote:
> 
> 
>> On 13 Nov 2018, at 21.06, Arkadiusz Miśkiewicz  wrote:
>>
>> On 13/11/2018 15:54, Arkadiusz Miśkiewicz wrote:
>>>
>>> 2.2.36 (not migrated to 2.3 yet) reports such problem:
>>>
>>>> Nov 13 15:50:58 mbox dovecot: lmtp(xxx): session=, 
>>>> Error: open(/var/mail/xxx/mailboxes.lock1bf6ad16b7b8b703) failed: Disk 
>>>> quota exceeded
>>>> Nov 13 15:50:58 mbox dovecot: lmtp(xxx): session=, 
>>>> Error: Couldn't create mailbox list lock /var/mail/xxx/mailboxes.lock: 
>>>> file_create_locked(/var/mail/xxx/mailboxes.lock) failed: safe_mkstemp(/var
>>>> /mail/xxx/mailboxes.lock) failed: Disk quota exceeded
>>>> Nov 13 15:50:58 mbox dovecot: lmtp(xxx): session=, 
>>>> msgid=: save failed to open mailbox 
>>>> INBOX.Spam: Internal error occurred. Refer to server log for more informat
>>>> ion. [2018-11-13 15:50:58]
>>>
>>> Looks a bug to me since disk exceeded is not a internal error. Shouldn't
>>> lmtp return over quota info instead of error?
>>>
>>
>> Just to confirm - dovecot 2.3.3 - the same behaviour, internal error
> 
> Dovecot can't create the lock file and it's treated as internal error. Why do 
> you think that it should not be treated as such?

Dovecot knows it's over quota error and can report that way. Just like
it reports other over quota conditions.

> Sami


-- 
Arkadiusz Miśkiewicz, arekm / ( maven.pl | pld-linux.org )


Re: dovecot lmtp thinks that "disk quota exceeded" is "internal error"

2018-11-13 Thread Sami Ketola



> On 13 Nov 2018, at 21.06, Arkadiusz Miśkiewicz  wrote:
> 
> On 13/11/2018 15:54, Arkadiusz Miśkiewicz wrote:
>> 
>> 2.2.36 (not migrated to 2.3 yet) reports such problem:
>> 
>>> Nov 13 15:50:58 mbox dovecot: lmtp(xxx): session=, 
>>> Error: open(/var/mail/xxx/mailboxes.lock1bf6ad16b7b8b703) failed: Disk 
>>> quota exceeded
>>> Nov 13 15:50:58 mbox dovecot: lmtp(xxx): session=, 
>>> Error: Couldn't create mailbox list lock /var/mail/xxx/mailboxes.lock: 
>>> file_create_locked(/var/mail/xxx/mailboxes.lock) failed: safe_mkstemp(/var
>>> /mail/xxx/mailboxes.lock) failed: Disk quota exceeded
>>> Nov 13 15:50:58 mbox dovecot: lmtp(xxx): session=, 
>>> msgid=: save failed to open mailbox 
>>> INBOX.Spam: Internal error occurred. Refer to server log for more informat
>>> ion. [2018-11-13 15:50:58]
>> 
>> Looks a bug to me since disk exceeded is not a internal error. Shouldn't
>> lmtp return over quota info instead of error?
>> 
> 
> Just to confirm - dovecot 2.3.3 - the same behaviour, internal error

Dovecot can't create the lock file and it's treated as internal error. Why do 
you think that it should not be treated as such?

Sami

Re: dovecot lmtp thinks that "disk quota exceeded" is "internal error"

2018-11-13 Thread Aki Tuomi


> On 13 November 2018 at 22:06 Arkadiusz Miśkiewicz  wrote:
> 
> 
> On 13/11/2018 15:54, Arkadiusz Miśkiewicz wrote:
> > 
> > 2.2.36 (not migrated to 2.3 yet) reports such problem:
> > 
> >> Nov 13 15:50:58 mbox dovecot: lmtp(xxx): session=, 
> >> Error: open(/var/mail/xxx/mailboxes.lock1bf6ad16b7b8b703) failed: Disk 
> >> quota exceeded
> >> Nov 13 15:50:58 mbox dovecot: lmtp(xxx): session=, 
> >> Error: Couldn't create mailbox list lock /var/mail/xxx/mailboxes.lock: 
> >> file_create_locked(/var/mail/xxx/mailboxes.lock) failed: safe_mkstemp(/var
> >> /mail/xxx/mailboxes.lock) failed: Disk quota exceeded
> >> Nov 13 15:50:58 mbox dovecot: lmtp(xxx): session=, 
> >> msgid=: save failed to open mailbox 
> >> INBOX.Spam: Internal error occurred. Refer to server log for more informat
> >> ion. [2018-11-13 15:50:58]
> > 
> > Looks a bug to me since disk exceeded is not a internal error. Shouldn't
> > lmtp return over quota info instead of error?
> > 
> 
> Just to confirm - dovecot 2.3.3 - the same behaviour, internal error
> 
> -- 
> Arkadiusz Miśkiewicz, arekm / ( maven.pl | pld-linux.org )

Are you using quota:fs?

Aki


Re: dovecot lmtp thinks that "disk quota exceeded" is "internal error"

2018-11-13 Thread Arkadiusz Miśkiewicz
On 13/11/2018 15:54, Arkadiusz Miśkiewicz wrote:
> 
> 2.2.36 (not migrated to 2.3 yet) reports such problem:
> 
>> Nov 13 15:50:58 mbox dovecot: lmtp(xxx): session=, 
>> Error: open(/var/mail/xxx/mailboxes.lock1bf6ad16b7b8b703) failed: Disk quota 
>> exceeded
>> Nov 13 15:50:58 mbox dovecot: lmtp(xxx): session=, 
>> Error: Couldn't create mailbox list lock /var/mail/xxx/mailboxes.lock: 
>> file_create_locked(/var/mail/xxx/mailboxes.lock) failed: safe_mkstemp(/var
>> /mail/xxx/mailboxes.lock) failed: Disk quota exceeded
>> Nov 13 15:50:58 mbox dovecot: lmtp(xxx): session=, 
>> msgid=: save failed to open mailbox 
>> INBOX.Spam: Internal error occurred. Refer to server log for more informat
>> ion. [2018-11-13 15:50:58]
> 
> Looks a bug to me since disk exceeded is not a internal error. Shouldn't
> lmtp return over quota info instead of error?
> 

Just to confirm - dovecot 2.3.3 - the same behaviour, internal error

-- 
Arkadiusz Miśkiewicz, arekm / ( maven.pl | pld-linux.org )


dovecot lmtp thinks that "disk quota exceeded" is "internal error"

2018-11-13 Thread Arkadiusz Miśkiewicz


2.2.36 (not migrated to 2.3 yet) reports such problem:

> Nov 13 15:50:58 mbox dovecot: lmtp(xxx): session=, 
> Error: open(/var/mail/xxx/mailboxes.lock1bf6ad16b7b8b703) failed: Disk quota 
> exceeded
> Nov 13 15:50:58 mbox dovecot: lmtp(xxx): session=, 
> Error: Couldn't create mailbox list lock /var/mail/xxx/mailboxes.lock: 
> file_create_locked(/var/mail/xxx/mailboxes.lock) failed: safe_mkstemp(/var
> /mail/xxx/mailboxes.lock) failed: Disk quota exceeded
> Nov 13 15:50:58 mbox dovecot: lmtp(awypior): 
> session=, 
> msgid=: save failed to open mailbox 
> INBOX.Spam: Internal error occurred. Refer to server log for more informat
> ion. [2018-11-13 15:50:58]

Looks a bug to me since disk exceeded is not a internal error. Shouldn't
lmtp return over quota info instead of error?

-- 
Arkadiusz Miśkiewicz, arekm / ( maven.pl | pld-linux.org )


Re: dovecot lmtp and drop privileges to specific user

2018-07-23 Thread Aki Tuomi



On 21.07.2018 13:04, Christos Chatzaras wrote:
> Is it possible when dovecot LMTP to drop privileges to a specific user 
> instead of the e-mail account user?

Yes. You can use

protocol lda {
  userdb {
    driver = static
    args = uid=whatever gid=whoever
  }
}

Aki




dovecot lmtp and drop privileges to specific user

2018-07-21 Thread Christos Chatzaras
Is it possible when dovecot LMTP to drop privileges to a specific user instead 
of the e-mail account user?

Dovecot LMTP rejects all users as non-existent

2018-03-09 Thread Alexander Harm
I'm running Dovecot 2.2.27 (c0f36b0) on Debian Stretch and I'm having
some trouble with LMTP delivery from Postfix to Dovecot.

The message in the logs is

Mar  9 09:21:19 mail postfix/smtpd[3295]: NOQUEUE: reject: RCPT from
some.mail.server[1.2.3.4]: 450 4.1.1 : Recipient
address rejected: unverified address: host
my.mail.server[private/dovecot-lmtp] said: 550 5.1.1 
User doesn't exist: user@my.domain (in reply to RCPT TO command);
from= to= proto=ESMTP
helo=

However, testing my installation with doveadm works fine:

doveadm user -u user@my.domain
userdb: user@my.domain
  user  : user@my.domain
  uid   : 5000
  gid   : 5000
  home  : /srv/mail/vhosts/my.domain/user

doveadm auth test user@my.domain
passdb: user@my.domain auth succeeded

I'm using a static userdb and a ldap passdb:

# /etc/dovecot/conf.d/auth-ldap.conf.ext

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

userdb {
  driver = static
  args = uid=vmail gid=vmail home=/srv/mail/vhosts/%d/%n
}

And my LDAP config reads like this

# /etc/dovecot/dovecot-ldap.conf.ext

uris = ldap://127.0.0.1
dn = uid=dovecot,ou=services,dc=my,dc=domain
dnpass = *
auth_bind = yes
auth_bind_userdn = cn=%u,ou=mail,dc=my,dc=domain
ldap_version = 3
base = ou=mail,dc=querco,dc=org
deref = never
scope = onelevel
user_attrs =
user_filter =
(&(objectclass=PostfixBookMailAccount)(mailEnabled=TRUE)(cn=%u))
pass_attrs = cn=user,userPassword=password
pass_filter =
(&(objectclass=PostfixBookMailAccount)(mailEnabled=TRUE)(cn=%u))
iterate_attrs = cn=user
iterate_filter = (&(objectclass=PostfixBookMailAccount)(mailEnabled=TRUE))

Sending the mail straight to user@my.domain works. Sending it to another
alias works as well. Is there some caching problem and if so how to
delete the cache (reboot didn't work)?

Any pointers are highly appreciated.



Re: Dovecot lmtp doesn't log

2017-12-04 Thread Stephan Bosch



Op 4-12-2017 om 11:08 schreef Tomislav Perisic:
Im sure because dovecot from server A takes the email from the MTA and 
proxies it to the dovecot on server B that doesnt have an MTA.


Right. Forgot about that part.

Regards,

Stephan.

On 4 Dec 2017 10:54, "Stephan Bosch" <mailto:s.bo...@ox.io>> wrote:




Op 1-12-2017 om 15:30 schreef Tomislav Perisic:

Hi,

Thanks for replying.

initially logging was done via syslog, and the custom log file
for mail.* facility was /var/log/maillog. Everything was
logged normally (dovecot login logouts, sieve scripts, extra
debugging lines) but nothing regarding LMTP. I would receive
the email in my inbox but I wouldnt be able to see anything in
the logs regarding this. After that i turned off syslog and
used the direct dovecot logging to a separate file. Again, it
was logging everything except of LMTP (mail debug is turned on).

Does anyone have a working configuration regarding this that
they don't have a problem with LMTP logging? If yes could you
please send me your config and dovecot version to compare.

Or if anyone has any other ideas.


    Are you sure Dovecot LMTP  is even being used? Your MTA may be
delivering messages directly, without involving Dovecot. Check the
MTA logs.






Re: Dovecot lmtp doesn't log

2017-12-04 Thread Tomislav Perisic
Im sure because dovecot from server A takes the email from the MTA and
proxies it to the dovecot on server B that doesnt have an MTA.

On 4 Dec 2017 10:54, "Stephan Bosch"  wrote:

>
>
> Op 1-12-2017 om 15:30 schreef Tomislav Perisic:
>
>> Hi,
>>
>> Thanks for replying.
>>
>> initially logging was done via syslog, and the custom log file for mail.*
>> facility was /var/log/maillog. Everything was logged normally (dovecot
>> login logouts, sieve scripts, extra debugging lines) but nothing regarding
>> LMTP. I would receive the email in my inbox but I wouldnt be able to see
>> anything in the logs regarding this. After that i turned off syslog and
>> used the direct dovecot logging to a separate file. Again, it was logging
>> everything except of LMTP (mail debug is turned on).
>>
>> Does anyone have a working configuration regarding this that they don't
>> have a problem with LMTP logging? If yes could you please send me your
>> config and dovecot version to compare.
>>
>> Or if anyone has any other ideas.
>>
>>
> Are you sure Dovecot LMTP  is even being used? Your MTA may be delivering
> messages directly, without involving Dovecot. Check the MTA logs.
>
> Regards,
>
> Stephan.
>
> Thank you.
>>
>>
>> On Thu, Nov 30, 2017 at 2:34 PM, Stephan Bosch > s.bo...@ox.io>> wrote:
>>
>>
>>
>> Op 25-11-2017 om 13:00 schreef Tomislav Perisic:
>>
>> Does anyone have any idea regarding this?
>>
>> On 17 Nov 2017 11:36, "Tomislav Perisic"
>> mailto:tomiperi...@gmail.com>> wrote:
>>
>> Hi,
>>
>> We have 2 servers, server A and server B.
>>
>> Server A has:
>>
>> Postfix
>> dovecot-2.2.33.2-1.el6.x86_64
>>
>> Server B has:
>>
>> dovecot-2.2.33.2-1.el6.x86_64
>> dovecot-pigeonhole-2.2.33.2-1.el6.x86_64
>>
>> Server A receives email on postfix, dovecot then takes that
>> email from
>> postfix and proxies it to Server B Dovecot. Dovecot on Server
>> B takes the
>> proxied email and delivers it with lmtp to the user inboxes.
>>
>> The problem is that the dovecot on server B Doesn't log
>> anything regarding
>> the emails that are being delivered to the mailbox via lmtp.
>>
>> Dovecot on server A logs everything perfectly regarding the
>> proxy, so my
>> assumption is that there is an issue with Dovecot lmtp
>> logging. We changed
>> the logging from syslog directly to a file and we noticed the
>> same problem,
>> missing log entries.
>>
>> We also tried turning on verbose logging and it didn't help.
>>
>>
>> Are you sure you're looking in the right place?
>>
>> You can find out where logs are written using `doveadm log find`.
>>
>> Especially with mail_debug enabled, you should see a lot of log
>> messages for an LMTP delivery.
>>
>> Regards,
>>
>> Stephan.
>>
>>
>>
>> Server B:
>>
>> Red Hat  6.7 x86_64
>>
>> rpm -qa | grep dove
>> dovecot-2.2.33.2-1.el6.x86_64
>> dovecot-pigeonhole-2.2.33.2-1.el6.x86_64
>>
>> doveconf -n
>>
>> # 2.2.33.2 <http://2.2.33.2>: /etc/dovecot/dovecot.conf
>> # Pigeonhole version 0.4.21
>> auth_cache_negative_ttl = 0
>> auth_debug = yes
>> auth_debug_passwords = yes
>> auth_verbose = yes
>> listen = *
>> mail_debug = yes
>> mail_gid = mail
>> mail_location = maildir:~/Maildir
>> mail_plugins = " quota zlib"
>> mail_uid = vmail
>> managesieve_notify_capability = mailto
>>
>> namespace inbox {
>>inbox = yes
>>location =
>>mailbox Drafts {
>>  auto = subscribe
>>  special_use = \Drafts
>>}
>>mailbox Sent {
>>  auto = subscribe
>>  special_use = \Sent
>>}
>>mailbox Spam {
>>  auto = subscribe
>>  special_use = \Junk
>>}
>>mailbox Trash {
>>  auto = subscribe
>>  special_us

Re: Dovecot lmtp doesn't log

2017-12-04 Thread Stephan Bosch



Op 1-12-2017 om 15:30 schreef Tomislav Perisic:

Hi,

Thanks for replying.

initially logging was done via syslog, and the custom log file for 
mail.* facility was /var/log/maillog. Everything was logged normally 
(dovecot login logouts, sieve scripts, extra debugging lines) but 
nothing regarding LMTP. I would receive the email in my inbox but I 
wouldnt be able to see anything in the logs regarding this. After that 
i turned off syslog and used the direct dovecot logging to a separate 
file. Again, it was logging everything except of LMTP (mail debug is 
turned on).


Does anyone have a working configuration regarding this that they 
don't have a problem with LMTP logging? If yes could you please send 
me your config and dovecot version to compare.


Or if anyone has any other ideas.



Are you sure Dovecot LMTP  is even being used? Your MTA may be 
delivering messages directly, without involving Dovecot. Check the MTA logs.


Regards,

Stephan.


Thank you.


On Thu, Nov 30, 2017 at 2:34 PM, Stephan Bosch <mailto:s.bo...@ox.io>> wrote:




Op 25-11-2017 om 13:00 schreef Tomislav Perisic:

Does anyone have any idea regarding this?

On 17 Nov 2017 11:36, "Tomislav Perisic"
mailto:tomiperi...@gmail.com>> wrote:

Hi,

We have 2 servers, server A and server B.

Server A has:

Postfix
dovecot-2.2.33.2-1.el6.x86_64

Server B has:

dovecot-2.2.33.2-1.el6.x86_64
dovecot-pigeonhole-2.2.33.2-1.el6.x86_64

Server A receives email on postfix, dovecot then takes that
email from
postfix and proxies it to Server B Dovecot. Dovecot on Server
B takes the
proxied email and delivers it with lmtp to the user inboxes.

The problem is that the dovecot on server B Doesn't log
anything regarding
the emails that are being delivered to the mailbox via lmtp.

Dovecot on server A logs everything perfectly regarding the
proxy, so my
assumption is that there is an issue with Dovecot lmtp
logging. We changed
the logging from syslog directly to a file and we noticed the
same problem,
missing log entries.

We also tried turning on verbose logging and it didn't help.


Are you sure you're looking in the right place?

You can find out where logs are written using `doveadm log find`.

Especially with mail_debug enabled, you should see a lot of log
messages for an LMTP delivery.

Regards,

Stephan.



Server B:

Red Hat  6.7 x86_64

rpm -qa | grep dove
dovecot-2.2.33.2-1.el6.x86_64
dovecot-pigeonhole-2.2.33.2-1.el6.x86_64

doveconf -n

# 2.2.33.2 <http://2.2.33.2>: /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21
auth_cache_negative_ttl = 0
auth_debug = yes
auth_debug_passwords = yes
auth_verbose = yes
listen = *
mail_debug = yes
mail_gid = mail
mail_location = maildir:~/Maildir
mail_plugins = " quota zlib"
mail_uid = vmail
managesieve_notify_capability = mailto

namespace inbox {
   inbox = yes
   location =
   mailbox Drafts {
     auto = subscribe
     special_use = \Drafts
   }
   mailbox Sent {
     auto = subscribe
     special_use = \Sent
   }
   mailbox Spam {
     auto = subscribe
     special_use = \Junk
   }
   mailbox Trash {
     auto = subscribe
     special_use = \Trash
   }
   mailbox Virus {
     auto = subscribe
   }

plugin {
   quota = maildir:User quota
   sieve_extensions = +editheader
   sieve_max_actions = 32
   sieve_max_redirects = 4
   sieve_max_script_size = 1M
   sieve_quota_max_scripts = 0
   sieve_trace_debug = yes
   sieve_trace_level = matching
   sieve_vacation_dont_check_recipient = yes
   sieve_vacation_send_from_recipient = yes
   sieve_vacation_use_original_recipient = yes
   zlib_save = gz
   zlib_save_level = 6
}
protocols = imap pop3 lmtp sieve
service auth {
   unix_listener auth-userdb {
     group = mail
     mode = 0666
     user = vmail
   }
}
service lmtp {
   inet_listener lmtp {
     port = xx
   }
}
service managesieve-login {
   inet_listener sieve {
     port = xx
   }
   service_count = 1
}

protocol lmtp {
   mail_plugins = " quota zlib sieve mail_log notify"
}
protocol imap {
   mail_plugins = " quota zlib imap_quota imap_zlib"

Re: Dovecot lmtp doesn't log

2017-12-01 Thread Thomas Leuxner
* Tomislav Perisic  2017.12.01 15:30:

> Does anyone have a working configuration regarding this that they don't
> have a problem with LMTP logging? If yes could you please send me your
> config and dovecot version to compare.
2.2.devel (904765b05):

# doveconf deliver_log_format syslog_facility
deliver_log_format = msgid=%m, time=%{delivery_time}ms, status=%$
syslog_facility = local1

rsyslog.conf:
local1.*-/var/log/dovecot/dovecot.log

local1.info   -/var/log/dovecot/dovecot.info
local1.warn   -/var/log/dovecot/dovecot.warn
local1.err/var/log/dovecot/dovecot.err
if ($syslogfacility-text=='local1') and ($programname=='dovecot') and\
($msg contains 'lmtp') and ($msg contains 'stored mail into mailbox')\
 then -/var/log/dovecot/dovecot.lmtp


signature.asc
Description: PGP signature


Re: Dovecot lmtp doesn't log

2017-12-01 Thread Tomislav Perisic
Hi,

Thanks for replying.

initially logging was done via syslog, and the custom log file for mail.*
facility was /var/log/maillog. Everything was logged normally (dovecot
login logouts, sieve scripts, extra debugging lines) but nothing regarding
LMTP. I would receive the email in my inbox but I wouldnt be able to see
anything in the logs regarding this. After that i turned off syslog and
used the direct dovecot logging to a separate file. Again, it was logging
everything except of LMTP (mail debug is turned on).

Does anyone have a working configuration regarding this that they don't
have a problem with LMTP logging? If yes could you please send me your
config and dovecot version to compare.

Or if anyone has any other ideas.

Thank you.


On Thu, Nov 30, 2017 at 2:34 PM, Stephan Bosch  wrote:

>
>
> Op 25-11-2017 om 13:00 schreef Tomislav Perisic:
>
>> Does anyone have any idea regarding this?
>>
>> On 17 Nov 2017 11:36, "Tomislav Perisic"  wrote:
>>
>> Hi,
>>
>> We have 2 servers, server A and server B.
>>
>> Server A has:
>>
>> Postfix
>> dovecot-2.2.33.2-1.el6.x86_64
>>
>> Server B has:
>>
>> dovecot-2.2.33.2-1.el6.x86_64
>> dovecot-pigeonhole-2.2.33.2-1.el6.x86_64
>>
>> Server A receives email on postfix, dovecot then takes that email from
>> postfix and proxies it to Server B Dovecot. Dovecot on Server B takes the
>> proxied email and delivers it with lmtp to the user inboxes.
>>
>> The problem is that the dovecot on server B Doesn't log anything regarding
>> the emails that are being delivered to the mailbox via lmtp.
>>
>> Dovecot on server A logs everything perfectly regarding the proxy, so my
>> assumption is that there is an issue with Dovecot lmtp logging. We changed
>> the logging from syslog directly to a file and we noticed the same
>> problem,
>> missing log entries.
>>
>> We also tried turning on verbose logging and it didn't help.
>>
>
> Are you sure you're looking in the right place?
>
> You can find out where logs are written using `doveadm log find`.
>
> Especially with mail_debug enabled, you should see a lot of log messages
> for an LMTP delivery.
>
> Regards,
>
> Stephan.
>
>
>
>> Server B:
>>
>> Red Hat  6.7 x86_64
>>
>> rpm -qa | grep dove
>> dovecot-2.2.33.2-1.el6.x86_64
>> dovecot-pigeonhole-2.2.33.2-1.el6.x86_64
>>
>> doveconf -n
>>
>> # 2.2.33.2: /etc/dovecot/dovecot.conf
>> # Pigeonhole version 0.4.21
>> auth_cache_negative_ttl = 0
>> auth_debug = yes
>> auth_debug_passwords = yes
>> auth_verbose = yes
>> listen = *
>> mail_debug = yes
>> mail_gid = mail
>> mail_location = maildir:~/Maildir
>> mail_plugins = " quota zlib"
>> mail_uid = vmail
>> managesieve_notify_capability = mailto
>>
>> namespace inbox {
>>inbox = yes
>>location =
>>mailbox Drafts {
>>  auto = subscribe
>>  special_use = \Drafts
>>}
>>mailbox Sent {
>>  auto = subscribe
>>  special_use = \Sent
>>}
>>mailbox Spam {
>>  auto = subscribe
>>  special_use = \Junk
>>}
>>mailbox Trash {
>>  auto = subscribe
>>  special_use = \Trash
>>}
>>mailbox Virus {
>>  auto = subscribe
>>}
>>
>> plugin {
>>quota = maildir:User quota
>>sieve_extensions = +editheader
>>sieve_max_actions = 32
>>sieve_max_redirects = 4
>>sieve_max_script_size = 1M
>>sieve_quota_max_scripts = 0
>>sieve_trace_debug = yes
>>sieve_trace_level = matching
>>sieve_vacation_dont_check_recipient = yes
>>sieve_vacation_send_from_recipient = yes
>>sieve_vacation_use_original_recipient = yes
>>zlib_save = gz
>>zlib_save_level = 6
>> }
>> protocols = imap pop3 lmtp sieve
>> service auth {
>>unix_listener auth-userdb {
>>  group = mail
>>  mode = 0666
>>  user = vmail
>>}
>> }
>> service lmtp {
>>inet_listener lmtp {
>>  port = xx
>>}
>> }
>> service managesieve-login {
>>inet_listener sieve {
>>  port = xx
>>}
>>service_count = 1
>> }
>>
>> protocol lmtp {
>>mail_plugins = " quota zlib sieve mail_log notify"
>> }
>> protocol imap {
>>mail_plugins = " quota zlib imap_quota imap_zlib"
>> }
>> protocol sieve {
>>managesieve_implementation_string = dovecot
>>managesieve_logout_format = bytes ( in=%i : out=%o )
>>managesieve_max_line_length = 65536
>>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
>> }
>>
>
>


Re: Dovecot lmtp doesn't log

2017-11-30 Thread Stephan Bosch



Op 25-11-2017 om 13:00 schreef Tomislav Perisic:

Does anyone have any idea regarding this?

On 17 Nov 2017 11:36, "Tomislav Perisic"  wrote:

Hi,

We have 2 servers, server A and server B.

Server A has:

Postfix
dovecot-2.2.33.2-1.el6.x86_64

Server B has:

dovecot-2.2.33.2-1.el6.x86_64
dovecot-pigeonhole-2.2.33.2-1.el6.x86_64

Server A receives email on postfix, dovecot then takes that email from
postfix and proxies it to Server B Dovecot. Dovecot on Server B takes the
proxied email and delivers it with lmtp to the user inboxes.

The problem is that the dovecot on server B Doesn't log anything regarding
the emails that are being delivered to the mailbox via lmtp.

Dovecot on server A logs everything perfectly regarding the proxy, so my
assumption is that there is an issue with Dovecot lmtp logging. We changed
the logging from syslog directly to a file and we noticed the same problem,
missing log entries.

We also tried turning on verbose logging and it didn't help.


Are you sure you're looking in the right place?

You can find out where logs are written using `doveadm log find`.

Especially with mail_debug enabled, you should see a lot of log messages 
for an LMTP delivery.


Regards,

Stephan.



Server B:

Red Hat  6.7 x86_64

rpm -qa | grep dove
dovecot-2.2.33.2-1.el6.x86_64
dovecot-pigeonhole-2.2.33.2-1.el6.x86_64

doveconf -n

# 2.2.33.2: /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21
auth_cache_negative_ttl = 0
auth_debug = yes
auth_debug_passwords = yes
auth_verbose = yes
listen = *
mail_debug = yes
mail_gid = mail
mail_location = maildir:~/Maildir
mail_plugins = " quota zlib"
mail_uid = vmail
managesieve_notify_capability = mailto

namespace inbox {
   inbox = yes
   location =
   mailbox Drafts {
 auto = subscribe
 special_use = \Drafts
   }
   mailbox Sent {
 auto = subscribe
 special_use = \Sent
   }
   mailbox Spam {
 auto = subscribe
 special_use = \Junk
   }
   mailbox Trash {
 auto = subscribe
 special_use = \Trash
   }
   mailbox Virus {
 auto = subscribe
   }

plugin {
   quota = maildir:User quota
   sieve_extensions = +editheader
   sieve_max_actions = 32
   sieve_max_redirects = 4
   sieve_max_script_size = 1M
   sieve_quota_max_scripts = 0
   sieve_trace_debug = yes
   sieve_trace_level = matching
   sieve_vacation_dont_check_recipient = yes
   sieve_vacation_send_from_recipient = yes
   sieve_vacation_use_original_recipient = yes
   zlib_save = gz
   zlib_save_level = 6
}
protocols = imap pop3 lmtp sieve
service auth {
   unix_listener auth-userdb {
 group = mail
 mode = 0666
 user = vmail
   }
}
service lmtp {
   inet_listener lmtp {
 port = xx
   }
}
service managesieve-login {
   inet_listener sieve {
 port = xx
   }
   service_count = 1
}

protocol lmtp {
   mail_plugins = " quota zlib sieve mail_log notify"
}
protocol imap {
   mail_plugins = " quota zlib imap_quota imap_zlib"
}
protocol sieve {
   managesieve_implementation_string = dovecot
   managesieve_logout_format = bytes ( in=%i : out=%o )
   managesieve_max_line_length = 65536
   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
}




Re: [SPAMMY]Re: Dovecot LMTP Proxy + STARTTLS?

2017-11-26 Thread Stephan Bosch
Op 11/23/2017 om 8:44 PM schreef tobiswo...@gmail.com:
> Hi
>
> thanks for the link. Read that page before but somehow missed the
> comment about ssl+lmtp proxy :-)
>
> Are there any plans to implement that to dovecot in future?

Shouldn't be a problem for v2.3.

Regards,

Stephan.

> Regards
>
> tobi
>
> Am 23.11.2017 um 18:38 schrieb Carsten Rosenberg:
>> NOTE: LMTP/doveadm proxying doesn't support SSL/TLS currently - any 
>> ssl/starttls extra field is ignored
>>
>> https://wiki2.dovecot.org/PasswordDatabase/ExtraFields/Proxy
>>
>> Am 23. November 2017 09:31:41 MEZ schrieb Tobi :
>>> Hi
>>>
>>> I got dovecot 2.2.26 on a Centos7 with latest updates. Dovecot is
>>> configured to act as director and delivers to my two backend servers.
>>> I enabled lmtp proxy on director to listen on port 24.
>>>
>>> Now I see in msg headers that the connection to the lmtp proxy uses
>>> STARTTLS but the connection from proxy to backend seems to be
>>> unencrypted. Is it possible to enforce the use of STARTTLS in the
>>> connection from the director to the backend as well?
>>>
>>> Regards
>>>
>>> tobi



[SPAMMY]Re: Dovecot LMTP Proxy + STARTTLS?

2017-11-26 Thread Carsten Rosenberg
NOTE: LMTP/doveadm proxying doesn't support SSL/TLS currently - any 
ssl/starttls extra field is ignored

https://wiki2.dovecot.org/PasswordDatabase/ExtraFields/Proxy

Am 23. November 2017 09:31:41 MEZ schrieb Tobi :
>Hi
>
>I got dovecot 2.2.26 on a Centos7 with latest updates. Dovecot is
>configured to act as director and delivers to my two backend servers.
>I enabled lmtp proxy on director to listen on port 24.
>
>Now I see in msg headers that the connection to the lmtp proxy uses
>STARTTLS but the connection from proxy to backend seems to be
>unencrypted. Is it possible to enforce the use of STARTTLS in the
>connection from the director to the backend as well?
>
>Regards
>
>tobi


Re: Dovecot LMTP Proxy + STARTTLS?

2017-11-26 Thread Matt Bryant
Not according to dovecot doco ... from
https://wiki2.dovecot.org/PasswordDatabase/ExtraFields/Proxy

*NOTE: LMTP/doveadm proxying doesn't support SSL/TLS currently - any
ssl/starttls extra field is ignored

*rgds

Matt


> Tobi 
> 23 November 2017 at 6:31 pm
> Hi
>
> I got dovecot 2.2.26 on a Centos7 with latest updates. Dovecot is
> configured to act as director and delivers to my two backend servers.
> I enabled lmtp proxy on director to listen on port 24.
>
> Now I see in msg headers that the connection to the lmtp proxy uses
> STARTTLS but the connection from proxy to backend seems to be
> unencrypted. Is it possible to enforce the use of STARTTLS in the
> connection from the director to the backend as well?
>
> Regards
>
> tobi



Re: Dovecot lmtp doesn't log

2017-11-25 Thread Tomislav Perisic
Does anyone have any idea regarding this?

On 17 Nov 2017 11:36, "Tomislav Perisic"  wrote:

Hi,

We have 2 servers, server A and server B.

Server A has:

Postfix
dovecot-2.2.33.2-1.el6.x86_64

Server B has:

dovecot-2.2.33.2-1.el6.x86_64
dovecot-pigeonhole-2.2.33.2-1.el6.x86_64

Server A receives email on postfix, dovecot then takes that email from
postfix and proxies it to Server B Dovecot. Dovecot on Server B takes the
proxied email and delivers it with lmtp to the user inboxes.

The problem is that the dovecot on server B Doesn't log anything regarding
the emails that are being delivered to the mailbox via lmtp.

Dovecot on server A logs everything perfectly regarding the proxy, so my
assumption is that there is an issue with Dovecot lmtp logging. We changed
the logging from syslog directly to a file and we noticed the same problem,
missing log entries.

We also tried turning on verbose logging and it didn't help.

Server B:

Red Hat  6.7 x86_64

rpm -qa | grep dove
dovecot-2.2.33.2-1.el6.x86_64
dovecot-pigeonhole-2.2.33.2-1.el6.x86_64

doveconf -n

# 2.2.33.2: /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21
auth_cache_negative_ttl = 0
auth_debug = yes
auth_debug_passwords = yes
auth_verbose = yes
listen = *
mail_debug = yes
mail_gid = mail
mail_location = maildir:~/Maildir
mail_plugins = " quota zlib"
mail_uid = vmail
managesieve_notify_capability = mailto

namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
auto = subscribe
special_use = \Drafts
  }
  mailbox Sent {
auto = subscribe
special_use = \Sent
  }
  mailbox Spam {
auto = subscribe
special_use = \Junk
  }
  mailbox Trash {
auto = subscribe
special_use = \Trash
  }
  mailbox Virus {
auto = subscribe
  }

plugin {
  quota = maildir:User quota
  sieve_extensions = +editheader
  sieve_max_actions = 32
  sieve_max_redirects = 4
  sieve_max_script_size = 1M
  sieve_quota_max_scripts = 0
  sieve_trace_debug = yes
  sieve_trace_level = matching
  sieve_vacation_dont_check_recipient = yes
  sieve_vacation_send_from_recipient = yes
  sieve_vacation_use_original_recipient = yes
  zlib_save = gz
  zlib_save_level = 6
}
protocols = imap pop3 lmtp sieve
service auth {
  unix_listener auth-userdb {
group = mail
mode = 0666
user = vmail
  }
}
service lmtp {
  inet_listener lmtp {
port = xx
  }
}
service managesieve-login {
  inet_listener sieve {
port = xx
  }
  service_count = 1
}

protocol lmtp {
  mail_plugins = " quota zlib sieve mail_log notify"
}
protocol imap {
  mail_plugins = " quota zlib imap_quota imap_zlib"
}
protocol sieve {
  managesieve_implementation_string = dovecot
  managesieve_logout_format = bytes ( in=%i : out=%o )
  managesieve_max_line_length = 65536
  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
}


Re: [SPAMMY]Re: Dovecot LMTP Proxy + STARTTLS?

2017-11-23 Thread tobisworld
Hi

thanks for the link. Read that page before but somehow missed the
comment about ssl+lmtp proxy :-)

Are there any plans to implement that to dovecot in future?

Regards

tobi

Am 23.11.2017 um 18:38 schrieb Carsten Rosenberg:
> NOTE: LMTP/doveadm proxying doesn't support SSL/TLS currently - any 
> ssl/starttls extra field is ignored
> 
> https://wiki2.dovecot.org/PasswordDatabase/ExtraFields/Proxy
> 
> Am 23. November 2017 09:31:41 MEZ schrieb Tobi :
>> Hi
>>
>> I got dovecot 2.2.26 on a Centos7 with latest updates. Dovecot is
>> configured to act as director and delivers to my two backend servers.
>> I enabled lmtp proxy on director to listen on port 24.
>>
>> Now I see in msg headers that the connection to the lmtp proxy uses
>> STARTTLS but the connection from proxy to backend seems to be
>> unencrypted. Is it possible to enforce the use of STARTTLS in the
>> connection from the director to the backend as well?
>>
>> Regards
>>
>> tobi


Dovecot LMTP Proxy + STARTTLS?

2017-11-23 Thread Tobi
Hi

I got dovecot 2.2.26 on a Centos7 with latest updates. Dovecot is
configured to act as director and delivers to my two backend servers.
I enabled lmtp proxy on director to listen on port 24.

Now I see in msg headers that the connection to the lmtp proxy uses
STARTTLS but the connection from proxy to backend seems to be
unencrypted. Is it possible to enforce the use of STARTTLS in the
connection from the director to the backend as well?

Regards

tobi


Dovecot lmtp doesn't log

2017-11-17 Thread Tomislav Perisic
Hi,

We have 2 servers, server A and server B.

Server A has:

Postfix
dovecot-2.2.33.2-1.el6.x86_64

Server B has:

dovecot-2.2.33.2-1.el6.x86_64
dovecot-pigeonhole-2.2.33.2-1.el6.x86_64

Server A receives email on postfix, dovecot then takes that email from
postfix and proxies it to Server B Dovecot. Dovecot on Server B takes the
proxied email and delivers it with lmtp to the user inboxes.

The problem is that the dovecot on server B Doesn't log anything regarding
the emails that are being delivered to the mailbox via lmtp.

Dovecot on server A logs everything perfectly regarding the proxy, so my
assumption is that there is an issue with Dovecot lmtp logging. We changed
the logging from syslog directly to a file and we noticed the same problem,
missing log entries.

We also tried turning on verbose logging and it didn't help.

Server B:

Red Hat  6.7 x86_64

rpm -qa | grep dove
dovecot-2.2.33.2-1.el6.x86_64
dovecot-pigeonhole-2.2.33.2-1.el6.x86_64

doveconf -n

# 2.2.33.2: /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21
auth_cache_negative_ttl = 0
auth_debug = yes
auth_debug_passwords = yes
auth_verbose = yes
listen = *
mail_debug = yes
mail_gid = mail
mail_location = maildir:~/Maildir
mail_plugins = " quota zlib"
mail_uid = vmail
managesieve_notify_capability = mailto

namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
auto = subscribe
special_use = \Drafts
  }
  mailbox Sent {
auto = subscribe
special_use = \Sent
  }
  mailbox Spam {
auto = subscribe
special_use = \Junk
  }
  mailbox Trash {
auto = subscribe
special_use = \Trash
  }
  mailbox Virus {
auto = subscribe
  }

plugin {
  quota = maildir:User quota
  sieve_extensions = +editheader
  sieve_max_actions = 32
  sieve_max_redirects = 4
  sieve_max_script_size = 1M
  sieve_quota_max_scripts = 0
  sieve_trace_debug = yes
  sieve_trace_level = matching
  sieve_vacation_dont_check_recipient = yes
  sieve_vacation_send_from_recipient = yes
  sieve_vacation_use_original_recipient = yes
  zlib_save = gz
  zlib_save_level = 6
}
protocols = imap pop3 lmtp sieve
service auth {
  unix_listener auth-userdb {
group = mail
mode = 0666
user = vmail
  }
}
service lmtp {
  inet_listener lmtp {
port = xx
  }
}
service managesieve-login {
  inet_listener sieve {
port = xx
  }
  service_count = 1
}

protocol lmtp {
  mail_plugins = " quota zlib sieve mail_log notify"
}
protocol imap {
  mail_plugins = " quota zlib imap_quota imap_zlib"
}
protocol sieve {
  managesieve_implementation_string = dovecot
  managesieve_logout_format = bytes ( in=%i : out=%o )
  managesieve_max_line_length = 65536
  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
}


Re: Dovecot lmtp

2016-11-12 Thread Aki Tuomi

> On November 12, 2016 at 8:08 PM Peter Fraser  wrote:
> 
> 
> Hi All
> I am migrating from dovecot-1.x where I had LDA running
> to dovecot2-2.2.26.0_1 where I am trying to set up LMTP. I have enabled a
> TCP/IP socket .Setting below.
> service lmtp {
> inet_listener lmtp {
> address = 127.0.0.1
> port = 24
> }
> }
> 
> and put this additional entry in postfix
>  virtual_transport = lmtp:127.0.0.1:24
> 
> in 10-mail.conf my mail location is below
> mail_location=maildir:~/Maildir:INBOX=~/Maildir/:INDEX=~/Maildir/tmp/index
> 
> My problem is that when I enable lmtp, dovecot creates a new maildir at
> /home/vmail/u...@domain.com and delivers the email there in a Maildir
> instead of using the default one at /home/vmail/username
> 
> I researched it but I just can't seem to figure out why this is. I would
> really appreciate any help on this. Thanks in advance.

You probably have something like

mail_home=/home/vmail/%u

change that to 

mail_home=/home/vmail/%Ln # (lowercase username)

you can verify this with

doveadm user usern...@domain.com

Aki


Dovecot lmtp

2016-11-12 Thread Peter Fraser
Hi All
I am migrating from dovecot-1.x where I had LDA running
to dovecot2-2.2.26.0_1 where I am trying to set up LMTP. I have enabled a
TCP/IP socket .Setting below.
service lmtp {
inet_listener lmtp {
address = 127.0.0.1
port = 24
}
}

and put this additional entry in postfix
 virtual_transport = lmtp:127.0.0.1:24

in 10-mail.conf my mail location is below
mail_location=maildir:~/Maildir:INBOX=~/Maildir/:INDEX=~/Maildir/tmp/index

My problem is that when I enable lmtp, dovecot creates a new maildir at
/home/vmail/u...@domain.com and delivers the email there in a Maildir
instead of using the default one at /home/vmail/username

I researched it but I just can't seem to figure out why this is. I would
really appreciate any help on this. Thanks in advance.


Dovecot lmtp support for SMTPUTF8

2016-09-20 Thread Igor Colombi
Hello,

I'm using dovecot lmtp with Postfix.

I'm enabling SMTPUTF8 (EAI), but when Postfix (v 3.1.2) tries to deliver
the message to dovecot-lmtp it receive this error:

status=bounced (SMTPUTF8 is required, but was not offered by host
dlvmx.espsrv.net[private/dovecot-lmtp]

I'm not sure if Dovecot lda and lmpt support EAI and how can I enable it.
I've just found and old thread:

http://www.dovecot.org/list/dovecot/2013-January/087756.html

Thanks for your help.

--
Igor Colombi


Re: Dovecot-LMTP and LDAP: passdb doesn't support credential lookups

2016-03-30 Thread Sven Hartge
Niols  wrote:

> Here is my /etc/dovecot/conf.d/auth-ldap.conf.ext. I use the static
> driver for userdb, and the LDAP driver for passdb.

> passdb {
>   driver = ldap
>   args = /etc/dovecot/dovecot-ldap.conf.ext
> }

> userdb {
>   driver = static
>   args = uid=mail gid=mail home=/var/mail/%u
> }

My config:

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

userdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  default_fields = uid=virtmail gid=virtmail 
home=/srv/mail/%2NLn/%2.256NLn/%Ln/ quota_rule2=Trash:ignore
  driver = ldap
}

I also use ldap for the userdb, because I need to lookup the quota from
LDAP. 

> Here is my /etc/dovecot/dovecot-ldap.conf.ext file.

> hosts = localhost
> ldap_version = 3
> dn = cn=dovecot,ou=services,dc=niols,dc=fr
> dnpass = a-random-password

> auth_bind = yes
> base = ou=people,dc=niols,dc=fr

> pass_filter = (&(objectClass=inetOrgPerson)(mail=%u))

Here is my ldap.conf.ext, there is some elaborate filtering going on,
but you should get the idea:

hosts = ldap.somedomain.de
dn = cn=mailsystem,ou=systemuser,dc=somedomain,dc=de
dnpass = verySecurePassword
tls = yes
auth_bind = yes
ldap_version = 3
base = dc=somedomain,dc=de
deref = always
scope = subtree
user_attrs = =quota_rule=*:bytes=%{ldap:gifb-mailquota}
user_filter = 
(&(objectClass=gifb-mailperson)(ou=SomeLocation)(uid=%Ln)(!(objectClass=gifb-role)))
pass_attrs = uid=user,userPassword=password
pass_filter = 
(&(objectClass=gifb-mailperson)(ou=SomeLocation)(gifb-status=1)(uid=%n)(!(objectClass=gifb-role)))
iterate_attrs = uid=user
iterate_filter = (&(objectClass=gifb-mailperson)(ou=SomeLocation))

Grüße,
Sven.

-- 
Sigmentation fault. Core dumped.


Dovecot-LMTP and LDAP: passdb doesn't support credential lookups

2016-03-30 Thread Niols
Hello,

Sorry, this might be a newbish question, but I really can't get the
answer by myself.

I'm trying to setup a mail server using LDAP to authenticate users, and
I keep receiving the errors:

passdb doesn't support credential lookups
passdb doesn't support lookups, can't verify user's existence

when I send test mails to (existing) users.

I'm already using the LDAP server for other purposes, and it's working
fine. I can't (or I don't want to) give read access to the userPassword
attribute, so I want to use a authentication bind:

http://wiki.dovecot.org/AuthDatabase/LDAP/AuthBinds

I've already managed to have postfix working with this LDAP server, the
users (and their aliases) are correctly recognized. Postfix then sends
the mails to Dovecot (2.2.13, Debian Jessie's version) with dovecot-lmtp.

Here is my /etc/dovecot/conf.d/auth-ldap.conf.ext. I use the static
driver for userdb, and the LDAP driver for passdb.

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

userdb {
  driver = static
  args = uid=mail gid=mail home=/var/mail/%u
}

Here is my /etc/dovecot/dovecot-ldap.conf.ext file.

hosts = localhost
ldap_version = 3
dn = cn=dovecot,ou=services,dc=niols,dc=fr
dnpass = a-random-password

auth_bind = yes
base = ou=people,dc=niols,dc=fr

pass_filter = (&(objectClass=inetOrgPerson)(mail=%u))

I haven't set the user_filter and user_attrs values, since I thought
these would only be usefull for userdb. I haven't set the pass_attrs
value, since I don't see why it would be needed (I just need to be able
to bind my user, right?). I can't auth_bind_userdn since the e-mail
address aren't necessarily related in any way to the user dn. I assumed
%u was going to be replaced by the user's full e-mail address.

I tried to play a bit with these values to find a working configuration,
without success. I tried to search myself on the LDAP server, using the
provided dn and dnpass, and I succeeded. I tried to activate debug logs,
but that didn't give me much more information (full debug log at the end
of this e-mail).

I think the problem is that passdb cannot find the user on the LDAP
server, but I don't know why. I believe the problem is lying in my
non-comprehension of what userdb and passdb actually do. I tried to find
out by myself, and I'm here because I didn't manage to do so.

I'm sorry if this post looks stupid. Any help and any comments of any
kind would be greatly appreciated.

Regards,
Niols

PS: Here is the full debug log that I get after sending a test message
to t...@niols.net (.net vs. .fr: this is not a mistake, I use my .net
domain for testing purposes while I use my .fr domain for eveyday life)
with swaks:

lmtp(3208): Connect from local
auth: Debug: Loading modules from directory:
/usr/lib/dovecot/modules/auth
auth: Debug: Loading modules from directory:
/usr/lib/dovecot/modules/auth
auth: Debug: Module loaded:
/usr/lib/dovecot/modules/auth/libauthdb_ldap.so
auth: Debug: Read auth token secret from
/var/run/dovecot/auth-token-secret.dat
auth: Debug: LDAP initialization took 0 msecs
auth: Debug: master in: USER1t...@niols.net
service=lmtp
auth: Debug: ldap(t...@niols.net): passdb doesn't support credential
lookups
auth: Error: static(t...@niols.net): passdb doesn't support lookups,
can't verify user's existence
auth: Debug: userdb out: FAIL1
lmtp(3208): Error: user t...@niols.net: Auth USER lookup failed
lmtp(3208): Disconnect from local: Successful quit


Re: postfix/dovecot - [private/dovecot-lmtp]: No such file or directory

2016-02-21 Thread Aki Tuomi



On 22.02.2016 03:59, soko.tica wrote:

Hello list,

I am trying to send a mail message from root to a system user on the same
box. While postfix functions without dovecot properly, once dovecot is
installed, I get the message from logs as set in the subject line - that
postfix/lmpt cannot connect to [private/dovecot-lmtp]: No such file or
directory

Also, user's ~/.Maildir aren't created, although there is such instructions
in dovecot. Finally, doveconf -n says there is no ssl enabled, although I
explicitly set it in /conf.d/10-ssl.conf

Below are dmesg, postconf -n, doveconf -n and a snippet from
/var/log/mail.log

Please advise. Thanks in advance.

$ doveconf -n
# 2.2.13: /etc/dovecot/dovecot.conf
# OS: Linux 3.18.26-x1-64 x86_64 Debian 8.3
hostname = mail.domain.tld
protocols = lmtp
service lmtp {
   unix_listener lmtp {
 group = postfix
 mode = 0600
 user = postfix
   }
}



You probably want to define socket path here, so that the socket gets 
created in postfix's private directory, probably /var/lib/postfix/private


Aki


postfix/dovecot - [private/dovecot-lmtp]: No such file or directory

2016-02-21 Thread soko.tica
Hello list,

I am trying to send a mail message from root to a system user on the same
box. While postfix functions without dovecot properly, once dovecot is
installed, I get the message from logs as set in the subject line - that
postfix/lmpt cannot connect to [private/dovecot-lmtp]: No such file or
directory

Also, user's ~/.Maildir aren't created, although there is such instructions
in dovecot. Finally, doveconf -n says there is no ssl enabled, although I
explicitly set it in /conf.d/10-ssl.conf

Below are dmesg, postconf -n, doveconf -n and a snippet from
/var/log/mail.log

Please advise. Thanks in advance.

$dmesg
[0.00] Linux version 3.18.26-x1-64 (r...@dev0001.support.domain.tld)
(gcc version 4.4.5 (Debian 4.4.5-8) ) #1 SMP Mon Feb 8 11:43:41 GMT 2016
[0.740773] pps_core: LinuxPPS API ver. 1 registered

$ postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
default_transport = error
delay_warning_time = 4h
inet_interfaces = loopback-only
mailbox_size_limit = 0
mailbox_transport = lmtp:unix:private/dovecot-lmtp
mydestination = $myhostname localhost.$mydomain localhost $mydomain
myhostname = mail.domain.tld
mynetworks = [:::127.0.0.0]/104 [::1]/128
myorigin = $myhostname
notify_classes = resource, software
readme_directory = no
recipient_delimiter = +
relay_domains = $mydestination
relay_transport = error
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
==

$ doveconf -n
# 2.2.13: /etc/dovecot/dovecot.conf
# OS: Linux 3.18.26-x1-64 x86_64 Debian 8.3
hostname = mail.domain.tld
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
lda_original_recipient_header = X-Original-To
mail_location = maildir:~/Maildir
maildir_very_dirty_syncs = yes
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 =
  separator = /
  type = private
}
passdb {
  driver = pam
}
passdb {
  driver = pam
}
plugin {
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
postmaster_address = postmas...@mail.domain.tld
protocols = lmtp
service lmtp {
  unix_listener lmtp {
group = postfix
mode = 0600
user = postfix
  }
}
ssl = no
ssl_cert = 
Feb 21 23:22:28 boxname postfix/cleanup[32177]: EA06822140:
message-id=<20160221232228.ea06822...@mail.domain.tld>
Feb 21 23:22:28 boxname postfix/qmgr[32139]: EA06822140:
from=, size=333, nrcpt=1 (queue active)
Feb 21 23:22:29 boxname postfix/lmtp[32180]: EA06822140:
to=, orig_to=, relay=none, delay=0.06,
delays=0.02/0.01/0.04/0, dsn=4.4.1, status=deferred (connect to
mail.domain.tld[private/dovecot-lmtp]: No such file or directory)


Re: Dovecot LMTP tries to access a directory of a different user, than the one it actually changed to.

2015-07-06 Thread Ernest Deak

Adding r= field into the Mlocal definition of sendmail.cf worked out.
However, I dug around the documentation and found a macro one can define
to achieve this without having to mess around with the .cf file.

I am adding this here for anyone who might encounter the same problem.

In an .mc file, you can write:

define(`LOCAL_MAILER_MAXRCPTS',`1')

To achieve the same effect.

Thanks to all for the hints.

On 03.07.2015 15:09, Steffen Kaiser wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 3 Jul 2015, Ernest Deak wrote:

Hello, I encountered a problem when trying to send an email to 
multiple recipients.


Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, tester): Error: 
stat(/home/han.solo/mail/.imap/INBOX/dovecot.index.log) failed: 
Permission denied (euid=802(tester) egid=800(kerber) missing +x perm: 
/home/han.solo, euid is not dir owner)
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, tester): Error: 
open(/home/han.solo/mail/.imap/INBOX/dovecot.index) failed: 
Permission denied (euid=802(tester) egid=800(kerber) missing +x perm: 
/home/han.solo, euid is not dir owner)
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, tester): 
70NxN1FlllUqXgAA0vrzwA: msgid=<55966551.IfKOMu/T0WTB9M5x%vader at 
dhcp90.#>: save failed to INBOX: BUG: Unknown internal error



My MTA is sendmail
I am using dovecot-lmtp for local delivery
Mailbox format is mbox
Configured managesieve plugin to listen on 4190. (not sure if this is 
even related but it might)


The problem I see is that lmtp(user1) tries to access the home 
directory /home/user2 and I cannot figure out the reason why.

This only happens when sending mails to multiple recipients.


I see the that lmtp complains that it doesn't have execute 
permissions. But I don't want to place execute permissions for others 
on the entire /home/* dir structure.


as far as I remember there had been (or is) a bug in Dovecot, that 
privilegues are not changed correctly when delivering to another user. 
If that's the case, limit the number of recipients per LMTP message to 
1, see r= field in mailer definition in op.me.


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

iQEVAwUBVZaJdHz1H7kL/d9rAQJrBAf/XYV/Pma3MEyZsyk90g/llcRbXK4kn84J
IopHII8l82XPGZKBsaaEp3hkNn+hKkNxwPpLXD57Ny5rM9fAZkYrvW/ZPBZ6pFoQ
htMF5VXkpZ9i99ftCMGo4KmpbJC1cpmnTluxJvKclgjzwRLWfCdhuRH51YnAhinM
8dItrRyrv/5H0T8HeIQi9QSQPdquCiuY8RVQvos+6dClb3XEKAjyRwmjs0SRgoI2
Zqewwls6UbaXbgDqA+2umySRjHh8lQsIWg4DFcSigH3vE7XuYdruphbsHdY7Ssib
nT/l3WhrjjdXEoAzTPZgmorzP7/e/NM9rYZxNxgopht4YDBPX1/CYA==
=JYrh
-END PGP SIGNATURE-





smime.p7s
Description: S/MIME Cryptographic Signature


Re: Dovecot LMTP tries to access a directory of a different user, than the one it actually changed to.

2015-07-03 Thread Arkadiusz Miśkiewicz
On Friday 03 of July 2015, Ernest Deak wrote:
> Hello, I encountered a problem when trying to send an email to multiple
> recipients.

That bug exists for some time

http://www.dovecot.org/list/dovecot/2014-September/097688.html

but no solution exists and I think no one actually tried to fix it.

(no solution beside already mentioned ugly workaround with limiting to 1 
recipient per lmtp session)

-- 
Arkadiusz Miśkiewicz, arekm / ( maven.pl | pld-linux.org )


Re: Dovecot LMTP tries to access a directory of a different user, than the one it actually changed to.

2015-07-03 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 3 Jul 2015, Ernest Deak wrote:

Hello, I encountered a problem when trying to send an email to multiple 
recipients.


Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, tester): Error: 
stat(/home/han.solo/mail/.imap/INBOX/dovecot.index.log) failed: Permission 
denied (euid=802(tester) egid=800(kerber) missing +x perm: /home/han.solo, 
euid is not dir owner)
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, tester): Error: 
open(/home/han.solo/mail/.imap/INBOX/dovecot.index) failed: Permission denied 
(euid=802(tester) egid=800(kerber) missing +x perm: /home/han.solo, euid is 
not dir owner)
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, tester): 70NxN1FlllUqXgAA0vrzwA: 
msgid=<55966551.IfKOMu/T0WTB9M5x%vader at dhcp90.#>: save failed to 
INBOX: BUG: Unknown internal error



My MTA is sendmail
I am using dovecot-lmtp for local delivery
Mailbox format is mbox
Configured managesieve plugin to listen on 4190. (not sure if this is even 
related but it might)


The problem I see is that lmtp(user1) tries to access the home directory 
/home/user2 and I cannot figure out the reason why.

This only happens when sending mails to multiple recipients.


I see the that lmtp complains that it doesn't have execute permissions. But I 
don't want to place execute permissions for others on the entire /home/* dir 
structure.


as far as I remember there had been (or is) a bug in Dovecot, that 
privilegues are not changed correctly when delivering to another user. If 
that's the case, limit the number of recipients per LMTP message to 1, see 
r= field in mailer definition in op.me.


- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEVAwUBVZaJdHz1H7kL/d9rAQJrBAf/XYV/Pma3MEyZsyk90g/llcRbXK4kn84J
IopHII8l82XPGZKBsaaEp3hkNn+hKkNxwPpLXD57Ny5rM9fAZkYrvW/ZPBZ6pFoQ
htMF5VXkpZ9i99ftCMGo4KmpbJC1cpmnTluxJvKclgjzwRLWfCdhuRH51YnAhinM
8dItrRyrv/5H0T8HeIQi9QSQPdquCiuY8RVQvos+6dClb3XEKAjyRwmjs0SRgoI2
Zqewwls6UbaXbgDqA+2umySRjHh8lQsIWg4DFcSigH3vE7XuYdruphbsHdY7Ssib
nT/l3WhrjjdXEoAzTPZgmorzP7/e/NM9rYZxNxgopht4YDBPX1/CYA==
=JYrh
-END PGP SIGNATURE-


Dovecot LMTP tries to access a directory of a different user, than the one it actually changed to.

2015-07-03 Thread Ernest Deak


Hello, I encountered a problem when trying to send an email to multiple 
recipients.



=== LOG ===

... cut ...
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106): Debug: none: root=, index=, 
control=, inbox=

Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106): Connect from local
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106): Debug: Loading modules from 
directory: /usr/lib64/dovecot
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106): Debug: Module loaded: 
/usr/lib64/dovecot/lib90_sieve_plugin.so
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106): Debug: auth input: han.solo 
system_groups_user=han.solo uid=805 gid=800 home=/home/han.solo
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106): Debug: auth input: tester 
system_groups_user=tester uid=802 gid=800 home=/home/tester
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106): Debug: auth input: vader 
system_groups_user=vader uid=804 gid=800 home=/home/vader
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, han.solo): Debug: Effective 
uid=805, gid=800, home=/home/han.solo
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, han.solo): Debug: fs: 
root=/home/han.solo/mail, index=, control=, inbox=/var/mail/han.solo
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, han.solo): Debug: 
70NxN1FlllUqXgAA0vrzwA: sieve: user's script path 
/home/han.solo/.dovecot.sieve doesn't exist (using global script path in 
stead)
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, han.solo): Debug: 
70NxN1FlllUqXgAA0vrzwA: sieve: user has no valid personal script
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, han.solo): Debug: 
70NxN1FlllUqXgAA0vrzwA: sieve: no scripts to execute: reverting to 
default delivery.
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, han.solo): 
70NxN1FlllUqXgAA0vrzwA: msgid=<55966551.IfKOMu/T0WTB9M5x%vader at 
dhcp90.#>: saved mail to INBOX
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, tester): Debug: Effective 
uid=802, gid=800, home=/home/tester
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, tester): Debug: fs: 
root=/home/tester/mail, index=, control=, inbox=/var/mail/tester
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, tester): Debug: 
70NxN1FlllUqXgAA0vrzwA: sieve: user's script path 
/home/tester/.dovecot.sieve doesn't exist (using global script path in 
stead)
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, tester): Debug: 
70NxN1FlllUqXgAA0vrzwA: sieve: user has no valid personal script
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, tester): Debug: 
70NxN1FlllUqXgAA0vrzwA: sieve: no scripts to execute: reverting to 
default delivery.
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, tester): Error: 
stat(/home/han.solo/mail/.imap/INBOX/dovecot.index.log) failed: 
Permission denied (euid=802(tester) egid=800(kerber) missing +x perm: 
/home/han.solo, euid is not dir owner)
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, tester): Error: 
open(/home/han.solo/mail/.imap/INBOX/dovecot.index) failed: Permission 
denied (euid=802(tester) egid=800(kerber) missing +x perm: 
/home/han.solo, euid is not dir owner)
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, tester): 
70NxN1FlllUqXgAA0vrzwA: msgid=<55966551.IfKOMu/T0WTB9M5x%vader at 
dhcp90.#>: save failed to INBOX: BUG: Unknown internal error
Jul  3 12:34:57 dhcp90 sendmail[24121]: t63AYvn5024116: to=dhcp90.#>, ctladdr= (804/800), 
delay=00:00:00, xdelay=00:00:00, mailer=local, pri=91062, 
relay=localhost, dsn=4.2.0, stat=Deferred: 451 4.2.0  BUG: 
Unknown internal error
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, vader): Debug: Effective 
uid=804, gid=800, home=/home/vader
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, vader): Debug: fs: 
root=/home/vader/mail, index=, control=, inbox=/var/mail/vader
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, vader): Debug: 
70NxN1FlllUqXgAA0vrzwA: sieve: user's script path 
/home/vader/.dovecot.sieve doesn't exist (using global script path in stead)
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, vader): Debug: 
70NxN1FlllUqXgAA0vrzwA: sieve: user has no valid personal script
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, vader): Debug: 
70NxN1FlllUqXgAA0vrzwA: sieve: no scripts to execute: reverting to 
default delivery.
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, vader): Error: 
stat(/home/han.solo/mail/.imap/INBOX/dovecot.index.log) failed: 
Permission denied (euid=804(vader) egid=800(kerber) missing +x perm: 
/home/han.solo, euid is not dir owner)
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, vader): Error: 
open(/home/han.solo/mail/.imap/INBOX/dovecot.index) failed: Permission 
denied (euid=804(vader) egid=800(kerber) missing +x perm: 
/home/han.solo, euid is not dir owner)
Jul  3 12:34:57 dhcp90 dovecot: lmtp(24106, vader): 
70NxN1FlllUqXgAA0vrzwA: msgid=<55966551.IfKOMu/T0WTB9M5x%vader at 
dhcp90.#>: save failed to INBOX: BUG: Unknown internal error
Jul  3 12:34:57 dhcp90 sendmail[24121]: t63AYvn5024116: to=dhcp90.#>, ctladdr= (804/800), 
delay=00:00:00, xdelay=00:00:00, mailer=local, pri=91062, 
relay=localhost, dsn=4.2.0, stat=Deferred: 451 4.2.0  BUG: 
Unknown internal error
Jul  3 12:3

Re: dovecot-lmtp

2015-07-01 Thread Steven Hopps
I have solved the issue, I had to add mailbox_transport to main.cf, and 
I had to add auth_username_format = %Ln to dovecot.conf to fix the 
"Unrecognized User" errors.


It's now working!

Steven Hopps || sho...@pridetechdesign.com
424-888-0443 || http://www.pridetechdesign.com

= Ask about my Security Tune-Up & 24/7 Server Monitoring! =

On 7/1/2015 10:28, Steven Hopps wrote:

Hi, I'm trying to use dovecot-lmtp so that I can filter messages with
sieve, however it doesn't appear to be working.

I followed the instructions on wiki2.dovecot.org. I'm running Debian
Wheezy. I've got runit configured to execute postfix and dovecot, which
may be the source of the problem (runit executes /usr/sbin/dovecot -F).
I've got mail_debug turned on and there is nothing in the mail log about
lmtp.

Any help would be appreciated.


Re: dovecot-lmtp

2015-07-01 Thread Steven Hopps
I apologize for the multiple emails, I forgot to mention that when I 
added a mailbox_transport line, suddenly the log started showing lmtp 
entries, however everything was bouncing (I did mention the bouncing.)


When I removed that line, it works again, but now the log does not show 
any lmtp entries, same as before. I should point out that this email 
server has been functional for a long while.


Steven Hopps || sho...@pridetechdesign.com
424-888-0443 || http://www.pridetechdesign.com

= Ask about my Security Tune-Up & 24/7 Server Monitoring! =

On 7/1/2015 12:17, Pascal Volk wrote:

On 07/01/2015 02:28 PM, Steven Hopps wrote:

Hi, I'm trying to use dovecot-lmtp so that I can filter messages with
sieve, however it doesn't appear to be working.

I followed the instructions on wiki2.dovecot.org. I'm running Debian
Wheezy. I've got runit configured to execute postfix and dovecot, which
may be the source of the problem (runit executes /usr/sbin/dovecot -F).
I've got mail_debug turned on and there is nothing in the mail log about
lmtp.

Any help would be appreciated.



`postconf virtual_transport mailbox_transport`?
`doveconf -n`?


Regards,
Pascal



Re: dovecot-lmtp

2015-07-01 Thread Steven Hopps
I tried copying virtual_transport to mailbox_transport and started 
receiving user unknown and no such user errors. Current configuration 
output follows:


virtual_transport = lmtp:unix:private/dovecot-lmtp
mailbox_transport =

# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.8
auth_mechanisms = plain login
mail_debug = yes
mail_location = maildir:~/Maildir
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 {
  driver = pam
}
plugin {
  sieve = file:~/sieve;active=~/Maildir/filters.sieve
}
protocols = lmtp imap
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
}
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
user = postfix
  }
}
ssl_cert = http://www.pridetechdesign.com

= Ask about my Security Tune-Up & 24/7 Server Monitoring! =

On 7/1/2015 12:17, Pascal Volk wrote:

On 07/01/2015 02:28 PM, Steven Hopps wrote:

Hi, I'm trying to use dovecot-lmtp so that I can filter messages with
sieve, however it doesn't appear to be working.

I followed the instructions on wiki2.dovecot.org. I'm running Debian
Wheezy. I've got runit configured to execute postfix and dovecot, which
may be the source of the problem (runit executes /usr/sbin/dovecot -F).
I've got mail_debug turned on and there is nothing in the mail log about
lmtp.

Any help would be appreciated.



`postconf virtual_transport mailbox_transport`?
`doveconf -n`?


Regards,
Pascal



Re: dovecot-lmtp

2015-07-01 Thread Pascal Volk
On 07/01/2015 02:28 PM, Steven Hopps wrote:
> Hi, I'm trying to use dovecot-lmtp so that I can filter messages with 
> sieve, however it doesn't appear to be working.
> 
> I followed the instructions on wiki2.dovecot.org. I'm running Debian 
> Wheezy. I've got runit configured to execute postfix and dovecot, which 
> may be the source of the problem (runit executes /usr/sbin/dovecot -F). 
> I've got mail_debug turned on and there is nothing in the mail log about 
> lmtp.
> 
> Any help would be appreciated.
> 

`postconf virtual_transport mailbox_transport`?
`doveconf -n`?


Regards,
Pascal
-- 
The trapper recommends today: c01dcafe.1518...@localdomain.org


dovecot-lmtp

2015-07-01 Thread Steven Hopps
Hi, I'm trying to use dovecot-lmtp so that I can filter messages with 
sieve, however it doesn't appear to be working.


I followed the instructions on wiki2.dovecot.org. I'm running Debian 
Wheezy. I've got runit configured to execute postfix and dovecot, which 
may be the source of the problem (runit executes /usr/sbin/dovecot -F). 
I've got mail_debug turned on and there is nothing in the mail log about 
lmtp.


Any help would be appreciated.
--
Steven Hopps || sho...@pridetechdesign.com
424-888-0443 || http://www.pridetechdesign.com

= Ask about my Security Tune-Up & 24/7 Server Monitoring! =


problem with dovecot/lmtp

2015-03-02 Thread Dan LaSota
I am getting this in my errorlog for postfix/dovecot

Mar  2 16:42:14 mail postfix/error[5074]: A689580F236: 
to=, relay=none, delay=21420, delays=21420/0.05/0/0, 
dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 
mail.example.com[private/dovecot-lmtp]: Connection refused)

From my reading, I believe this has something to do with virtual_transport 
which I have set to:
virtual_transport = lmtp:unix:private/dovecot-lmtp

The socket file, exists:

[root@mail ~]# ls -l /var/spool/postfix/private/dovecot-lmtp
srw---. 1 postfix postfix 0 Mar  2 09:14 
/var/spool/postfix/private/dovecot-lmtp

But I'm a little stumped as how to proceed.

The only thing I think I understand is that postfix is trying to talk to 
dovecot-lmtp and dovecot-lmtp is refusing the connection.
Am I reading that correct?
What can I do about it?

Thanks,

Dan LaSota
Instructional Designer, UAF eLearning
(907) 451-4067
dan.las...@alaska.edu
http://elearning.uaf.edu


How to setup a dovecot lmtp proxy server ?

2014-09-01 Thread Webster Liang
Dear All :

 I want to setup a dovecot lmtp proxy server , my target as below :

Postfix (lmtp) -->dovecot lmtp proxy servers-->dovecot backend servers

but i don't know how to setup the dovecot lmtp proxy server , who can help
me ? thanks a lot .



--
View this message in context: 
http://dovecot.2317879.n4.nabble.com/How-to-setup-a-dovecot-lmtp-proxy-server-tp49553.html
Sent from the Dovecot mailing list archive at Nabble.com.


Aw: Re: OT - Finding/removing duplicate emails - WAS: Re: [Dovecot] dovecot/lmtp munmap()-ing a lot

2014-07-04 Thread Infoomatic
> >> On 6/9/2014 5:44 PM, Ralf Hildebrandt  wrote:
> >>> That's probably the problem here. The user had LOTS of (duplicate!)
> >>> mails in his inbox.

I had the same problem with a corrupted IBM Domino mailfile which gave me lots 
of duplicates, however imapsync with the options "--useheader Date --useheader 
Subject --skipheader X.*" to eliminate headers according to date+subject did 
the trick.

Alternatively you could have a look at the Thunderbird Addon "Remove Duplicate 
Message (alternate) 0.39" - havent used it on large IMAP folders but works also 
nicely.

hth,
infoomatic


Re: OT - Finding/removing duplicate emails - WAS: Re: [Dovecot] dovecot/lmtp munmap()-ing a lot

2014-07-03 Thread Jiri Bourek

On 3.7.2014 21:35, Timo Sirainen wrote:

On 10.6.2014, at 14.05, Charles Marcus  wrote:


On 6/9/2014 5:44 PM, Ralf Hildebrandt  wrote:

That's probably the problem here. The user had LOTS of (duplicate!)
mails in his inbox.


Anyone ever found a reliable way to do this?

It sure would be nice if dovecot could perform this on a per account and/or per 
maildir/mailbox case with a simple doveadm command...


doveadm deduplicate



When I last tried, doveadm deduplicate was quite unreliable (IMO to the 
point of not being worth using at all.)


http://www.dovecot.org/list/dovecot/2014-March/095447.html

(Tried again, the behaviour is the same in 2.2.13 from Debian testing)


Re: OT - Finding/removing duplicate emails - WAS: Re: [Dovecot] dovecot/lmtp munmap()-ing a lot

2014-07-03 Thread Timo Sirainen
On 10.6.2014, at 14.05, Charles Marcus  wrote:

> On 6/9/2014 5:44 PM, Ralf Hildebrandt  wrote:
>> That's probably the problem here. The user had LOTS of (duplicate!)
>> mails in his inbox.
> 
> Anyone ever found a reliable way to do this?
> 
> It sure would be nice if dovecot could perform this on a per account and/or 
> per maildir/mailbox case with a simple doveadm command...

doveadm deduplicate


Re: OT - Finding/removing duplicate emails - WAS: Re: [Dovecot] dovecot/lmtp munmap()-ing a lot

2014-06-10 Thread Charles Marcus

On 6/10/2014 12:32 PM, Ralf Hildebrandt  wrote:

* Charles Marcus:

>On 6/9/2014 5:44 PM, Ralf Hildebrandt  wrote:

> >That's probably the problem here. The user had LOTS of (duplicate!)
> >mails in his inbox.

>
>Anyone ever found a reliable way to do this?

To duplicate the mails?


'This' referred obviously to my altered SUBJECT... ;)


Best regards,

Charles


Re: OT - Finding/removing duplicate emails - WAS: Re: [Dovecot] dovecot/lmtp munmap()-ing a lot

2014-06-10 Thread Ralf Hildebrandt
> Wasn't there a thread some days/weeks ago, that Pigeonhole behaves the 
> same by default and the poster asked how long the timeframe is Pigeonhole 
> remembers the ids?

How would I go about enabling this?
 
> Actually, I still wonder about whether or not the same message-id is 
> sufficient to decide to "silently drop" a message, as I interprete "to
> ignore a message" as "to drop". They might came different paths, some MUA 
> might not generate ids unqiue world-wide or time-depended, ... . It's a 
> matter of taste, IMHO.

You're probably right, but in the case of a runaway fetchmail it would
nbe sufficient.

mutt's "~=" Tagging does the same (IMHO)

-- 
[*] 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: OT - Finding/removing duplicate emails - WAS: Re: [Dovecot] dovecot/lmtp munmap()-ing a lot

2014-06-10 Thread Ralf Hildebrandt
> The basic question is: what is a duplicate?
> 
> I spot 100% duplicates within the same Maildir mailbox with a script 
> similiar to "fdupes" http://linux.die.net/man/1/fdupes .
> Because an user may copy messages around, I scan one mailbox at a time.

But with mdbox? Or mailboxes != Maildir format in general?

-- 
[*] 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: OT - Finding/removing duplicate emails - WAS: Re: [Dovecot] dovecot/lmtp munmap()-ing a lot

2014-06-10 Thread Ralf Hildebrandt
* Charles Marcus :
> On 6/9/2014 5:44 PM, Ralf Hildebrandt  wrote:
> >That's probably the problem here. The user had LOTS of (duplicate!)
> >mails in his inbox.
> 
> Anyone ever found a reliable way to do this?

To duplicate the mails? Yeah: Just let fetchmail run unobserved for
weeks, will fuck up things nicely. No manual intervention needed.

-- 
[*] 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: OT - Finding/removing duplicate emails - WAS: Re: [Dovecot] dovecot/lmtp munmap()-ing a lot

2014-06-10 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 10 Jun 2014, Reindl Harald wrote:

Am 10.06.2014 15:39, schrieb Steffen Kaiser:

On Tue, 10 Jun 2014, Reindl Harald wrote:

Am 10.06.2014 15:17, schrieb Steffen Kaiser:

The basic question is: what is a duplicate?
However, neither script I would call general enough for automatic processing



dbmail has just "suppress_duplicates = yes" and silently ignores
*new received* messages with the same message-id to the same user
as a global setting


Wasn't there a thread some days/weeks ago, that Pigeonhole behaves the same by 
default and the poster asked how
long the timeframe is Pigeonhole remembers the ids?

Actually, I still wonder about whether or not the same message-id is sufficient to decide 
to "silently drop" a
message, as I interprete "to ignore a message" as "to drop". They might came 
different paths, some MUA might not
generate ids unqiue world-wide or time-depended, ... . It's a matter of taste, 
IMHO


if it generates one it's unlikely to have the same message-id
for the same RCPT


yes, but then some recipients forward (automatically or manually). Or you 
a fetchmail-like grabber that re-transmits the message, ... .



   - usually the current timestamp is part of it


that I mean with "time-depended", but you also used "unlikely" and 
"usually". So you still see a little chance, that the message-id is not 
world-wide unique. ;-)


I know, nowadays all MUAs should be capable of generating sensible message 
ids and some claims about bandwith and such are outdated, too. You have to 
rely on information you do not control -> you have to decide how far to 
trust.


- -- 
Steffen Kaiser

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

iQEVAwUBU5cWsnz1H7kL/d9rAQI+Zgf+Pp7968AvnVuOdd/RcnK2fd1rxetBtnzY
DKkKjZ3jV9vwKr5yvxNQ5Ic9liHNrW7QvnFOFlPSPZTp5MgmM3dN6LpKTxmWgK4o
zb4Zizp2FwWR/qRj67t+tdlyLC/ZVarSRcR4KW5y1iGr7MlvR0RDxaT5Rw1y33bG
VZIlnR+LOwQaCa9sg9HjbpsG6FTkgB9VQjgMdqQYdba1+C2RPD/9fm5+CM58JXFt
UUBGZITL/AEKBOJ5U1OyK1gr9BlJvbHeIuEJ4XVF7ybkV4rDSngt4Z/8SXaKf2AC
FxJT3XbnsJv22iuNA+2LpZxTRQa5QYYoyZSNd70wGnb3GBXjGP4lMA==
=WTSS
-END PGP SIGNATURE-


Re: OT - Finding/removing duplicate emails - WAS: Re: [Dovecot] dovecot/lmtp munmap()-ing a lot

2014-06-10 Thread Reindl Harald

Am 10.06.2014 15:39, schrieb Steffen Kaiser:
> On Tue, 10 Jun 2014, Reindl Harald wrote:
>> Am 10.06.2014 15:17, schrieb Steffen Kaiser:
>>> The basic question is: what is a duplicate?
>>> However, neither script I would call general enough for automatic processing
> 
>> dbmail has just "suppress_duplicates = yes" and silently ignores
>> *new received* messages with the same message-id to the same user
>> as a global setting
> 
> Wasn't there a thread some days/weeks ago, that Pigeonhole behaves the same 
> by default and the poster asked how
> long the timeframe is Pigeonhole remembers the ids?
> 
> Actually, I still wonder about whether or not the same message-id is 
> sufficient to decide to "silently drop" a
> message, as I interprete "to ignore a message" as "to drop". They might came 
> different paths, some MUA might not
> generate ids unqiue world-wide or time-depended, ... . It's a matter of 
> taste, IMHO

if the MUA generates no message-id at all the MTA usually does
because otherwise you would risk to get messages rejected what
we did many many years ago for any incoming mail without msgid

if it generates one it's unlikely to have the same message-id
for the same RCPT - usually the current timestamp is part of it





signature.asc
Description: OpenPGP digital signature


Re: OT - Finding/removing duplicate emails - WAS: Re: [Dovecot] dovecot/lmtp munmap()-ing a lot

2014-06-10 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 10 Jun 2014, Reindl Harald wrote:

Am 10.06.2014 15:17, schrieb Steffen Kaiser:

On Tue, 10 Jun 2014, Charles Marcus wrote:

On 6/9/2014 5:44 PM, Ralf Hildebrandt  wrote:

That's probably the problem here. The user had LOTS of (duplicate!)
mails in his inbox.



Anyone ever found a reliable way to do this?



It sure would be nice if dovecot could perform this on a per account and/or per 
maildir/mailbox case with a
simple doveadm command...


The basic question is: what is a duplicate?

I spot 100% duplicates within the same Maildir mailbox with a script similiar to 
"fdupes"
http://linux.die.net/man/1/fdupes .
Because an user may copy messages around, I scan one mailbox at a time.

For some rare cases, where I merge two accounts, I use a script, that looks for 
the message id in one account and
removes all messages with the same id in the other account. Than I merge the 
Maildirs.

However, neither script I would call general enough for automatic processing


dbmail has just "suppress_duplicates = yes" and silently ignores
*new received* messages with the same message-id to the same user
as a global setting


Wasn't there a thread some days/weeks ago, that Pigeonhole behaves the 
same by default and the poster asked how long the timeframe is Pigeonhole 
remembers the ids?


Actually, I still wonder about whether or not the same message-id is 
sufficient to decide to "silently drop" a message, as I interprete "to 
ignore a message" as "to drop". They might came different paths, some MUA 
might not generate ids unqiue world-wide or time-depended, ... . It's a 
matter of taste, IMHO.


- -- 
Steffen Kaiser

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

iQEVAwUBU5cKf3z1H7kL/d9rAQIFXQf/eOVNj6OCbpbrvgvj1dUmQ4eqZuISO80A
oMsncG65sYwOWZAepapdWQCxSK/+kEYmWm7nhmqC+ZfJebsEM+VRaL++gesNXlCZ
Uo1VuQKgyEF0Y+buDvOSHxwn8+Fum3u6kiMkvf9Jiog+ucVwlOAsOvPrTfxdT9ST
udBzpSjfE9JLWhptjKdqS/1Hum5I3UJN6nb0g2ZYTB1rVdQxmTfmnoRiMb5UeTRA
aUpFBQULANbHFJiaVfnUXoYIU1cUl9iaywDSeNG34bmfXJlgGWfpMy1Ani5XdsR6
f7cnIGSdsNmthfdS3SHvY86TfYSf2qUMEJUi4k3QMjDlttWAATqvkA==
=mlVS
-END PGP SIGNATURE-


Re: OT - Finding/removing duplicate emails - WAS: Re: [Dovecot] dovecot/lmtp munmap()-ing a lot

2014-06-10 Thread Reindl Harald


Am 10.06.2014 15:17, schrieb Steffen Kaiser:
> On Tue, 10 Jun 2014, Charles Marcus wrote:
>> On 6/9/2014 5:44 PM, Ralf Hildebrandt  wrote:
>>> That's probably the problem here. The user had LOTS of (duplicate!)
>>> mails in his inbox.
> 
>> Anyone ever found a reliable way to do this?
> 
>> It sure would be nice if dovecot could perform this on a per account and/or 
>> per maildir/mailbox case with a
>> simple doveadm command...
> 
> The basic question is: what is a duplicate?
> 
> I spot 100% duplicates within the same Maildir mailbox with a script similiar 
> to "fdupes"
> http://linux.die.net/man/1/fdupes .
> Because an user may copy messages around, I scan one mailbox at a time.
> 
> For some rare cases, where I merge two accounts, I use a script, that looks 
> for the message id in one account and
> removes all messages with the same id in the other account. Than I merge the 
> Maildirs.
> 
> However, neither script I would call general enough for automatic processing

dbmail has just "suppress_duplicates = yes" and silently ignores
*new received* messages with the same message-id to the same user
as a global setting

that's fine for people not able to handling a mailing-list
and hit reply-all every time




signature.asc
Description: OpenPGP digital signature


Re: OT - Finding/removing duplicate emails - WAS: Re: [Dovecot] dovecot/lmtp munmap()-ing a lot

2014-06-10 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 10 Jun 2014, Charles Marcus wrote:

On 6/9/2014 5:44 PM, Ralf Hildebrandt  wrote:

That's probably the problem here. The user had LOTS of (duplicate!)
mails in his inbox.


Anyone ever found a reliable way to do this?

It sure would be nice if dovecot could perform this on a per account and/or 
per maildir/mailbox case with a simple doveadm command...


The basic question is: what is a duplicate?

I spot 100% duplicates within the same Maildir mailbox with a script 
similiar to "fdupes" http://linux.die.net/man/1/fdupes .

Because an user may copy messages around, I scan one mailbox at a time.

For some rare cases, where I merge two accounts, I use a script, that 
looks for the message id in one account and removes all messages with the 
same id in the other account. Than I merge the Maildirs.


However, neither script I would call general enough for automatic 
processing.


- -- 
Steffen Kaiser

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

iQEVAwUBU5cFZXz1H7kL/d9rAQK/ogf/YWmoJBc7tg5Wsnnz2FPHcxIrnC3YZD2b
FXSFsCm60Gc2eyqW2zti7bNLOzZShcIUsYeRteV4lyC0iIcDD6QV13hc50O3LlPx
L31kffgtmzIi1P0nQMkiIepbm75e0Rj+4XaaYSaEY1GKSMP6MDUhoBHLPwXS/qaK
IahX1ALPVt9gE4SBf9iZirMfHssLJAQvUoGHf6PJLPzWPMUgUV1bY+2U07pgEBh3
4Iaq518zDIKxPp3hWj8d0AuTuErC3xh5Abdcs7x60cUFIoLIIfC7DOszDpA0OkUv
Tbc7cOS2sPbP5B0n8k4J28H9h6tlLlUxIT144TUDy9bjbuKVP0FxhA==
=CwgK
-END PGP SIGNATURE-


  1   2   3   4   5   >