Forum Discussion

Dennis_Schmidt's avatar
Dennis_Schmidt
Icon for Nimbostratus rankNimbostratus
Jun 29, 2021

SNAT based on mail domain in iRule

Hi there,

 

I want to collect the SMTP traffic and read the mail from domain. Based on this domain I want to do a SNAT.

 

The actual problem is that I can't read the TCP Payload.

 

I've tested with unencrypted smtp traffic to the F5.

 

Any Ideas how to do that?

  • You can see the links below with using either TCP::collect or a stream profile:

     

     

    https://devcentral.f5.com/s/question/0D51T00006j2p4a/logging-smtp-traffic-info-via-hsl-to-remote-log-server

     

    https://devcentral.f5.com/s/articles/smtp-proxy

     

     

    https://devcentral.f5.com/s/question/0D51T00006j2p4Z/irule-for-smtp-passing-client-ip-addr-to-backend-mail-servers

    • Dennis_Schmidt's avatar
      Dennis_Schmidt
      Icon for Nimbostratus rankNimbostratus

      Thanks for your answer.

      I've tried with the TCP::collect.

      The problem is that we don't get any SMTP Data. HTTP and HTTPS works fine. But the variable is always empty when SMTP traffic is send.

       

      Any Idea why the variable is emtpy?

       

      Thanks in advance.

      • Nikoolayy1's avatar
        Nikoolayy1
        Icon for MVP rankMVP

        See the stream options in:

         

         

        https://devcentral.f5.com/s/question/0D71T000007a8ve/detail?s1oid=00D00000000hXqv&t=1625129872640&s1nid=0DB1T0000008Ony&emkind=chatterCommentNotification&s1uid=0051T000008eyBa&emtm=1625128385879&fromEmail=1&s1ext=0