Click here for "Error Codes for Commercial Air Conditioners".(Japanese Version)

AlmaLinux9.2 ; Anti-virus(Clamav) , Mail Server

Clamav (anti-virus software)Install

1.Clam AntiVirus Install

2.Clam AntiVirus  Configuration File Edit

3.Virus definition file update settings

4.Virus definition file update

5.Clam AntiVirus Auto-Start Settings

6.Conducted virus scan
■Download a test virus and perform a virus scan

7.Deployment of virus scan auto-execution scripts

8.Virus scan exclusion directory settings

9.Scheduled virus scan execution

Mail Server Install

1. Postfix

1.1 Install
Install Postfix and build an SMTP server

Confirm Postfix is installed

1.2 Register Postfix to the service

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

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

Allow SMTP port (port 25)

1.5 Start Postfix

2.Dovecot

2.1 dovecot Install

2.2 Edit dovecot.conf file

2.3 Edit 10-auth.conf file

2.4 Edit 10-mail.conf file

2.5 Edit 10-master.conf file

2.6 Edit 10-ssl.conf file

2.7 Register dovecot as a service and start it

2.8 Allow POP/IMAP services in Firewalld Port Allow
POP is [110/TCP], IMAP is [143/TCP].

3.Create mail user and check operation

3.1 advance preparation
①new user
When a new user is added, set up the system to automatically send and receive e-mail.

②Existing users
Configure the already created users to be able to send and receive e-mail.

3.2 User Account Creation

3.3 operation check ①
①Log in as an email user and send a test email.

②Email Confirmation

3.4 operation check ②
Set up and confirm your account in Mozilla Thunderbird(For OS user huong as mail user)
①Start Thunderbird, and click "Tools", "Account Settings".
「Account Actions」「Add Mail Account」
Your full name : Any name
Email addtess : huong@korodes.com
Password : Password for huong
Enter each 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 : Postfix + Clamav + clamav-milter+SpamAssassin

1.Real-time scanning of e-mails

①clamav-milter Install
Virus checks are performed on the mail server side using Clam AntiVirus.
The mail server and Clam AntiVirus are linked using clamav-milter.

➁clamav-milter configuration

➂clamav-milter startup and auto-startup settings

④Postfix and clamav-milter integration settings
Edit Postfix configuration file

⑤Add postfix user to clamilt group

⑥Postfix Settings Reflected

⑦Check with Thunderbird
I sent a blank email to myself in Thunderbird, and in the header display of the received email, I see the following
X-Virus-Scanned: clamav-milter 0.103.10 at Lepard

Try sending yourself an email with the body of the email "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*" and confirm that the email is discarded and never received

2.Email spam protection

2.1 SpamAssassin, spamass-milter, and postfix settings

①SpamAssassin・spamass-milter Install

➁SpamAssassin start

➂SpamAssassin Settings

④SpamAssassin configuration file modernization script

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

Confirm that the SpamAssassin configuration file (local.cf) has been 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

⑤spamass-milter startup and automatic startup settings

⑥Postfix and spamass-milter integration settings

⑦Restart postfix

⑧Procmail Settings
Create procmail configuration file

Create procmail log rotation configuration file

⑨Postfix and Procmail integration settings

Postfix Settings Reflected

2.2 Spam mail sorting settings

Mail marked as spam in the mail header by SpamAssassin will be delivered to a spam-only mailbox, while other mail will be delivered to a normal mailbox.

①Create a dedicated spam mailbox
For existing users, add a spam-only mailbox to their mailboxes.
For new users, a spam-only mailbox will be automatically created when a user is added.

①Created script to create spam-only mailboxes

Run script to create spam-only mailboxes

Measures against new users
Automatic spam-only mailbox creation when adding new users

➁spam mail sorting
Emails identified as spam by SpamAssassin are delivered to a spam-only mailbox.

➂spamass-milter confirmation
When you send a blank email to yourself, the following message is appended to the header of the received email
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on Lepard

④Spam check confirmation
Send yourself an email with the body of the email "XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X" and make sure the email is not delivered and is sorted into the Spam folder

Copied title and URL