Re: Suggestions for dovecot-submission (XCLIENT NAME attribute)

2019-03-11 Thread Aki Tuomi via dovecot


 
 
  
   
  
  
   
On 8 March 2019 17:59 Marcelo Coelho via dovecot <
dovecot@dovecot.org> wrote:
   
   

   
   

   
   
Hi,
   
   

   
   
Currently, Dovecot Submission doesn't forward NAME attribute when XCLIENT is enable:
   
   

   
   
Received: from server.example.org (localhost [1.2.3.4])
   
   
(Authenticated sender: 
t...@example.org)
   
   
by localhost (Postfix) with ESMTPA id AA
   
   
for <
u...@domain.com>; Fri, 8 Mar 2019 12:28:02
   
   

   
   
Postfix adds a header with the sender IP address (1.2.3.4), but with localhost as hostname.
   
   

   
   
It would be great if Dovecot Submission send NAME attribute, with the resolved hostname of the sender IP (ADDR attribute).
   
   

   
   

   
   
Thank you!
   
   

   
   

   
   
--
   
   
Marcelo Coelho
   
  
  
   
  
  
   Hi,
  
  
   
  
  
   we have seen this suggestion. We'll consider it.
  
  
   ---
Aki TuomiOpen-Xchange Oy
   
 



RE: Sieve scripts not triggered on IMAP inbound messages using IMAPC

2019-03-11 Thread Fred via dovecot
Stephan--

Thank you for the troubleshooting link. I've already been through that and
every other HowTo I could find. The likely underlying problem is that I'm
not using an LDA -- I'm simply using this as a proxy using IMAPC.

I can define static rules in dovecot.conf and they get triggered (e.g., when
moving a message between folders), similar to this:

imapsieve_mailbox1_name= *
imapsieve_mailbox1_causes  = COPY APPEND FLAG
imapsieve_mailbox1_before  =
file:/var/vmail/sieve/global/spam_rule.sieve

This will trigger on an existing message, such as if I manually move a
message from the inbox into trash, or mark the message as read. What I want
to have happen is for this rule (or something similar) to trigger when a
message is initially received into the inbox.


Op 08/03/2019 om 15:12 schreef Fred via dovecot:
>
> Good morning.
>
> I am using Dovecot as an IMAP proxy -- using IMAPC -- and the system 
> is working great. Thank you for contributing such great software to 
> the community!
>
> I’m using Dovcot 2.3.5 and Pigeonhole 0.5.5.
>
> My server is located behind a content-filtering firewall that will 
> mark incoming messages by adding “[SPAM]” to the subject line. I’m 
> trying to use Sieve to identify those messages and move them into the 
> Spam folder. I have a basic Sieve script that looks like this:
>
>    require ["fileinto"];
>
>    if anyof (header :contains "Subject" "[SPAM]",
>
>      header :contains "X-Spam-Flag" "Yes")
>
>    {
>
>    fileinto "Spam";
>
>    stop;
>
>    }
>
> I can see in the logs that Sieve is loaded, and also the 
> imapsieve_plugin
>
>    Debug: sieve: Pigeonhole version 0.5.5 (2483b085) initializing
>
>    Debug: sieve: Sieve imapsieve plugin for Pigeonhole version 0.5.5
> (2483b085) loaded
>
> Sieve detects outbound messages (from the log: Debug: imapsieve: 
> mailbox INBOX.Sent: APPEND event) but nothing registers for inbound, 
> and my spam_rule is never triggered. Any suggestions?
>

https://wiki.dovecot.org/Pigeonhole/Sieve/Troubleshooting

