Skip to content
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

IMAP integration body limited to 2048, was not an issue for imap_email_content #93138

Closed
ez12a opened this issue May 16, 2023 · 3 comments · Fixed by #93163
Closed

IMAP integration body limited to 2048, was not an issue for imap_email_content #93138

ez12a opened this issue May 16, 2023 · 3 comments · Fixed by #93163
Assignees

Comments

@ez12a
Copy link

ez12a commented May 16, 2023

The problem

Migrated recently from the imap_email_content integration as recommended in the UI.

I built some automation and conditions based on the body of the email, which was available with imap_email_content integration.

With the migration to imap_content event, the body is now truncated to 2048 bytes. The email body is HTML all that the sensor gets is HTML and truncated before any useful information from the body can be obtained. Is there a workaround for this? The change to limit the body size was introduced here #92055

Thanks!

What version of Home Assistant Core has the issue?

core-2023.5.2

What was the last working version of Home Assistant Core?

core-2023.3.x

What type of installation are you running?

Home Assistant OS

Integration causing the issue

IMAP

Link to integration documentation on our website

https://www.home-assistant.io/integrations/imap/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @engrbm87, @jbouwh, mind taking a look at this issue as it has been labeled with an integration (imap) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of imap can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign imap Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


imap documentation
imap source
(message by IssueLinks)

@jbouwh
Copy link
Contributor

jbouwh commented May 16, 2023

I understand your concern, the new implementation uses events, and there is a limit to the size of events. We had to choose a safe size to work with. In an email has a plain text part it will return that part in favorit to an html part (truncated to 2048 bytes).
It might possible to allow a larger part, but we need to make sure that the other elements like the message headers also fit in the event.

@jbouwh
Copy link
Contributor

jbouwh commented May 16, 2023

I have opened a PR to allow to increase the maximum message size to be passed in the event data.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants