Forum Discussion

BrentonPrice_27's avatar
BrentonPrice_27
Icon for Nimbostratus rankNimbostratus
May 02, 2017

Exchange SMTP relap I-rule

Can some one help me with what I am missing I will put in a SNAT ip address when implementing but getting error

 

01070151:3: Rule [/Common/Exchange-Relay] error: /Common/Exchange-Relay:5: error: [wrong args][class match [IP::client_addr]] /Common/Exchange-Relay:6: error: [undefined procedure: equals][equals smtp_relay_allowed ]

 

when CLIENT_ACCEPTED { set accepted_snat "SNAT ip" if { [ class exists smtp_relay_allowed ] } { if { [ class match [IP::client_addr] equals smtp_relay_allowed ] } { snat $accepted_snat } else { snat automap } } else { snat automap } }

 

2 Replies

  • The iRule looks to be correct and I can load in my lab. Can you paste the iRule using the correct formatting for code in devcentral (see the formatting buttons)? Also, when do you get this error (like when creating the iRule, when attaching to a virtual server, when passing traffic)?

     

  • JG's avatar
    JG
    Icon for Cumulonimbus rankCumulonimbus

    Try this:

    when CLIENT_ACCEPTED {
        set accepted_snat "SNAT ip"
        if { [ class exists smtp_relay_allowed ] }
        {
            if { [ class match [IP::client_addr] \
                       equals smtp_relay_allowed ] }
            {
                snat $accepted_snat
            } else {
                snat automap
            }
        } else {
            snat automap
        }
    }
    

    .