> Here is the output from “Dovecot -n”:
>
> # 2.3.5 (513208660): /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)  xfs
>
> # Hostname: 
>
> auth_master_user_separator = *
>
> auth_mechanisms = PLAIN LOGIN
>
> auth_verbose_passwords = plain
>
> deliver_log_format = from=%{from}, envelope_sender=%{from_envelope}, 
> subject=%{subject}, msgid=%m, size=%{size}, %$
>
> dict {
>
>   acl = pgsql:/etc/dovecot/dovecot-share-folder.conf
>
>   quotadict = pgsql:/etc/dovecot/dovecot-used-quota.conf
>
> }
>
> first_valid_uid = 2000
>
> imapc_features = fetch-bodystructure fetch-headers
>
> imapc_host = 
>
> imapc_port = 993
>
> imapc_ssl = imaps
>
> imapc_ssl_verify = no
>
> last_valid_uid = 2000
>
> listen = * [::]
>
> mail_debug = yes
>
> mail_gid = 2000
>
> mail_home = /var/mail/imapc/home/%d/%n
>
> mail_location = imapc:/var/mail/imapc/%d/%n
>
> mail_plugins = mailbox_alias mail_log notify
>
> mail_uid = 2000
>
> 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
>
>   list = yes
>
>   location =
>
>   prefix =
>
>   separator = .
>
>   type = private
>
> }
>
> passdb {
>
>   args = host=
>
>   default_fields = userdb_imapc_user=%u 
> userdb_imapc_password=#hidden_use-P_to_show#
>
>   driver = imap
>
> }
>
> passdb {
>
>   args = /etc/dovecot/dovecot-master-users
>
>   driver = passwd-file
>
>   master = yes
>
> }
>
> plugin {
>
>   imapsieve_default = /var/vmail/sieve/global/spam_rule.sieve
>
>   mail_log_events = delete undelete expunge mailbox_delete 
> mailbox_rename
>
>   mail_log_fields = uid box msgid size from subject
>
>   mailbox_alias_new = Sent Messages
>
>   mailbox_alias_new2 = Sent Items
>
>   mailbox_alias_old = Sent
>
>   mailbox_alias_old2 = Sent
>
>   sieve_global_dir = /var/vmail/sieve/global/
>
>   sieve_max_redirects = 30
>
>   sieve_plugins = sieve_imapsieve
>
>   sieve_trace_debug = yes
>
>   sieve_trace_dir = /var/log/dovecot
>
>   sieve_trace_level = matching
>
> }
>
> protocols = imap sieve
>
> service auth {
>
>   unix_listener /var/spool/postfix/private/dovecot-auth {
>
>     group = postfix
>
>     mode = 0666
>
>     user = postfix
>
>   }
>
>   unix_listener auth-master {
>
>     group = vmail
>
>     mode = 0666
>
>     user = vmail
>
>   }
>
>   unix_listener auth-userdb {
>
>     group = vmail
>
>     mode = 0660
>
>     user = vmail
>
>   }
>
> }
>
> service dict {
>
>   unix_listener dict {
>
>     group = vmail
>
>     mode = 0660
>
>     user = vmail
>
>   }
>
> }
>
> service imap-login {
>
>   process_limit = 500
>
>   

Re: imap-hibernate not working

2019-03-11 Thread Larry Rosenman via dovecot
If I can help (I'm the FreeBSD port maintainer for dovecot), I'm willing.

I can also provide access to a server to help debug

On Mon, Mar 11, 2019 at 7:54 PM Timo Sirainen via dovecot <
dovecot@dovecot.org> wrote:

> On 8 Mar 2019, at 20.44, Marcelo Coelho via dovecot 
> wrote:
> >
> > Hi,
> >
> > I follow different setup instructions and I can't make imap-hibernate
> work. I've tried vmail and dovecot as users, tried to set mode to 0666,
> without success. I'm using FreeBSD 11.2.
> >
> > Is imap-hibernate compatible with FreeBSD 11.2?
> >
> >
> >
> > My operational system:
> >
> > # uname -v
> > FreeBSD 11.2-RELEASE-p9 #0: Tue Feb  5 15:30:36 UTC 2019
>  r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC
> >
> > Here are my logs:
> >
> > Mar  8 15:30:57 servername dovecot: imap(u...@domain.com:52.125.128.90):
> Error: kevent(-1) for notify remove failed: Bad file descriptor
> > Mar  8 15:30:57 servername dovecot: imap(u...@domain.com:52.125.128.90):
> Error: close(-1) for notify remove failed: Bad file descriptor
> > Mar  8 15:30:57 servername dovecot: imap-hibernate: Error: Failed to
> parse client input: Invalid peer_dev_minor value: 18446744073709486335
> > Mar  8 15:30:57 servername dovecot: imap(u...@domain.com:52.125.128.90):
> Error: /opt/dovecot/2.3.5/var/run/dovecot/imap-hibernate returned failure:
> Failed to parse client input: Invalid peer_dev_minor value:
> 18446744073709486335
>
> Looks bad. I suppose it's broken with FreeBSD.
>
>

-- 
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 214-642-9640 (c) E-Mail: larry...@gmail.com
US Mail: 5708 Sabbia Dr, Round Rock, TX 78665-2106


Re: Delayed flags changes over IDLE

2019-03-11 Thread Timo Sirainen via dovecot
On 10 Mar 2019, at 10.14, Kostya Vasilyev via dovecot  
wrote:
> 
> My mail is stored under ~/mail/.imap (not sure what this format is called), I 
> mean not "single file mbox".
> 
> I have not changed any IDLE related config settings:
> 
> doveconf  | grep -i idle
> default_idle_kill = 1 mins
> director_ping_idle_timeout = 30 secs
> imap_idle_notify_interval = 2 mins
> imapc_max_idle_time = 29 mins
> mailbox_idle_check_interval = 30 secs
> 
> What can I do to make Dovecot notify IDLE clients about flags changes - more 
> quickly? Preferably near-instant?

It should simply just work, assuming there aren't any weird inotify limits, but 
you should get errors logged about reaching those. You could see if it makes 
any difference to set mailbox_idle_check_interval=1s



Re: imap-hibernate not working

2019-03-11 Thread Timo Sirainen via dovecot
On 8 Mar 2019, at 20.44, Marcelo Coelho via dovecot  wrote:
> 
> Hi,
> 
> I follow different setup instructions and I can't make imap-hibernate work. 
> I've tried vmail and dovecot as users, tried to set mode to 0666, without 
> success. I'm using FreeBSD 11.2.
> 
> Is imap-hibernate compatible with FreeBSD 11.2?
> 
> 
> 
> My operational system:
> 
> # uname -v
> FreeBSD 11.2-RELEASE-p9 #0: Tue Feb  5 15:30:36 UTC 2019 
> r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC 
> 
> Here are my logs:
> 
> Mar  8 15:30:57 servername dovecot: imap(u...@domain.com:52.125.128.90): 
> Error: kevent(-1) for notify remove failed: Bad file descriptor
> Mar  8 15:30:57 servername dovecot: imap(u...@domain.com:52.125.128.90): 
> Error: close(-1) for notify remove failed: Bad file descriptor
> Mar  8 15:30:57 servername dovecot: imap-hibernate: Error: Failed to parse 
> client input: Invalid peer_dev_minor value: 18446744073709486335
> Mar  8 15:30:57 servername dovecot: imap(u...@domain.com:52.125.128.90): 
> Error: /opt/dovecot/2.3.5/var/run/dovecot/imap-hibernate returned failure: 
> Failed to parse client input: Invalid peer_dev_minor value: 
> 18446744073709486335

Looks bad. I suppose it's broken with FreeBSD.



Re: submission-login: Fatal: master: service(submission-login):

2019-03-11 Thread Timo Sirainen via dovecot
On 11 Mar 2019, at 13.53, Marcelo Coelho via dovecot  
wrote:
> 
> Hi everyone!
> 
> I’m using dovecot 2.3.5. submission-login is crashing many times in a day:
> 
> Here is a sample error message:
> 
> dovecot: submission-login: Fatal: master: service(submission-login): child 
> 34247 killed with signal 11 (core not dumped - 
> https://dovecot.org/bugreport.html#coredumps - set service submission-login { 
> drop_priv_before_exec=yes })
> 
> After I added drop_priv_before_exec, I got these error messages:

If you're using Linux, you could alternatively: sysctl -w fs.suid_dumpable=2

> submission-login: Error: master-service: cannot get filters: 
> net_connect_unix(/var/run/dovecot/config) failed: Permission denied
> dovecot: master: Error: service(submission-login): command startup failed, 
> throttling for 2 secs


This could be avoided with adding to dovecot.conf:

service config {
  unix_listener config {
mode = 0666
  }
}



Re: Sieve scripts not triggered on IMAP inbound messages using IMAPC

2019-03-11 Thread Stephan Bosch via dovecot




Op 08/03/2019 om 15:12 schreef Fred via dovecot:


Good morning.

I am using Dovecot as an IMAP proxy -- using IMAPC -- and the system 
is working great. Thank you for contributing such great software to 
the community!


I’m using Dovcot 2.3.5 and Pigeonhole 0.5.5.

My server is located behind a content-filtering firewall that will 
mark incoming messages by adding “[SPAM]” to the subject line. I’m 
trying to use Sieve to identify those messages and move them into the 
Spam folder. I have a basic Sieve script that looks like this:


   require ["fileinto"];

   if anyof (header :contains "Subject" "[SPAM]",

     header :contains "X-Spam-Flag" "Yes")

   {

   fileinto "Spam";

   stop;

   }

I can see in the logs that Sieve is loaded, and also the imapsieve_plugin

   Debug: sieve: Pigeonhole version 0.5.5 (2483b085) initializing

   Debug: sieve: Sieve imapsieve plugin for Pigeonhole version 0.5.5 
(2483b085) loaded


Sieve detects outbound messages (from the log: Debug: imapsieve: 
mailbox INBOX.Sent: APPEND event) but nothing registers for inbound, 
and my spam_rule is never triggered. Any suggestions?




https://wiki.dovecot.org/Pigeonhole/Sieve/Troubleshooting


Here is the output from “Dovecot -n”:

# 2.3.5 (513208660): /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)  xfs


# Hostname: 

auth_master_user_separator = *

auth_mechanisms = PLAIN LOGIN

auth_verbose_passwords = plain

deliver_log_format = from=%{from}, envelope_sender=%{from_envelope}, 
subject=%{subject}, msgid=%m, size=%{size}, %$


dict {

  acl = pgsql:/etc/dovecot/dovecot-share-folder.conf

  quotadict = pgsql:/etc/dovecot/dovecot-used-quota.conf

}

first_valid_uid = 2000

imapc_features = fetch-bodystructure fetch-headers

imapc_host = 

imapc_port = 993

imapc_ssl = imaps

imapc_ssl_verify = no

last_valid_uid = 2000

listen = * [::]

mail_debug = yes

mail_gid = 2000

mail_home = /var/mail/imapc/home/%d/%n

mail_location = imapc:/var/mail/imapc/%d/%n

mail_plugins = mailbox_alias mail_log notify

mail_uid = 2000

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

  list = yes

  location =

  prefix =

  separator = .

  type = private

}

