Forum Discussion
Arkashik_6155
Nimbostratus
Jan 04, 2013iRule to log POP3/IMAP user
Hello everyone,
Since i'm new with iRules, could you please advice me how to log username/user's email address from POP3 and IMAP sessions.
The goal is to move users to go through POP3/IMAP...
nitass
Employee
Jan 05, 2013this is just another example.
pop3
root@(B3900-R72-S16)(cfg-sync Standalone)(Active)(/Common)(tmos) list ltm virtual bar110
ltm virtual bar110 {
destination any:110
ip-protocol tcp
mask any
pool gw
profiles {
tcp { }
}
rules {
myrule110
}
source 0.0.0.0/0
source-address-translation {
type automap
}
translate-address disabled
translate-port disabled
vlans-disabled
}
root@(B3900-R72-S16)(cfg-sync Standalone)(Active)(/Common)(tmos) list ltm rule myrule110
ltm rule myrule110 {
when CLIENT_ACCEPTED {
TCP::collect 0 0
}
when CLIENT_DATA {
if { [TCP::payload] contains "USER" } {
scan [TCP::payload] {USER%s} username
log local0. $username
TCP::release
return
}
TCP::release
TCP::collect
}
}
[root@B3900-R72-S16:Active:Standalone] config tail -f /var/log/ltm
Jan 5 02:56:05 B3900-R72-S16 info tmm[11078]: Rule /Common/myrule110 : garfield@something.com
Jan 5 02:56:09 B3900-R72-S16 info tmm1[11078]: Rule /Common/myrule110 : odie@something.com
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects