Sending a copy of messages according to the rule
-
Greetings everyone!, the task is to make a copy of this letter for incoming letters to a certain mailbox and send it to another place, and in response to a response from a certain mailbox, make a copy of the letter and send it to another place.
Did it through the rule content filter
If the from header contains option contains (OR) test@test.com
Copy the message to specifield user(s) - select the account where the copy of the letter from test@test.com should go
At the output we get the picture: if test@test.com > test2@test.com then one letter is added to the copy, and if test@test.com it will be attached + test1@test.com, test2@test.com, test3@test. someone will receive 3 copies of the same letter, how can I make sure that the copy of the letter is shared with these recipients?
-
Arron Staff
I'm not sure I'm understanding the issue.
When a message is addressed to multiple recipients, MDaemon creates a copy of the message for each recipient and each copy is processed by the content filter. If your rule is only checking the From header, then the rule will generate a copy of the message for each original recipient and send it to the use specified.
The easiest way to avoid this, is to also check the X-MDaemon-Deliver-To header for the address of the intended recipient. It would look something like this:
If the From header contains user1@test.com and if the X-MDaemon-Deliver-To header contains user2@local.com then send a copy of the message to user3@local.com.
If you don't want to have to look at the recipient, the only other way I can think of would be to write the message ID to disk and then check the message ID to make sure it has not already been processed. The rule in the cfrules.dat file would look something like this:
[Rule025]
RuleName=MessageID in File
Enable=Yes
ThisRuleCondition=All
ProcessQueue=BOTH
Condition01=Message-ID|not contained in file|AND|c:\mdaemon\app\msgid.txt|
Condition02=FROM|contains|AND|user@external.com|
Action01=copy to|"user1@local.com"
Action02=add line to text file|"c:\mdaemon\app\msgid.txt","$MESSAGEID$"If this does not solve your issue, please share the exact rules you are using from the MDaemon\app\cfrules.dat file and provide an example of what is happening and an example of what you'd like to have happen.
-
I just need to make copies of letters from one address and send it where I need it, I don’t understand how this can be done in Mdaemon
-
[Rule002]
RuleName=REMAIL_CCS_DEP
uid={955722b3-3f43-4a88-b944-99940d198e32}
Enable=No
ThisRuleCondition=All
ProcessQueue=BOTH
Condition01=FROM|contains|OR|m1@dogma.com|m2@dogma.com|m3@dogma.com|m4@dogma.com|test@dogma.com|
Action01=copy to|"ccs_dep@dogma.com"
-
Arron Staff
What issue are you having with the content filter rule that you created? Is the rule not working at all?
Are you getting duplicates copies of messages sent to ccs_dep@dogma.com?
Or are you having some other issue with it?
-
I receive duplicates in large quantities
The sender having 6 people in the copy I receive 6 identical letters
ccs_dep@dogma.com
-
Arron Staff
Did my previous post about checking the X-MDaemon-Deliver-To header or the message ID header not solve the issue?
When a message is addressed to multiple recipients, MDaemon creates a copy of the message for each recipient and each copy is processed by the content filter. If your rule is only checking the From header, then the rule will generate a copy of the message for each original recipient and send it to the use specified.
The easiest way to avoid this, is to also check the X-MDaemon-Deliver-To header for the address of the intended recipient. It would look something like this:
If the From header contains user1@test.com and if the X-MDaemon-Deliver-To header contains user2@local.com then send a copy of the message to user3@local.com.
If you don't want to have to look at the recipient, the only other way I can think of would be to write the message ID to disk and then check the message ID to make sure it has not already been processed. The rule in the cfrules.dat file would look something like this:
[Rule025]
RuleName=MessageID in File
Enable=Yes
ThisRuleCondition=All
ProcessQueue=BOTH
Condition01=Message-ID|not contained in file|AND|c:\mdaemon\app\msgid.txt|
Condition02=FROM|contains|AND|user@external.com|
Action01=copy to|"user1@local.com"
Action02=add line to text file|"c:\mdaemon\app\msgid.txt","$MESSAGEID$"
-
no it doesn't work
-
Arron Staff
Please post the rule that you are using from the cfrules.dat file and post a log snippet from the content filter log that shows MDaemon processing a message with multiple recipients that should match the rule.
-
thanks, all worked well!
X-MDaemon-Deliver-To header contains
I would like to see examples of using filters in the instructions
-
Arron Staff
I'm glad you were able to get it working and thank you for the feedback.