Click here for "Safe Air Conditioner Repair and Proper Freon Recovery".

OracleLinux8.8 ; Clamav(anti-virus) , Mail Server

1. Clamav(anti-virus)

1.1 Clam AntiVirus Install

1.2 Edit Clam AntiVirus configuration file

1.3 Virus definition file update settings

1.4 Virus definition file update

1.5 Start Clam AntiVirus

clamd start

clamd auto-startup configuration

operation check

1.6 Conduct virus scan

Download a test virus and perform a virus scan

1.7 Virus scan auto-execute script

Create script storage directory

Create clamscan.sh under /var/www/system/

1.8 Virus scan exclusion directory settings

The sys and proc directories are excluded.

1.9 Scheduled virus scan execution

Run a trial script and do a full scan (takes a while)

2. Mail Server Installation

2.1 Postfix

Install Postfix and build an SMTP server

Make sure Postfix is installed

2.2 Register Postfix to the service

2.3 Edit postfix configuration file

Backup postfix configuration files, main.cf and master.cf files

To prevent unauthorized mail relay, configure Postfix to require authentication for outgoing mail as well, using Dovecot's SASL function.

2.4 Release SMTP port (port 25)

2.5 Start Postfix

3. Dovecot

3.1 dovecot Install

3.2 Edit dovecot.conf file

3.3 Edit 10-auth.conf file

3.4 Edit 10-mail.conf file

3.5 Edit 10-master.conf file

3.6 Edit 10-ssl.conf file

3.7 Register dovecot as a service and start

3.8 Permission port opening for POP/IMAP service with firewalld

POP is [110/TCP], IMAP is [143/TCP].

4.Create mail user and check operation

4.1 事前準備

①Pretreatment for new users
When a new user is added, set up the system to automatically send and receive e-mail.

②Mail environment pre-processing for existing users
Configure the already created users to be able to send and receive e-mail.

4.2 User Account Creation

Mail client installation

Add user [linux]

4.3 Operation check ①

Log in as an email user and send a test email.

4.4 Operation check ②

Set up and confirm your account in Mozilla Thunderbird. This time we will set it up with the general user "huong".
①Start Thunderbird 「Tools」「Account Settings」

②「Account Actions」「Add Mail Account」

③「Your full name」は任意の名称
Your full name : Any name
Email addtess : huong@korodes.com
Password : Password for huong
and click "Configure manually".

④Set "INCOMMING SERVER" and "OUTGOING SERVER" as shown below and click "Re-test".

⑤The following settings were found by probinfg the given server

「After clicking "Done," the following "Warning" appears, but there is no problem, so click "Confirm"

⑥Click "Finish" when "Account syccessfuly created" is displayed.

Mail server : Postfix + Clamav + Amavisd+SpamAssassin

1.Real-time scanning of e-mails

Install Amavisd and Clamav Server

Configuration File Editing

Setup and start Amavisd

Postfix Configuration

Check with Thunderbird
I sent a test email to myself in Thunderbird, and in the header display part of the received email, I see the following
"X-Virus-Scanned: amavisd-new at korodes."

2.Email spam protection

SpamAssassin Settings

SpamAssassin configuration file modernization script

Grant execute permission to the spamassassin-update script and run it

Check that the SpamAssassin configuration file is created in the /etc/mail/spamassassin directory with the date of the day.

Set up cron to automatically run a script daily that updates the SpamAssassin configuration file

Integrate SpamAssassin into Postfix

Restart postfix

⑤If you send an e-mail to yourself in Thunderbird with the following information in the body, the following will appear in the header.

「XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X」

Copied title and URL