Re: Hiding imap account and still using it for outgoing email

2022-06-06 Thread Hippo Man
Well, I got impatient and decided to try this approach.

And it works!

-- 
 hippo...@gmail.com
 Take a hippopotamus to lunch today.


On Mon, Jun 6, 2022 at 2:43 PM Hippo Man  wrote:

> I'm using dovecot 2.3.18 with a fairly recent version of postfix
> on my Debian-11 box.
>
> I have a question, and I'm not sure whether it pertains to
> dovecot, postfix, or both. I'm asking first here, but I'm glad
> to go to a postfix forum if it turns out that my question
> doesn't pertain to dovecot.
>
> On my server, account management in both dovecot and
> postfix is managed by the same mysql database, and postfix
> is configured to use dovecot's authentication mechanism.
>
> I have an email address which I do not want to be seen as
> one which can be accessed for imap nor pop3. However, I
> want to receive email to that address, and I, myself, still do
> want to be able to use imap or pop3 in order to access
> email that is sent to that address.
>
> I have something I want to try in order to accomplish this, but
> before I do, I want to make sure that no one can see any issues
> or "gotchas" with the following approach, or perhaps that there
> is an easier, more straightforward way to accomplish what I want
> to do:
>
> Assume the email address in question is "myem...@domain.com",
> and assume that I own and manage the "domain.com" domain.
>
> (1) Create another email address called "ot...@domain.com",
> and set it up with the same configuration as is currently set up
> for "myem...@domain.com"
>
> (2) In all my email clients, set the outgoing mail address and
> reply-to address for "ot...@domain.com" to be "myem...@domain.com".
> This way, all outgoing email from "ot...@domain.com" will look
> like it is being sent from "myem...@domain.com".
>
> (3) Change "myemail.com" (in the database used by dovecot
> and postfix) from being a bona-fide email address into
> becoming simply a forwarding email alias for "ot...@domain.com".
>
> (4) In all my email clients, change the inbox that I previously used
> for "myem...@domain.com" to now be associated with
> "ot...@domain.com".
>
> So ... if anyone sends email to "myem...@domain.com", it will
> automatically go to the "ot...@domain.com" inbox. And when I reply
> to those emails, the sender and reply-to addresses will still be
> "myem...@domain.com".
>
> And now, dovecot will no longer see "myem...@domain.com" as a
> mailbox from which email can be retrieved. And I will still be able to
> retrieve that email via imap or pop3 from the "ot...@domain.com"
> account.
>
> Do you folks think this will work? And again, is there perhaps a
> simpler way to accomplish this?
>
> Thank you in advance for any thoughts and suggestions.
>
> --
>  hippo...@gmail.com
>  Take a hippopotamus to lunch today.
>


Hiding imap account and still using it for outgoing email

2022-06-06 Thread Hippo Man
I'm using dovecot 2.3.18 with a fairly recent version of postfix
on my Debian-11 box.

I have a question, and I'm not sure whether it pertains to
dovecot, postfix, or both. I'm asking first here, but I'm glad
to go to a postfix forum if it turns out that my question
doesn't pertain to dovecot.

On my server, account management in both dovecot and
postfix is managed by the same mysql database, and postfix
is configured to use dovecot's authentication mechanism.

I have an email address which I do not want to be seen as
one which can be accessed for imap nor pop3. However, I
want to receive email to that address, and I, myself, still do
want to be able to use imap or pop3 in order to access
email that is sent to that address.

I have something I want to try in order to accomplish this, but
before I do, I want to make sure that no one can see any issues
or "gotchas" with the following approach, or perhaps that there
is an easier, more straightforward way to accomplish what I want
to do:

Assume the email address in question is "myem...@domain.com",
and assume that I own and manage the "domain.com" domain.

(1) Create another email address called "ot...@domain.com",
and set it up with the same configuration as is currently set up
for "myem...@domain.com"

(2) In all my email clients, set the outgoing mail address and
reply-to address for "ot...@domain.com" to be "myem...@domain.com".
This way, all outgoing email from "ot...@domain.com" will look
like it is being sent from "myem...@domain.com".

(3) Change "myemail.com" (in the database used by dovecot
and postfix) from being a bona-fide email address into
becoming simply a forwarding email alias for "ot...@domain.com".

(4) In all my email clients, change the inbox that I previously used
for "myem...@domain.com" to now be associated with
"ot...@domain.com".

So ... if anyone sends email to "myem...@domain.com", it will
automatically go to the "ot...@domain.com" inbox. And when I reply
to those emails, the sender and reply-to addresses will still be
"myem...@domain.com".

And now, dovecot will no longer see "myem...@domain.com" as a
mailbox from which email can be retrieved. And I will still be able to
retrieve that email via imap or pop3 from the "ot...@domain.com"
account.

Do you folks think this will work? And again, is there perhaps a
simpler way to accomplish this?

Thank you in advance for any thoughts and suggestions.

-- 
 hippo...@gmail.com
 Take a hippopotamus to lunch today.


Re: Occasional service disruptions

2022-06-06 Thread Oscar del Rio

On 2022-06-06 12:59 p.m., Nikolaos Milas wrote:


Any other suggestions regarding process_limit and service_count values?

Are there any rules of thumb for determining optimal values for these 
and/or other critical configuration parameters?




The limits are explained here:
https://doc.dovecot.org/configuration_manual/service_configuration/

In my case, I've only had to adjust process_limit for service.imap and 
service.imap-login, similar to yours.


Re: Occasional service disruptions

2022-06-06 Thread Nikolaos Milas

On 6/6/2022 7:09 μ.μ., Oscar del Rio wrote:

increasing inotify settings, as the error message suggests. E.g. in 
/etc/sysctl.conf


Thanks Oscar,

I did that.

Any other suggestions regarding process_limit and service_count values?

Are there any rules of thumb for determining optimal values for these 
and/or other critical configuration parameters?


Cheers,
Nick



Re: Occasional service disruptions

2022-06-06 Thread Oscar del Rio

On 2022-06-06 11:38 a.m., Nikolaos Milas wrote:
Jun 06 12:01:22 imap(user1)<29639>: Warning: Inotify 
instance limit for user 500 (UID vmail) exceeded, disabling. Increase 
/proc/sys/fs/inotify/max_user_instances

...
Jun 06 12:01:26 imap(user2)<29793>: Warning: Inotify 
instance limit for user 500 (UID vmail) exceeded, disabling. Increase 
/proc/sys/fs/inotify/max_user_instances


Restarting Dovecot returns things back to normal.


This might help:
https://doc.dovecot.org/configuration_manual/os/

increasing inotify settings, as the error message suggests. E.g. in 
/etc/sysctl.conf


Occasional service disruptions

2022-06-06 Thread Nikolaos Milas

Hello,

On a server with (Postfix and) Dovecot 2.3.18 (on a VM running CentOS 7 
- 1 CPU, 5 GB RAM) with the config you will see below, we are facing 
occasional (infrequent) service disruptions: IMAP service seems 
unavailable to some users.


Jun  6 12:01:25 vweb2 roundcube: <1eecb0d4> IMAP Error: Login failed for 
imaptester against vmail2.noa.gr from 195.251.202.xxx. Could not connect 
to ssl://vmail2.noa.gr:993: Connection rejected in 
/var/webs/webmail/rcube/program/lib/Roundcube/rcube_imap.php on line 211 
(POST /?_task=login&_action=login)


At that time there was no associated logged event in dovecot log. (Other 
users are logging in and out.)


However, I see some warnings (I list the two of them closest to the 
above event):


Jun 06 12:01:22 imap(user1)<29639>: Warning: Inotify 
instance limit for user 500 (UID vmail) exceeded, disabling. Increase 
/proc/sys/fs/inotify/max_user_instances

...
Jun 06 12:01:26 imap(user2)<29793>: Warning: Inotify 
instance limit for user 500 (UID vmail) exceeded, disabling. Increase 
/proc/sys/fs/inotify/max_user_instances


