[PR #469] [MERGED] feat: add ENABLE_CHECK_JUNK_MAIL #582

Closed
opened 2026-02-26 21:31:53 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dreamhunter2333/cloudflare_temp_email/pull/469
Author: @dreamhunter2333
Created: 11/6/2024
Status: Merged
Merged: 11/6/2024
Merged by: @dreamhunter2333

Base: mainHead: feature/dev


📝 Commits (1)

  • 492c0b9 feat: add ENABLE_CHECK_JUNK_MAIL

📊 Changes

9 files changed (+72 additions, -2 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 vitepress-docs/docs/en/cli.md (+2 -0)
📝 vitepress-docs/docs/zh/guide/cli/worker.md (+2 -0)
📝 worker/src/admin_api/worker_config.ts (+2 -1)
📝 worker/src/common.ts (+3 -1)
worker/src/email/check_junk.ts (+44 -0)
📝 worker/src/email/index.ts (+14 -0)
📝 worker/src/types.d.ts (+2 -0)
📝 worker/wrangler.toml.template (+2 -0)

📄 Description

User description

#435


PR Type

Enhancement, Documentation


Description

  • Added ENABLE_CHECK_JUNK_MAIL configuration option to enable or disable junk mail checking.
  • Implemented a function check_if_junk_mail to determine if an email is junk based on SPF, DKIM, and DMARC headers.
  • Integrated junk mail checking into the email processing workflow.
  • Updated the Bindings type to include the ENABLE_CHECK_JUNK_MAIL option.
  • Documented the new configuration option in both English and Chinese CLI guides.
  • Updated the configuration template to include the new option.

Changes walkthrough 📝

Relevant files
Enhancement
6 files
worker_config.ts
Add junk mail check configuration option                                 

worker/src/admin_api/worker_config.ts

  • Added ENABLE_CHECK_JUNK_MAIL configuration option to the worker
    configuration.
  • +2/-1     
    common.ts
    Include headers in parsed email object                                     

    worker/src/common.ts

    • Added headers field to the parsed email object.
    +3/-1     
    check_junk.ts
    Implement junk mail checking function                                       

    worker/src/email/check_junk.ts

  • Created a new function check_if_junk_mail to determine if an email is
    junk based on SPF, DKIM, and DMARC headers.
  • +44/-0   
    index.ts
    Integrate junk mail checking into email processing             

    worker/src/email/index.ts

    • Integrated junk mail checking into the email processing workflow.
    +14/-0   
    types.d.ts
    Update Bindings type with junk mail check option                 

    worker/src/types.d.ts

    • Added ENABLE_CHECK_JUNK_MAIL to the Bindings type.
    +2/-0     
    wrangler.toml.template
    Add ENABLE_CHECK_JUNK_MAIL to configuration template         

    worker/wrangler.toml.template

  • Added ENABLE_CHECK_JUNK_MAIL configuration option to the template.
  • +2/-0     
    Documentation
    3 files
    CHANGELOG.md
    Document ENABLE_CHECK_JUNK_MAIL configuration option         

    CHANGELOG.md

  • Documented the addition of the ENABLE_CHECK_JUNK_MAIL configuration
    option.
  • +1/-0     
    cli.md
    Add ENABLE_CHECK_JUNK_MAIL documentation in English CLI guide

    vitepress-docs/docs/en/cli.md

  • Added documentation for the ENABLE_CHECK_JUNK_MAIL configuration
    option in the English CLI guide.
  • +2/-0     
    worker.md
    Add ENABLE_CHECK_JUNK_MAIL documentation in Chinese CLI guide

    vitepress-docs/docs/zh/guide/cli/worker.md

  • Added documentation for the ENABLE_CHECK_JUNK_MAIL configuration
    option in the Chinese CLI guide.
  • +2/-0     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information


    🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

    ## 📋 Pull Request Information **Original PR:** https://github.com/dreamhunter2333/cloudflare_temp_email/pull/469 **Author:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Created:** 11/6/2024 **Status:** ✅ Merged **Merged:** 11/6/2024 **Merged by:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Base:** `main` ← **Head:** `feature/dev` --- ### 📝 Commits (1) - [`492c0b9`](https://github.com/dreamhunter2333/cloudflare_temp_email/commit/492c0b986685d43e75c7b62978e2a23e6a9ac6f9) feat: add ENABLE_CHECK_JUNK_MAIL ### 📊 Changes **9 files changed** (+72 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `vitepress-docs/docs/en/cli.md` (+2 -0) 📝 `vitepress-docs/docs/zh/guide/cli/worker.md` (+2 -0) 📝 `worker/src/admin_api/worker_config.ts` (+2 -1) 📝 `worker/src/common.ts` (+3 -1) ➕ `worker/src/email/check_junk.ts` (+44 -0) 📝 `worker/src/email/index.ts` (+14 -0) 📝 `worker/src/types.d.ts` (+2 -0) 📝 `worker/wrangler.toml.template` (+2 -0) </details> ### 📄 Description ### **User description** #435 ___ ### **PR Type** Enhancement, Documentation ___ ### **Description** - Added `ENABLE_CHECK_JUNK_MAIL` configuration option to enable or disable junk mail checking. - Implemented a function `check_if_junk_mail` to determine if an email is junk based on SPF, DKIM, and DMARC headers. - Integrated junk mail checking into the email processing workflow. - Updated the `Bindings` type to include the `ENABLE_CHECK_JUNK_MAIL` option. - Documented the new configuration option in both English and Chinese CLI guides. - Updated the configuration template to include the new option. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>6 files</summary><table> <tr> <td> <details> <summary><strong>worker_config.ts</strong><dd><code>Add junk mail check configuration option</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/admin_api/worker_config.ts <li>Added <code>ENABLE_CHECK_JUNK_MAIL</code> configuration option to the worker <br>configuration.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/469/files#diff-49df0a54d190cb8ea3788432fae88000683da8e61a5c4d0d184c8b7f0015a0ae">+2/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>common.ts</strong><dd><code>Include headers in parsed email object</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/common.ts - Added `headers` field to the parsed email object. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/469/files#diff-fcc08fd5aa3c190d0d45c7e3dd208e5ee831d360b272fdd5869607cf472c5eb1">+3/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>check_junk.ts</strong><dd><code>Implement junk mail checking function</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/email/check_junk.ts <li>Created a new function <code>check_if_junk_mail</code> to determine if an email is <br>junk based on SPF, DKIM, and DMARC headers.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/469/files#diff-565fa6622914712e83a6155e454ec724434edd8778070fc25efcd1ba613030a5">+44/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>index.ts</strong><dd><code>Integrate junk mail checking into email processing</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/email/index.ts - Integrated junk mail checking into the email processing workflow. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/469/files#diff-da1768152a73f37b0a0780d578569f84c3d4bb946294e3a81fb0271302e6d816">+14/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>types.d.ts</strong><dd><code>Update Bindings type with junk mail check option</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/types.d.ts - Added `ENABLE_CHECK_JUNK_MAIL` to the `Bindings` type. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/469/files#diff-583fb024d5c9d1efac71bbea788d8379e5e8fc2f0bb1696a9863c6f6cac54bee">+2/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>wrangler.toml.template</strong><dd><code>Add ENABLE_CHECK_JUNK_MAIL to configuration template</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/wrangler.toml.template <li>Added <code>ENABLE_CHECK_JUNK_MAIL</code> configuration option to the template.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/469/files#diff-743273da72481b71fbeb1dddfd294be9249554eef65691dfc9bcfa9f0fd971fb">+2/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>3 files</summary><table> <tr> <td> <details> <summary><strong>CHANGELOG.md</strong><dd><code>Document ENABLE_CHECK_JUNK_MAIL configuration option</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> CHANGELOG.md <li>Documented the addition of the <code>ENABLE_CHECK_JUNK_MAIL</code> configuration <br>option.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/469/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed">+1/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>cli.md</strong><dd><code>Add ENABLE_CHECK_JUNK_MAIL documentation in English CLI guide</code></dd></summary> <hr> vitepress-docs/docs/en/cli.md <li>Added documentation for the <code>ENABLE_CHECK_JUNK_MAIL</code> configuration <br>option in the English CLI guide.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/469/files#diff-3f8f72a691fa19c8581621e91cf67ad28855af7a57e58513f6563cf4c8886e5f">+2/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>worker.md</strong><dd><code>Add ENABLE_CHECK_JUNK_MAIL documentation in Chinese CLI guide</code></dd></summary> <hr> vitepress-docs/docs/zh/guide/cli/worker.md <li>Added documentation for the <code>ENABLE_CHECK_JUNK_MAIL</code> configuration <br>option in the Chinese CLI guide.<br> </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/469/files#diff-f760a2ec5dad4b6bda0bd4a9325274567778add8cb984e73650dbaaf680c9178">+2/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></details></td></tr></tr></tbody></table> ___ > 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull request to receive relevant information --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
    kerem 2026-02-26 21:31:53 +03:00
    Sign in to join this conversation.
    No milestone
    No project
    No assignees
    1 participant
    Notifications
    Due date
    The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

    No due date set.

    Dependencies

    No dependencies set.

    Reference
    starred/cloudflare_temp_email#582
    No description provided.