passdb {

  args = host=

  default_fields = userdb_imapc_user=%u 
userdb_imapc_password=#hidden_use-P_to_show#


  driver = imap

}

passdb {

  args = /etc/dovecot/dovecot-master-users

  driver = passwd-file

  master = yes

}

plugin {

  imapsieve_default = /var/vmail/sieve/global/spam_rule.sieve

  mail_log_events = delete undelete expunge mailbox_delete mailbox_rename

  mail_log_fields = uid box msgid size from subject

  mailbox_alias_new = Sent Messages

  mailbox_alias_new2 = Sent Items

  mailbox_alias_old = Sent

  mailbox_alias_old2 = Sent

  sieve_global_dir = /var/vmail/sieve/global/

  sieve_max_redirects = 30

  sieve_plugins = sieve_imapsieve

  sieve_trace_debug = yes

  sieve_trace_dir = /var/log/dovecot

  sieve_trace_level = matching

}

protocols = imap sieve

service auth {

  unix_listener /var/spool/postfix/private/dovecot-auth {

    group = postfix

    mode = 0666

    user = postfix

  }

  unix_listener auth-master {

    group = vmail

    mode = 0666

    user = vmail

  }

  unix_listener auth-userdb {

    group = vmail

    mode = 0660

    user = vmail

  }

}

service dict {

  unix_listener dict {

    group = vmail

    mode = 0660

    user = vmail

  }

}

service imap-login {

  process_limit = 500

  service_count = 1

}

service lmtp {

  executable = lmtp -L

  inet_listener lmtp {

    address = 127.0.0.1

    port = 24

  }

  process_min_avail = 5

  unix_listener /var/spool/postfix/private/dovecot-lmtp {

    group = postfix

    mode = 0600

    user = postfix

  }

  user = vmail

}

service managesieve-login {

  inet_listener sieve {

    address = 127.0.0.1

    port = 4190

  }

}

ssl = required

ssl_cert = ssl_cipher_list = 
ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5


ssl_client_ca_file = /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem

ssl_dh = # hidden, use -P to show it

ssl_key = # hidden, use -P to show it

ssl_prefer_server_ciphers = yes

syslog_facility = local5

userdb {

  driver = prefetch

}

protocol imap {

  imap_client_workarounds = tb-extra-mailbox-sep

  mail_max_userip_connections = 30

  mail_plugins = mailbox_alias mail_log notify imap_sieve

}

protocol sieve {

  info_log_path = /var/log/dovecot/sieve-info.log

  log_path = /var/log/dovecot/sieve-err.log

  managesieve_implementation_string = 

dovecot Connection closed IDLE running

2019-03-11 Thread Adrian Minta via dovecot



Hello,

sometimes I get lines like this on mail log.

Mar 11 07:57:14 mail2 dovecot: imap(john@domain.ro): Connection 
closed (IDLE running for 0.006 + waiting input for 1765.640 secs, 0.001 
in locks, 2 B in + 10+0 B out, state=wait-input) in=323201 out=3177999


Mar 11 07:58:56 mail3 dovecot: imap(john@domain.ro): Connection 
closed (IDLE running for 0.005 + waiting input for 3535.348 secs, 0.001 
in locks, 2 B in + 10+0 B out, state=wait-input) in=1627 out=14872
Mar 11 08:38:50 mail2 dovecot: imap(s...@domain.ro): Connection closed 
(IDLE running for 2.225 + waiting input for 267.413 secs, 0.005 in 
locks, 2 B in + 10+0 B out, state=wait-input) in=7212 out=2503
Mar 11 09:01:23 mail2 dovecot: imap(john@domain.ro): Connection 
closed (FETCH running for 8.784 + waiting input for 0.001 secs, 0.008 in 
locks, 24 B in + 6291+6291 B out, state=wait-input) in=196 out=43968
Mar 11 09:02:57 mail1 dovecot: imap(b...@domain.ro): Connection closed 
(IDLE running for 0.006 + waiting input for 1031.530 secs, 0.001 in 
locks, 2 B in + 10+0 B out, state=wait-input) in=9157 out=381003
Mar 11 09:33:31 mail2 dovecot: imap(john@domain.ro): Connection 
closed (IDLE running for 0.008 + waiting input for 1737.458 secs, 0.001 
in locks, 2 B in + 41+0 B out, state=wait-input) in=7871 out=322122


Our dovecot version is 2.2.27 and the mail storage is maildir.

What is the cause ? Could this negatively affects the users ?

--
Best regards,
Adrian Minta




Re: Delayed flags changes over IDLE

2019-03-11 Thread Kostya Vasilyev via dovecot
Aki,

Please see below.

On Mon, Mar 11, 2019, at 12:58 PM, Aki Tuomi via dovecot wrote:
> 
> On 10.3.2019 10.14, Kostya Vasilyev via dovecot wrote:
> > Hello,
> >
> > I'm experiencing slow flags changes over IMAP IDLE:
> >
> > - If I start an IDLE session / command
> > - Change the flags of some messages via another email app
> > - Dovecot can take a minute or more to notify the IDLE connection about 
> > flags changes
> >
> > If I use another email app to add or remove a message, Dovecot sends that 
> > (EXISTS / EXPUNGE) instantly and also flushes the (so far delayed) flags 
> > changes. So it does "know" already.
> >
> > The system is Debian Testing, 64 bit, file system is ext4.
> >
> > Dovecot is 2.3.4.1 (f79e8e7e4) - I believe from Debian repos (I had 
> > Dovecot's own repo added at some point, disabled now).
> >
> > My mail is stored under ~/mail/.imap (not sure what this format is called), 
> > I mean not "single file mbox".
> >
> > I have not changed any IDLE related config settings:
> >
> > doveconf  | grep -i idle
> > default_idle_kill = 1 mins
> > director_ping_idle_timeout = 30 secs
> > imap_idle_notify_interval = 2 mins
> > imapc_max_idle_time = 29 mins
> > mailbox_idle_check_interval = 30 secs
> >
> > What can I do to make Dovecot notify IDLE clients about flags changes - 
> > more quickly? Preferably near-instant?
> >
> Can you send doveconf -n?



doveconf -n
# 2.3.4.1 (f79e8e7e4): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.4 ()
# OS: Linux 4.18.16-x86_64-linode118 x86_64 Debian buster/sid 
# Hostname: kman.mobi
auth_default_realm = kman.mobi
auth_mechanisms = plain login
login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c %k
mail_location = mbox:~/mail:INBOX=/var/mail/%n
mail_privileged_group = mail
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
auto = create
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
auto = create
special_use = \Sent
  }
  mailbox "Sent Messages" {
special_use = \Sent
  }
  mailbox Trash {
auto = create
special_use = \Trash
  }
  prefix = 
}
passdb {
  args = scheme=CRYPT username_format=%u /etc/dovecot/users
  driver = passwd-file
}
protocols = " imap"
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
  }
}
service imap-login {
  inet_listener imap {
port = 0
  }
}
service pop3-login {
  inet_listener pop3 {
port = 0
  }
}
ssl_cert = 

submission-login: Fatal: master: service(submission-login):

2019-03-11 Thread Marcelo Coelho via dovecot
Hi everyone!

I’m using dovecot 2.3.5. submission-login is crashing many times in a day:

Here is a sample error message:

dovecot: submission-login: Fatal: master: service(submission-login): child 
34247 killed with signal 11 (core not dumped - 
https://dovecot.org/bugreport.html#coredumps - set service submission-login { 
drop_priv_before_exec=yes })

After I added drop_priv_before_exec, I got these error messages:

submission-login: Error: master-service: cannot get filters: 
net_connect_unix(/var/run/dovecot/config) failed: Permission denied
dovecot: master: Error: service(submission-login): command startup failed, 
throttling for 2 secs

How to get submission core dumps properly?

Thank you.

— 
Marcelo Coelho



Re: Delayed flags changes over IDLE

2019-03-11 Thread Aki Tuomi via dovecot


On 10.3.2019 10.14, Kostya Vasilyev via dovecot wrote:
> Hello,
>
> I'm experiencing slow flags changes over IMAP IDLE:
>
> - If I start an IDLE session / command
> - Change the flags of some messages via another email app
> - Dovecot can take a minute or more to notify the IDLE connection about flags 
> changes
>
> If I use another email app to add or remove a message, Dovecot sends that 
> (EXISTS / EXPUNGE) instantly and also flushes the (so far delayed) flags 
> changes. So it does "know" already.
>
> The system is Debian Testing, 64 bit, file system is ext4.
>
> Dovecot is 2.3.4.1 (f79e8e7e4) - I believe from Debian repos (I had Dovecot's 
> own repo added at some point, disabled now).
>
> My mail is stored under ~/mail/.imap (not sure what this format is called), I 
> mean not "single file mbox".
>
> I have not changed any IDLE related config settings:
>
> doveconf  | grep -i idle
> default_idle_kill = 1 mins
> director_ping_idle_timeout = 30 secs
> imap_idle_notify_interval = 2 mins
> imapc_max_idle_time = 29 mins
> mailbox_idle_check_interval = 30 secs
>
> What can I do to make Dovecot notify IDLE clients about flags changes - more 
> quickly? Preferably near-instant?
>
Can you send doveconf -n?

