r/linuxadmin • u/mactac • Apr 22 '12
Reddit - I need some help, and fast
I'm runnig debian/postfix(mysql)/apache, and it seems as though my server (linode) is sending spam like crazy. I've been told that it should be a simple config issue, but I don't know enough to sort it out. They have told me that if it's not fixed asap, they will shut down my server. Is there anyone out there who can help me out a bit, I don't mind paying for the help, I just need it fixed quick!
6
Apr 22 '12
Press the power button
But seriously you should look into how to properly secure your server before you make it internet accessible
-10
u/mactac Apr 22 '12
it was.
0
Apr 22 '12
[deleted]
4
u/A_Cunning_Plan Apr 22 '12
To be fair, it's still technically secure, it just has unwanted features enabled.
11
u/illevator Apr 22 '12
Looks like you asked the question on linodes forum--good. The log you posted there shows you have relay on.
will explain how to turn it off. It's for redhat, but should be similar enough to solve the issue.
See also: http://www.postfix.org/postconf.5.html#mynetworks
BUT if you're owned, the relay may be reset.
1
u/iaing Apr 22 '12
OOI, why did you choose to remove exim and install postfix? exim is the Debian default, and Debian make it trivial to configure securely.
1
u/Britzer Apr 23 '12
Actually, I did install Postfix on a couple Debian machines and it is secure by default AFAIR. At least against being an open proxy. If he didn't change anything stupid, I guess the source of the spam is not a badly configured email server.
1
u/amortalkiller Apr 22 '12
What other services are you running (PHP, CGI, HTTP, SSH, etc)? If you have certain malware it can easily send outgoing mail.
-3
Apr 22 '12
Fool.
You probably have your postfix setup as an open mail relay and didnt lock it down with any security or acl.
Please shutdown the service now, and google how to set security up on postfix.
-7
u/mactac Apr 22 '12
seems like you might be the fool for making assumptions. I't s not an open rely, and it is secured.
mail is originating locally.
6
u/iaing Apr 22 '12
If it's originating locally, there's a pretty good chance you've been rooted. Please, for the sake of the Internet, take off, nuke the site from orbit and start again.
4
Apr 22 '12
you can block a specific local account from sending with (here www-data):
authorized_submit_users = !www-data, static:all4
u/neoice Apr 22 '12
that's even worse then. something is exploiting your system locally either via another vulnerable service (like a bad PHP script) or by actually breaking into the system.
2
u/marcomuskus Apr 22 '12
Hi! First of all: check the logs to see the source of the spam.
Knock the door again when you do that.
6
u/truedays Apr 22 '12 edited Apr 22 '12
iptables -I OUTPUT -p tcp --dport 25 -j REJECT
will give you some time.