Configuring POSTFIX to receive emails only from localhost

Hello,

I am new to POSTFIX.

My manager has asked me to configure POSTFIX running on a server to accept mail only from itself(localhost). Can someone tell me how I can go about doing this?

in main.cf:

mynetworks_style = host
mynetworks = 127.0.0.0/8
smtpd_recipient_restrictions = permit_mynetworks

or

inet_interfaces = localhost

and than restart postfix