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

I'm digging the web around to find the best way to configure Postfix.

I don't want to install a full Postfix server, the only thing I want is to send mail with the PHP mail(). I know this can be tricky, spammer loves the misconfigured mail server. So, I am looking for the best way to do this.

The best documentation I found is the Archlinux one.

But on several blogs I found some more tricky configuration like this

myhostname = foo.me
mydestination = localhost
mynetworks = 127.0.0.0/8

myorigin = /etc/mailname
mydestination = sd-24300.com , localhost
mail_owner = postfix

smtpd_recipient_restrictions =reject_unknown_sender_domain,reject_non_fqdn_sender,reject_unknown_recipient_domain,reject_non_fqdn_recipient,permit_mynetworks,reject_unauth_destination,permit
smtpd_data_restrictions =reject_unauth_pipelining,permit
inet_interfaces = loopback-only

So my question is quite easy, what is the best way to do this? By best i mean the more secure one.

Ps: My server runs a Ubuntu 12.04 with LAMP

share|improve this question

2 Answers 2

Use nullmailer instead of Postfix, it is a relay-only server made for this purpose.

It's available in the universe repo.

share|improve this answer

Since you're using ubuntu you can select from a couple predefined configs using the command:

sudo dpkg-reconfigure postfix

It should have one that fits your description.

share|improve this answer
    
This is much too vague, and factually untrue: while you could cobble something together by starting with the satellite config, there is no dpkg option that gives you a nullmailer. –  adaptr Jan 14 '13 at 9:49

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.