actually it looks like it may be working have to test more but for debugging i am doing this variation of it
when RULE_INIT {
debug logging to /var/log/ltm (local0)? 0 = no, 1 = yes
set static::debug 1
}
if { [matchclass [IP::remote_addr] equals smtp_relay_allowed] } {
when CLIENT_ACCEPTED {
if { [IP::addr [IP::remote_addr] equals $ip_of_lb ] } {
log local0. "Node IP address is: [IP::remote_addr] and sent to SMTP_clients_from_ltm_addr"
} else {
log local0. "Node IP address is: [IP::remote_addr]"
if { [class match [IP::client_addr] equals smtp_relay_allowed] } {
pool mail.dcname
} else {
reject
}
}
}