tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: resource configuration for jndi mail
Date Mon, 06 Aug 2012 16:08:17 GMT
Hash: SHA1


On 8/5/12 6:16 PM, Mark Eggers wrote:
> This system currently does not have nonlocal mail capabilities.

Do you mean that you can only connect to localhost:25 or that you can
(and must) connect to Gmail in order to send email to non-local
destinations? I suspect you mean the latter.

> The only other applications at this point (Icinga, Redmine) talk to
> a GMail service account directly.
> I'm really at a tipping point here - configure postfix to forward 
> nonlocal mail to GMail using the service account, or configure
> (another) direct connection.

Direct-connect isn't too bad, though it might be nice to have postfix
doing the queuing (and re-trying) for you locally.

> Just to get things running, I'm thinking of using the direct
> connection and defining all of the parameters in a Resource element
> in context.xml.
> I understand from the documentation that I can define the host name
> with the attribute
> Will translating the other properties I need to send mail via GMail
> to attributes work (port, password, auth, and so on)? The other
> mechanism is to set these in CATALINA_OPTS. The latter makes these
> values more easily accessible (casual ps command for example).

See the JNDI Resources HOWTO:

Specifically, there is this passage under "Configure Tomcat's Resource
Factory" (the one for "mail/Session"... there are like 5 of those
titles in the JNDI HOWTO but only one for SMTP):

Additional resource attributes and values will be converted to
properties and values and passed to
javax.mail.Session.getInstance(java.util.Properties) as part of the
java.util.Properties collection. In addition to the properties defined
in Annex A of the JavaMail specification, individual providers may
also support additional properties like password.

You can find big lists of properties that can you set in the following

> I suppose it's time to set up postfix.

Not a terrible idea, though not strictly necessary.

- -chris
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools -
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message