Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can junk mail rules be created by exchangelib? #1291

Closed
kingfer30 opened this issue Apr 8, 2024 · 1 comment
Closed

Can junk mail rules be created by exchangelib? #1291

kingfer30 opened this issue Apr 8, 2024 · 1 comment

Comments

@kingfer30
Copy link

Is your feature request related to a problem? Please describe.
Hello, I would like to ask if there is an interface for creating junk rules through the API?

Describe the solution you'd like
I saw that the rule created by this rule is only valid in the rule list and not in the junk list.
image

Describe alternatives you've considered
By reading the code, I found a method "bulk_mark_as_junk", but the official document states that blocked emails need to already exist, and my scenario is that certain the person or domain is not sending me emails, but I need to configure it so that I receive emails properly and not get marked as junk.
image

Additional context
That is like this:
image

Is it possible to implement?

@ecederstrand
Copy link
Owner

The inbox rule implementation in exchangelib uses the *InboxRule EWS services. For creation, specifically this one: https://learn.microsoft.com/en-us/previous-versions/office/developer/exchange-server-2010/ff709537(v=exchg.140)

I don't know where this lands when you look at it in Outlook. You could try to create a junk rule in Outlook and use exchangelib to see if that rule is exposed via account.rules. If not, then EWS probably does not expose this type of rule.

Repository owner locked and limited conversation to collaborators Apr 11, 2024
@ecederstrand ecederstrand converted this issue into discussion #1294 Apr 11, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants