Postfix securing binding to specific files or scripts
Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
or should I be looking at an alternative method of sending out email, and if so, what would you suggest.
Thanks in advance
If code has been injected into a bunch of php files (i.e. "at will"), what do you hope to accomplish by allowing only this particular file? I suppose you could configure Postfix to require authentication and then build auth into your sendmail.php script. Else maybe also config Postfix to listen on some obscure and/or high port and only allow connections from localhost. But, again, if arbitrary code is being injected into a bunches of php files, there's not much to stop them from also injecting a port scanner tool. So all you can really do is raise the bar a bit and hope the kiddies go somewhere else where it's lower.
Well from what I've seen so far with the files that have been exploited or created is that the newly created files have random looking names, ie, w40688301n.php, and injected code is mostly limited to the top level of the domain, ie index.php. While my rebuild of the server and update to the software 'should' close these holes, as both the server and the software install was somewhat outdated, I was hoping I could further secure postfix by allowing only my said scripts to generate emails. Sort of like a whitelist. The problem is that the sendmail.php file is not my own, so any changes I make to it could easily get update during future updates to the site software.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.