Discussion:
reset password: mail configuration?
Kristian Rink
2015-02-19 21:21:03 UTC
Permalink
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
2015-02-20 01:41:45 UTC
Permalink
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
Post by Kristian Rink
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
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
Kristian Rink
2015-02-20 08:21:05 UTC
Permalink
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">***@...</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
2015-02-23 10:26:11 UTC
Permalink
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
Post by Kristian Rink
Hi Olivier;
and first off, thanks a bunch for your help. Gave it a quick look, read
<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.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
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
Kristian Rink
2015-02-23 12:27:35 UTC
Permalink
Post by Olivier Lamy
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
Olivier Lamy
2015-02-23 22:30:48 UTC
Permalink
Post by Kristian Rink
Post by Olivier Lamy
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 :-)
Post by Kristian Rink
Thanks again and all the best,
Kristian
--
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy
Loading...