# IMAP sync שלבים משתמש חדש אם Group.incoming\_email אינו מוגדר ל-Group.email\_username

**URL:** <https://meta.discourse.org/t/imap-sync-stages-new-user-if-group-incoming-email-is-not-set-to-group-email-username/178674>\
**Category:** Bug\
**Created:** [6 בפברואר,‏ 2021,‏ 6:18pm UTC](https://meta.discourse.org/t/imap-sync-stages-new-user-if-group-incoming-email-is-not-set-to-group-email-username/178674 "2021-02-06T18:18:29Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![thoka](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thoka/32/115652_2.png) [@thoka](https://meta.discourse.org/u/thoka)\
**Post date:** [6 בפברואר,‏ 2021,‏ 6:18pm UTC](https://meta.discourse.org/t/imap-sync-stages-new-user-if-group-incoming-email-is-not-set-to-group-email-username/178674/1 "2021-02-06T18:18:29Z")

</div>

While [playing around with IMAP sync](https://meta.discourse.org/t/imap-support-for-group-inboxes/160588/18) a staged user was created for `Group.email_username` during import from the IMAP account.  
Trying to understand what happened I noticed that `Group.find_by_email` does not take `Group.email_username` into account requiring to set `Group.incoming_email` to include this value at least.

Repro steps:

- enable IMAP sync
- configure Email sync options on a group but leave `Group.incoming_email` unconfigured
- send a mail to `Group.email_username`

---

_[View the full topic](https://meta.discourse.org/t/imap-sync-stages-new-user-if-group-incoming-email-is-not-set-to-group-email-username/178674)._
