Allowing anonymous e-mails for private category prevents e-mails from existing users


(Kārlis Gaņģis) #1

If I use “Accept emails from anonymous users with no accounts” for a category that only staff has access to it can correctly receive e-mails from anonymous users (they are submitted via the “system” user and a quote tag).

I expected that this accepts e-mails from existing users since it does not reduce the security in any way. Unfortunately it does not - instead a rejection e-mail is sent back to the user.

My use case - as many others I am trying to use Discourse to replace our ticketing system. I have a small script that uses API to retrieve the received e-mails, create new users and change the owner of the posts.

I would actually prefer a setting “Accept any e-mail” - that would set “skip_validations” option both for replies and topic creation - a moderator would then process the posts. The reason is that when a user writes the e-mail he does not get the feedback about unique titles, minimum lengths, permissions etc.

Non-users can't post by email even with Accept emails from anonymous users with no accounts checked
(Kane York) #2

I actually identified this as a potential problem when I wrote the logic, figured I’d wait until someone actually tried it and noticed :wink:

(Tom Price) #3

I’ve just had another version of this, only now it appears to not be working for all anonymous users emailing in.

Exact error message is Email can not be processed: can_create? failed

Backtrace if it’s helpful (I’m not really a rails dev)

/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/logster-1.0.1/lib/logster/logger.rb:74:in `add_with_opts'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/logster-1.0.1/lib/logster/logger.rb:35:in `add'
/usr/local/lib/ruby/2.0.0/logger.rb:445:in `warn'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:28:in `handle_failure'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:23:in `rescue in process_popmail'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:19:in `process_popmail'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:76:in `block (2 levels) in poll_pop3'
/usr/local/lib/ruby/2.0.0/net/pop.rb:688:in `block in delete_all'
/usr/local/lib/ruby/2.0.0/net/pop.rb:687:in `each'
/usr/local/lib/ruby/2.0.0/net/pop.rb:687:in `delete_all'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:75:in `block in poll_pop3'
/usr/local/lib/ruby/2.0.0/net/pop.rb:531:in `start'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:74:in `poll_pop3'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:15:in `execute'
/var/www/discourse/app/jobs/base.rb:154:in `block (2 levels) in perform'

(Sander Datema) #4

I did just reproduce this error.

(Régis Hanol) #5

@Knagis, @ItsGhost & @Sander78, can you update to latest and check? I believe this is fixed now.

(Tom Price) #6

Updated and everything appears to be working now, just waiting to see if a notification email is sent to the staged user.

Out of interest this only came about because I couldn’t disable staged accounts, has the old functionality of system posting been removed by design?

(Régis Hanol) #7

Yup, staged accounts is much more powerful than quoting emails.

(Sander Datema) #8

Yep, it seems to work!

(Jeff Atwood) #9

This topic was automatically closed after 2 days. New replies are no longer allowed.