Try the following query:

SELECT msgrcpt.mail_id, msgrcpt.ds, msgs.sid, msgs.spam_level, msgs.mail_id, 
msgs.secret_id, msgs.time_iso, msgs.subject, msgs.from_addr, msgs.content, 
msgs.client_addr FROM msgs INNER
JOIN msgrcpt ON msgs.mail_id = msgrcpt.mail_id where msgs.time_iso between 
'2021-05-01 12:00:00' and '2021-05-01 23:00:00' and msgs.content like binary 
'S' order by msgs.time_iso desc

Here are the quarantined msgs.content types:

V = Virus
B = Banned
S = Quarantined Spam
M = Bad-Mime
H = Bad-Header
O = Oversized

Hope this helps.

Many more queries can be found here:

https://github.com/deeztek/Hermes-Secure-Email-Gateway/blob/master/dirstructure/var/www/html/admin/message_history_new.cfm






From: amavis-users 
<[email protected]> On Behalf Of 
Benedict White
Sent: Sunday, June 13, 2021 7:26 PM
To: [email protected]
Subject: Issue with mails in sql quarantine

I had an issue for two days over a weekend where most emails got quarantined.

Does anyone have an sql statement to list quarantined emails by user please?

Kind Regards,

Benedict White

Our business grows by referrals. If you know someone who would benefit from our 
help, please pass on our details.

[cid:[email protected]]<http://www.cse-ltd.co.uk/?utm_source=EmailSig&utm_medium=None&utm_campaign=CSE_TechSupp>

Tel:

01444 238070

Tech:

01444 238080

Fax:

01444 238099

Web:

www.cse-ltd.co.uk<http://www.cse-ltd.co.uk/?utm_source=EmailSig&utm_medium=None&utm_campaign=CSE_TechSupp>

Registered in England and Wales No: 8666450
Unit D, Consort Way, Burgess Hill, West Sussex,
RH15 9TJ

[cid:[email protected]]

  [cid:[email protected]] 
<http://www.facebook.com/?ref=tn_tnmn#!/pages/CSE/173531926406>      
[cid:[email protected]] 
<http://www.google.com/+CseltdUk_ITSupport>      
[cid:[email protected]] <https://twitter.com/cseltd>      
[cid:[email protected]] 
<http://www.linkedin.com/company/computer-systems-engineering-ltd>

[Description: 
Q:\marketing\Logos\NewCo\ActionPress\Help.jpg]<http://www.cse-ltd.co.uk/Help?utm_source=EmailSig&utm_medium=TechHelp&utm_campaign=CSE_TechSupp>









Legal Disclaimer: This message and any attachment may be confidential and 
privileged. If you are not the intended recipient please notify the sender and 
delete this e-mail and any attachment from your system. Any unauthorised 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden. All information given in this e-mail is provided in good faith but 
not binding for legal reasons.



Reply via email to