Computer viruses generally do not cause problems for Mac users because there is no automated way for them to execute their malicious code. If you receive a virus in an e-mail attachment, it will not do anything if the message is just sitting in your inbox. Even opening the attached file is not, by itself, dangerous because macOS will not execute code from a single file. You would need to, for example, decompress the ZIP archive and then double-click the extracted .app file. Even if you do all this, the Mac is likely to warn you that you are launching an unknown application.
SpamSieve will generally classify messages with viruses as spam and move them to the Junk mailbox. This will prevent them from cluttering your inbox and provide some protection if you access your mail on a Windows PC (where attached .exe files can more easily cause harm).
Anti-virus Software
If you are running anti-virus software, it is normal for it to find viruses in your Junk mailbox. You can safely ignore these warnings because the viruses are embedded in the e-mail messages and are inert.
Anti-virus software such as Avira and Bitdefender can interfere with the operation of Apple Mail. One manifestation is that the software will find messages with viruses, which SpamSieve has put in the Junk mailbox, and delete the message files or move them to a holding area. Mail will then report errors because the files are no longer where it was expecting to find them, and this may prevent you from deleting the messages in Mail. You can get rid of the orphaned messages in Mail by rebuilding its database. However, it is better to configure your anti-virus software so that it doesn’t touch Mail’s files. For example, in Avira, go to the Real-Time Protection settings, then Basic Settings, and change the Default action if a thread is found so that files are not moved into quarantine.