Aki



Re: Assistance with doveadm backup...

2019-03-11 Thread Natu via dovecot
Well for the purpose of upgrading your server, you could do the following:

 1. Rsync your maildir directories to a backup directory
 2. repeat rsync again so most of your changed files have been synced
 3. shut down your dovecot and smtp servers
 4. rsync one more time - should be relatively fast
 5. restart your dovecot and smtp servers

Otherwise, just schedule downtime and use whatever backup method you
prefer. You will probably want to backup and then leave dovecot and smtp
server down until you've completed the dovecot upgrade anyway, so you
may as well schedule downtime for the entire process and do the dovecot
upgrade between steps 4 and 5 above.

Natu




On 3/10/19 10:07 PM, Aki Tuomi via dovecot wrote:
> I'd say the correct term is not broken but missing. backup was
> implemented in later version. 
>
> With maildir keeping a copy of the content is sufficient backup. 
>
> Aki
>> On 11 March 2019 03:39 SH Development via dovecot
>>  wrote:
>>
>>
>> Ok, so for lack of any other information, am I to conclude that the
>> doveadm backup command is broken in 2.0.9?  I have been through the
>> wiki for it back and forth and cannot make it work.
>>
>> Yes, I need to upgrade, there is no question, but I won’t do that
>> without a maildir backup.  I would prefer to use the built-in dovecot
>> mechanisms for that than something else.
>>
>> Jeff
>>
>>> On Mar 10, 2019, at 12:09 PM, SH Development via dovecot <
>>> dovecot@dovecot.org > wrote:
>>> Okay then.  Is there a document on how to do that in place?  That
>>> was one of the reasons I was trying to do a backup first.
>>>
>>> Jeff
>>>
>>>
 On Mar 10, 2019, at 4:12 AM, Aki Tuomi via dovecot <
 dovecot@dovecot.org > wrote:
 You should upgrade 2.2 first.

 Aki
