smtp - Java - VM option to specify network device -


in bit of bind (pun intended).

we have websphere application server uses mail package send email via javamail, on smtp. have rhel box, non-root access (can't change that), has 2 network devices, eth0 , eth1. mail package used significant number applications , effort update , change labor intensive. previously, did not have worry this..

i need have mail sent eth1, however, have no means configure this. this, https://www-01.ibm.com/support/knowledgecenter/ssd28v_8.5.5/com.ibm.websphere.nd.doc/ae/trun_multiplenic.html , not help, not control outgoing calls.

have tried number of javamail vm options, e.g., mail.smtp.localhost / localaddress (but knew get-go incoming port bindings, tried anyway).

unfortunately, have not come across vm option allow me specify network device use via javamail or jvm in general (the latter preferred).

my intent minimize level of effort accommodate change in server setup (for have no control of).

the obvious answer - setup iptables force traffic on 1 device, can't that.

the next answer - specify network device use when building transport, can't because don't own mail package , require significant amount of time regression test against applications..

any or creative approaches try (given restrictions) appreciated!

very interesting "problem constraints" :) there property called mail.smtp.localaddress in javamail. value should ip of interface want bind (ip of eth1). since it's property, may set when starting application -dmail.smtp.localaddress=123.124.123.123

afaik there "general jvm property" setting in websphere, don't know exactly


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -