OPNsense Forum

English Forums => General Discussion => Topic started by: colora on February 24, 2021, 02:48:23 PM

Title: Scan files attached to the emails
Post by: colora on February 24, 2021, 02:48:23 PM
Hello!

I want to scan files attached to the emails such as .pdf, .exe.
The only solution I've found is clamAV + postfix + rspamd (using OPNsense as mail server)
But I already have mail server in my network. So is there any possibility to do SMTP flow-based file scanning?

Thank you!
Title: Re: Scan files attached to the emails
Post by: lfirewall1243 on February 24, 2021, 03:47:53 PM
Yes
look at the docs "Mail Gateway" this will solve it
Title: Re: Scan files attached to the emails
Post by: colora on February 24, 2021, 06:59:58 PM
Thank you!

But as I understand, if OPNsense is configured as mail gateway, all clients will have to use it as mail server.
Please, tell me if I'm wrong

I just want OPNsense to scan attachments in SMTP packets without being mail server (see diagram)
Title: Re: Scan files attached to the emails
Post by: lfirewall1243 on February 24, 2021, 08:42:03 PM
Quote from: colora on February 24, 2021, 06:59:58 PM
Thank you!

But as I understand, if OPNsense is configured as mail gateway, all clients will have to use it as mail server.
Please, tell me if I'm wrong

I just want OPNsense to scan attachments in SMTP packets without being mail server (see diagram)
Not for incoming mails

I think your mails are getting delivered to you via smtp

The OPNsense will get these mails and will forward them to the  configured domains to your mail server

Idk for outgoing mails, never used it
Title: Re: Scan files attached to the emails
Post by: Indiat9 on March 10, 2023, 10:56:58 AM
One option is using an email security service that offers attachment scanning as part of its features.
Title: Re: Scan files attached to the emails
Post by: Fright on March 10, 2023, 11:50:59 AM
QuoteI just want OPNsense to scan attachments in SMTP packets without being mail server (see diagram)
yes. it will work this way with  'clamAV + postfix + rspamd'
Title: Re: Scan files attached to the emails
Post by: jlab on March 10, 2023, 04:51:01 PM
Depents on email, if its 587 SSL this won't do anything. For IMAP or Pop yeah, but its 2023 who uses IMAP or pop these days.
Title: Re: Scan files attached to the emails
Post by: KellyMaleaht on March 13, 2023, 11:10:16 AM
I see that you're looking for a way to scan email attachments for potential viruses or malware. One solution you mentioned is clamAV, postfix, and spamd, but you're wondering if there's a way to do SMTP flow-based file scanning instead.
And while you're at it, use a document verification service like idanalyzer.com (https://www.idanalyzer.com/products/prime-id-scanner.html) to ensure the authenticity and validity of your scanned documents. It's always important to take extra precautions to protect sensitive information.