Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a a web server that needs to send emails, but not recieve them. I have installed postfix (it came with nagios, also installed on this server) and now I need to make sure that my server does not get used as a spam server.

What steps do I need to take to ensure that this does not happen?

What additional security measures do I need to put in place?

Server is Ubuntu 10.4

share|improve this question

1 Answer 1

up vote 2 down vote accepted

When you install postfix on Ubuntu it should prompt you with a couple of options for how you wish to setup the server.

If the only goal is to send email then as long as you picked satellite system or localhost only then it's not setup to receive any email from an external source. If you didn't pick one of these options or aren't sure run sudo dpkg-reconfigure postfix.

But in general the setup should be secure by default. Only hosts or networks listed in the 'mynetworks' parameter will be able to send email. So you can double check you '/etc/postfix/main.cf'

You can also check to see if you're an open relay from this site.

share|improve this answer
    
I initially selected 'Internet Site' because all the other options required a smarthost (which I don't have). Local only states 'The only delivered mail is the mail for local users. There is no network.', won't this just put the emails within the local machine mailboxes? –  Josiah May 9 '10 at 3:21
    
Ok I think Internet Site will work for your needs. But you should run this command postconf -e inet_interfaces=loopback-only This will only allow it to accept email from the local host so your php or other web scripts can put outgoing email into the queue. –  3dinfluence May 9 '10 at 23:22
    
But I would also use that open relay test to verify that nothing is open from the outside world. –  3dinfluence May 9 '10 at 23:23
    
I exchanged the link to a different site, the one you linked is not working any more. Please verify if you'd also trust the tool I linked - I'm not an expert! –  lumbric Jan 1 '12 at 22:48
    
I'm sure that tool is fine. There are a number of sites that will test to see if you're an open relay they should all do the trick. You can also always run a few of them against your mail server to verify the results. –  3dinfluence Jan 1 '12 at 23:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.