> On 10 March 2019 10:45 SH Development via dovecot <
> dovecot@dovecot.org > wrote:
>
>
> V 2.0.9
>
> Jeff
>
>> On Mar 10, 2019, at 12:07 AM, Aki Tuomi via dovecot <
>> dovecot@dovecot.org > wrote:
>> What version are you using?
>>
>> Aki
>>> On 10 March 2019 00:40 SH Development via dovecot <
>>> dovecot@dovecot.org > wrote:
>>>
>>>
>>> Okay, apparently I’m just a complete idiot. Why doesn’t this work?
>>>
>>> doveadm -Dv backup -u user
>>> Maildir:/mnt/maelstrombackups/vmailbackup
>>>
>>> With user being the actual user name.
>>>
>>> No backup is created, it just shows me the usage text.
>>>
>>> Jeff
>>>
 On Feb 20, 2019, at 10:11 PM, SH Development <
 listacco...@starionline.com
 > wrote:

 I am having trouble locating examples of how to use doveadm
 backup. All the examples I see are for sync. I simply want to
 create a backup to a network volume of the email server's vmail
 folders. The goal here is to have a reasonably current backup
 should the main drive on the email server go south.

 We currently authenticate our users from a mysql database.
 User’s mailboxes are stored as domainname/username/Maildir

 I assume what I will wind up on the network volume is a
 duplicate directory structure as the vmail folder on the email
 server?

 Can someone help get me started here?

 Jeff
>>
>> ---
>> Aki Tuomi
>

 ---
 Aki Tuomi
>>>
>>
>
> ---
> Aki Tuomi




Re: readonly archive folders using squashfs

2019-03-11 Thread Natu via dovecot
On 3/9/19 11:49 PM, Yassine Chaouche via dovecot wrote:
> For every u...@domain.tld I created a u...@backup.domain.tld where he
> could look up deleted messages (archive).
>
> I then made u...@backup.domain.tld's cur directory a shared directory
> to u...@domain.tld but only with read privileges. So, anytime the user
> wants to read his old messages, he only needs to read his .archive
> folder, which is u...@backup.domain.tld's cur. No need to make the
> filesystem read-only.

Thank you.  This is a little bit different from what I am looking to do,
but gives me ideas on at least one possibility of how to implement it. 
The reason that I am interested in the squashfs read-only filesystem is
it has decent performance and from tests that I did it gave me between
40 and 78 % compression rates of maildir folders.  The best compression
rates are for tiny messages that have no attachments in them (because of
the minimum block limits of files in most file systems.  Squashfs has
much less overhead here).  I would probably just do an annual or bi
annual archive run and move all messages older than a year into archive
format.

>
> The difficulty is to make sure that every e-mail, sent or received,
> gets backed up properly before being deleted. Relying on cron jobs is
> not an option since the e-mail can be deleted and expunged before the
> script has a chance to get executed and do the backup. So what I did
> is to create a hidden sieve filter for every user's **main** mailbox
> (u...@domain.tld) that automatically creates a copy of every incoming
> message to the u...@backup.domain.tld mailbox. For outgoing e-mail,
> one can do a bcc map in postfix (or the equivalent in other SMTP
> software) that ensures that every sent mail is also sent to
> user+s...@backup.domain.tld, then you can create a filter in the
> user's **backup** mailbox (u...@backup.domain.tld) that filters on the
> user+sent part of the e-mail and stores every e-mail sent to that
> e-mail address to the .Sent directory in the u...@backup.domain.tld
> mailbox.
>
>
> Finally, the backup.domain.tld doesn't even have to be declared in the
> DNS nor in /etc/hosts and can be entirely virtual to the MTA (for ex.
> in postfix that would only be added to virtual_mailbox_domains)
>
> Yassine.
>
> On 3/8/19 12:49 AM, Natu via dovecot wrote:
>> I have a dovecot server running under CentOS using maildir format.  Due
>> to the issue with minimum blocksize for files I would like to offer some
>> kind of readonly archive using something like the compressed squashfs
>> where I would move messages to be archived to a maildir folder and then
>> convert "cur" directory into a squashfs and mount it in place of the
>> original directory so my biggest users could have readonly access to
>> older messages without it using so much disk space.
>>
>> Has anyone tried anything like this before and is dovecot likely to
>> complain about the readonly cur directory?  If the complaints are
>> minimal and didn't cause other problems it might be ok.  Any better
>> ideas to implement something like this?
>>
>> Thank You,
>>
>> Natu
>>
>>