You can use spam filter to block emails by size.
Login to your DirectAdmin account.
In the
Email Manager
section, click on theSpam Filters
icon or type “Spam Filters” in theNavigation Filter
box and the option will appear. Click on it.Under “Block By” from the
drop-down
menu, choose theSize
option.Under “Value”, choose
Size
in KB or MB and enter your value.Click on the
Block
button.
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.