I have been recommending Proxmox Mail Gateway for Primary Antispam for client email server because of many reasons. Beautiful log tracking is the reason how i use it and recommend it to another person. Beside it, friendly interface and easy to use is another reason how PMG worthy.

Below is one of an example of how i create a rule to block an email by subject.

  • Login to your PMG UI
  • Go to What Object | Create.
Create What Object
  • Click on your created rule then Add | Match Field. For example, i want to block an email with subjectYou Mailbox has been full“.
Create Subject Match Field

Notes
Field: Type of your field on the header (for example subject)
Value: Your blocked Subject

  • Next, Go to Mail Filter Menu | Add new rules.
Create Mail Filter Rule
  • Last, click on your created rule. Choose your What object you have been created (Blocked Subject). And Choose action do you want. I choose quarantine action for match email to this rule.
Example Rule

Now, Try the rule. Below is the example of trapped email.

Trapped Mail

Interested to use Proxmox Mail Gateway Support & Subscriptions License?

Don’t hesitate to contact sales@excellent.co.id. Our sales will give the best price and best services for you!


Dhenandi Putra

Hi, I'm dhenandi, Mac and openSUSE user. An office boy, typist, and man behind this blog. I also write on another blog https://dhenandi.web.id/ in Bahasa Indonesia.

8 Comments

vicent.wu · January 15, 2019 at 3:38 pm

Your article is very useful to me, great
But I ask a question, value does not support other languages? For example, Japanese Chinese, etc.
I don’t know what to do with it.
thks

    Alexey · March 5, 2019 at 3:26 pm

    The same question from me too.

    How to set up correctly this filter in order to block the Russian phrases?

    I am trying to put in Value string some Russian words but the error ”
    Wide character in subroutine entry at /usr/share/perl5/PMG/RuleDB/MatchField.pm line 87. (500)” ocured.

Alexey · January 22, 2019 at 5:23 pm

Unfortunately, this rule doesn’t work in my case.

PMG 5.1-3 version, tried to set the rule to deny and receieve any email from/to one particular address.

I created a new rule In “Who objects”, let’s say “First rule”, than added the particular email there.

Then added in “Mail Filter” a new rule where I selected Block for “First rule” with a priority 100 and made it active.

Neveretheless, I still can receive and send any letters to/from this address.

What shoud I do to make this rule worked?

Thank you.

    Dhenandi Putra · January 25, 2019 at 8:17 pm

    Hello,

    Pardon me for delay response.

    Are you mean you want to block email from/to some address to your account?

    If you don’t mind, please give a touch to m@dhenandi.com, we can discuss to solve this problem 🙂

douaire david · March 18, 2019 at 7:47 pm

Hello,

Your article is really very interesting.

I would like to know how to filter on the content of the mail instead of the subject.

Sincerely,
M DOUAIRE David

david douaire · March 18, 2019 at 8:23 pm

Hello,

Your article is really very interesting.

I would like to know how to filter on the content of the email instead of the subject

Dmitriy Vorotyncev · June 10, 2019 at 4:08 pm

Thank you Dhenandi!

Carlos · May 29, 2020 at 11:57 pm

Hi! Thank you very much! Works for me! Just one cuestion, I can do the same with the mail body? matching words like “click here” or “unsubscribe”?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.