Forum Discussion
Damien_Turner_1
Nimbostratus
Oct 30, 2008Mutiple Email Server with static Addresses
Hi all I'm new to iRules and have become stuck!
I have 3 email servers and each have there own incoming VIP, but I need to make sure that when one of these email server sends a mail it get's se...
hoolio
Cirrostratus
Nov 05, 2008Hi Damien,
You could defined one datagroup (called a class in the bigip.conf) for each pool of a type 'address' where you define the valid client IP addresses which should use that pool. You could then check the client IP address against the datagroups.
You would define the datagroup outside the rule (under Local Traffic >> iRules >> Datagroup tab). The definition in the bigip.conf would look like this:
class mail_10.0.0.1_clients {
network 192.168.1.0/24
host 192.168.20.1
}
class mail_10.20.0.1_clients {
network 192.168.2.0/24
host 192.168.40.1
}
The rule would look like this:
when CLIENT_ACCEPTED {
Check if client is part of the first datagroup
if {[matchclass [IP::client_addr] equals $::mail_10.0.0.1_clients]}{
Client matched first datagroup so use the corresponding pool
pool mail_10.0.0.1_pool
} elseif {[matchclass [IP::client_addr] equals $::mail_10.20.0.1_clients]}{
Client matched second datagroup so use the corresponding pool
pool mail_10.20.0.1_pool
} else {
Take some default action?
pool default_pool
}
}
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects