# Polling של אימייל POP3 הפסיק לעבוד

**URL:** https://meta.discourse.org/t/pop3-email-polling-stopped-working/181115
**Category:** Support
**Created:** [25 בפברואר,‏ 2021,‏ 12:59pm UTC](https://meta.discourse.org/t/pop3-email-polling-stopped-working/181115 "2021-02-25T12:59:29Z")
**Posts on this page:** 4
**Page:** 2

<div class="post-metadata">

### Author: ![jzedlitz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jzedlitz/32/211132_2.png) [@jzedlitz](https://meta.discourse.org/u/jzedlitz)
#### Post date: [12 באפריל,‏ 2021,‏ 4:33pm UTC](https://meta.discourse.org/t/pop3-email-polling-stopped-working/181115/21 "2021-04-12T16:33:58Z")

</div>

I have a suspicion: We also feed our Discourse with emails from mailing lists. If an old message held for moderation is released by the mailinglist moderator, it might be considered as too old by the Discourse filter. Because of the `break` the loop will be existed. Thus, a single old message could stop all further processing.

---

<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: [12 באפריל,‏ 2021,‏ 6:53pm UTC](https://meta.discourse.org/t/pop3-email-polling-stopped-working/181115/22 "2021-04-12T18:53:37Z")

</div>

Oh, and due to the ordering of this POP email server, it’s going from oldest to newest.

How about this patch @gerhard ? Also, prefer `Discourse.handle_job_exception` if possible for proper reporting of any other errors.

```diff
- break if mail_too_old?(mail_string)
+ next if mail_too_old?(mail_string)

```

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [12 באפריל,‏ 2021,‏ 7:02pm UTC](https://meta.discourse.org/t/pop3-email-polling-stopped-working/181115/23 "2021-04-12T19:02:12Z")

</div>

Thanks for the explanation. That makes sense.

@riking I agree, a proper fix should use `handle_job_exception`. Feel free to create a PR. 😉

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [16 באפריל,‏ 2021,‏ 10:19pm UTC](https://meta.discourse.org/t/pop3-email-polling-stopped-working/181115/25 "2021-04-16T22:19:41Z")

</div>

This should fix it.

[https://github.com/discourse/discourse/pull/12742](https://github.com/discourse/discourse/pull/12742)

[Previous page](https://meta.discourse.org/t/pop3-email-polling-stopped-working/181115.md?page=1)
