Hello I would like to telnet a mail server from srx 240
i tried this
telnet hostname port 25 interface
is the above command correct
Yes it is correct
You can refer for more details.
Also be aware that this telnet connection will be self traffic from the SRX so will come from the junos-host zone.
So if you are using this as a test for security policies, it will generally not work for you initiating the test traffic from the SRX itself.