(In above log excerpts I've only modified real usernames.)

Restarting Dovecot returns things back to normal.

I have tried to use "service_count = 100" in all configured services, to 
see how it goes.


Most of the config is inherited from the past (older versions) and is 
not optimized. For example one can observe different "process_limit" 
values for different services, for no apparent reason I am aware of.


Could anyone suggest changes and/or additions to the OS and/or Dovecot 
to resolve this issue?


Any additional suggestions will also be welcome.

Thanks in advance for your kind assistance.

Here is the config (I've only changed postmaster address):

===

protocols = imap pop3 sieve lmtp

login_greeting = Dovecot NOA ICXC-NIKA

log_path = /var/log/dove.log

mail_location = maildir:~/Maildir/

mail_gid = 500
mail_uid = 500

auth_mechanisms = plain login
auth_username_format = %Ln

auth_verbose = no
auth_debug = no
mail_debug = no

disable_plaintext_auth = no

mail_plugins = quota mail_log notify

protocol imap {
  imap_client_workarounds = "delay-newmail"
  mail_plugins = quota imap_quota mail_log notify
  mail_max_userip_connections = 400

  namespace inbox {
   mailbox Trash {
    autoexpunge = 15d
   }
  }
}

protocol pop3 {
  mail_max_userip_connections = 3
  mail_plugins = quota notify
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_uidl_format = %08Xu%08Xv

  namespace inbox {
   mailbox Trash {
    autoexpunge = 15d
   }
  }
}

protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  mail_plugins = quota notify sieve
  postmaster_address = xx...@noa.gr
  sendmail_path = /usr/lib/sendmail
}

protocol lmtp {
  auth_socket_path = /var/run/dovecot/auth-master
  postmaster_address = xx...@noa.gr
  mail_plugins = quota notify sieve
  sendmail_path = /usr/lib/sendmail
}

protocol sieve {
  managesieve_max_line_length = 65536
  mail_max_userip_connections = 10
  managesieve_logout_format = bytes=%i/%o

  managesieve_max_compile_errors = 10
}

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

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

plugin {
  mail_log_events = delete undelete expunge copy mailbox_delete 
mailbox_rename flag_change save mailbox_create

  mail_log_fields = uid box msgid size flags vsize from subject

  quota = maildir:User quota
  quota_rule = *:storage=15G
  quota_rule2 = Trash:storage=+3%%
  quota_warning = storage=75%% quota-warning 75 %u
  quota_warning2 = storage=90%% quota-warning 90 %u

  sieve = file:~/sieve;active=~/.dovecot.sieve
  sieve_max_script_size = 0
  sieve_max_actions = 0
  sieve_max_redirects = 2
}

service quota-warning {
  executable = script /opt/mail1.sh
  user = vmail
  unix_listener quota-warning {
    user = vmail
  }
}

service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-master {
    group = vmail
    mode = 0660
    user = vmail
  }
  user = root
}

service imap-login {
  service_count = 100
  vsz_limit = 64 M
  process_limit = 500
}

service pop3-login {
  service_count = 100
  vsz_limit = 64 M
}

service managesieve-login {
  inet_listener sieve {
    port = 4190
  }

  service_count = 100
  process_min_avail = 0
  vsz_limit = 64M
}

service managesieve {
  process_limit = 1024
}

service imap {
  executable = imap postlogin
  process_limit = 2048
}

service pop3 {
  executable = pop3 postlogin
}

service postlogin {
  executable = script-login -d rawlog
  unix_listener postlogin {
  }
}

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

ssl = yes
ssl_cert = 

Re: Replicator: Panic: data stack: Out of memory

2022-06-06 Thread Ivan Jurišić
Dana 06.06.2022 14:14, Paul Kudla (SCOM.CA Internet Services Inc.) je 
napisao(la):

did you get this figured out / working
getting posts out of order - just wanted to make sure your ok?


Replication not work, now have problem with "data stack", error is:

Jun 06 15:49:32 
doveadm(ivan@myserv.local)<79253>: Panic: data 
stack: Out of memory when allocating 536870952 bytes


I have lots free memory and not sure what is problem?

