You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by Kristian Rink <ka...@gmail.com> on 2015/02/19 22:21:03 UTC

reset password: mail configuration?

Folks;

in our archiva installation, it's impossible to reset passwords as, by 
then, archiva seems to try sending out an e-mail to the user in question 
which, however, does not get delivered: Archiva apparently uses JavaMail 
to send the message through the local mail transport using 
<username>@localhost, <username> being the name of the system user 
running archiva. This message, however, is rejected by the remote MTA.

Is there a way, in archiva, to configure how these mails are sent out 
(sender message, mail host to connect to, ...)? I sort of expected this 
to be somewhere in the configuration available to the archiva admin but 
this doesn't seem the case...

TIA and all the best,
Kristian

Re: reset password: mail configuration?

Posted by Olivier Lamy <ol...@apache.org>.
On 23 February 2015 at 23:27, Kristian Rink <ka...@gmail.com> wrote:

> Am 23.02.2015 um 11:26 schrieb Olivier Lamy:
>
>> I recommend you have a look here:
>> http://archiva.apache.org/redback/configuration.html#Email_Settings
>>
>> The properties used are: email.from.address and email.from.name
>>
>
> Aaah thanks and sorry. Being used to Spring JavaMail session and all, I
> kinda expected the smtp.* properties to work here. I will set it up right
> then.
>

No worries. I reckon the doc is not very visible :-)


>
> Thanks again and all the best,
> Kristian
>
>


-- 
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy

Re: reset password: mail configuration?

Posted by Kristian Rink <ka...@gmail.com>.
Am 23.02.2015 um 11:26 schrieb Olivier Lamy:
> I recommend you have a look here:
> http://archiva.apache.org/redback/configuration.html#Email_Settings
>
> The properties used are: email.from.address and email.from.name

Aaah thanks and sorry. Being used to Spring JavaMail session and all, I 
kinda expected the smtp.* properties to work here. I will set it up 
right then.

Thanks again and all the best,
Kristian


Re: reset password: mail configuration?

Posted by Olivier Lamy <ol...@apache.org>.
I recommend you have a look here:
http://archiva.apache.org/redback/configuration.html#Email_Settings

The properties used are: email.from.address and email.from.name

HTH
Olivier

On 20 February 2015 at 19:21, Kristian Rink <ka...@gmail.com> wrote:

> Hi Olivier;
>
> and first off, thanks a bunch for your help. Gave it a quick look, read
> through the jetty reference and configured it just like this:
>
>
> <New class="org.eclipse.jetty.jndi.factories.MailSessionReference">
>  <Set name="properties">
>   <New class="java.util.Properties">
>     <Put name="mail.smtp.host">192.168.1.253</Put>
>     <Put name="mail.from">admin@...</Put>
>     <Put name="mail.debug">true</Put>
>   </New>
>  </Set>
> </New>
>
> Outcome: archiva does now try to use the defined MX rather than the local
> transport on its VM to send mails (good), but the "mail.from" parameter
> still is ignored, mail still is trying to be sent as <user>@localhost. Is
> there anything else I am missing here? I do not have user/password set as
> the local hosts do not need to authenticate for sending out...
>
>
> TIA and all the best,
> Kristian
>



-- 
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy

Re: reset password: mail configuration?

Posted by Kristian Rink <ka...@gmail.com>.
Hi Olivier;

and first off, thanks a bunch for your help. Gave it a quick look, read 
through the jetty reference and configured it just like this:


<New class="org.eclipse.jetty.jndi.factories.MailSessionReference">
  <Set name="properties">
   <New class="java.util.Properties">
     <Put name="mail.smtp.host">192.168.1.253</Put>
     <Put name="mail.from">admin@...</Put>
     <Put name="mail.debug">true</Put>
   </New>
  </Set>
</New>

Outcome: archiva does now try to use the defined MX rather than the 
local transport on its VM to send mails (good), but the "mail.from" 
parameter still is ignored, mail still is trying to be sent as 
<user>@localhost. Is there anything else I am missing here? I do not 
have user/password set as the local hosts do not need to authenticate 
for sending out...

TIA and all the best,
Kristian

Re: reset password: mail configuration?

Posted by Olivier Lamy <ol...@apache.org>.
Hi,
That's the default configuration.
You can override that (depending if you the standalone version or if you
deployed it in a container)
if standalone look in the file called conf/jetty.xml and modify within the
section <New class="org.eclipse.jetty.jndi.factories.MailSessionReference">

if in a container  just configure the jndi resources see
http://archiva.apache.org/docs/2.1.1/adminguide/webapp.html

HTH
Olivier


On 20 February 2015 at 08:21, Kristian Rink <ka...@gmail.com> wrote:

> Folks;
>
> in our archiva installation, it's impossible to reset passwords as, by
> then, archiva seems to try sending out an e-mail to the user in question
> which, however, does not get delivered: Archiva apparently uses JavaMail to
> send the message through the local mail transport using
> <username>@localhost, <username> being the name of the system user running
> archiva. This message, however, is rejected by the remote MTA.
>
> Is there a way, in archiva, to configure how these mails are sent out
> (sender message, mail host to connect to, ...)? I sort of expected this to
> be somewhere in the configuration available to the archiva admin but this
> doesn't seem the case...
>
> TIA and all the best,
> Kristian
>



-- 
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy