Re: replication and spam removal ("doveadm expunge")

2020-04-04 Thread Aki Tuomi


 
 
  
   Can you provide doveconf -n and try turning on mail_debug=yes on both ends and try doveadm -Dv expunge 
  
  
   
  
  
   Aki
  
  
   
On 04/04/2020 20:03 Olaf Hopp <
olaf.h...@kit.edu> wrote:
   
   

   
   

   
   
Nobody ? :-(
   
   

   
   
On 3/30/20 5:26 PM, Olaf Hopp wrote:
   
   

 Hello everybody,


 since now I did no replication and spam is delivered into users folder "spambox"


 Every night there is a cronjob which deletes spam older than 30 days via something like


 "find  -ctime +30 -delete"


 Now I'm going to set up replication (two way) and I thought that


 doing "rm" is not a good idea.


 So I modified the job to something like


 /usr/bin/doveadm expunge  -u test1 mailbox INBOX.spambox  BEFORE  30d


 which works like intended, but I see that on the replication


 partner the spam isn't deleted. Even if I do a


 doveadm  force-resync  -u test1 '*'


 or log in via imap to the replication partner I still see the old spam.


 


 So my question is:


 is this the intended behaviour and I have to run the "doveadm expunge" on both replication partners


 or should the deletion via "expunge" being replicated to the partner and I have a misconfiguration


 or maybe I hit a bug ?


 


 Regards, Olaf


 


 


 /etc/dovecot/conf.d/12-replication.conf:


 


 


 mail_plugins = $mail_plugins notify replication


 service aggregator {


     fifo_listener replication-notify-fifo {


     mode = 0666


     }


     unix_listener replication-notify {


     mode = 0666


     }


 }


 service replicator {


     process_min_avail = 1


     unix_listener replicator-doveadm {


     mode = 0666


     }


 }


 service doveadm {


     inet_listener {


     port = 1109


     }


 }


 doveadm_password = X


 plugin {


     mail_replica = tcp:X.Y.Z.X:1109


 }


 


 

   
   

   
   
--
   
   
Karlsruher Institut für Technologie (KIT)
   
   
ATIS - Abt. Technische Infrastruktur, Fakultät für Informatik
   
   

   
   
Dipl.-Geophys. Olaf Hopp
   
   
- Leitung IT-Dienste -
   
   

   
   
Am Fasanengarten 5, Gebäude 50.34, Raum 009
   
   
76131 Karlsruhe
   
   
Telefon: +49 721 608-43973
   
   
Fax: +49 721 608-46699
   
   
E-Mail: 
olaf.h...@kit.edu
   
   
www.atis.informatik.kit.edu
   
   

   
   
www.kit.edu
   
   

   
   
KIT - Die Forschungsuniversität in der Helmholtz-Gemeinschaft
   
   

   
   
Das KIT ist seit 2010 als familiengerechte Hochschule zertifiziert.
   
  
  
   
  
  
   ---
Aki Tuomi
   
 



Re: replication and spam removal ("doveadm expunge")

2020-04-04 Thread Olaf Hopp


Nobody ? :-(

On 3/30/20 5:26 PM, Olaf Hopp wrote:

Hello everybody,
since now I did no replication and spam is delivered into users folder "spambox"
Every night there is a cronjob which deletes spam older than 30 days via 
something like
 "find  -ctime +30 -delete"
Now I'm going to set up replication (two way) and I thought that
doing "rm" is not a good idea.
So I modified the job to something like
 /usr/bin/doveadm expunge  -u test1 mailbox INBOX.spambox  BEFORE  30d
which works like intended, but I see that on the replication
partner the spam isn't deleted. Even if I do a
 doveadm  force-resync  -u test1 '*'
or log in via imap to the replication partner I still see the old spam.

So my question is:
is this the intended behaviour and I have to run the "doveadm expunge" on both 
replication partners
or should the deletion via "expunge" being replicated to the partner and I have 
a misconfiguration
or maybe I hit a bug ?

Regards, Olaf


/etc/dovecot/conf.d/12-replication.conf:


mail_plugins = $mail_plugins notify replication
service aggregator {
     fifo_listener replication-notify-fifo {
     mode = 0666
     }
     unix_listener replication-notify {
     mode = 0666
     }
}
service replicator {
     process_min_avail = 1
     unix_listener replicator-doveadm {
     mode = 0666
     }
}
service doveadm {
     inet_listener {
     port = 1109
     }
}
doveadm_password = X
plugin {
     mail_replica = tcp:X.Y.Z.X:1109
}





--
Karlsruher Institut für Technologie (KIT)
ATIS - Abt. Technische Infrastruktur, Fakultät für Informatik

Dipl.-Geophys. Olaf Hopp
- Leitung IT-Dienste -

Am Fasanengarten 5, Gebäude 50.34, Raum 009
76131 Karlsruhe
Telefon: +49 721 608-43973
Fax: +49 721 608-46699
E-Mail: olaf.h...@kit.edu
www.atis.informatik.kit.edu

www.kit.edu

KIT - Die Forschungsuniversität in der Helmholtz-Gemeinschaft

Das KIT ist seit 2010 als familiengerechte Hochschule zertifiziert.



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Disabling system users from mail

2020-04-04 Thread Andrei Petru Mura
OK. I fixed it. Thanks for help.

On Sat, Apr 4, 2020 at 2:13 PM Andrei Petru Mura 
wrote:

> Hi Aki,
>
> 
>>
> Do you mean anything via this?
>
>>
>> >
>> > I want to disable accounts for system users. Only virtual users will
>> have accounts (not configured yet). Is this possible?
>> >
>> > Thanks,
>> > Mura Andrei
>>
>> Hi!
>>
>> System users are only enabled if you use pam/passwd/shadow drivers. They
>> are not enabled by default.
>>
> I don't think I'm using this drivers. Do I? (I suppose provided
> configuration should reflect this).
>
> Andrei
>
>>
>> Aki
>>
>


Re: Disabling system users from mail

2020-04-04 Thread Andrei Petru Mura
Hi Aki,


>
Do you mean anything via this?

>
> >
> > I want to disable accounts for system users. Only virtual users will
> have accounts (not configured yet). Is this possible?
> >
> > Thanks,
> > Mura Andrei
>
> Hi!
>
> System users are only enabled if you use pam/passwd/shadow drivers. They
> are not enabled by default.
>
I don't think I'm using this drivers. Do I? (I suppose provided
configuration should reflect this).

Andrei

>
> Aki
>


Re: Disabling system users from mail

2020-04-04 Thread Aki Tuomi


> On 04/04/2020 14:06 Andrei Petru Mura  wrote:
> 
> 
> I'm using dovecot 2.2.36 on CentOS 7.7.
> My configurations are (dovecot -n):
> 



> 
> I want to disable accounts for system users. Only virtual users will have 
> accounts (not configured yet). Is this possible?
> 
> Thanks,
> Mura Andrei

Hi!

System users are only enabled if you use pam/passwd/shadow drivers. They are 
not enabled by default.

Aki


Disabling system users from mail

2020-04-04 Thread Andrei Petru Mura
I'm using dovecot 2.2.36 on CentOS 7.7.
My configurations are (dovecot -n):

disable_plaintext_auth = no
first_valid_uid = 1000
mail_location = maildir:~/Maildir
mbox_write_locks = fcntl
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox "Sent Messages" {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix =
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
  }
}
ssl = required
ssl_cert = 

index problems after update

2020-04-04 Thread Ajay Guleria
I Upgraded a server from Ubuntu 16.04 to Ubuntu 18.04. This includes an upgrade 
from dovecot 2.2.22 to 2.2.33.2. 
Sometimes it happens, that dovecot stops showing new mail. There is no error in 
the log, dovecot just seems to do his normal operations but is not delivering 
new emails from /var/mail/user (for some users only) emails are delivered again 
if I delete index-files from .imap folder.
Ajay Guleria



Re: net_connect_unix(imap) failed

2020-04-04 Thread Alessio Cecchi

Hi Philips,

I have the same error after upgrade from dovecot 2.2 to dovecot 2.3, 
could be related to "service stats",


try to grep in the dovecot.log for "reached" and look for an error like:

dovecot: master: Warning: service(stats): client_limit (1000) reached, 
client connections are being dropped


If you find it add to 10-master.conf:

service stats {
  client_limit = 10240
  unix_listener stats-writer {
    mode = 0660
    #user = vmail
    #group = vmail
  }
}

then restart dovecot.

Let me know if you solve or find others limit reached in the log.

Ciao

Il 31/03/20 18:22, Philipp Ewald ha scritto:

Hello everyone,

we have a huge problem with dovecot and IMAP connections.

we got the following errors: 39665 today

dovecot: imap-login: Error: master(imap): net_connect_unix(imap) 
failed: Resource temporarily unavailable - 
http://wiki2.dovecot.org/SocketUnavailable (client-pid=29066, 
client-id=1755, rip=IP, created 562 msecs ago, received 0/4 bytes)


