F5 Sites
  • F5.com
  • LearnF5
  • NGINX
  • MyF5
  • Partner Central
Contact
  • Under Attack?
  • F5 Support
  • DevCentral Support
  • F5 Sales
  • NGINX Sales
  • F5 Professional Services
Brand LogoSkip to content
Forums
CrowdSRC
Articles
Groups
EventsSuggestionsHow Do I...?
RegisterSign In
  1. DevCentral
  2. CrowdSRC
  3. CodeShare

SMTP Proxy

Problem this snippet solves: This iRule implements a simple SMTP proxy. This is just to show an idea to relay smtp message and to route mail traffic based on FROM or TO... this rule is tested and wo...
Published Mar 18, 2015
Version 1.0
application delivery
devops
iRules
smtp
CodeCentral_194's avatar
CodeCentral_194
Icon for Cirrus rankCirrus
Joined May 05, 2019
View Profile
CodeCentral_194's avatar
CodeCentral_194
Icon for Cirrus rankCirrus
Joined May 05, 2019
View Profile
F5_Jeff's avatar
F5_Jeff
Icon for Cirrus rankCirrus
Nov 29, 2018

Hi,

We are also constructing iRule which will direct traffic on a specific pool if an email was received from "gmail.com" or "google.com"

here is our script:

when CLIENT_ACCEPTED {
  log local0. "Client_ACCEPTED_HIT: IP address:[IP::client_addr]"
  TCP::respond "220\r\n" 
  TCP::collect
} 

when CLIENT_DATA { 
  log local0. "Client_DATA_HIT: IP address:[IP::client_addr] Data: [TCP::payload]"
  if { [TCP::payload] contains "gmail.com" } {
      pool testtesttest
      log local0. "cdata_FOUND: IP address:[IP::client_addr] Dest IP:[server_addr]:[server_port] Data: [TCP::payload]"
   }
  TCP::release
  TCP::collect
}

The issue we are having is that, the traffic is not being directed to the specified pool but to the default pool. however, the log "cdata_FOUND:.." can be seen. This mean that the traffic satisfied the "if condition".

This is where we are lost.

ABOUT DEVCENTRAL

DevCentral NewsTechnical ForumTechnical ArticlesTechnical CrowdSRCCommunity GuidelinesDevCentral EULAGet a Developer Lab LicenseBecome a DevCentral MVP

RESOURCES

Product DocumentationWhite PapersGlossaryCustomer StoriesWebinarsFree Online CoursesF5 CertificationLearnF5 Training

SUPPORT

Manage SubscriptionsProfessional ServicesProfessional ServicesCreate a Service RequestSoftware DownloadsSupport Portal

PARTNERS

Find a Reseller PartnerTechnology AlliancesBecome an F5 PartnerLogin to Partner Central

F5 logo©2024 F5, Inc. All rights reserved.
TrademarksPoliciesPrivacyCalifornia PrivacyDo Not Sell My Personal Information