Re: Timeout when opening folder

2024-06-28 Thread Entrepreneur AJ via dovecot
Im starting to think maybe its an issue with Calico's BGP setup with my 
provider, other email clients are getting connectivity errors instead of 
timeouts, If we could leave this thread in limbo whilst I do some digging on 
that side and will update once I determine if that's the issue.
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Timeout when opening folder

2024-06-26 Thread John Stoffel via dovecot
> "Entrepreneur" == Entrepreneur AJ via dovecot  
> writes:

Ok so does it work moving mails to a new folder or not?  The lots
are showing a bunch of useless (to this problem of saving mails to a
new folder) SSL: issues.  

The rest of the log lines look good, since you can look up users in
the userdb.  But have you been able to fix your problem?  

> Applied John's recommendation and getting less in the logs now but
> here is the full log from fresh pod start (confirmed to be a single
> pod deployment only. Personal IP MODIFIED:



> [eaj@lpt1 ~]$ k logs -f pod/dovecot-86c75498c8-hdqtr
> Jun 26 09:32:10 master: Info: Dovecot v2.3.21 (47349e2482) starting up for 
> imap, lmtp
> Jun 26 09:32:38 imap-login: Debug: SSL: where=0x10, ret=1: before SSL 
> initialization
> Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: before SSL 
> initialization
> Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2002, ret=-1: before SSL 
> initialization
> Jun 26 09:32:38 auth: Debug: Loading modules from directory: 
> /usr/lib/dovecot/auth
> Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: before SSL 
> initialization
> Jun 26 09:32:38 auth: Debug: Module loaded: 
> /usr/lib/dovecot/auth/lib20_auth_var_expand_crypt.so
> Jun 26 09:32:38 auth: Debug: Module loaded: 
> /usr/lib/dovecot/auth/libdriver_pgsql.so
> Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS read 
> client hello
> Jun 26 09:32:38 auth: Debug: sqlpool(pgsql): Creating new connection
> Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write 
> server hello
> Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write 
> change cipher spec
> Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: TLSv1.3 write 
> encrypted extensions
> Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write 
> certificate
> Jun 26 09:32:38 auth: Debug: Wrote new auth token secret to 
> /var/run/dovecot//auth-token-secret.dat
> Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: TLSv1.3 write 
> server certificate verify
> Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write 
> finished
> Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: TLSv1.3 early 
> data
> Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2002, ret=-1: TLSv1.3 early 
> data
> Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2002, ret=-1: TLSv1.3 early 
> data
> Jun 26 09:32:38 auth: Debug: sqlpool(pgsql): Creating new connection
> Jun 26 09:32:38 auth: Debug: auth client connected (pid=10)
> Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2002, ret=-1: TLSv1.3 early 
> data
> Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2002, ret=-1: TLSv1.3 early 
> data
> Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: TLSv1.3 early 
> data
> Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS read 
> finished
> Jun 26 09:32:38 imap-login: Debug: SSL: where=0x20, ret=1: SSLv3/TLS write 
> session ticket
> Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write 
> session ticket
> Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write 
> session ticket
> Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2002, ret=1: SSL negotiation 
> finished successfully
> Jun 26 09:32:38 auth: Debug: client in: AUTH  1   PLAIN   service=imap
> secured=tls session=qx70sccb5tfCz3qglip=10.244.24.239   
> rip=194.207.0.0 lport=993   rport=55270 local_name=imap.eajglobal.net
> Jun 26 09:32:38 auth: Debug: client passdb out: CONT  1   
> Jun 26 09:32:38 auth: Debug: client in: CONT
> Jun 26 09:32:38 auth: Debug: 
> sql(e...@eajglobal.com,194.207.0.0,): Performing passdb 
> lookup
> Jun 26 09:32:38 auth: Debug: 
> sql(e...@eajglobal.com,194.207.0.0,): query: SELECT userid 
> as user, password, '/srv/vmail/eaj' as userdb_home, 'maildir:/srv/vmail/eaj' 
> as userdb_mail, 1000 as  userdb_uid, 1000 as userdb_gid FROM mailboxes WHERE 
> userid = 'eaj' AND deleted_at IS NULL
> Jun 26 09:32:38 auth: Debug: pgsql(postgres-primary.postgres.svc): Finished 
> query 'SELECT userid as user, password, '/srv/vmail/eaj' as userdb_home, 
> 'maildir:/srv/vmail/eaj' as userdb_mail, 1000 as  userdb_uid, 1000 as 
> userdb_gid FROM mailboxes WHERE userid = 'eaj' AND deleted_at IS NULL' in 2 
> msecs
> Jun 26 09:32:38 auth: Debug: 
> sql(e...@eajglobal.com,194.207.0.0,): username changed 
> e...@eajglobal.com -> eaj
> Jun 26 09:32:38 auth: Debug: sql(eaj,194.207.0.0,): 
> Finished passdb lookup
> Jun 26 09:32:38 auth: Debug: auth(eaj,194.207.0.0,): Auth 
> request finished
> Jun 26 09:32:38 auth: Debug: client passdb out: OK1   user=eaj
> original_user=e...@eajglobal.com
> Jun 26 09:32:38 auth: Debug: master in: REQUEST   2651455489  10  
> 1   3f75659e5b7188588f19d7ed4874cb8asession_pid=13  
> request_auth_token
> Jun 26 09:32:38 auth: Debug: 

Re: Timeout when opening folder

2024-06-26 Thread Entrepreneur AJ via dovecot
If it helps;

Dockerfile:
FROM alpine:3.20

RUN apk add dovecot dovecot-pgsql dovecot-lmtpd
RUN addgroup -S -g 1000 vmail && adduser -S vmail -G vmail -u 1000 -h /srv/vmail
RUN rm -rf /etc/dovecot && mkdir /etc/dovecot && mkdir /etc/dovecot/conf.d

ADD dovecot.conf /etc/dovecot/dovecot.conf
ADD conf.d/* /etc/dovecot/conf.d/

CMD ["/usr/sbin/dovecot", "-F"]

dovecot-sql-cm.yml:
apiVersion: v1
kind: ConfigMap
metadata:
  name: dovecot-sql
  namespace: email
data:
  dovecot-sql.conf.ext: |
driver = pgsql
connect = host=DBHOST dbname=DBNAME user=DBUSER password=PSQLPASS
default_pass_scheme = ARGON2ID
iterate_query = SELECT userid AS user FROM mailboxes
user_query = SELECT '/srv/vmail/%n' as home, 'maildir:/srv/vmail/%n' as 
mail, 1000 AS uid, 1000 AS gid FROM mailboxes WHERE userid = '%n' AND 
deleted_at IS NULL
password_query = SELECT userid as user, password, '/srv/vmail/%n' as 
userdb_home, 'maildir:/srv/vmail/%n' as userdb_mail, 1000 as  userdb_uid, 1000 
as userdb_gid FROM mailboxes WHERE userid = '%n' AND deleted_at IS NULL

pvc.yml:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: mail-store
  namespace: email
spec:
  accessModes:
- ReadWriteOnce
  resources:
requests:
  storage: 1Gi

tls-cert.yml:
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: dovecot
  namespace: email
spec:
  secretName: dovecot-le-cert
  dnsNames:
  - imap.eajglobal.net
  issuerRef:
name: letsencrypt
kind: ClusterIssuer
group: cert-manager.io
---
apiVersion: v1
kind: Secret
metadata:
  name: dovecot-rest-certs
  namespace: email
type: kubernetes.io/tls
data:
  tls.crt: |
ATRESTENCRYPTIONCERT
  tls.key: |
ATRESTENCRYPTIONKEY

deployment.yml:
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
app.kubernetes.io/name: dovecot
  name: dovecot
  namespace: email
spec:
  revisionHistoryLimit: 1
  selector:
matchLabels:
  app.kubernetes.io/name: dovecot
  template:
metadata:
  creationTimestamp: null
  labels:
app.kubernetes.io/name: dovecot
spec:
  imagePullSecrets:
  - name: glreg-dovecot
  volumes:
  - name: ssl-certs
secret:
  secretName: dovecot-le-cert
  - name: rest-certs
secret:
  secretName: dovecot-rest-certs
  - name: sql-config
configMap:
  name: dovecot-sql
  items:
  - key: dovecot-sql.conf.ext
path: dovecot-sql.conf.ext
  - name: mail-store
persistentVolumeClaim:
  claimName: mail-store
  containers:
- name: dovecot
  image: 
registry.gitlab.com/eajglobal/email-services/imap-server:LATESTSHAREF
  imagePullPolicy: IfNotPresent
  ports:
  - name: imaps
containerPort: 993
protocol: TCP
  - name: lmtp
containerPort: 24
protocol: TCP
  volumeMounts:
- name: ssl-certs
  mountPath: /etc/dovecot/certs
- name: rest-certs
  mountPath: /etc/dovecot/rest-certs
- name: sql-config
  mountPath: /etc/dovecot/dovecot-sql.conf.ext
  subPath: dovecot-sql.conf.ext
- name: mail-store
  mountPath: "/srv/vmail"
  dnsPolicy: ClusterFirstWithHostNet
  restartPolicy: Always
  schedulerName: default-scheduler
  securityContext: {}
  terminationGracePeriodSeconds: 30

imap-svc.yml:
apiVersion: v1
kind: Service
metadata:
  name: imaps
  namespace: email
  labels:
app.kubernetes.io/name: dovecot
spec:
  selector:
app.kubernetes.io/name: dovecot
  externalTrafficPolicy: Local
  externalIPs: ["195.184.0.0"]
  ports:
- name: imaps
  protocol: TCP
  port: 993
  targetPort: 993
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Timeout when opening folder

2024-06-26 Thread Entrepreneur AJ via dovecot
Applied John's recommendation and getting less in the logs now but here is the 
full log from fresh pod start (confirmed to be a single pod deployment only. 
Personal IP MODIFIED:

[eaj@lpt1 ~]$ k logs -f pod/dovecot-86c75498c8-hdqtr
Jun 26 09:32:10 master: Info: Dovecot v2.3.21 (47349e2482) starting up for 
imap, lmtp
Jun 26 09:32:38 imap-login: Debug: SSL: where=0x10, ret=1: before SSL 
initialization
Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: before SSL 
initialization
Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2002, ret=-1: before SSL 
initialization
Jun 26 09:32:38 auth: Debug: Loading modules from directory: 
/usr/lib/dovecot/auth
Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: before SSL 
initialization
Jun 26 09:32:38 auth: Debug: Module loaded: 
/usr/lib/dovecot/auth/lib20_auth_var_expand_crypt.so
Jun 26 09:32:38 auth: Debug: Module loaded: 
/usr/lib/dovecot/auth/libdriver_pgsql.so
Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS read 
client hello
Jun 26 09:32:38 auth: Debug: sqlpool(pgsql): Creating new connection
Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write 
server hello
Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write 
change cipher spec
Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: TLSv1.3 write 
encrypted extensions
Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write 
certificate
Jun 26 09:32:38 auth: Debug: Wrote new auth token secret to 
/var/run/dovecot//auth-token-secret.dat
Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: TLSv1.3 write 
server certificate verify
Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write 
finished
Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: TLSv1.3 early data
Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2002, ret=-1: TLSv1.3 early data
Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2002, ret=-1: TLSv1.3 early data
Jun 26 09:32:38 auth: Debug: sqlpool(pgsql): Creating new connection
Jun 26 09:32:38 auth: Debug: auth client connected (pid=10)
Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2002, ret=-1: TLSv1.3 early data
Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2002, ret=-1: TLSv1.3 early data
Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: TLSv1.3 early data
Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS read 
finished
Jun 26 09:32:38 imap-login: Debug: SSL: where=0x20, ret=1: SSLv3/TLS write 
session ticket
Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write 
session ticket
Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write 
session ticket
Jun 26 09:32:38 imap-login: Debug: SSL: where=0x2002, ret=1: SSL negotiation 
finished successfully
Jun 26 09:32:38 auth: Debug: client in: AUTH1   PLAIN   service=imap
secured=tls session=qx70sccb5tfCz3qglip=10.244.24.239   
rip=194.207.0.0 lport=993   rport=55270 local_name=imap.eajglobal.net
Jun 26 09:32:38 auth: Debug: client passdb out: CONT1   
Jun 26 09:32:38 auth: Debug: client in: CONT
Jun 26 09:32:38 auth: Debug: 
sql(e...@eajglobal.com,194.207.0.0,): Performing passdb lookup
Jun 26 09:32:38 auth: Debug: 
sql(e...@eajglobal.com,194.207.0.0,): query: SELECT userid as 
user, password, '/srv/vmail/eaj' as userdb_home, 'maildir:/srv/vmail/eaj' as 
userdb_mail, 1000 as  userdb_uid, 1000 as userdb_gid FROM mailboxes WHERE 
userid = 'eaj' AND deleted_at IS NULL
Jun 26 09:32:38 auth: Debug: pgsql(postgres-primary.postgres.svc): Finished 
query 'SELECT userid as user, password, '/srv/vmail/eaj' as userdb_home, 
'maildir:/srv/vmail/eaj' as userdb_mail, 1000 as  userdb_uid, 1000 as 
userdb_gid FROM mailboxes WHERE userid = 'eaj' AND deleted_at IS NULL' in 2 
msecs
Jun 26 09:32:38 auth: Debug: 
sql(e...@eajglobal.com,194.207.0.0,): username changed 
e...@eajglobal.com -> eaj
Jun 26 09:32:38 auth: Debug: sql(eaj,194.207.0.0,): Finished 
passdb lookup
Jun 26 09:32:38 auth: Debug: auth(eaj,194.207.0.0,): Auth 
request finished
Jun 26 09:32:38 auth: Debug: client passdb out: OK  1   user=eaj
original_user=e...@eajglobal.com
Jun 26 09:32:38 auth: Debug: master in: REQUEST 2651455489  10  1   
3f75659e5b7188588f19d7ed4874cb8asession_pid=13  request_auth_token
Jun 26 09:32:38 auth: Debug: sql(eaj,194.207.0.0,): 
Performing userdb lookup
Jun 26 09:32:38 auth: Debug: sql(eaj,194.207.0.0,): SELECT 
'/srv/vmail/eaj' as home, 'maildir:/srv/vmail/eaj' as mail, 1000 AS uid, 1000 
AS gid FROM mailboxes WHERE userid = 'eaj' AND deleted_at IS NULL
Jun 26 09:32:38 auth: Debug: pgsql(postgres-primary.postgres.svc): Finished 
query 'SELECT '/srv/vmail/eaj' as home, 'maildir:/srv/vmail/eaj' as mail, 1000 
AS uid, 1000 AS gid FROM mailboxes WHERE userid = 'eaj' AND deleted_at IS NULL' 
in 2 msecs
Jun 26 09:32:38 auth: Debug: sql(eaj,194.207.0.0,): Finished 

Re: Timeout when opening folder

2024-06-25 Thread infoomatic via dovecot

My guess is that this is a kubernetes specific issue and not a dovecot
issue.

Please provide kubernetes logs. Also: how is your storage implemented?
Any chance more than one dovecot instance are accessing that storage? Is
the storage available on the node where the container runs?

Regards,
Robert


On 24.06.24 23:52, Entrepreneur AJ via dovecot wrote:

Hi all, I'm stuck with an issue.

Migrating everything to a k0s kubernetes cluster, trying to migrate
dovecot and all so far seems to be well with PVC for mail storage, ssl
working great, authentication vis PostgreSQL working great.

Issue is when trying to look at another folder say Deleted or Spam etc
folder I am getting a timeout error with no logs.

___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: Timeout when opening folder

2024-06-25 Thread John Stoffel via dovecot
> "Entrepreneur" == Entrepreneur AJ via dovecot  
> writes:

> Migrating everything to a k0s kubernetes cluster, trying to migrate
> dovecot and all so far seems to be well with PVC for mail storage,
> ssl working great, authentication vis PostgreSQL working great.

So how do you have your local storage defined in your kubernetes
cluster?  That strikes me (as a total Kubernetes noob) as the possible
issue you're running into.  Your /src/vmail/sr
> Issue is when trying to look at another folder say Deleted or Spam etc 
> folder I am getting a timeout error with no logs.

> I disabled apparmour on the nodes the try again and the following error 
> message appears;

> Jun 24 21:01:55 imap-login: Info: Login: user=, method=PLAIN, 
> rip=194.207.0.0, lip=10.244.24.235, mpid=15, TLS, session=
> Jun 24 21:01:55 imap(eaj)<15>: Debug: Added userdb 
> setting: mail=maildir:/srv/vmail/eaj
> Jun 24 21:01:55 imap(eaj)<15>: Debug: Effective 
> uid=1000, gid=1000, home=/srv/vmail/eaj
> Jun 24 21:01:55 imap(eaj)<15>: Debug: 
> open(/proc/self/io) failed: Permission denied
> Jun 24 21:01:55 imap(eaj)<15>: Debug: Namespace inbox: 
> type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, 
> subscriptions=yes location=maildir:/srv/vmail/eaj
> Jun 24 21:01:55 imap(eaj)<15>: Debug: maildir++: 
> root=/srv/vmail/eaj, index=, indexpvt=, control=, inbox=/srv/vmail/eaj, alt=
> Jun 24 21:01:55 imap(eaj)<14><3PRZF6kb0JHCz3qg>: Debug: Mailbox INBOX: 
> Mailbox opened
> Jun 24 21:02:24 imap(eaj)<15>: Debug: Mailbox Sent: 
> Couldn't open mailbox in list index: Storage size changed 160 != 396
> Jun 24 21:02:24 imap(eaj)<15>: Debug: Mailbox Sent: 
> Mailbox opened
> Jun 24 21:02:24 imap(eaj)<15>: Debug: Mailbox Drafts: 
> Couldn't open mailbox in list index: Storage size changed 160 != 396
> Jun 24 21:02:24 imap(eaj)<15>: Debug: Mailbox Drafts: 
> Mailbox opened

> Thunderbird keeps showing a timeout error after a few minutes.

> Dovecot Version: 2.3.21 (47349e2482)

> dovecot -n config:
> # 2.3.21 (47349e2482): /etc/dovecot/dovecot.conf
> # OS: Linux 5.15.0-112-generic x86_64
> # Hostname: dovecot-549bdc98ff-tzwcf
> auth_debug = yes
> auth_debug_passwords = yes
> auth_mechanisms = plain login
> auth_verbose = yes
> auth_verbose_passwords = yes
> base_dir = /var/run/dovecot/
> first_valid_uid = 1000
> import_environment = TZ
> last_valid_uid = 1000
> log_path = /dev/stdout
> login_greeting = IMAP ready.
> mail_debug = yes
> mail_home = /srv/vmail/%n
> mail_location = maildir:~

I think this is wrong, you really want something like:

  mail_home = 
  mail_location = maildir:/srv/vmail/%d/%n/Maildir

Because you don't have local directories for your users.  You're doing
completely virtual, so I think this is what you want instead.  Also,
for future growth, you might want to add %d (domain) in your path just
in case.  

> namespace inbox {
>    hidden = no
>    inbox = yes
>    list = yes
>    location =
>    mailbox Drafts {
>      auto = subscribe
>      special_use = \Drafts
>    }
>    mailbox Junk {
>      special_use = \Junk
>    }
>    mailbox Sent {
>      auto = subscribe
>      special_use = \Sent
>    }
>    mailbox "Sent Messages" {
>      special_use = \Sent
>    }
>    mailbox Spam {
>      auto = subscribe
>      special_use = \Junk
>    }
>    mailbox Trash {
>      auto = subscribe
>      special_use = \Trash
>    }
>    prefix =
>    subscriptions = yes
>    type = private
> }
> passdb {
>    args = /etc/dovecot/dovecot-sql.conf.ext
>    driver = sql
> }
> plugin {
>    acl = vfile:/etc/dovecot/global-acls:cache_secs=300
>    acl_shared_dict = file:/var/lib/dovecot/shared-mailboxes
>    imap_compress_deflate_level = 9
>    mail_crypt_global_private_key = # hidden, use -P to show it
>    mail_crypt_global_public_key = # hidden, use -P to show it
>    mail_crypt_save_version = 2
>    zlib_save = zstd
>    zlib_save_level = 3
> }
> service auth-worker {
>    user = vmail
> }
> service auth {
>    unix_listener auth-userdb {
>      group = vmail
>      mode = 0600
>      user = vmail
>    }
> }
> service dict {
>    unix_listener dict {
>      group = vmail
>      mode = 0660
>      user = vmail
>    }
> }
> service imap-login {
>    inet_listener imap {
>      port = 143
>    }
>    inet_listener imaps {
>      port = 993
>      ssl = yes
>    }
> }
> service lmtp {
>    inet_listener lmtp {
>      port = 24
>    }
>    user = vmail
> }
> service pop3-login {
>    inet_listener pop3 {
>      port = 0
>    }
>    inet_listener pop3s {
>      port = 0
>      ssl = yes
>    }
> }
> service submission-login {
>    inet_listener submission {
>      port = 0
>    }
>    inet_listener submissions {
>      port = 0
>    }
> }
> ssl = required
> ssl_cert =  ssl_cipher_list = 
> 

Timeout when opening folder

2024-06-25 Thread Entrepreneur AJ via dovecot

Hi all, I'm stuck with an issue.

Migrating everything to a k0s kubernetes cluster, trying to migrate 
dovecot and all so far seems to be well with PVC for mail storage, ssl 
working great, authentication vis PostgreSQL working great.


Issue is when trying to look at another folder say Deleted or Spam etc 
folder I am getting a timeout error with no logs.


I disabled apparmour on the nodes the try again and the following error 
message appears;


Jun 24 21:01:55 imap-login: Info: Login: user=, method=PLAIN, 
rip=194.207.0.0, lip=10.244.24.235, mpid=15, TLS, session=
Jun 24 21:01:55 imap(eaj)<15>: Debug: Added userdb 
setting: mail=maildir:/srv/vmail/eaj
Jun 24 21:01:55 imap(eaj)<15>: Debug: Effective 
uid=1000, gid=1000, home=/srv/vmail/eaj
Jun 24 21:01:55 imap(eaj)<15>: Debug: 
open(/proc/self/io) failed: Permission denied
Jun 24 21:01:55 imap(eaj)<15>: Debug: Namespace inbox: 
type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, 
subscriptions=yes location=maildir:/srv/vmail/eaj
Jun 24 21:01:55 imap(eaj)<15>: Debug: maildir++: 
root=/srv/vmail/eaj, index=, indexpvt=, control=, inbox=/srv/vmail/eaj, alt=
Jun 24 21:01:55 imap(eaj)<14><3PRZF6kb0JHCz3qg>: Debug: Mailbox INBOX: 
Mailbox opened
Jun 24 21:02:24 imap(eaj)<15>: Debug: Mailbox Sent: 
Couldn't open mailbox in list index: Storage size changed 160 != 396
Jun 24 21:02:24 imap(eaj)<15>: Debug: Mailbox Sent: 
Mailbox opened
Jun 24 21:02:24 imap(eaj)<15>: Debug: Mailbox Drafts: 
Couldn't open mailbox in list index: Storage size changed 160 != 396
Jun 24 21:02:24 imap(eaj)<15>: Debug: Mailbox Drafts: 
Mailbox opened


Thunderbird keeps showing a timeout error after a few minutes.

Dovecot Version: 2.3.21 (47349e2482)

dovecot -n config:
# 2.3.21 (47349e2482): /etc/dovecot/dovecot.conf
# OS: Linux 5.15.0-112-generic x86_64
# Hostname: dovecot-549bdc98ff-tzwcf
auth_debug = yes
auth_debug_passwords = yes
auth_mechanisms = plain login
auth_verbose = yes
auth_verbose_passwords = yes
base_dir = /var/run/dovecot/
first_valid_uid = 1000
import_environment = TZ
last_valid_uid = 1000
log_path = /dev/stdout
login_greeting = IMAP ready.
mail_debug = yes
mail_home = /srv/vmail/%n
mail_location = maildir:~
namespace inbox {
  hidden = no
  inbox = yes
  list = yes
  location =
  mailbox Drafts {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    auto = subscribe
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Spam {
    auto = subscribe
    special_use = \Junk
  }
  mailbox Trash {
    auto = subscribe
    special_use = \Trash
  }
  prefix =
  subscriptions = yes
  type = private
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  acl = vfile:/etc/dovecot/global-acls:cache_secs=300
  acl_shared_dict = file:/var/lib/dovecot/shared-mailboxes
  imap_compress_deflate_level = 9
  mail_crypt_global_private_key = # hidden, use -P to show it
  mail_crypt_global_public_key = # hidden, use -P to show it
  mail_crypt_save_version = 2
  zlib_save = zstd
  zlib_save_level = 3
}
service auth-worker {
  user = vmail
}
service auth {
  unix_listener auth-userdb {
    group = vmail
    mode = 0600
    user = vmail
  }
}
service dict {
  unix_listener dict {
    group = vmail
    mode = 0660
    user = vmail
  }
}
service imap-login {
  inet_listener imap {
    port = 143
  }
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}
service lmtp {
  inet_listener lmtp {
    port = 24
  }
  user = vmail
}
service pop3-login {
  inet_listener pop3 {
    port = 0
  }
  inet_listener pop3s {
    port = 0
    ssl = yes
  }
}
service submission-login {
  inet_listener submission {
    port = 0
  }
  inet_listener submissions {
    port = 0
  }
}
ssl = required
ssl_cert = ssl_cipher_list = 
ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305

ssl_key = # hidden, use -P to show it
ssl_prefer_server_ciphers = yes
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
verbose_ssl = yes
protocol imap {
  mail_plugins =
  postmaster_address = postmas...@eajglobal.net
}
protocol lmtp {
  mail_plugins =
  postmaster_address = postmas...@eajglobal.net
}


Any pointers would be highly appreciated.

___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Timeout when opening folder

2024-06-24 Thread Entrepreneur AJ via dovecot


Hi all, I'm stuck with an issue.

Migrating everything to a k0s kubernetes cluster, trying to migrate 
dovecot and all so far seems to be well with PVC for mail storage, ssl 
working great, authentication vis PostgreSQL working great.


Issue is when trying to look at another folder say Deleted or Spam etc 
folder I am getting a timeout error with no logs.


I disabled apparmour on the nodes the try again and the following error 
message appears;


Jun 24 21:01:55 imap-login: Info: Login: user=, method=PLAIN, 
rip=194.207.0.0, lip=10.244.24.235, mpid=15, TLS, session=
Jun 24 21:01:55 imap(eaj)<15>: Debug: Added userdb 
setting: mail=maildir:/srv/vmail/eaj
Jun 24 21:01:55 imap(eaj)<15>: Debug: Effective 
uid=1000, gid=1000, home=/srv/vmail/eaj
Jun 24 21:01:55 imap(eaj)<15>: Debug: 
open(/proc/self/io) failed: Permission denied
Jun 24 21:01:55 imap(eaj)<15>: Debug: Namespace inbox: 
type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, 
subscriptions=yes location=maildir:/srv/vmail/eaj
Jun 24 21:01:55 imap(eaj)<15>: Debug: maildir++: 
root=/srv/vmail/eaj, index=, indexpvt=, control=, inbox=/srv/vmail/eaj, alt=
Jun 24 21:01:55 imap(eaj)<14><3PRZF6kb0JHCz3qg>: Debug: Mailbox INBOX: 
Mailbox opened
Jun 24 21:02:24 imap(eaj)<15>: Debug: Mailbox Sent: 
Couldn't open mailbox in list index: Storage size changed 160 != 396
Jun 24 21:02:24 imap(eaj)<15>: Debug: Mailbox Sent: 
Mailbox opened
Jun 24 21:02:24 imap(eaj)<15>: Debug: Mailbox Drafts: 
Couldn't open mailbox in list index: Storage size changed 160 != 396
Jun 24 21:02:24 imap(eaj)<15>: Debug: Mailbox Drafts: 
Mailbox opened


Thunderbird keeps showing a timeout error after a few minutes.

Dovecot Version: 2.3.21 (47349e2482)

dovecot -n config:
# 2.3.21 (47349e2482): /etc/dovecot/dovecot.conf
# OS: Linux 5.15.0-112-generic x86_64
# Hostname: dovecot-549bdc98ff-tzwcf
auth_debug = yes
auth_debug_passwords = yes
auth_mechanisms = plain login
auth_verbose = yes
auth_verbose_passwords = yes
base_dir = /var/run/dovecot/
first_valid_uid = 1000
import_environment = TZ
last_valid_uid = 1000
log_path = /dev/stdout
login_greeting = IMAP ready.
mail_debug = yes
mail_home = /srv/vmail/%n
mail_location = maildir:~
namespace inbox {
  hidden = no
  inbox = yes
  list = yes
  location =
  mailbox Drafts {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    auto = subscribe
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Spam {
    auto = subscribe
    special_use = \Junk
  }
  mailbox Trash {
    auto = subscribe
    special_use = \Trash
  }
  prefix =
  subscriptions = yes
  type = private
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  acl = vfile:/etc/dovecot/global-acls:cache_secs=300
  acl_shared_dict = file:/var/lib/dovecot/shared-mailboxes
  imap_compress_deflate_level = 9
  mail_crypt_global_private_key = # hidden, use -P to show it
  mail_crypt_global_public_key = # hidden, use -P to show it
  mail_crypt_save_version = 2
  zlib_save = zstd
  zlib_save_level = 3
}
service auth-worker {
  user = vmail
}
service auth {
  unix_listener auth-userdb {
    group = vmail
    mode = 0600
    user = vmail
  }
}
service dict {
  unix_listener dict {
    group = vmail
    mode = 0660
    user = vmail
  }
}
service imap-login {
  inet_listener imap {
    port = 143
  }
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}
service lmtp {
  inet_listener lmtp {
    port = 24
  }
  user = vmail
}
service pop3-login {
  inet_listener pop3 {
    port = 0
  }
  inet_listener pop3s {
    port = 0
    ssl = yes
  }
}
service submission-login {
  inet_listener submission {
    port = 0
  }
  inet_listener submissions {
    port = 0
  }
}
ssl = required
ssl_cert = ssl_cipher_list = 
ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305

ssl_key = # hidden, use -P to show it
ssl_prefer_server_ciphers = yes
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
verbose_ssl = yes
protocol imap {
  mail_plugins =
  postmaster_address = postmas...@eajglobal.net
}
protocol lmtp {
  mail_plugins =
  postmaster_address = postmas...@eajglobal.net
}


Any pointers would be highly appreciated.

___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org