global::net

Predefined network ip ranges.

fn non_routable

fn non_routable() -> Array
details

Return a list of non routable networks (net_192, net_172, and net_10).


fn rg_10

fn rg_10() -> SharedObject
details

Return an ip range over “10.0.0.0/8”.

Example

#{
    rcpt: [
        rule "anti relay" || { if ctx::client_ip() in net::rg_10() { state::next() } else { state::deny() } }
    ]
}

fn rg_172

fn rg_172() -> SharedObject
details

Return an ip range over “172.16.0.0/12”.

Example

#{
    rcpt: [
        rule "anti relay" || { if ctx::client_ip() in net::rg_172() { state::next() } else { state::deny() } }
    ]
}

fn rg_192

fn rg_192() -> SharedObject
details

Return an ip range over “192.168.0.0/16”.

Example

#{
    rcpt: [
        rule "anti relay" || { if ctx::client_ip() in net::rg_192() { state::next() } else { state::deny() } }
    ]
}