haraka / Haraka

A fast, highly extensible, and event driven SMTP server
https://haraka.github.io
MIT License
5.09k stars 661 forks source link

Cant use server.notes in later events #1476

Closed ricardopolo closed 8 years ago

ricardopolo commented 8 years ago

Haraka version 2.8.4

I save information in server.notes in the init_master event.

When i get server.notes in the queue event notes are empty. I also try connection.server.notes and is empty too. Why? Is this the expected behavior? How can I access server.notes the in queue event?

I think this may be a new bug or a new behavior, it believe the same code was working in older haraka versions.

Thanks

baudehlo commented 8 years ago

Sharing data between master and server should never be considered as reliable. Use an external database such as redis (available as a plugin) or anything else.

On May 24, 2016, at 9:51 PM, Ricardo Polo notifications@github.com wrote:

Haraka version 2.8.4

I save information in server.notes in the init_master event.

When i get server.notes in the queue event notes are empty. I also try connection.server.notes and is empty too. Why? Is this the expected behavior? How can I access server.notes the in queue event?

I think this may be a new bug or a new behavior, it believe the same code was working in older haraka versions.

Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub

ricardopolo commented 8 years ago

@baudehlo This is my requirement: I need to read a file from the file system that has a certificate that I need later. How can I read only once from the File System and reuse it later in the plugin?

I don't want to read the file in every email, I would like to cache it's content in the Haraka start

ricardopolo commented 8 years ago

Ok fixed. I was using init_master instead init_child. it used to work because we didn't have cluster active.