I'm trying to improve the protection of my mail server from hijack by
spammers. I understand one can restrict a node's access to a postfix
mail server by using:
mynetworks ='config-directory'/mynetworks
in the mail.cf file.
And I know that in the 'mynetworks' file you can specify the IP address
of the machine that's allowed to to send, but I was wondering if there
are other criteria you can use in the file besides an IP address. ie:
can you specify a machine by it's mac address? or computer name? maybe
the email address used by the node? And if so, what is the correct
format?
Thanks for any pointers.
http://www.postfix.org/postconf.5.html and scroll down....
--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
thanks for your response.
I did go to the page and scroll down but I didn't see anything except
references to IP addresses.
That's about all that you can usefully use, plus anything that will
resolve to a hostname [1].
Domain names generally won't resolve unless the domain refers to a single
IP. The short-hand for a network is the CIDR form, which requires a
partial IP, e.g. 192.168.0.0/16 and its the easiest way to specify a
subnet: you could list individual hosts but that could easily get long-
winded and is error-prone. A single CIDR subnet reference is a lot easier
to maintain than a list of hostnames.
[1] I haven't tried this but it will probably work seeing that you can
use host names as well as IPs in other places.