Restrict outgoing email from user

By way of background, I run Virtualmin on a web-only server -- i.e., email accounts are hosted on a separate server not connected to Virtualmin at all. However, web apps on the Virtualmin server do need to send email occasionally, and so Postfix is running by default.

Perhaps I should have asked this on a Postfix mailing list, but I was wondering if there's a way to restrict the ability of a single user on the server to send email. To be more specific, if a website is cracked and starts spewing spam, I'd rather not take down the website immediately; I'd rather give the user a chance to do something about the root cause of the problem before hitting his website with a sledgehammer, but in the meantime prevent the user on the server from sending any email via PHP scripts, or any other technique, for that matter.

A search led me to this Serverfault thread, which would seem to be the solution I'm looking for. I'm just wondering if there's a straightforward way to do this built into Virtualmin.

Thanks.

Craig

Status: 
Active

Comments

Howdy -- Postfix does have ways of restricting a user from sending email, such as the post you shared. That will actually work well.

Virtualmin doesn't have a method built blocking email from users in that manner.

However, you could always take a look at Email Messages -> Email Rate Limiting as well.

Hi Eric,

Thanks. I took a look at "Email Messages -> Mail Rate Limiting", but it doesn't exist:

"Email rate limiting is not available on this system : The milter-greylist configuration file /etc/mail/greylist.conf does not exist"

I'm guessing this is because Postgrey isn't installed, because this server doesn't accept incoming email.

I'll go the manual route. Thanks.

Craig