Can't send activation mail before approving user


#1

Hello,

I just did a fresh setup of my discourse installation. The existing one was for testing and so on, now I’m going to production.

Since I’m hit by First mail validation mail never sent I resend the activation mail for users.

I have a user that is approved, but not yet active, since he didn’t replied to the activation mail so far. I try to resend it, but only get

(original) Du hast nicht die Erlaubnis, die angeforderte Ressource zu betrachten.
(translation) You don’t the necessary permissions to watch the requested ressources.

The user is trust level 1 (I start from 1)

I work with the default administrator. It says:

Administrator: yes
Moderator: no
trust level: 1

I recently deactivated the bootstrap mode, the forum banner says it’s due to be deactivated in the next 24 hours.

I am bit surprised that I’m not moderator, though it’s probably included in Administrator.

Why can’t I trigger resending the activation mail.

Thanks!


#2

Ok, I’ve noticed another odd thing:

It seems that mail validation is completely disabled. When I sign up for a new test user it just says

Thanks for registration, we will notify you as soon as your account is approved.

Nothing about mail validation. Sending mails otherwise works fine. What could be the problem here?

  • enable local logins is checked, default trust level = 1
  • Sending a test mail works.
  • Already tried rebuilding the app
  • /logs/ shows this error:

[details=Backtrace]> /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/journey/formatter.rb:46:in `generate’

/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/routing/route_set.rb:721:in generate' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/routing/route_set.rb:752:ingenerate’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/routing/route_set.rb:799:in url_for' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/routing/route_set.rb:280:incall’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/routing/route_set.rb:345:in block (2 levels) in define_url_helper' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/routing/polymorphic_routes.rb:239:inhandle_string_call’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/routing/url_for.rb:161:in url_for' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_controller/metal/redirecting.rb:95:in_compute_redirect_to_location’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_controller/metal/redirecting.rb:75:in redirect_to' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_controller/metal/flash.rb:57:inredirect_to’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_controller/metal/instrumentation.rb:64:in block in redirect_to' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:inblock in instrument’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:20:in instrument' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:ininstrument’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_controller/metal/instrumentation.rb:63:in redirect_to' /var/www/discourse/app/controllers/application_controller.rb:567:inredirect_to_login_if_required’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:432:in block in make_lambda' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:164:inblock in halting’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:504:in block in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:504:ineach’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:504:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:92:inrun_callbacks
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:778:in _run_process_action_callbacks' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:81:inrun_callbacks’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/abstract_controller/callbacks.rb:19:in process_action' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_controller/metal/rescue.rb:29:inprocess_action’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_controller/metal/instrumentation.rb:32:in block in process_action' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:inblock in instrument’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:20:in instrument' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:ininstrument’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_controller/metal/instrumentation.rb:30:in process_action' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_controller/metal/params_wrapper.rb:250:inprocess_action’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.8/lib/active_record/railties/controller_runtime.rb:18:in process_action' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/abstract_controller/base.rb:137:inprocess’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-4.2.8/lib/action_view/rendering.rb:30:in process' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-mini-profiler-0.10.4/lib/mini_profiler/profiling_methods.rb:76:inblock in profile_method’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_controller/metal.rb:196:in dispatch' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_controller/metal/rack_delegation.rb:13:indispatch’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_controller/metal.rb:237:in block in action' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/routing/route_set.rb:74:indispatch’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/routing/route_set.rb:43:in serve' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/journey/router.rb:43:inblock in serve’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/journey/router.rb:30:in each' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/journey/router.rb:30:inserve’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/routing/route_set.rb:817:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:incall’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:189:in call!' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:167:incall’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:189:in call!' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:167:incall’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:189:in call!' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:167:incall’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:189:in call!' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:167:incall’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:189:in call!' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:167:incall’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:189:in call!' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:167:incall’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/omniauth-1.6.1/lib/omniauth/builder.rb:63:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-1.6.8/lib/rack/conditionalget.rb:25:incall’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-1.6.8/lib/rack/head.rb:13:in call' /var/www/discourse/lib/middleware/anonymous_cache.rb:138:incall’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/params_parser.rb:27:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/flash.rb:260:incall’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-1.6.8/lib/rack/session/abstract/id.rb:225:in context' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-1.6.8/lib/rack/session/abstract/id.rb:220:incall’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/cookies.rb:560:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.8/lib/active_record/query_cache.rb:36:incall’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/callbacks.rb:29:inblock in call’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:88:in __run_callbacks__' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:778:in_run_call_callbacks’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:81:in run_callbacks' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/callbacks.rb:27:incall’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/remote_ip.rb:78:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:17:incall’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/show_exceptions.rb:30:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/logster-1.2.7/lib/logster/middleware/reporter.rb:31:incall’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/rack/logger.rb:38:in call_app' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/rack/logger.rb:22:incall’
/var/www/discourse/config/initializers/100-quiet_logger.rb:17:in call_with_quiet_assets' /var/www/discourse/config/initializers/100-silence_logger.rb:29:incall’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/request_id.rb:21:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-1.6.8/lib/rack/methodoverride.rb:22:incall’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-1.6.8/lib/rack/runtime.rb:18:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-1.6.8/lib/rack/sendfile.rb:113:incall’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-mini-profiler-0.10.4/lib/mini_profiler/profiler.rb:171:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/message_bus-2.0.2/lib/message_bus/rack/middleware.rb:62:incall’
/var/www/discourse/lib/middleware/request_tracker.rb:73:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/engine.rb:518:incall’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/application.rb:165:in call' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/railtie.rb:194:inpublic_send’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-4.2.8/lib/rails/railtie.rb:194:in method_missing' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-1.6.8/lib/rack/urlmap.rb:66:inblock in call’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-1.6.8/lib/rack/urlmap.rb:50:in each' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-1.6.8/lib/rack/urlmap.rb:50:incall’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/unicorn-5.3.0/lib/unicorn/http_server.rb:606:in process_client' /var/www/discourse/lib/scheduler/defer.rb:85:inprocess_client’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/unicorn-5.3.0/lib/unicorn/http_server.rb:702:in worker_loop' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/unicorn-5.3.0/lib/unicorn/http_server.rb:549:inspawn_missing_workers’
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/unicorn-5.3.0/lib/unicorn/http_server.rb:142:in start' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/unicorn-5.3.0/bin/unicorn:126:in<top (required)>’
/var/www/discourse/vendor/bundle/ruby/2.4.0/bin/unicorn:22:in load' /var/www/discourse/vendor/bundle/ruby/2.4.0/bin/unicorn:22:in'[/details]

Another update:

  1. I register, Discourse does not send a mail, nor does it states it will do so.
  2. I immediately change the mail address in the “Thanks for registration” dialogue.
  3. The mail is now sent to the new address.

Still, when I skip 2., there is no mail sent, nor can I request sending as an adminstrator.

Please help, as it basically breaks username/password based signup.

Thanks!
Florian


(Jeff Atwood) #3

Sounds like email is not working? See the email troubleshooting #howto topic.


#4

Mail is working just fine, please read my posts.

  • Sending mails otherwise works fine.
  • Sending a test mail works.
  • The mail is now sent to the new address.

Best Regards,
Florian


(Jeff Atwood) #5

If you have manual account approval enabled, you must go to the pending user approval queue and approve the users.

Otherwise, disable “must approve users” in your site settings.


#6

Has this behavior changed recently? Because I remember: Signup -> Verification Mail -> Approval -> Approval Mail.

Now it seems Signup -> Approval -> Approval/Verfication Mail.

Best,
Florian


(Jeff Atwood) #7

So you can confirm it is working for you? It is a bit of a :chicken: and :egg: problem between which comes first, the approval or the verification mail… I don’t have strong feelings about it either way.


#8

Me either, I’m fine with either. But I remember, that not too long ago, it was like I described above and I feel that behavior has changed.

Issue is solved therefore.


(Jeff Atwood) #9

Great! Sorry about the confusion.