smtpd_client_restrictions controls who is allowed to request an SMTP connection. It takes effect before the client gives the HELO command. By default, it is empty, which means that anyone is allowed to connect. For more info about the various parameters,
Even though anyone is allowed to make an SMTP connection to the mail server, by default the only allowable RCPT TO: addresses are those of local users. If you want to control which machines on your local network can relay mail, you can use the
mynetwoks_style parameter.
Examples:
1. Allow relay for mail submitted by this machine only:
Code:
mynetworks_style = host
2. Allow relay for mail submitted by any machine on my local network:
Code:
mynetworks_style = subnet
For finer control, use the
mynetworks parameter instead.
3. Mail server has address 192.168.0.2, but allows relay for mail submitted by machine 192.168.0.4:
Code:
mynetworks = 127.0.0.0/8 192.168.0.2/32 192.168.0.4/32