# free -m
   totalusedfree  shared  buff/cache   
available
Mem:795626854966  26 305 
   5151

Swap:   7629   07629


Re: Replicator: Panic: data stack: Out of memory

2022-06-06 Thread Paul Kudla (SCOM.CA Internet Services Inc.)



did you get this figured out / working

getting posts out of order - just wanted to make sure your ok?



Happy Monday !!!
Thanks - paul

Paul Kudla


Scom.ca Internet Services 
004-1009 Byron Street South
Whitby, Ontario - Canada
L1N 4S3

Toronto 416.642.7266
Main 1.866.411.7266
Fax 1.888.892.7266
Email p...@scom.ca

On 6/6/2022 4:03 AM, Ivan Jurišić wrote:


Dana 04.06.2022 15:34, Paul Kudla (SCOM.CA Internet Services Inc.) je 
napisao(la):

   ok thanks for the info
   from here you need to turn on full debugging and then filter the 
log by

   "replicat"


Now replication work when set vsz_limit in service aggregator and remove 
parametar replication_dsync_parameters and 
replication_full_sync_interval from my 90-replicator.conf. Now my 
configuration work for replication on another mail server.


Config file for replication /etc/dovecot/conf.d/90-replicator.conf
--

service aggregator {
   vsz_limit = 256M
   fifo_listener replication-notify-fifo {
     user = vmail
   }
   unix_listener replication-notify {
     user = vmail
   }
}

service replicator {
   process_min_avail = 1
   unix_listener replicator-doveadm {
     mode = 0600
     user = vmail
   }
}

service doveadm {
   inet_listener {
     port = 12345
     ssl = no
   }
}

replication_max_conns = 100
#replication_dsync_parameters = -d -N -l 30 -U
#replication_full_sync_interval = 1 days

doveadm_port = 12345
doveadm_password = Jados82!

plugin {
   mail_replica = tcp:imap.myserv2.local:12345
}



Re: Replicator: Panic: data stack: Out of memory

2022-06-06 Thread Ivan Jurišić

Sry, I check my logs and this configuration of replication is not help.

Jun 06 12:05:40 
doveadm(ivan@myserv.local)<2864367>: Panic: data 
stack: Out of memory when allocating 134217768 bytes
Jun 06 12:05:40 
doveadm(ivan@myserv.local)<2864367>: Error: Raw 
backtrace: /usr/lib/dovecot/libdovecot.so.0(backtrace_append+0x42) 
[0x7f722cdb6582] -> /usr/lib/dovecot/libdovecot.so.0(backtrace_get+0x1e) 
[0x7f722cdb669e] -> /usr/lib/dovecot/libdovecot.so.0(+0x1022fb) 
[0x7f722cdc32fb] -> /usr/lib/dovecot/libdovecot.so.0(+0x102391) 
[0x7f722cdc3391] -> /usr/lib/dovecot/libdovecot.so.0(+0x55589) 
[0x7f722cd16589] -> /usr/lib/dovecot/libdovecot.so.0(+0x54d52) 
[0x7f722cd15d52] -> /usr/lib/dovecot/libdovecot.so.0(+0xfb808) 
[0x7f722cdbc808] -> 
/usr/lib/dovecot/libdovecot.so.0(t_strdup_until+0x21) [0x7f722cdf95c1] 
-> dovecot/doveadm-server(dsync_mailbox_tree_find_delete+0x1a5) 
[0x5622f20c6e05] -> dovecot/doveadm-server(+0x4fe05) [0x5622f20bbe05] -> 
dovecot/doveadm-server(dsync_brain_recv_mailbox_tree_deletes+0xd8) 
[0x5622f20bcd68] -> dovecot/doveadm-server(dsync_brain_run+0x1ce) 
[0x5622f20b938e] -> dovecot/doveadm-server(+0x4da85) [0x5622f20b9a85] -> 
dovecot/doveadm-server(+0x5f3cf) [0x5622f20cb3cf] -> 
/usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x69) [0x7f722cdd9529] 
-> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0x132) 
[0x7f722cddac12] -> 
/usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0x50) 
[0x7f722cdd95d0] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x40) 
[0x7f722cdd9790] -> dovecot/doveadm-server(+0x31195) [0x5622f209d195] -> 
dovecot/doveadm-server(+0x33a05) [0x5622f209fa05] -> 
dovecot/doveadm-server(doveadm_cmd_ver2_to_mail_cmd_wrapper+0x2ca) 
[0x5622f20a0aba] -> dovecot/doveadm-server(doveadm_cmd_run_ver2+0x501) 
[0x5622f20b1161] -> dovecot/doveadm-server(+0x495aa) [0x5622f20b55aa] -> 
/usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x69) [0x7f722cdd9529] 
-> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0x132) 
[0x7f722cddac12] -> 
/usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0x50) 
[0x7f722cdd95d0] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x40) 
[0x7f722cdd9790] -> 
/usr/lib/dovecot/libdovecot.so.0(master_service_run+0x13) 
[0x7f722cd4c353] -> dovecot/doveadm-server(main+0x102) [0x5622f208ffc2] 
-> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea) 
[0x7f722c9ded0a]



