You can use spam filter to block emails by size.
Login to your DirectAdmin account.
In the
Email Managersection, click on theSpam Filtersicon or type “Spam Filters” in theNavigation Filterbox and the option will appear. Click on it.
Under “Block By” from the
drop-downmenu, choose theSizeoption.Under “Value”, choose
Sizein KB or MB and enter your value.
Click on the
Blockbutton.
If you have chosen size in MB and have entered the value 5, for example, all emails exceeding 5 MB in size will be blocked.