You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by Robert Wierschke <wi...@googlemail.com> on 2010/03/22 13:57:47 UTC
How to configure smtp?
Hi,
can you point me to some more documentation on how to configure mail
settings?
After following the instructions here [1], I get exceptions when trying to
register users due to wrong email settings. How can I configure the smpt
server being used (especially authentication)?
Thanks in advance.
regards,
robert
[1] http://archiva.apache.org/docs/1.3/adminguide/webapp.html
Re: How to configure smtp?
Posted by Deng Ching <oc...@apache.org>.
Could you also try using mail.smtp.user and password properties to set the
username and password respectively, something like this:
<Resource name="mail/session" auth="Container" type="javax.mail.Session"
...
mail.smtp.user="username" password="password">
Thanks,
Deng
On Sat, Mar 27, 2010 at 11:29 PM, Deng Ching <oc...@apache.org> wrote:
> Hmm.. for the mail.smtp.user property, did you append the @domain (ex.
> user@bogusmail.com)?
>
>
> On Thu, Mar 25, 2010 at 7:08 PM, Robert Wierschke <wierob83@googlemail.com
> > wrote:
>
>> This doesn't work either.
>>
>> 2010/3/25 Deng Ching <oc...@apache.org>
>>
>> > On Wed, Mar 24, 2010 at 11:30 PM, Robert Wierschke
>> > <wi...@googlemail.com>wrote:
>> >
>> > > I've written a small Java example that uses the mail api to send
>> mails.
>> > The
>> > > app can succesfully send mails via google using the following
>> properties:
>> > >
>> > > mail.smtp.host="smtp.googlemail.com"
>> > > mail.smtp.port="465"
>> > > mail.smtp.starttls.enable="true"
>> > > mail.smtp.auth="true"
>> > >
>> > > mail.smtp.socketFactory.port="465"
>> > > mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
>> > > mail.smtp.socketFactory.fallback="false"
>> > >
>> > > In my example username and password must be configured via
>> > > a javax.mail.Authenticator instance. However, I can't find any example
>> > that
>> > > shows how to set user and password via properties. So how to I
>> configure
>> > > username and password for Archiva? Both, mail.password
>> > > and mail.smpt.password do not work.
>> > >
>> > >
>> > Could you try with just username and password as the property names
>> instead
>> > of mail.user and mail.password?
>> >
>> > Thanks,
>> > Deng
>> >
>>
>
>
Re: How to configure smtp?
Posted by Deng Ching <oc...@apache.org>.
Hmm.. for the mail.smtp.user property, did you append the @domain (ex.
user@bogusmail.com)?
On Thu, Mar 25, 2010 at 7:08 PM, Robert Wierschke
<wi...@googlemail.com>wrote:
> This doesn't work either.
>
> 2010/3/25 Deng Ching <oc...@apache.org>
>
> > On Wed, Mar 24, 2010 at 11:30 PM, Robert Wierschke
> > <wi...@googlemail.com>wrote:
> >
> > > I've written a small Java example that uses the mail api to send mails.
> > The
> > > app can succesfully send mails via google using the following
> properties:
> > >
> > > mail.smtp.host="smtp.googlemail.com"
> > > mail.smtp.port="465"
> > > mail.smtp.starttls.enable="true"
> > > mail.smtp.auth="true"
> > >
> > > mail.smtp.socketFactory.port="465"
> > > mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
> > > mail.smtp.socketFactory.fallback="false"
> > >
> > > In my example username and password must be configured via
> > > a javax.mail.Authenticator instance. However, I can't find any example
> > that
> > > shows how to set user and password via properties. So how to I
> configure
> > > username and password for Archiva? Both, mail.password
> > > and mail.smpt.password do not work.
> > >
> > >
> > Could you try with just username and password as the property names
> instead
> > of mail.user and mail.password?
> >
> > Thanks,
> > Deng
> >
>
Re: How to configure smtp?
Posted by Robert Wierschke <wi...@googlemail.com>.
This doesn't work either.
2010/3/25 Deng Ching <oc...@apache.org>
> On Wed, Mar 24, 2010 at 11:30 PM, Robert Wierschke
> <wi...@googlemail.com>wrote:
>
> > I've written a small Java example that uses the mail api to send mails.
> The
> > app can succesfully send mails via google using the following properties:
> >
> > mail.smtp.host="smtp.googlemail.com"
> > mail.smtp.port="465"
> > mail.smtp.starttls.enable="true"
> > mail.smtp.auth="true"
> >
> > mail.smtp.socketFactory.port="465"
> > mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
> > mail.smtp.socketFactory.fallback="false"
> >
> > In my example username and password must be configured via
> > a javax.mail.Authenticator instance. However, I can't find any example
> that
> > shows how to set user and password via properties. So how to I configure
> > username and password for Archiva? Both, mail.password
> > and mail.smpt.password do not work.
> >
> >
> Could you try with just username and password as the property names instead
> of mail.user and mail.password?
>
> Thanks,
> Deng
>
Re: How to configure smtp?
Posted by Deng Ching <oc...@apache.org>.
On Wed, Mar 24, 2010 at 11:30 PM, Robert Wierschke
<wi...@googlemail.com>wrote:
> I've written a small Java example that uses the mail api to send mails. The
> app can succesfully send mails via google using the following properties:
>
> mail.smtp.host="smtp.googlemail.com"
> mail.smtp.port="465"
> mail.smtp.starttls.enable="true"
> mail.smtp.auth="true"
>
> mail.smtp.socketFactory.port="465"
> mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
> mail.smtp.socketFactory.fallback="false"
>
> In my example username and password must be configured via
> a javax.mail.Authenticator instance. However, I can't find any example that
> shows how to set user and password via properties. So how to I configure
> username and password for Archiva? Both, mail.password
> and mail.smpt.password do not work.
>
>
Could you try with just username and password as the property names instead
of mail.user and mail.password?
Thanks,
Deng
Re: How to configure smtp?
Posted by Brett Porter <br...@apache.org>.
On 25/03/2010, at 2:30 AM, Robert Wierschke wrote:
> I've written a small Java example that uses the mail api to send mails. The
> app can succesfully send mails via google using the following properties:
>
> mail.smtp.host="smtp.googlemail.com"
> mail.smtp.port="465"
> mail.smtp.starttls.enable="true"
> mail.smtp.auth="true"
>
> mail.smtp.socketFactory.port="465"
> mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
> mail.smtp.socketFactory.fallback="false"
>
> In my example username and password must be configured via
> a javax.mail.Authenticator instance. However, I can't find any example that
> shows how to set user and password via properties. So how to I configure
> username and password for Archiva? Both, mail.password
> and mail.smpt.password do not work.
>
>
I think you can pass all those parameters in to Tomcat as parameters in the resource example already given. The Jetty standalone bundle also takes the same parameters. If you have the "debug" option on, the log should show which options are being used when it starts up.
>
>>
>>> 4) is it possible to disable the user registration dialog and setup up the
>>> users manually in order to avoid the exception.
>>>
>>
>> I'm not sure I understand what you mean here :)
>>
>>
> Since the exception only occures if a user tries to register, is it possible
> to disable the user registration function and create new users only via the
> admin interface?
Not at this time, though there's a ticket open in JIRA for it already. It wouldn't be too hard to create a patch for it if you are interested in helping out.
Cheers,
Brett
--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/
Re: How to configure smtp?
Posted by Robert Wierschke <wi...@googlemail.com>.
I've written a small Java example that uses the mail api to send mails. The
app can succesfully send mails via google using the following properties:
mail.smtp.host="smtp.googlemail.com"
mail.smtp.port="465"
mail.smtp.starttls.enable="true"
mail.smtp.auth="true"
mail.smtp.socketFactory.port="465"
mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
mail.smtp.socketFactory.fallback="false"
In my example username and password must be configured via
a javax.mail.Authenticator instance. However, I can't find any example that
shows how to set user and password via properties. So how to I configure
username and password for Archiva? Both, mail.password
and mail.smpt.password do not work.
>
>> 4) is it possible to disable the user registration dialog and setup up the
>> users manually in order to avoid the exception.
>>
>
> I'm not sure I understand what you mean here :)
>
>
Since the exception only occures if a user tries to register, is it possible
to disable the user registration function and create new users only via the
admin interface?
regards
robert
Re: How to configure smtp?
Posted by Deng Ching <oc...@apache.org>.
Oh, sorry :)
On Tue, Mar 23, 2010 at 11:33 PM, Robert Wierschke
<wi...@googlemail.com>wrote:
> Hi Deng,
>
> I already got your first reply via the web archive ;) but I still
> get AuthenticationFailedException without any further detail. So,
>
> 1) is there a way to increase the log level in order to get more
> information about the exception cause
>
This might help: http://tomcat.apache.org/tomcat-6.0-doc/logging.html
> 2) what other properties can be configured for mail (e.g. TLS)
>
Could you try adding mail.smtp.starttls.enable=true to the mail resource?
> 3) is there a way to configure mail via the archiva web interface
>
There's no way to configure it from the web UI..
> 4) is it possible to disable the user registration dialog and setup up the
> users manually in order to avoid the exception.
>
I'm not sure I understand what you mean here :)
Thanks,
Deng
>
> regards
> robert
>
> 2010/3/23 Deng Ching <od...@gmail.com>
>
> Hi Robert,
>>
>> Please subscribe to the Archiva users list, your mails are getting
>> moderated :) I already replied to your first email btw, I don't think you
>> got it since it was in the users list..
>>
>> Anyway, you can set the mail session config as follows:
>>
>> <Resource name="mail/Session" type="javax.mail.Session" auth="Container"
>> mail.smtp.host="localhost"
>> mail.smtp.auth="true"
>> mail.user="USERNAME"
>> mail.password="PASSWORD"
>> mail.port="25"
>> mail.transport.protocol="smtp"
>> mail.debug="true"/>
>>
>>
>> Thanks,
>> Deng
>>
>>
>> On Tue, Mar 23, 2010 at 9:09 PM, Robert Wierschke <
>> wierob83@googlemail.com> wrote:
>>
>>> Unfortunately, I keep getting javax.mail.AuthenticationFailedException.
>>> Is
>>> there a way to increase the log level in order to get more information?
>>>
>>> 2010/3/22 Robert Wierschke <wi...@googlemail.com>
>>>
>>> > Hi,
>>> >
>>> > can you point me to some more documentation on how to configure mail
>>> > settings?
>>> >
>>> > After following the instructions here [1], I get exceptions when trying
>>> to
>>> > register users due to wrong email settings. How can I configure the
>>> smpt
>>> > server being used (especially authentication)?
>>> >
>>> > Thanks in advance.
>>> >
>>> > regards,
>>> > robert
>>> >
>>> > [1] http://archiva.apache.org/docs/1.3/adminguide/webapp.html
>>> >
>>>
>>
>>
>
Re: How to configure smtp?
Posted by Robert Wierschke <wi...@googlemail.com>.
Hi Deng,
I already got your first reply via the web archive ;) but I still
get AuthenticationFailedException without any further detail. So,
1) is there a way to increase the log level in order to get more information
about the exception cause
2) what other properties can be configured for mail (e.g. TLS)
3) is there a way to configure mail via the archiva web interface
4) is it possible to disable the user registration dialog and setup up the
users manually in order to avoid the exception.
regards
robert
2010/3/23 Deng Ching <od...@gmail.com>
> Hi Robert,
>
> Please subscribe to the Archiva users list, your mails are getting
> moderated :) I already replied to your first email btw, I don't think you
> got it since it was in the users list..
>
> Anyway, you can set the mail session config as follows:
>
> <Resource name="mail/Session" type="javax.mail.Session" auth="Container"
> mail.smtp.host="localhost"
> mail.smtp.auth="true"
> mail.user="USERNAME"
> mail.password="PASSWORD"
> mail.port="25"
> mail.transport.protocol="smtp"
> mail.debug="true"/>
>
>
> Thanks,
> Deng
>
>
> On Tue, Mar 23, 2010 at 9:09 PM, Robert Wierschke <wierob83@googlemail.com
> > wrote:
>
>> Unfortunately, I keep getting javax.mail.AuthenticationFailedException. Is
>> there a way to increase the log level in order to get more information?
>>
>> 2010/3/22 Robert Wierschke <wi...@googlemail.com>
>>
>> > Hi,
>> >
>> > can you point me to some more documentation on how to configure mail
>> > settings?
>> >
>> > After following the instructions here [1], I get exceptions when trying
>> to
>> > register users due to wrong email settings. How can I configure the smpt
>> > server being used (especially authentication)?
>> >
>> > Thanks in advance.
>> >
>> > regards,
>> > robert
>> >
>> > [1] http://archiva.apache.org/docs/1.3/adminguide/webapp.html
>> >
>>
>
>
Re: How to configure smtp?
Posted by Deng Ching <od...@gmail.com>.
Hi Robert,
Please subscribe to the Archiva users list, your mails are getting moderated
:) I already replied to your first email btw, I don't think you got it since
it was in the users list..
Anyway, you can set the mail session config as follows:
<Resource name="mail/Session" type="javax.mail.Session" auth="Container"
mail.smtp.host="localhost"
mail.smtp.auth="true"
mail.user="USERNAME"
mail.password="PASSWORD"
mail.port="25"
mail.transport.protocol="smtp"
mail.debug="true"/>
Thanks,
Deng
On Tue, Mar 23, 2010 at 9:09 PM, Robert Wierschke
<wi...@googlemail.com>wrote:
> Unfortunately, I keep getting javax.mail.AuthenticationFailedException. Is
> there a way to increase the log level in order to get more information?
>
> 2010/3/22 Robert Wierschke <wi...@googlemail.com>
>
> > Hi,
> >
> > can you point me to some more documentation on how to configure mail
> > settings?
> >
> > After following the instructions here [1], I get exceptions when trying
> to
> > register users due to wrong email settings. How can I configure the smpt
> > server being used (especially authentication)?
> >
> > Thanks in advance.
> >
> > regards,
> > robert
> >
> > [1] http://archiva.apache.org/docs/1.3/adminguide/webapp.html
> >
>
Re: How to configure smtp?
Posted by Robert Wierschke <wi...@googlemail.com>.
Unfortunately, I keep getting javax.mail.AuthenticationFailedException. Is
there a way to increase the log level in order to get more information?
2010/3/22 Robert Wierschke <wi...@googlemail.com>
> Hi,
>
> can you point me to some more documentation on how to configure mail
> settings?
>
> After following the instructions here [1], I get exceptions when trying to
> register users due to wrong email settings. How can I configure the smpt
> server being used (especially authentication)?
>
> Thanks in advance.
>
> regards,
> robert
>
> [1] http://archiva.apache.org/docs/1.3/adminguide/webapp.html
>
Re: How to configure smtp?
Posted by Deng Ching <oc...@apache.org>.
Hi Robert,
You can set the mail session config as follows:
<Resource name="mail/Session" type="javax.mail.Session" auth="Container"
mail.smtp.host="localhost"
mail.smtp.auth="true"
mail.user="USERNAME"
mail.password="PASSWORD"
mail.port="25"
mail.transport.protocol="smtp"
mail.debug="true"/>
Thanks,
Deng
On Mon, Mar 22, 2010 at 8:57 PM, Robert Wierschke
<wi...@googlemail.com>wrote:
> Hi,
>
> can you point me to some more documentation on how to configure mail
> settings?
>
> After following the instructions here [1], I get exceptions when trying to
> register users due to wrong email settings. How can I configure the smpt
> server being used (especially authentication)?
>
> Thanks in advance.
>
> regards,
> robert
>
> [1] http://archiva.apache.org/docs/1.3/adminguide/webapp.html
>