Dovecot Failed to initialize SSL server context

2020-04-16 Thread Adam Raszkiewicz
I'm trying to configure TLS for Dovecot 2.3 but after setting all things up I'm 
not able to start  Dovecot:

Apr 16 20:56:02 master: Info: Dovecot v2.3.9.3 (9f41b88fa) starting up for 
imap, pop3, lmtp (core dumps disabled)
Apr 16 20:56:25 auth: Debug: Loading modules from directory: 
/usr/lib/dovecot/auth
Apr 16 20:56:25 auth: Debug: Module loaded: 
/usr/lib/dovecot/auth/lib20_auth_var_expand_crypt.so
Apr 16 20:56:25 auth: Debug: Read auth token secret from 
/usr/var/run/dovecot/auth-token-secret.dat
Apr 16 20:56:25 auth: Debug: auth client connected (pid=30750)
Apr 16 20:56:25 imap-login: Error: Failed to initialize SSL server context: 
Can't load SSL private key: Key is for a different cert than ssl_cert: user=<>, 
rip=::1, lip=::1, secured, session=
Apr 16 20:56:25 imap-login: Info: Disconnected: TLS initialization failed. 
(no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, 
session=
Apr 16 20:57:47 master: Fatal: Dovecot is already running with PID 30727 
(read from /usr/var/run/dovecot/master.pid)
Apr 16 20:57:47 master: Warning: Killed with signal 15 (by pid=30823 uid=0 
code=kill)

I have created a brand new key pair, csr and the cert but still it complains to 
start.

Any thoughts on that?

Thanks,
Adam


How to specify pattern for share folder using ACL vfile

2020-04-15 Thread Adam Raszkiewicz
My `90-acl.conf` file looks like:

plugin {
  #acl = vfile:/etc/dovecot/global-acls:cache_secs=300
  #acl = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
  acl = vfile
}

# To let users LIST mailboxes shared by other users, Dovecot needs a
# shared mailbox dictionary. For example:
plugin {
  #acl_shared_dict = file:/var/lib/dovecot/shared-mailboxes
  acl_shared_dict = proxy::acl
}


When ACLs were set for particular mailbox I can see that dovecot-acl file were 
created but I have no idea how to specify a pattern for shared folder like is 
in the `dovecot-dict-sql.conf.ext`

map {
  pattern = shared/shared-boxes/user/$to/$from
  table = user_shares
  value_field = dummy

  fields {
from_user = $from
to_user = $to
  }
}

My goal is to control how it appears on the client site. As for now is as 
`shared/user@domain/folder/` but I have no idea where it is defined.

Thanks,
Adam


Re: Disable Dovecot LDA

2020-04-02 Thread Adam Raszkiewicz
So there is no way to skip Postfix for incoming messages and go directly to 
LMTP/LDA but I need two instances of Postfix in that case?

Regarding your second question - it is required to be complaint with Direct 
Trust. 

Thanks,
Adam

On 4/2/20, 3:07 PM, "dovecot on behalf of Juri Haberland" 
 wrote:

On 02/04/2020 15:18, Adam Raszkiewicz wrote:
> Desired flow looks like:
> 
> Dovecot -> Postfix --> Relay Server -┐
> Dovecot <-- LMTP/LDA <-- Postfix <-┘

This mail flow cannot work with one Postfix instance. Either Postfix
knows that "localdomain.com" is local and should be delivered to the
LDA, in which case it won't be forwarded to the relay server, or Postfix
does not know that "localdomain.com" is a local address and therefor
forwards it the relay server, but than it will do that anytime it sees
"localdomain.com".

Only possibility is to run two instances of Postfix.

The real question is:
Why do you want this mail flow? Where is the benefit in sending a local
mail out to a relay server only to get it back and deliver it?


Cheers,
  Juri




Re: Disable Dovecot LDA

2020-04-02 Thread Adam Raszkiewicz
Desired flow looks like:

Dovecot -> Postfix --> Relay Server -┐
Dovecot <-- LMTP/LDA <-- Postfix <-┘

Top part of that flow works fine - a message will get to the relay server and 
it will be send back to the postfix for a local delivery but then
it will start to loop back to the relay server instead hand over to LMTP/LDA. 

For some reason Postfix  doesn't know that a...@localdomain.com is located on 
Dovecot and it will try to send it back to the relay server.
I have the same problem explained here: 
https://serverfault.com/questions/1010325/postfix-via-relay-server-and-lmtp-configuration-for-incoming-delivery-to-local-m

Thanks for any help!
~Adam

On 4/1/20, 6:45 PM, "dovecot on behalf of Dauser Martin Johannes" 
 wrote:

On Dienstag, 31. März 2020 21:14:26 CEST Adam Raszkiewicz wrote:
> But then it loops again when get back to the postfix as an incoming 
message
> (doesn't know that a...@localdomain.com is located on that Dovecot)
+
> Is there any way to disable Dovecot LDA? I want to always send email via 
> postfix and relay server even it will be a local delivery within the 
Dovecot
> server
>
>Thanks,
>Adam

Why should a disabled LDA or a relayhost help in this matter? Honestly, who 
is 
sending what to where anyway? 

I mean Dovecot is an IMAP-Server: It receives emails from Postfix and 
mailclients connect to Dovecot to get these mails. When a mailclient sends 
an 
email it connects to Postfix not to Dovecot, so a delivery "within Dovecot" 
isn't really happening. Dovecot's LDA has options to send (bounce) mails 
back 
to Postfix. I guess loops occur there?

WHO doesn't know that a...@localdomain.com is located on Dovecot -- Dovecot 
itself (= unknown recipient or perhaps permission problems while saving the 
mail) or Postfix (= no transport to Dovecot)? 

Martin









Re: Disable Dovecot LDA

2020-03-31 Thread Adam Raszkiewicz
But then it loops again when get back to the postfix as an incoming message 
(doesn't know that a...@localdomain.com is located on that Dovecot)

 <https://img.newoldstamp.com/r/292975/p>
Adam Raszkiewicz
 
 
p: 845.896.0191 
e: araszkiew...@medallies.com 
w: www.medallies.com <http://www.medallies.com/main.html> 
 
 <https://img.newoldstamp.com/r/292975/twitter>
 <https://img.newoldstamp.com/r/292975/linkedin>
 <https://img.newoldstamp.com/r/292975/instagram>
 
 <https://img.newoldstamp.com/r/292975/b>
 
This communication and any files or attachments transmitted with it may contain 
information that is confidential, privileged and exempt from disclosure under 
applicable law. It is intended solely for the use of the individual or the 
entity to which it is addressed. If you are not the intended recipient, you are 
hereby notified that any use, dissemination, or copying of this communication 
is strictly prohibited by federal law. If you have received this communication 
in error, please destroy it and notify the sender.
 

On 3/31/20, 1:45 PM, "dovecot on behalf of Aki Tuomi" 
 wrote:

    
> On 31/03/2020 19:35 Adam Raszkiewicz  wrote:
> 
> 
>   
> Hi,
>  
>  
> Is there any way to disable Dovecot LDA? I want to always send email via 
postfix and relay server even it will be a local delivery within the Dovecot 
server
>  

Dovecot LDA is fully optional. Just don't use it in postfix configuration

Aki

>  
> Thanks,
>  
> Adam




Disable Dovecot LDA

2020-03-31 Thread Adam Raszkiewicz
Hi,

Is there any way to disable Dovecot LDA? I want to always send email via 
postfix and relay server even it will be a local delivery within the Dovecot 
server

Thanks,
Adam


Re: Not able to start dovecot

2020-03-19 Thread Adam Raszkiewicz
I was able to solve errors below but now it complains about the startup how is 
handled on Centos7:

● dovecot.service - LSB: Dovecot init script
   Loaded: loaded (/etc/rc.d/init.d/dovecot; bad; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2020-03-19 15:15:37 UTC; 54s ago
 Docs: man:systemd-sysv-generator(8)
  Process: 20398 ExecStart=/etc/rc.d/init.d/dovecot start (code=exited, 
status=203/EXEC)

Mar 19 15:15:37 systemd[1]: Starting LSB: Dovecot init script...
Mar 19 15:15:37 systemd[1]: dovecot.service: control process exited, 
code=exited status=203
Mar 19 15:15:37 systemd[1]: Failed to start LSB: Dovecot init script.
Mar 19 15:15:37 systemd[1]: Unit dovecot.service entered failed state.
Mar 19 15:15:37 systemd[1]: dovecot.service failed.

Any thoughts on that matter?

Thanks,
Adam



Freshly compiled dovecot 2.3.9.3 on Centos 7 for some reason not able to start

sudo systemctl status dovecot.service
● dovecot.service - LSB: Starts the Dovecot POP3/IMAP service
   Loaded: loaded (/etc/rc.d/init.d/dovecot; bad; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2020-03-18 16:32:17 UTC; 15s ago
 Docs: man:systemd-sysv-generator(8)
  Process: 2868 ExecStart=/etc/rc.d/init.d/dovecot start (code=exited, 
status=127)

Mar 18 16:32:17 systemd[1]: Starting LSB: Starts the Dovecot POP3/IMAP 
service...
Mar 18 16:32:17 dovecot[2868]: /etc/rc.d/init.d/dovecot: line 34: log_info_msg: 
command not found
Mar 18 16:32:17 dovecot[2868]: /etc/rc.d/init.d/dovecot: line 35: start_daemon: 
command not found
Mar 18 16:32:17 dovecot[2868]: /etc/rc.d/init.d/dovecot: line 36: 
evaluate_retval: command not found
Mar 18 16:32:17 systemd[1]: dovecot.service: control process exited, 
code=exited status=127
Mar 18 16:32:17 systemd[1]: Failed to start LSB: Starts the Dovecot POP3/IMAP 
service.
Mar 18 16:32:17 systemd[1]: Unit dovecot.service entered failed state.
Mar 18 16:32:17 systemd[1]: dovecot.service failed.

I have compiled the same code on Centos 6 and had no problem to run it.

Any thoughts on that?

Thanks,
Adam


Not able to start dovecot

2020-03-18 Thread Adam Raszkiewicz
Freshly compiled dovecot 2.3.9.3 on Centos 7 for some reason not able to start

sudo systemctl status dovecot.service
● dovecot.service - LSB: Starts the Dovecot POP3/IMAP service
   Loaded: loaded (/etc/rc.d/init.d/dovecot; bad; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2020-03-18 16:32:17 UTC; 15s ago
 Docs: man:systemd-sysv-generator(8)
  Process: 2868 ExecStart=/etc/rc.d/init.d/dovecot start (code=exited, 
status=127)

Mar 18 16:32:17 systemd[1]: Starting LSB: Starts the Dovecot POP3/IMAP 
service...
Mar 18 16:32:17 dovecot[2868]: /etc/rc.d/init.d/dovecot: line 34: log_info_msg: 
command not found
Mar 18 16:32:17 dovecot[2868]: /etc/rc.d/init.d/dovecot: line 35: start_daemon: 
command not found
Mar 18 16:32:17 dovecot[2868]: /etc/rc.d/init.d/dovecot: line 36: 
evaluate_retval: command not found
Mar 18 16:32:17 systemd[1]: dovecot.service: control process exited, 
code=exited status=127
Mar 18 16:32:17 systemd[1]: Failed to start LSB: Starts the Dovecot POP3/IMAP 
service.
Mar 18 16:32:17 systemd[1]: Unit dovecot.service entered failed state.
Mar 18 16:32:17 systemd[1]: dovecot.service failed.

I have compiled the same code on Centos 6 and had no problem to run it.

Any thoughts on that?

Thanks,
Adam


Re: Problem with converting mdbox to MailDir

2019-10-03 Thread Adam Raszkiewicz via dovecot
Solution, in my case, was to add

separator = /

to the inbox namespace as well. For some reason it didn't defaulted to whatever 
the mailbox format's internal separator was.


--
Adam




From: dovecot  on behalf of Adam Raszkiewicz via 
dovecot 
Reply-To: Adam Raszkiewicz 
Date: Wednesday, October 2, 2019 at 5:05 PM
To: Asai via dovecot 
Subject: Re: Problem with converting mdbox to MailDir

And /bin/doveconf namespace

namespace {
  disabled = no
  hidden = no
  ignore_on_failure = no
  inbox = no
  list = children
  location = mdbox:/var/mailboxes/%%2Mu/%%2.2Mu/%%u
  order = 0
  prefix = shared/%%u/
  separator = /
  subscriptions = yes
  type = shared
}
namespace inbox {
  disabled = no
  hidden = no
  ignore_on_failure = no
  inbox = yes
  list = yes
  location =
  mailbox Drafts {
auto = subscribe
driver =
special_use = \Drafts
  }
  mailbox INBOX {
auto = subscribe
driver =
special_use =
  }
  mailbox Junk {
auto = no
driver =
special_use = \Junk
  }
  mailbox Sent {
auto = subscribe
driver =
special_use = \Sent
  }
  mailbox "Sent Messages" {
auto = no
driver =
special_use = \Sent
  }
  mailbox Trash {
auto = subscribe
driver =
special_use = \Trash
  }
  order = 0
  prefix =
  separator =
  subscriptions = yes
  type = private
}

--
Adam Raszkiewicz
Front End Web Developer
MedAllies, Inc.
300 Westage Business Center Drive, Suite 320
Fishkill, NY 12524
Office:  845.896.0191
Fax:  845.896.9306
www.medallies.com<http://www.medallies.com>
[Twitter-Bird]<https://twitter.com/medallies>Follow us on Twitter 
@MedAllies<https://twitter.com/medallies>




From: dovecot  on behalf of Adam Raszkiewicz via 
dovecot 
Reply-To: Adam Raszkiewicz 
Date: Wednesday, October 2, 2019 at 4:50 PM
To: Asai via dovecot 
Subject: Problem with converting mdbox to MailDir

I have a problem to convert mdbox to MailDir. Log from that process looks like:

/bin/dsync -Dv -u u...@domian.com mirror 
maildir:/tmp/destination/mailboxes/u...@domian.com

Debug: Loading modules from directory: /lib/dovecot
Debug: Module loaded: /lib/dovecot/lib01_acl_plugin.so
Debug: Loading modules from directory: /lib/dovecot/doveadm
Debug: Module loaded: /lib/dovecot/doveadm/lib10_doveadm_acl_plugin.so
Debug: Skipping module doveadm_expire_plugin, because dlopen() failed: 
/lib/dovecot/doveadm/lib10_doveadm_expire_plugin.so: undefined symbol: 
expire_set_lookup (this is usually intentional, so just ignore this message)
Debug: Skipping module doveadm_quota_plugin, because dlopen() failed: 
/lib/dovecot/doveadm/lib10_doveadm_quota_plugin.so: undefined symbol: 
quota_user_module (this is usually intentional, so just ignore this message)
Debug: Module loaded: /lib/dovecot/doveadm/lib10_doveadm_sieve_plugin.so
Debug: Skipping module doveadm_fts_plugin, because dlopen() failed: 
/lib/dovecot/doveadm/lib20_doveadm_fts_plugin.so: undefined symbol: 
fts_list_backend (this is usually intentional, so just ignore this message)
doveadm(u...@domian.com): Debug: Effective uid=503, gid=503, 
home=/var/mailboxes/%2Mu/%2.2Mu/%u
doveadm(u...@domian.com): Debug: Home dir not found: 
/var/mailboxes/%2Mu/%2.2Mu/%u
doveadm(u...@domian.com): Debug: Namespace inbox: type=private, prefix=, sep=, 
inbox=yes, hidden=no, list=yes, subscriptions=yes 
location=mdbox:/var/mailboxes/64/b1/u...@domian.com
doveadm(u...@domian.com): Debug: fs: root=/var/mailboxes/64/b1/u...@domian.com, 
index=, indexpvt=, control=, inbox=, alt=
doveadm(u...@domian.com): Debug: acl: initializing backend with data: vfile
doveadm(u...@domian.com): Debug: acl: acl username = u...@domian.com
doveadm(u...@domian.com): Debug: acl: owner = 1
doveadm(u...@domian.com): Debug: acl vfile: Global ACLs disabled
doveadm(u...@domian.com): Debug: Namespace : type=shared, prefix=shared/%u/, 
sep=/, inbox=no, hidden=no, list=children, subscriptions=yes 
location=mdbox:/var/mailboxes/%2Mu/%2.2Mu/%u
doveadm(u...@domian.com): Debug: shared: root=/var/run/dovecot, index=, 
indexpvt=, control=, inbox=, alt=
doveadm(u...@domian.com): Debug: acl: initializing backend with data: vfile
doveadm(u...@domian.com): Debug: acl: acl username = u...@domian.com
doveadm(u...@domian.com): Debug: acl: owner = 0
doveadm(u...@domian.com): Debug: acl vfile: Global ACLs disabled
doveadm(u...@domian.com): Debug: acl vfile: file 
/var/mailboxes/64/b1/u...@domian.com/mailboxes/INBOX/dbox-Mails/dovecot-acl not 
found
doveadm(u...@domian.com): Debug: acl vfile: file 
/var/mailboxes/64/b1/u...@domian.com/mailboxes/Drafts/dbox-Mails/dovecot-acl 
not found
doveadm(u...@domian.com): Debug: acl vfile: file 
/var/mailboxes/64/b1/u...@domian.com/mailboxes/Sent/dbox-Mails/dovecot-acl not 
found
doveadm(u...@domian.com): Debug: acl vfile: file 
/var/mailboxes/64/b1/u...@domian.com/mailboxes/Trash/dbox-Mails/dovecot-acl not 
found
doveadm(u...@domian.com): Debug: Namespace : Using permissions from 
/var/mailboxes/64/b1/u...@domian.com: mode=0700 gid=default
d

Re: Problem with converting mdbox to MailDir

2019-10-02 Thread Adam Raszkiewicz via dovecot
And /bin/doveconf namespace

namespace {
  disabled = no
  hidden = no
  ignore_on_failure = no
  inbox = no
  list = children
  location = mdbox:/var/mailboxes/%%2Mu/%%2.2Mu/%%u
  order = 0
  prefix = shared/%%u/
  separator = /
  subscriptions = yes
  type = shared
}
namespace inbox {
  disabled = no
  hidden = no
  ignore_on_failure = no
  inbox = yes
  list = yes
  location =
  mailbox Drafts {
auto = subscribe
driver =
special_use = \Drafts
  }
  mailbox INBOX {
auto = subscribe
driver =
special_use =
  }
  mailbox Junk {
auto = no
driver =
special_use = \Junk
  }
  mailbox Sent {
auto = subscribe
driver =
special_use = \Sent
  }
  mailbox "Sent Messages" {
auto = no
driver =
special_use = \Sent
  }
  mailbox Trash {
auto = subscribe
driver =
special_use = \Trash
  }
  order = 0
  prefix =
  separator =
  subscriptions = yes
  type = private
}

--
Adam Raszkiewicz
Front End Web Developer
MedAllies, Inc.
300 Westage Business Center Drive, Suite 320
Fishkill, NY 12524
Office:  845.896.0191
Fax:  845.896.9306
www.medallies.com<http://www.medallies.com>
[Twitter-Bird]<https://twitter.com/medallies>Follow us on Twitter 
@MedAllies<https://twitter.com/medallies>




From: dovecot  on behalf of Adam Raszkiewicz via 
dovecot 
Reply-To: Adam Raszkiewicz 
Date: Wednesday, October 2, 2019 at 4:50 PM
To: Asai via dovecot 
Subject: Problem with converting mdbox to MailDir

I have a problem to convert mdbox to MailDir. Log from that process looks like:

/bin/dsync -Dv -u u...@domian.com mirror 
maildir:/tmp/destination/mailboxes/u...@domian.com

Debug: Loading modules from directory: /lib/dovecot
Debug: Module loaded: /lib/dovecot/lib01_acl_plugin.so
Debug: Loading modules from directory: /lib/dovecot/doveadm
Debug: Module loaded: /lib/dovecot/doveadm/lib10_doveadm_acl_plugin.so
Debug: Skipping module doveadm_expire_plugin, because dlopen() failed: 
/lib/dovecot/doveadm/lib10_doveadm_expire_plugin.so: undefined symbol: 
expire_set_lookup (this is usually intentional, so just ignore this message)
Debug: Skipping module doveadm_quota_plugin, because dlopen() failed: 
/lib/dovecot/doveadm/lib10_doveadm_quota_plugin.so: undefined symbol: 
quota_user_module (this is usually intentional, so just ignore this message)
Debug: Module loaded: /lib/dovecot/doveadm/lib10_doveadm_sieve_plugin.so
Debug: Skipping module doveadm_fts_plugin, because dlopen() failed: 
/lib/dovecot/doveadm/lib20_doveadm_fts_plugin.so: undefined symbol: 
fts_list_backend (this is usually intentional, so just ignore this message)
doveadm(u...@domian.com): Debug: Effective uid=503, gid=503, 
home=/var/mailboxes/%2Mu/%2.2Mu/%u
doveadm(u...@domian.com): Debug: Home dir not found: 
/var/mailboxes/%2Mu/%2.2Mu/%u
doveadm(u...@domian.com): Debug: Namespace inbox: type=private, prefix=, sep=, 
inbox=yes, hidden=no, list=yes, subscriptions=yes 
location=mdbox:/var/mailboxes/64/b1/u...@domian.com
doveadm(u...@domian.com): Debug: fs: root=/var/mailboxes/64/b1/u...@domian.com, 
index=, indexpvt=, control=, inbox=, alt=
doveadm(u...@domian.com): Debug: acl: initializing backend with data: vfile
doveadm(u...@domian.com): Debug: acl: acl username = u...@domian.com
doveadm(u...@domian.com): Debug: acl: owner = 1
doveadm(u...@domian.com): Debug: acl vfile: Global ACLs disabled
doveadm(u...@domian.com): Debug: Namespace : type=shared, prefix=shared/%u/, 
sep=/, inbox=no, hidden=no, list=children, subscriptions=yes 
location=mdbox:/var/mailboxes/%2Mu/%2.2Mu/%u
doveadm(u...@domian.com): Debug: shared: root=/var/run/dovecot, index=, 
indexpvt=, control=, inbox=, alt=
doveadm(u...@domian.com): Debug: acl: initializing backend with data: vfile
doveadm(u...@domian.com): Debug: acl: acl username = u...@domian.com
doveadm(u...@domian.com): Debug: acl: owner = 0
doveadm(u...@domian.com): Debug: acl vfile: Global ACLs disabled
doveadm(u...@domian.com): Debug: acl vfile: file 
/var/mailboxes/64/b1/u...@domian.com/mailboxes/INBOX/dbox-Mails/dovecot-acl not 
found
doveadm(u...@domian.com): Debug: acl vfile: file 
/var/mailboxes/64/b1/u...@domian.com/mailboxes/Drafts/dbox-Mails/dovecot-acl 
not found
doveadm(u...@domian.com): Debug: acl vfile: file 
/var/mailboxes/64/b1/u...@domian.com/mailboxes/Sent/dbox-Mails/dovecot-acl not 
found
doveadm(u...@domian.com): Debug: acl vfile: file 
/var/mailboxes/64/b1/u...@domian.com/mailboxes/Trash/dbox-Mails/dovecot-acl not 
found
doveadm(u...@domian.com): Debug: Namespace : Using permissions from 
/var/mailboxes/64/b1/u...@domian.com: mode=0700 gid=default
dsync(u...@domian.com): Debug: Effective uid=503, gid=503, 
home=/var/mailboxes/%2Mu/%2.2Mu/%u
dsync(u...@domian.com): Debug: Home dir not found: /var/mailboxes/%2Mu/%2.2Mu/%u
dsync(u...@domian.com): Debug: Namespace inbox: type=private, prefix=, sep=, 
inbox=yes, hidden=no, list=yes, subscriptions=yes 
location=maildir:/tmp/destination/mailboxes/u...@domian.com
dsync(u...@domian.com): 

Problem with converting mdbox to MailDir

2019-10-02 Thread Adam Raszkiewicz via dovecot
I have a problem to convert mdbox to MailDir. Log from that process looks like:

/bin/dsync -Dv -u u...@domian.com mirror 
maildir:/tmp/destination/mailboxes/u...@domian.com

Debug: Loading modules from directory: /lib/dovecot
Debug: Module loaded: /lib/dovecot/lib01_acl_plugin.so
Debug: Loading modules from directory: /lib/dovecot/doveadm
Debug: Module loaded: /lib/dovecot/doveadm/lib10_doveadm_acl_plugin.so
Debug: Skipping module doveadm_expire_plugin, because dlopen() failed: 
/lib/dovecot/doveadm/lib10_doveadm_expire_plugin.so: undefined symbol: 
expire_set_lookup (this is usually intentional, so just ignore this message)
Debug: Skipping module doveadm_quota_plugin, because dlopen() failed: 
/lib/dovecot/doveadm/lib10_doveadm_quota_plugin.so: undefined symbol: 
quota_user_module (this is usually intentional, so just ignore this message)
Debug: Module loaded: /lib/dovecot/doveadm/lib10_doveadm_sieve_plugin.so
Debug: Skipping module doveadm_fts_plugin, because dlopen() failed: 
/lib/dovecot/doveadm/lib20_doveadm_fts_plugin.so: undefined symbol: 
fts_list_backend (this is usually intentional, so just ignore this message)
doveadm(u...@domian.com): Debug: Effective uid=503, gid=503, 
home=/var/mailboxes/%2Mu/%2.2Mu/%u
doveadm(u...@domian.com): Debug: Home dir not found: 
/var/mailboxes/%2Mu/%2.2Mu/%u
doveadm(u...@domian.com): Debug: Namespace inbox: type=private, prefix=, sep=, 
inbox=yes, hidden=no, list=yes, subscriptions=yes 
location=mdbox:/var/mailboxes/64/b1/u...@domian.com
doveadm(u...@domian.com): Debug: fs: root=/var/mailboxes/64/b1/u...@domian.com, 
index=, indexpvt=, control=, inbox=, alt=
doveadm(u...@domian.com): Debug: acl: initializing backend with data: vfile
doveadm(u...@domian.com): Debug: acl: acl username = u...@domian.com
doveadm(u...@domian.com): Debug: acl: owner = 1
doveadm(u...@domian.com): Debug: acl vfile: Global ACLs disabled
doveadm(u...@domian.com): Debug: Namespace : type=shared, prefix=shared/%u/, 
sep=/, inbox=no, hidden=no, list=children, subscriptions=yes 
location=mdbox:/var/mailboxes/%2Mu/%2.2Mu/%u
doveadm(u...@domian.com): Debug: shared: root=/var/run/dovecot, index=, 
indexpvt=, control=, inbox=, alt=
doveadm(u...@domian.com): Debug: acl: initializing backend with data: vfile
doveadm(u...@domian.com): Debug: acl: acl username = u...@domian.com
doveadm(u...@domian.com): Debug: acl: owner = 0
doveadm(u...@domian.com): Debug: acl vfile: Global ACLs disabled
doveadm(u...@domian.com): Debug: acl vfile: file 
/var/mailboxes/64/b1/u...@domian.com/mailboxes/INBOX/dbox-Mails/dovecot-acl not 
found
doveadm(u...@domian.com): Debug: acl vfile: file 
/var/mailboxes/64/b1/u...@domian.com/mailboxes/Drafts/dbox-Mails/dovecot-acl 
not found
doveadm(u...@domian.com): Debug: acl vfile: file 
/var/mailboxes/64/b1/u...@domian.com/mailboxes/Sent/dbox-Mails/dovecot-acl not 
found
doveadm(u...@domian.com): Debug: acl vfile: file 
/var/mailboxes/64/b1/u...@domian.com/mailboxes/Trash/dbox-Mails/dovecot-acl not 
found
doveadm(u...@domian.com): Debug: Namespace : Using permissions from 
/var/mailboxes/64/b1/u...@domian.com: mode=0700 gid=default
dsync(u...@domian.com): Debug: Effective uid=503, gid=503, 
home=/var/mailboxes/%2Mu/%2.2Mu/%u
dsync(u...@domian.com): Debug: Home dir not found: /var/mailboxes/%2Mu/%2.2Mu/%u
dsync(u...@domian.com): Debug: Namespace inbox: type=private, prefix=, sep=, 
inbox=yes, hidden=no, list=yes, subscriptions=yes 
location=maildir:/tmp/destination/mailboxes/u...@domian.com
dsync(u...@domian.com): Debug: maildir++: 
root=/tmp/destination/mailboxes/u...@domian.com, index=, indexpvt=, control=, 
inbox=/tmp/destination/mailboxes/u...@domian.com, alt=
dsync(u...@domian.com): Debug: Namespace : 
/tmp/destination/mailboxes/u...@domian.com doesn't exist yet, using default 
permissions
dsync(u...@domian.com): Debug: Namespace : Using permissions from 
/tmp/destination/mailboxes/u...@domian.com: mode=0700 gid=default
dsync(u...@domian.com): Debug: acl: initializing backend with data: vfile
dsync(u...@domian.com): Debug: acl: acl username = u...@domian.com
dsync(u...@domian.com): Debug: acl: owner = 1
dsync(u...@domian.com): Debug: acl vfile: Global ACLs disabled
dsync(u...@domian.com): Debug: Namespace : type=shared, prefix=shared/%u/, 
sep=/, inbox=no, hidden=no, list=children, subscriptions=yes 
location=mdbox:/var/mailboxes/%2Mu/%2.2Mu/%u
dsync(u...@domian.com): Debug: shared: root=/var/run/dovecot, index=, 
indexpvt=, control=, inbox=, alt=
dsync(u...@domian.com): Debug: acl: initializing backend with data: vfile
dsync(u...@domian.com): Debug: acl: acl username = u...@domian.com
dsync(u...@domian.com): Debug: acl: owner = 0
dsync(u...@domian.com): Debug: acl vfile: Global ACLs disabled
dsync(u...@domian.com): Error: User initialization failed: namespace 
configuration error: All list=yes namespaces must use the same separator

but when I will specify namespace to the inbox like

/bin/dsync -Dv -u u...@domian.com mirror 
maildir:/tmp/destination/mailboxes/u...@domian.com 

James spooling messages problem

2019-08-16 Thread Adam Raszkiewicz via dovecot
For some reason my James setup is creating some kind of spooling queue of 
sending messages. It will queue 3 of them and then forth “sent” message will 
make 1st one to be sent outside.

Any thoughts?

Thanks
--
Adam



Re: Mail migration problem

2019-06-24 Thread Adam Raszkiewicz via dovecot
Yeah, I think dovecot was a custom compiled build 

Version is 2.2.18

Config:

# 2.2.18: /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.8
# OS: Linux 2.6.32-754.14.2.el6.x86_64 x86_64 CentOS release 6.10 (Final) xfs
auth_master_user_separator = *
auth_mechanisms = plain login
dict {
  acl = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
}
disable_plaintext_auth = no
lda_mailbox_autosubscribe = yes
log_path = /var/log/dovecot.log
mail_home = mdbox:/var/homedirs/%2Mu/%2.2Mu/%u
mail_location = mdbox:/var/mailboxes/%2Mu/%2.2Mu/%u
mail_plugins = acl
mail_shared_explicit_inbox = 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 
vnd.dovecot.pipe vnd.dovecot.filter vnd.dovecot.execute
namespace {
  list = children
  location = mdbox:/var/mailboxes/%%2Mu/%%2.2Mu/%%u
  prefix = shared/%%u/
  separator = /
  subscriptions = yes
  type = shared
}
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
auto = subscribe
special_use = \Drafts
  }
  mailbox INBOX {
auto = subscribe
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
auto = subscribe
special_use = \Sent
  }
  mailbox "Sent Messages" {
special_use = \Sent
  }
  mailbox Trash {
auto = subscribe
special_use = \Trash
  }
  prefix =
  subscriptions = yes
}
passdb {
  args = /etc/dovecot/mastership-sql.conf
  driver = sql
  master = yes
  pass = yes
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  acl = vfile
  acl_defaults_from_inbox = yes
  acl_shared_dict = proxy::acl
  sieve_after = /etc/dovecot/sieve/99-file-qvera-ccda.sieve
  sieve_after2 = /etc/dovecot/sieve/98-notify-biz-address.sieve
  sieve_after3 = /etc/dovecot/sieve/97-mdn-processed.sieve
  sieve_execute_bin_dir = /etc/dovecot/sieve-execute
  sieve_execute_socket_dir = sieve-execute
  sieve_extensions = +vnd.dovecot.execute +vnd.dovecot.filter +vnd.dovecot.pipe
  sieve_filter_bin_dir = /etc/dovecot/sieve-filter
  sieve_filter_socket_dir = sieve-filter
  sieve_pipe_bin_dir = /etc/dovecot/sieve-pipe
  sieve_pipe_socket_dir = sieve-pipe
  sieve_plugins = sieve_extprograms
}
postmaster_address = postmas...@test2.domain.com
sendmail_path = /sbin/sendmail
service dict {
  unix_listener dict {
user = dovecot
  }
}
service imap-postlogin {
  executable = script-login /etc/dovecot/imappostlogin
  user = $default_internal_user
}
service imap {
  executable = imap imap-postlogin
}
ssl = no
userdb {
  args = uid=dovecot gid=dovecot home=/var/mailboxes/%%2Mu/%%2.2Mu/%%u
  driver = static
}
protocol lmtp {
  mail_plugins = acl sieve
}
protocol lda {
  mail_plugins = acl sieve
}
protocol imap {
  mail_plugins = acl imap_acl
}
 
and --build-options:

Build options: ioloop=epoll notify=inotify ipv6 openssl io_block_size=8192
Mail storages: shared mdbox raw fail
SQL drivers: mysql
Passdb: checkpassword pam passwd passwd-file shadow sql
Userdb: checkpassword nss passwd prefetch passwd-file sql

At that point my question is if I can run another dovecot build on the same 
box? I knew I can run the same instance but as is this a custom build I want to 
have something generic just to use for migration purposes.

Thanks,
Adam

On 6/21/19, 4:45 PM, "dovecot on behalf of Germán Herrera via dovecot" 
 wrote:

Well, judging by the error message it appears like dovecot hasn't been 
compiled with support for maildir, which is strange because I don't see 
any way to disable in the compile-time options.

Are you using the precompiled package from the distro or compiling 
dovecot by yourself? Could you share the output of "dovecot 
--build-options" and "dovecot --version"?

    Thanks!

    On 2019-06-21 17:17, Adam Raszkiewicz wrote:

> Hi German,
> 
> I have tried your way and getting the same error message:
> 
> dsync(u...@domain.com): Debug: Namespace inbox: type=private, prefix=, 
> sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes 
> location=maildir:~/Maildir
> 
> dsync(u...@domain.com): Error: User initialization failed: Namespace 
> '': Unknown mail storage driver maildir
> 
> Thoughts? Missing dovecot library, something in the configuration?
> 
> Thanks,
> 
> Adam
> 
> FROM: dovecot  on behalf of Germán Herrera 
> via dovecot 
> ORGANIZATION: SES Sistemas Electrónicos S.A.
    > REPLY-TO: Germán Herrera 
> DATE: Friday, June 21, 2019 at 3:10 PM
> TO: Adam Raszkiewicz 
> CC: "dovecot@dovecot.org" 
> SUBJECT: Re: Mail migration problem
> 
> Hi Adam
> 
> Can you try: "doveadm sync -u  maildir:~/Maildir"
&

Mail migration problem

2019-06-21 Thread Adam Raszkiewicz via dovecot
I’m trying to migrate mdbox to maildir based on 
https://wiki.dovecot.org/Migration/MailFormat


  *   Modified dovecot.conf and set 
mail_location=maildir:/tmp/destination/mailboxes/
  *   Then I had run

/mnt/testmail/bin/dsync -Dv -u u...@domain.com mirror 
mdbox:/source/mailboxes/u...@domain.com

but that did nothing. Then I have


  *   Modified dovecot.conf and set mail_location=mdbox:/source/mailboxes
  *   Then I had run

/mnt/testmail/bin/dsync -Dv -u u...@domain.com mirror 
mdbox:/tmp/destination/mailboxes/u...@domain.com

that copied over u...@domain.com mailbox from the 
source to the destination location. As that was working I have tried to run


/mnt/testmail/bin/dsync -Dv -u u...@domain.com mirror 
maildir:/tmp/destination/mailboxes/u...@domain.com

but that got an error:

dsync(u...@domain.com): Debug: Namespace inbox: type=private, prefix=, sep=, 
inbox=yes, hidden=no, list=yes, subscriptions=yes 
location=maildir:/mnt/testmail/mailboxes
dsync(u...@domain.com): Error: User initialization failed: Namespace '': 
Unknown mail storage driver maildir

First problem is that based on example #2 from above provided syntax in 
https://wiki.dovecot.org/Migration/MailFormat is incorrect or for some reason 
is not working for me as it should for example #1.
Second issue is not recognizing maildir format – what about that? Docecot has 
some missing libraries?

Thanks,
Adam


Re: mdbox to Maildir

2019-06-20 Thread Adam Raszkiewicz via dovecot
Ok, so I have used my brain and came up with that:


  *   Created new directory and copied over original dovecot to that location 
as /tmp/destination
  *   Spawned that dovecot as dovecot-test
  *   Modified dovecot.conf and set 
mail_location=maildir:/tmp/destination/mailboxes/
  *   Then I had run

/mnt/testmail/bin/dsync -D -v -u u...@domain.com mirror 
mdbox:/source/mailboxes/u...@domain.com


based on description from there: https://wiki.dovecot.org/Migration/MailFormat 
but first that doesn’t do anything (/tmp/destination/mailboxes is empty) and on 
another hand I don’t think so dsync is reading modified dovecot.conf as is not 
creating maildir format mailbox converted from mdbox format provided as the 
source location.



Thoughts?

~Adam


On 19 Jun 2019, at 5.05, Adam Raszkiewicz 
mailto:araszkiew...@medallies.com>> wrote:

I saw that before but there is only maildir -> mdbox but not mdbox -> maildir
Did I have missed anything there?

There is no direct example on how to do just that but you can use your brain 
and modify the mbox -> maildir example a bit.

Sami





Re: Converting mdbox to mbox/MailDir

2019-06-20 Thread Adam Raszkiewicz via dovecot
OK, based on that it will convert all accounts set for current dovecot 
instance. So my another question will be if I can do that only for selected 
accounts?

~Adam



On 6/19/19, 2:44 AM, "dovecot on behalf of Aki Tuomi via dovecot" 
 wrote:


On 19.6.2019 6.39, @lbutlr via dovecot wrote:
> On 18 Jun 2019, at 20:46, Adam Raszkiewicz  
wrote:
>> maildir -> mdbox it is maildir to mdbox conversion when I'm looking 
something opposite: mdbox -> maildir
> Please go back and read all the words in my previous reply.
>

doveadm supports convering mdbox to maildir as well, it works pretty
much the same way as maildir to mdbox.

Aki





Re: mdbox to Maildir

2019-06-18 Thread Adam Raszkiewicz via dovecot
I saw that before but there is only maildir -> mdbox but not mdbox -> maildir

Did I have missed anything there?


From: dovecot  on behalf of Sami Ketola via 
dovecot 
Reply-To: Sami Ketola 
Date: Tuesday, June 18, 2019 at 9:58 PM
To: Dovecot Mailing List 
Cc: Ralph Seichter , Odhiambo Washington 

Subject: Re: mdbox to Maildir




On 18 Jun 2019, at 16.59, Odhiambo Washington via dovecot 
mailto:dovecot@dovecot.org>> wrote:



On Tue, 18 Jun 2019 at 01:35, Ralph Seichter via dovecot 
mailto:dovecot@dovecot.org>> wrote:
* Odhiambo Washington via dovecot:

> Is it possible? How do I do it for ALL mailboxes?

This has been asked (and answered) recently; see the Dovecot Wiki.

-Ralph

Could you kindly point me to the exact article in the wiki, please?


https://wiki.dovecot.org/Migration/MailFormat

Sami




Re: Converting mdbox to mbox/MailDir

2019-06-18 Thread Adam Raszkiewicz via dovecot
I saw that before but there is only maildir -> mdbox but not mdbox -> maildir
 
Did I have missed anything there?
 

On 6/18/19, 9:59 PM, "dovecot on behalf of @lbutlr via dovecot" 
 wrote:



> On 18 Jun 2019, at 15:18, Benny Pedersen via dovecot 
 wrote:
> 
> @lbutlr via dovecot skrev den 2019-06-18 23:06:
>> On 18 Jun 2019, at 14:32, Adam Raszkiewicz via dovecot
>>  wrote:
>>> Is there any way to convert Dovecot's mdbox/dbox to mbox, MailDir or 
eml format (or any other easy to import format)?
>> https://wiki.dovecot.org/Migration/MailFormat
> 
> page error python update that failed ?


<https://www.google.com/search?safe=off=safari=hp=wVYJXd-zAamC0wL5qZLwCw=https%3A%2F%2Fwiki.dovecot.org%2FMigration%2FMailFormat=https%3A%2F%2Fwiki.dovecot.org%2FMigration%2FMailFormat_l=psy-ab.12..33i160l3.18745.18745..27580...0.0..0.162.333.2j1..01..gws-wiz.0.cdoJgBaH5Wg>

or 

<https://is.gd/ZmfHY9>

Click the down triangle and choose “Cached”







Converting mdbox to mbox/MailDir

2019-06-18 Thread Adam Raszkiewicz via dovecot
Is there any way to convert Dovecot's mdbox/dbox to mbox, MailDir or eml format 
(or any other easy to import format)?

Thanks,
Adam




Re: [Sieve] Matches on body content - looking for working example

2018-09-20 Thread Adam Raszkiewicz
I know your example will work but I'm looking for something similar like

if envelope :matches "From" "*" { set "sender" "${0}"; }

but with the body :content


On 9/19/18, 6:22 PM, "Doug Hardie"  wrote:


> On 19 September 2018, at 12:54, Adam Raszkiewicz 
 wrote:
> 
> I have tried to do something like
>  
> if body :content ["multipart"] :matches ["Original-Message-ID" “*”] { set 
"Original_Message_ID" "${0}"; }
>  
> but instead getting Original Message ID I’m getting value from previous 
match which was
>  
> if envelope :matches "From" "*" { set "sender" "${0}"; }
>  
> Is there any example of working :matches matching-type with body?
>  
> Thanks


I have the following that works:

if allof (header :contains "from" "fbl-no-re...@postmaster.aol.com",
body :contains :raw "some text")
{
fileinto "Deleted Messages";
stop;
}






[Sieve] Matches on body content - looking for working example

2018-09-19 Thread Adam Raszkiewicz
I have tried to do something like

if body :content ["multipart"] :matches ["Original-Message-ID" “*”] { set 
"Original_Message_ID" "${0}"; }

but instead getting Original Message ID I’m getting value from previous match 
which was

if envelope :matches "From" "*" { set "sender" "${0}"; }

Is there any example of working :matches matching-type with body?

Thanks



[Sieve] How to retrieve part of message as a variable

2018-09-19 Thread Adam Raszkiewicz
I need to retrieve some parts of a message which looks like

Subject: Test message
Message-Id: <2788db2f-b5c3-4b8c-881e-362c3df4f915@server.local>
Mime-Version: 1.0
Content-Type: multipart/report; 
boundary="=_Part_fba0c199dfcd4d60ae506b37a6320a84"; 
report-type=disposition-notification
To: adam@test.local
Date: Mon, 17 Sep 2018 16:21:45 -0400 (EDT)
From: postmaster@server.local


--=_Part_fba0c199dfcd4d60ae506b37a6320a84
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

BTW, this is the correct notification ... it should be "failed" not "failure".
--=_Part_fba0c199dfcd4d60ae506b37a6320a84
Content-Type: message/notification
Content-Transfer-Encoding: 7bit

Final-Recipient: rfc822; eve@test.local
Original-Message-ID: <06dbfc12-57a5-49bd-84bd-a24bc3ba1e42@fake.cernerasp>

--=_Part_fba0c199dfcd4d60ae506b37a6320a84—

for an example I need to grab what is after “Final-Recipient: rfc822;” and 
“Original-Message-ID:” and store them as variables

Thanks


Sieve and output variable for execute

2018-09-19 Thread Adam Raszkiewicz
I'm trying to get blow Sieve filter to work
require ["fileinto", "imap4flags", "mailbox", "body", "envelope", 
"vnd.dovecot.pipe", "variables", "vnd.dovecot.execute"];

if envelope :matches "To" "*@*" {
  set "recipient" "${0}";
  set "user" "${1}";
  set "recip_domain" "${2}";
}

if envelope :matches "From" "*" {
  set "sender" "${0}";
}

#Check if recipient is valid user
if execute :output "valid_user" "user-verification" "${recipient}" {
if string :matches "${valid_user}" "True" {
  if body :raw :contains ["message/notification"] {
setflag "\\Seen";
fileinto :create "Notifications";
stop;
  }
}
}

Where user-verification is an extprogram which calls API and verify user based 
on email address then returns boolean (as an output to the console).
Everything works fine when I will remove if string :matches "${valid_user}" 
"True"statement other way it looks like is not recognizing valid_uservariable.
When I pipe valid_user to some script just to capture value for that variable 
it throws an error:

error: specified :args item `True?' is invalid.

Why question mark was added to the variable in this case?
Thoughts?