Dana 06.06.2022 10:03, Ivan Jurišić je napisao(la):

Dana 04.06.2022 15:34, Paul Kudla (SCOM.CA Internet Services Inc.) je 
napisao(la):

ok thanks for the info
from here you need to turn on full debugging and then filter the log 
by

"replicat"


Now replication work when set vsz_limit in service aggregator and 
remove parametar replication_dsync_parameters and 
replication_full_sync_interval from my 90-replicator.conf. Now my 
configuration work for replication on another mail server.


Config file for replication /etc/dovecot/conf.d/90-replicator.conf
--

service aggregator {
vsz_limit = 256M
fifo_listener replication-notify-fifo {
user = vmail
}
unix_listener replication-notify {
user = vmail
}
}

service replicator {
process_min_avail = 1
unix_listener replicator-doveadm {
mode = 0600
user = vmail
}
}

service doveadm {
inet_listener {
port = 12345
ssl = no
}
}

replication_max_conns = 100
#replication_dsync_parameters = -d -N -l 30 -U
#replication_full_sync_interval = 1 days

doveadm_port = 12345
doveadm_password = Jados82!

plugin {
mail_replica = tcp:imap.myserv2.local:12345
}


Re: Replicator: Panic: data stack: Out of memory

2022-06-06 Thread Ivan Jurišić
Dana 04.06.2022 15:34, Paul Kudla (SCOM.CA Internet Services Inc.) je 
napisao(la):

   ok thanks for the info
   from here you need to turn on full debugging and then filter the log 
by

   "replicat"


Now replication work when set vsz_limit in service aggregator and remove 
parametar replication_dsync_parameters and 
replication_full_sync_interval from my 90-replicator.conf. Now my 
configuration work for replication on another mail server.


Config file for replication /etc/dovecot/conf.d/90-replicator.conf
--

service aggregator {
  vsz_limit = 256M
  fifo_listener replication-notify-fifo {
user = vmail
  }
  unix_listener replication-notify {
user = vmail
  }
}

service replicator {
  process_min_avail = 1
  unix_listener replicator-doveadm {
mode = 0600
user = vmail
  }
}

service doveadm {
  inet_listener {
port = 12345
ssl = no
  }
}

replication_max_conns = 100
#replication_dsync_parameters = -d -N -l 30 -U
#replication_full_sync_interval = 1 days

doveadm_port = 12345
doveadm_password = Jados82!

plugin {
  mail_replica = tcp:imap.myserv2.local:12345
}


Re: Sieve configuration for roundcube

2022-06-06 Thread Vladislav Kurz

Dne 05. 06. 22 v 4:27 Jeremy Hansen napsal(a):
Any pointers to get dovecot configured with sieve for Roundcube filters? 
  Things I’ve found through search seem a bit all over the place. I’m 
using CentOS 8/Rocky Linux hosts.


Thanks





managesieve plugin for roundcube should be able to configure sieve 
scripts if you open sieve port on dovecot.


--
Best regards
Vladislav Kurz