OpenSUSE15.6 ; Clamav , Mail Server

1. clamav ( anti-virus software )

1.1 Clamav Install

1.2 virus definition file update

①Configuration File Editing

②virus definition file update

1.3 operation check

①Scan entire system

■If no virus is detected

■If a virus is detected
Download and scan for test viruses

1.4 Deployment of virus scan auto-execution scripts

①Create script storage directory

②Creation of auto-execution scripts

Create in /srv/www/system with the following contents

Grant execute permissions to scripts

The sys and proc directories are excluded from the scan because they cannot be scanned due to the specification.
OpenSUSE creates a large number of snapshots, so if necessary, set them in non-target directories.

Set up periodic virus scan

Execute "/srv/www/system/" to scan the entire system

2.  Mail server Install

2.1 Postfix Install

Install Postfix and build an SMTP server

Postfix Settings
To prevent unauthorized mail relay, use the SASL function of Dovecot, described below, and configure Postfix to require authentication for sending as well.

SMTP service permission is required if Firewalld is enabled; SMTP uses 25/TCP

2.3 Dovecot Install


Dovecot Settings
Configure Dovecot to provide SASL functionality for Postfix.

Dovecot startup and automatic execution

④POP/IMAP service permission required if Firewalld is enabled
POP uses 110/TCP, IMAP uses 143/TCP

2.4 User Account Registration

In this case, we will register the OS user "huong".
①Mail client installation

②Mailboxes are set to refer to Maildir

2.5 Confirmation of operation

Set up an account in Thunderbird, a free email client, to check its operation.
However, depending on your provider, port 587 may be used for the outgoing server.
Please free up port 587 in your firewall settings.

Start Thunderbird and select "Account Settings" from the "Tools" menu.

"Add Mail Account..." in "Account Actions" Select

Fill in each field as follows and click "Configure manually"
Your full name : Any name
Email address : <Mail server user name>@<Domain name>
Password   : Password for the mail server user

Set as shown below, but if your provider allows port 25 for outbound servers, you may use "25" instead of "587".     Click "Re-test"

Click "Done" when you see "Mail server found, account is valid.

A warning screen will appear. Check the box as shown below and click "Confirm.

If the next screen appears, success!

3. Mail Server : Postfix + Clamav + Amavisd

Set up Postfix and Clamav to work together to scan incoming and outgoing mail in real time.

3.1 Amavisd & Clamav Server Install

3.2 Configure Amavisd

Configuration File Editing

Startup and Auto-Run Settings

3.3 Postfix Configuration

3.4 Check with Thunderbird

When you send an e-mail to yourself with the following contents in the body, if you see "spam" in the list of received e-mails and the following message in the header of the e-mail, you have succeeded.

4.virus scan script substitution

Set up a notification to a specified e-mail address after virus check scan.

Create virus scan exclusion directory list

Disable existing script and create new virus scan script

Contents of new ""

You will now be notified by email if there is a virus. If there is no virus, you will not be notified.

Copied title and URL