# Securing Postfix

## asankaan

Hi,

I have set up a mail server using postfix. 

Users in my local network ('mynetwork') can send anonymous emails to any other person ( e.g. user 'A' can use smtp commands to send emails as they are sent by user 'B'). 

Is it possible to setup any authentication method to authenticate my local network users when sending emails?

Hope my question is clear enough!

Thanks in Advance.

Asanka

----------

## Veldrin

yes it is. 

remove your networks from mynetworks, as mynetworks are allowed to send mail unauthenticated. 

for possible authentication method, have a look at the postfix documentation

V.

----------

## asankaan

Thanks for the reply. I'll try that option  :Smile: 

Thank you.

Asanka

----------

## cach0rr0

should be able to just ^^remove your IP/range from $mynetworks, remove permit_mynetworks, and then enable sasl in postfix

sasl is the "glue" that ties your esmtp authentication to whichever backend, be it pam, mysql, imap, ldap, whatever. 

/etc/sasl2/smtpd.conf controls the tying. permit_sasl_authenticated (and other choice SASL conf options) tell postfix to use the SASL mechanism. 

it'll make more sense when you're balls deep into implementation, but that's the short version.

----------

