Send mail only from php; never from outside of localhost

Sygmoral

Verified User
Joined
Aug 15, 2012
Messages
64
My server is an application server. I'm the only using it. We have no mailboxes on it, but the php applications do send email, using the simple mail() function. (So I have already disabled dovecot.)

I see lots of login attempts happening on exim (Brute Force Monitor), and I would to close it down. I still need exim to be able to send mail using mail(), right? In that case I am hoping for an easy option to block all logins on exim from outside of the server itself.
 
Makes sense, though I wasn't sure how to do that easily as I did not find a firewall in DirectAdmin... However, I have now found this guide about installing CSF which was surprisingly easy. Then ConfigServer Security & Firewall appeared, so I went to csf > Firewall Configuration and updated the TCP_IN value to only 22,80,443,2222 (since I don't use ftp or named either).
 
Back
Top