we thinks this may be a problem with authorization take too long? 
Authorization is not local and with SQL.


i found the following in source code of Dovecot:
#define SOCKET_CONNECT_RETRY_MSECS 500
#define SOCKET_CONNECT_RETRY_WARNING_INTERVAL_SECS 2
[...]
i_error("master(%s): %s (client-pid=%u, client-id=%u, rip=%s, created 
%u msecs ago, received %u/%zu bytes)",


This is no process limit problem:

ps auxf | grep -c "[d]ovecot/imap$"
688

ps auxf | grep -c "[d]ovecot/imap-login$"
100


cat /proc/`pidof dovecot`/limits
Limit Soft Limit   Hard Limit   Units
Max cpu time  unlimited unlimited    seconds
Max file size unlimited unlimited    bytes
Max data size unlimited unlimited    bytes
Max stack size    8388608 unlimited    bytes
Max core file size    0 unlimited    bytes
Max resident set  unlimited unlimited    bytes
Max processes 64053 64053    processes
Max open files    65535 65535    files
Max locked memory 65536 65536    bytes
Max address space unlimited unlimited    bytes
Max file locks    unlimited unlimited    locks
Max pending signals   64053 64053    signals
Max msgqueue size 819200 819200   bytes
Max nice priority 0    0
Max realtime priority 0    0
Max realtime timeout  unlimited unlimited    us

ulimit -n
1024


dovecot --version
2.3.4.1 (f79e8e7e4)


protocols = imap pop3
service imap-login {
  process_min_avail = 4
  service_count = 0
}
service imap {
  process_limit = 4096
}
service pop3-login {
  process_min_avail = 4
  service_count = 0
}
service pop3 {
  process_limit = 4096
}



Can someone explain why we got this error and how to fix? If you need 
another information please tell me.




--
Alessio Cecchi
Postmaster @ http://www.qboxmail.it
https://www.linkedin.com/in/alessice