Email forwarders based on conditions

Is it possible to set up an email forwarder based on conditions like sender and subject line? For example, the incoming email is from * and with subject line “my birthday”, it should be auto forwarded to Is this possible somehow in virtualmin?

This, even if available, would be highly discouraged.
Just imagine an email received;
and you forwarded it to
just how long would it take to have (IP) blacklisted?


Usermin, Email Filters, though I am not sure that you can have eg From and Subject as conditions.

Off topic a bit, as mentioned be careful. Today I had a client that has his gmail address autoforward everything to his work email address that I host. Today he decided that he also wanted his work email to show on his gmail account, so created an autoforward from my server back to gmail.

Fortunately I spotted and deleted it before much damage was done - and this is after I told him not to, and why an endless loop is a bad idea. sigh…

Yes, it’s possible to set up email forwarding based on conditions such as the sender and subject line in Virtualmin. Virtualmin is a web hosting control panel that includes features for managing mail servers, among other things.

Here’s a general guide on how you might achieve this in Virtualmin:

  1. Login to Virtualmin:
  • Open a web browser and go to the Virtualmin control panel.
  1. Select the Domain:
  • Navigate to the domain for which you want to set up the email forwarding.
  1. Go to Email Settings:
  • Look for the “Email Settings” or “Email Options” section.
  1. Create an Email Alias:
  • You may need to create an email alias. An alias is an additional email address that forwards email to one or more existing email addresses.
  1. Set Up Email Forwarding:
  • In the email alias settings, you should find an option to set up forwarding. Here, you can specify the destination email address to which emails should be forwarded.
  1. Use Filters or Rules:
  • Some control panels like Virtualmin allow you to set up filters or rules. These rules can be based on conditions such as sender and subject line.
  1. Define Conditions:
  • In the filter or rule settings, define the conditions for the forwarding. For example, you might specify that emails from * with the subject line “my birthday” should be forwarded to
  1. Save Changes:
  • After configuring the forwarding rules, save the changes.

I done the same setting at SASSA Status Check

Please note that the specific steps and options may vary slightly depending on the version of Virtualmin you are using and the server configuration. Refer to the documentation or help resources provided by Virtualmin for more detailed and version-specific instructions.

I looked again. Setting the filter in Virtualmin doesn’t have an AND option.

So it can be either senders address, or subject but not both together.

Can anyone explain how to use Regular Expressions in creating a filter in Virtualmin?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.