Forum Discussion

MartinS's avatar
MartinS
Icon for Nimbostratus rankNimbostratus
Jan 22, 2019

Bypass SMTP profile for one IP

Hello, Can you help me with irule which would bypass LTM SMTP profile for one specific ip address? I begin with

 

when CLIENT_ACCEPTED { if { ([IP::client_addr] == "192.168.5.6%3") }{

 

and now I dont know how to match and bypass smtp profile called "smtp-prof"

 

thank you very much Martin

 

2 Replies

  • Martin,

    You could try using the 'SMTPS::disable' command. The iRule would look something like this.

    when CLIENT_ACCEPTED 
    { 
        if { ([IP::client_addr] == "192.168.5.6%3") }
        {
            SMTPS::disable
        }
    }
    
  • Hi Martin,

    there exists unfortunately no command to detach an assigned SMTP profile. But you may try the iRule below to disable the PSM functionality of the SMTP via the

    [PSM::SMTP::disable]
    command.

    https://support.f5.com/csp/article/K10987

    Note: The documentation of this command is not maintained anymore, so I dont know if this still works out on latest builds...

    when CLIENT_ACCEPTED { 
        if { [IP::addr [IP::client_addr] equals "10.10.10.0/24"] } then {
            PSM::SMTP::disable
        }
    }
    

    If this iRule does not workout, you may deploy a front-ending VS wich parses the connecting client IPs and then forwards the request either to a SMTP profile enabled VS or a nacked VS in a VIP-targeting-VIP setup...

    https://devcentral.f5.com/wiki/iRules.virtual.ashx

    Cheers, Kai