How can I avoid if any domain like "@test.com" comes into inboud mail inbox

HI every one ,

I configured inbound mail and outbound mail,those are working fine ,
Now all incoming mail comes in CRM mail box ,
but here I got one new challenge if any mail comes paritculer domain like @test.com
I have to avoid this inbound mail ,how can I do this one .

I have found some code at this path ,modules/InboundEmail/InboundEmail.php
in this InboundEmail.php file we have one function called pollMonitoredInboxesAOP in that function I found $header->fromaddress this line at 5353 ,I just wanna ask you how can I give condition over here ,

If this $header->fromaddress comes with @test.com I have to avoind .

Help on it please .

Thanks
Sandeep

I’m from a sysadmin background, and ideally you don’t want to be messing directly with the source code, unless you create a complete module, otherwise updates to your site are going to break anything that you put in place.

You want to use the ‘best tool for the job’. This is a mail issue, so you could connect something like Thunderbird

via IMAP directly to the account, and use Menu->Tools->Filters to remove/delete/forward etc based on whatever rules you want.

If you control the Mail server itself, then you should use something like SIEVE:

to ensure that the mail management is to your requirements. I use linux based systems, but I’m sure that there is an equivalent for Windows servers?