Skip to content

How to keep a context between multiple hooks? #13

@Sofahamster

Description

@Sofahamster

Sorry if this is obvious, but async python is new to me. How do I keep a context for a single email when I have multiple hooks? i.e. I want to check the daemon_name macro in the on_connect hook, and then check if one or more header values are present in the hook_on_header callback and only then decide to do something (i.e. add a header or reject the message).

Is there some kind of state variable or context where I can keep information / state about an email between hooks?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions