Set mailrule rules

Source: Internet
Author: User

1. Spam whitelist

Edit the mailworker configuration file
# Vi/etc/mailconsumer. conf

Is definitely not spam =/etc/mailstores/RULES/whitelist. Rules

The rule file format is as follows:

# Vi/etc/maillogs/RULES/whitelist. Rules

# Add addresses to the whitelist:

From: user@domain.com Yes

From: * @ domain.com Yes

# Add IP addresses to be blacklisted

From: 192.168.1. Yes

From:/^ 192 \. 168 \. 13 [4567] \./Yes

Fromorto: Default No


2. Spam blacklist

Edit the mailworker configuration file

# Vi/etc/mailconsumer. conf

Is definitely spam =/etc/maillogs/RULES/blacklist. Rules

The rule file format is as follows:

# Vi/etc/maillogs/RULES/blacklist. Rules

# Add to be includedBlackList address:

From: user@domain.com Yes

From: * @ domain.com Yes

# Add IP addresses to be blacklisted

From: 192.16.8.1. Yes

Fromorto: Default No

 

3. Sign the sent Email

edit the mailbench configuration file
# vi/etc/maillogs. conf
sign clean messages =/etc/maillogs/RULES/signing. rules
the rule file format is as follows:
# vi/etc/mailcharts/RULES/signing. rules
## Add the sent domain name
from: * @ domain.com Yes
## add an IP address
from: 192.168.1. yes
fromorto: default no


4. Use different signatures for different domains

Edit the mailworker configuration file

# Vi/etc/mailconsumer. conf

Inline text Signature =/etc/mailstores/RULES/Sig. Text. Rules

Inline HTML Signature =/etc/mailstores/RULES/sig.html. Rules

The rule file format is as follows:

# Vi/etc/mailcharts/RULES/Sig. Text. Rules

# Add different domains

From: * @ domain1.com/etc/mailtables/reports/domain1.sig.txt

From: * @ domain2.com/etc/mailtables/reports/domain2.sig.txt

Set the HTML signature for different domains

# Vi/etc/maillogs/RULES/sig.html. Rules

# Add different domains

From: * @ domain1.com/etc/mailtables/reports/domain1.sig.html

From: * @ domain2.com/etc/mailtables/reports/domain2.sig.html


5. Scan only some domains for viruses

Edit the mailworker configuration file

# Vi/etc/mailconsumer. conf

Virus Scanning =/etc/mailtasks/RULES/virus. Scanning. Rules

The rule file format is as follows:

# Vi/etc/maillogs/RULES/virus. Scanning. Rules

Fromorto: * @ domain.com Yes

Fromorto: Default No


6. Send administrator notifications to multiple users

Edit the mailworker configuration file

# Vi/etc/mailconsumer. conf

Notices to =/etc/maillogs/RULES/notices. to. Rules

The rule file format is as follows:

# Vi/etc/maillogs/RULES/notices. to. Rules

# Add an address

To:

@ Domain1.com

Postmaster@domain.com admin@domain1.com

To:

@ Domain2.com

Postmaster@domain.com admin@domain2.com

Fromorto: Default postmaster@domain.com


7. Isolate only some viruses

Edit the mailworker configuration file

# Vi/etc/mailconsumer. conf

Quarantine infections =/etc/mailstores/RULES/quarantine. Rules

The rule file format is as follows:

# Vi/etc/maillogs/RULES/quarantine. Rules

# Add a virus name

Virus:

Sobig No

Virus:

Default Yes


8. Use two conditions in the Rule

edit the mailbench configuration file
# vi/etc/maillogs. conf
spam actions =/etc/maillogs/RULES/spam. actions. rules
the rule file format is as follows:
# vi/etc/mailcharts/RULES/spam. actions. rules
## add conditions
from: domain.com and to: user @ * deliver
fromorto: domain1.com and fromorto: domain2.com deliver
fromorto: default store policy


9. Use Perl to match more advanced rules:

The rule file format is as follows:

# Matching user@domain.com and user@sub.domain.com

From:/[\ @ \.] domain \. com $/Yes

# Match all. gov

From:/\. gov $/Yes

# Match the German or Danish domain

From: Host:/(De | DK) $/Yes


10. Set the mail size

The rule file format is as follows:

# Vi/etc/maillogs/RULES/MAX. Message. Size. Rules

To: * @ domain1.com 10 m

To: * @ domain2.com 20 m

From: user@domain3.com 5 m

From: * @ domain3.com 500 k

Fromorto: Default 0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.