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

**URL:** https://meta.discourse.org/t/allowing-anonymous-e-mails-for-private-category-prevents-e-mails-from-existing-users/33421
**Category:** Bug
**Tags:** email
**Created:** [18 september 2015 om 05:50 UTC](https://meta.discourse.org/t/allowing-anonymous-e-mails-for-private-category-prevents-e-mails-from-existing-users/33421 "2015-09-18T05:50:39Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Knagis](https://avatars.discourse-cdn.com/v4/letter/k/ba9def/32.png) [@Knagis](https://meta.discourse.org/u/Knagis)
#### Post date: [18 september 2015 om 05:50 UTC](https://meta.discourse.org/t/allowing-anonymous-e-mails-for-private-category-prevents-e-mails-from-existing-users/33421/1 "2015-09-18T05:50:39Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [18 september 2015 om 07:36 UTC](https://meta.discourse.org/t/allowing-anonymous-e-mails-for-private-category-prevents-e-mails-from-existing-users/33421/2 "2015-09-18T07:36:51Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ItsGhost](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsghost/32/121482_2.png) [@ItsGhost](https://meta.discourse.org/u/ItsGhost)
#### Post date: [27 januari 2016 om 22:34 UTC](https://meta.discourse.org/t/allowing-anonymous-e-mails-for-private-category-prevents-e-mails-from-existing-users/33421/3 "2016-01-27T22:34:59Z")

</div>

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)

```plaintext
/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'

```

---

<div class="post-metadata">

### Author: ![Sander78](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sander78/32/296615_2.png) [@Sander78](https://meta.discourse.org/u/Sander78)
#### Post date: [17 februari 2016 om 16:22 UTC](https://meta.discourse.org/t/allowing-anonymous-e-mails-for-private-category-prevents-e-mails-from-existing-users/33421/4 "2016-02-17T16:22:37Z")

</div>

I did just reproduce this error.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [22 februari 2016 om 19:00 UTC](https://meta.discourse.org/t/allowing-anonymous-e-mails-for-private-category-prevents-e-mails-from-existing-users/33421/5 "2016-02-22T19:00:05Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ItsGhost](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsghost/32/121482_2.png) [@ItsGhost](https://meta.discourse.org/u/ItsGhost)
#### Post date: [22 februari 2016 om 19:52 UTC](https://meta.discourse.org/t/allowing-anonymous-e-mails-for-private-category-prevents-e-mails-from-existing-users/33421/6 "2016-02-22T19:52:46Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [22 februari 2016 om 20:41 UTC](https://meta.discourse.org/t/allowing-anonymous-e-mails-for-private-category-prevents-e-mails-from-existing-users/33421/7 "2016-02-22T20:41:48Z")

</div>

> [@ItsGhost](#):
>
> 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?

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

---

<div class="post-metadata">

### Author: ![Sander78](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sander78/32/296615_2.png) [@Sander78](https://meta.discourse.org/u/Sander78)
#### Post date: [22 februari 2016 om 22:46 UTC](https://meta.discourse.org/t/allowing-anonymous-e-mails-for-private-category-prevents-e-mails-from-existing-users/33421/8 "2016-02-22T22:46:13Z")

</div>

Yep, it seems to work!

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [24 februari 2016 om 19:30 UTC](https://meta.discourse.org/t/allowing-anonymous-e-mails-for-private-category-prevents-e-mails-from-existing-users/33421/9 "2016-02-24T19:30:01Z")

</div>

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