NFS and performances

2023-03-10 Thread tomate aceite
Thanks


how to setup timestamp

2023-03-10 Thread tomate aceite
*Thanks** Alessio Cecchi*


index locally

2023-03-10 Thread tomate aceite
Thanks guys for all the help. I will check if i can do a rsync script.


index locally

2023-03-07 Thread tomate aceite
Hello,

Do you know if is possible to store indexes locally instead of NFS in
dovecot 2.2.7 ?

Thanks.


how to setup timestamp

2023-03-07 Thread tomate aceite
Does anyone got any example about how to implement delay_until = timestamp ?

I am not sure where i can setup it.

Thanks!


dovecot director how to obtain hashed

2023-02-16 Thread tomate aceite
Morning again!  Working with my directors node.

Does anybody now how to obtain a list of all users hashes?

I know how to obtain for one user example:

*doveadm director status  user@domain*

I am looking to a way or command to take a list of hashed epired

(1)#: doveadm director status manolito@mydomain
> Current: 10.X.X.108 (expires 2023-02-17 12:17:59)
> Hashed: 10.X.X.108
> Initial config: 10.X.X.108
>


Where are stored the hashed ? To lock for the info , etc...

Thanks in advance!!!


NFS and performances

2023-02-15 Thread tomate aceite
Hello,  i have some question about NFS, dovecot director, and imap settings.

I was reading all dovecot documentation ad mail lists, but some aspect  are
not clear to me.

I am looking for performance / tunning my infra to work in a more efficient
way because we experiences some issues some days ago.

This is my infra:

I got an infra with 2 dovecot-directors and 3 imap backend.
I got all the emails stored in a common NFS share filer to all the imap
nodes. ( Index are locally stored in each imap node.)


My NFS mount options:

(0)#: nfsstat -m

/data/mail from myipaddress:/export/mail/maildirs
>  Flags:
> rw,nosuid,noexec,noatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,nordirplus,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=10.0.0.205,mountvers=3,mountport=20048,mountproto=tcp,local_lock=none,addr=10.0.0.205
>


*Questions*:  ( https://wiki.dovecot.org/PerformanceTuning ,
https://doc.dovecot.org/configuration_manual/nfs/  >> i am following these
steps )

1) Is my NFS correct setup with the mount options well optimized ?  Not
sure if someone is using the same flags that me or got a better
recomendation to used.

2) Set *mmap_disable = yes ???  * >>  This must be set to yes if you store
indexes to shared filesystems. In my case i got them locally in each imap
node not in NFS share folder.

I got setup  mmap_disable = no , is this correct?  I think no is the
correct option here with indexes locally.

because i can read here:

  https://wiki1.dovecot.org/NFS

>
> >> High performance NFS setup with indexes on local disk (see below for
> benefits):
>
> mmap_disable = no
>


3) Set* mail_fsync = always  ???*

Documentation: https://wiki.dovecot.org/PerformanceTuning

always
>
> Use fsync after all disk writes.
>
> Recommended for NFS to make sure there aren’t any delayed write()s.
>

3.a) where i can setup this option *mail_fsync = always , *because i run
doveconf -n in director,  and imap nodes, and they are not showing nothing.

3.b) *In which node ? *Do i need to add  the setting in dovecot.conf
in *director
node or in imap node or in both ?*  Not sure if this is the correct way:

This is an attemp of setup, not sure if is correct?

0)#: doveconf -n
> # 2.3.13 (89f716dc2): /etc/dovecot/dovecot.conf
> # Pigeonhole version 0.5.13 (cdd19fe3)
> # OS: Linux 5.10.0-20-amd64 x86_64 Debian 11.6
>
> mail_debug = yes
> mail_fsync = always
> mail_max_userip_connections = 20
> mail_nfs_storage = yes
> mail_plugins = " notify mail_log"
> mail_privileged_group = mail
>
>
>
> protocol lmtp {
>   mail_fsync = always
>   mail_plugins = " notify mail_log sieve mail_lua push_notification
> push_notification_lua"
>   plugin {
>...
>   }
>


4) Do not set *mail_nfs_index *or *mail_nfs_storage* (i.e. keep them as no)
  ?

First option make sense but the second one not.

https://doc.dovecot.org/settings/core/#core_setting-mail_nfs_storage

mail_nfs_storage
>>>
>>> Default: no
>>>
>>> Values: Boolean
>>>
>>> Flush NFS caches whenever it is necessary to do so.
>>>
>>
> This setting should only be enabled if you are using multiple servers
> on NFS.
>

So should be possible to enable this option   *mail_nfs_storage = yes ?*




4) I got this setting in *dovecot-sql.conf  ( director )  *

driver = mysql
> connect = host=myserver.X dbname=maildb user=dovecot
> password=
> default_pass_scheme = SHA
> password_query = select login as user, crypt_sha1 as password, home as
> userdb_home, uid AS userdb_uid, gid AS userdb_gid,
> concat(maildir,':INDEX=/data/indexes/',login) as userdb_mail from mailbox
> left join aliases on aliases.systemid = aliasid where login = '%u' and
> inactive = 0;
> user_query = select home, maildir as mail, uid, gid from mailbox left join
> aliases on aliases.systemid = aliasid where login = '%u' and inactive = 0;
> iterate_query = select distinct login as user from mailbox;
>


I would like to implement * ITERINDEX*  and probably *VOLATILEDIR *but not
sure if this is the correct change or if i need to change something into
the database.

from:

password_query = select login as user, crypt_sha1 as password, home as
> userdb_home, uid AS userdb_uid, gid AS userdb_gid,
> concat(maildir,':INDEX=/data/indexes/',login) as userdb_mail from mailbox
> left join aliases on aliases.systemid = aliasid where login = '%u' and
> inactive = 0;
>

to:

password_query = select login as user, crypt_sha1 as password, home as
> userdb_home, uid AS userdb_uid, gid AS userdb_gid,
> concat(maildir,':INDEX=/data/indexes/',login,':ITERINDEX',':VOLATILEDIR=/tmp/%2.256Nu/%u',login)
> as userdb_mail from mailbox left join aliases on aliases.systemid = aliasid
> where login = '%u' and inactive = 0;
>


But not sure if is working correctly,  * i checked debuging* in my imap
node in this way:

auth_verbose = yes
> auth_verbose_passwords = no
> auth_debug = yes
> auth_debug_passwords = yes
> mail_debug = yes
> verbose_ssl = yes
>

This is the output log:


Feb 15 09:32:53