Hi my server recive a lot of spam mail so i decided to disable the mail function not to recive mail at all. i disable postfix but steel the /var is full i do postsuper -d ALL every hour to delete all the deferet mail and to free space at /var but some time /var is out of space even faster and the server fails so i mast to mauly to run the comand.
Disabling the mail function will indeed prevent mail from being sent to your server – but it doesn’t prevent processes on your server from generating email.
It sounds like something on your server is generating email. That can happen if, say, a web application is generating mail, or one of your users is sending mail through your server.
What you can do is review the email headers, and use those to determine where the email is coming from.
Go to ‘Spam and Virus Delivery’ under ‘Server Configuration’
a. set up ‘Destination’ for ‘Spam’ as ‘Throw away’
This could be dangerous as it may throw away good ones too. Also, it is not a good idea to throw away spam immediately.
b. Enable ‘Automatically delete spam?’ and choose one of the options to delete mail automatically after a number of days or if the mailbox exceeds a certain MB size.
c. Enable ‘Create spamtrap and hamtrap email aliases?’ for users. This might make your task easier.
You may need to add a Hard disk that allows for more space, if you own the server machine.
write a perl/shell script to automatically delete .spam directory periodically.