X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=customer.sydyaus1.pop.starlinkisp.net; envelope-from=<surgemail-support@netwin.co.nz>;
X-Received: from [192.168.1.50] (customer.sydyaus1.pop.starlinkisp.net [206.83.102.231])
by netwin.co.nz (SurgeMail 7.6s) with ESMTP (TLS) id 2128045-1391920
for <surgemail-list@netwin.co.nz>; Tue, 30 Aug 2022 21:52:34 +0000
X-Return-Path: surgemail-support
Message-ID: <917d8b82-553d-aa0e-5240-1a1c9f9b9444@netwin.co.nz>
Date: Wed, 31 Aug 2022 09:52:34 +1200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.13.0
Subject: Re: [SurgeMail List] Delete messages from sender in all mailboxes
Content-Language: en-US
To: surgemail-list@netwin.co.nz
References: <BE6907E5-E067-4761-BC69-321ADAA6FED5@wtccommunications.ca>
From: Surgemail Support
In-Reply-To: <BE6907E5-E067-4761-BC69-321ADAA6FED5@wtccommunications.ca>
X-Qnum: 2128045
X-Rcpt-To: <surgemail-list@netwin.co.nz>
X-Info: aspam skipped due to (g_smite_skip_relay)
X-Dmarc: quarantine, from=surgemail-support@netwin.co.nz, dkim=Failed known=True Trusted spf=True
X-Encryption: SSL encrypted
X-IP-stats: Incoming Last 0, First 20, in=47, out=0, spam=0 ip=206.83.102.231
List-Unsubscribe: <mailto:surgemail-list-leave@netwin.co.nz?subject=unsubscribe>
X-Mailing-List: surgemail-list@netwin.co.nz
List-ID: <surgemail-list@netwin.co.nz>
Precedence: bulk
Reply-To: surgemail-list@netwin.co.nz
Content-Transfer-Encoding: 8bit
Content-Transfer-Encoding: 8bit
Commands to delete all messages containing string... obviously
these commands are EXTREMELY dangerous, in both cases the list is
generated to a file, which you can then examine and check that it
only contains the 'problem' messages and nothing else :-)
DOUBLE CHECK the file before running the command to actually
delete the files :-)
ChrisP.
# Windows
cd \surgemail\mbox
findstr /s /m "THINGTOFIND" u* >delete.txt
(examine delete.txt)
for /f %i in (delete.txt) do del %i
# Linux
find /var/surgemail/DOMAINPATH -name "u*" -print | xargs grep -l
"THINGTOFIND" | awk '{print "rm \x22"$1"\x22" }' > doit.sh
more doit.sh # // check the files are correct, examine them!!!
ONLY ONCE YOU ARE CERTAIN!!!! source doit.sh
ChrisP.
On 31/08/2022 1:02 am, Jeff Crowe
wrote:
HI all,
We had a phishing message delivered to a
bunch of mailboxes that made it past our spam filters. Is
there a tellmail command that will let me scan all mailboxes
and delete a message from a sender?
Thanks