ESGs employ a variety of techniques to filter emails. These include spam filters, antivirus scans, URL filtering, and content analysis. When an email is sent or received, it passes through the ESG, which scans the email for any suspicious content. If the email is deemed safe, it is delivered to the recipient; if not, it is quarantined or deleted.