Re: Force TCP socket disconnect on imap login failure?

2022-05-24 Thread John Hardin
On Tue, 24 May 2022, Hippo Man wrote: I have already been doing the following for the past year or so: as soon as I detect (via my own, homegrown fail2ban-like log monitoring utility) what I deem to be attempts to log in via imap or pop3 with a dictionary password attack, I immediately do a DROP

Re: Force TCP socket disconnect on imap login failure?

2022-05-24 Thread Hippo Man
Thank you very much. Yes, I did some manual tests via gdb to close the fd of a connected socket, and indeed the dovecot behavior is not desirable: this seems to crash dovecot. So I agree that this is not a good approach. I have already been doing the following for the past year or so: as soon as I

Panic: file userdb-blocking with Dovecot 2.3.19

2022-05-24 Thread Niklas Meyer
Hello all, since we´ve tested around with the new dovecot release in the mailcow project we´ve came across a curious and new error with Dovecot: /auth: Panic: file userdb-blocking.c: line 124 (userdb_blocking_iter_next): assertion failed: (ctx->conn != NULL)/ *System Information:* *D

Re: Force TCP socket disconnect on imap login failure?

2022-05-24 Thread didar
On Mon, May 23, 2022 at 03:11:46PM -0400, Lloyd Zusman wrote: > I'm running dovecot 2.2.13 under Debian 8. > > I'd like to force an immediate TCP socket disconnect after any imap login > attempt that fails. > > Right now, if invalid credentials are supplied during an imap login, the > client can

Re: Force TCP socket disconnect on imap login failure?

2022-05-24 Thread Paul Kudla (SCOM.CA Internet Services Inc.)
closing a socket can leave a process in an undertimed state pending how the code reacts blocking in the background via iptables would just stop traffic and the process should die cleanly. programming 101, network connections at best dont like the plug being pulled once they start to talk

Re: Force TCP socket disconnect on imap login failure?

2022-05-24 Thread Paul Kudla (SCOM.CA Internet Services Inc.)
"-j REJECT --reject-with tcp-reset" instead of DROP are valid ideas consider that if you update (in the background) and block the connection then dovecot (or any other process) should just block the traffic and timeout to close the connection anyways fyi ?? Happy Tuesday !!! Thanks - pa

Re: doveadm mailbox status -u p...@scom.ca -t all (syntax)

2022-05-24 Thread Paul Kudla (SCOM.CA Internet Services Inc.)
yes did thanks doveadm [-f formatter] mailbox status [-A|-u user|-F file] [-S socket_path] [-t] fields mailbox ... My apologies for being so stupid, in the cyrus days (myhead is still stuck there) the mbox name was also the username I am still seperating that in my head. Noted for future

Re: Force TCP socket disconnect on imap login failure?

2022-05-24 Thread Jochen Bern
On 24.05.22 09:36, Jan Hugo Prins wrote: - The below commands drops ALL future connections to the IMAP ports and not just the one from that specific IP address. On 5/23/22 23:16, Hippo Man wrote: OOPS! I incorrectly copied and pasted the iptables command in my previous message. Here is the cor

Re: Force TCP socket disconnect on imap login failure?

2022-05-24 Thread Paul Kudla (SCOM.CA Internet Services Inc.)
for what its worth this is a python script that i use for the database driven iptables updater for my asterisk server again same ideas but it gets the job done. It's a lot of work to get stuff like this going but may help point someone in the right directions balance wise pending on there s

Re: doveadm mailbox status -u p...@scom.ca -t all (syntax)

2022-05-24 Thread Aki Tuomi
You might want to add `INBOX` to the command? Aki > On 24/05/2022 00:34 Paul Kudla (SCOM.CA Internet Services Inc.) > wrote: > > > Ok I know this is a general question and at my level I should be able to > figure this out > > all i want is the complete status of an inbox ? > > > > > >

Re: Force TCP socket disconnect on imap login failure?

2022-05-24 Thread Jan Hugo Prins
Just a few comments. - The below commands drops ALL future connections to the IMAP ports and not just the one from that specific IP address. - It all depends on the ordering of the rest of your iptables rules. A lot of iptables setups have an accept related / established in the top of the INPU