Skip to main content
CSKUM
New Member
January 27, 2025
Solved

Fortimail - forward mail to another address based on keywords in subject or body

  • January 27, 2025
  • 1 reply
  • 1522 views

I need to create some kind of notifications that an email with specific words in subject or in body was sent to any email address.

 

I managed to achieve it with Archive account. I've created an Archive account which is forwarding email to another email address and I've created a policy that is archiving emails based on Subject and Body pattern. It works fine if the word in subject or body is equal to the word I've entered in pattern on policy.

 

For example I've created Policy with Policy Type Subject and in Pattern I've enter word: bomb

 

The policy works fine for example for a subject like this:

 

I've sent a bomb to you.

 

Email is properly forwarded to email address I've entered in Archive account.

 

However the policy is not working for subject like this:

 

I've sent few bombs to you.

 

I've tried entering *bomb* in pattern but it's not working. Is it possible to use WILDCARDS in this policy patterns or REGEXP expresions?

 

Or is there any other way to forward emails based on subject and body content to another email address?

Best answer by AEK

In the Antispam action profile. You just create your own and set the desired action(s).

1 reply

AEK
SuperUser
SuperUser
January 27, 2025

Did you try with dictionary profile?

https://docs.fortinet.com/document/fortimail/7.6.1/administration-guide/84792/configuring-dictionary-profiles

It allows regex and much more. Once it matches you can set the action you want, like add Cc or Bcc or other action.

AEK
CSKUM
CSKUMAuthor
New Member
January 27, 2025

I will try it. I think this should work, but where can I set this profile to for example add BCC to incomming message which will match this profile?

AEK
SuperUser
AEKAnswer
SuperUser
January 27, 2025

In the Antispam action profile. You just create your own and set the desired action(s).

AEK