On Wed, Mar 23, 2016 at 08:54:55PM +0100, [email protected] wrote: > On Wed, Mar 23, 2016 at 09:49:24AM +0100, Gilles Chehade wrote: > > On Wed, Mar 23, 2016 at 12:21:03AM +0100, Joerg Jung wrote: > > > On Tue, Mar 22, 2016 at 10:57:00PM +0100, [email protected] wrote: > > > > Hi, > > > > > > > > is it possible to share data between callback functions in a > > > > python-based filter? > > > > I'm looking for something like this one (from the clamav filter): > > > > - filter_api_set_udata > > > > - filter_api_get_udata > > > > > > I think you could just create your own python dict which associates user > > > data with the given message ID. > > > > > > > yes, that's what I do myself, i use the on_connect/on_disconnect to > > store a per-session dictionnary where i can store stuff I want to > > retain between callbacks > > > > Thanks, I'll give it a try. > > Btw: why do I not see the filter log calls (e.g. from filter-trace), if I use > $ echo "foo" | mail -s "bar" <localuser> > but I can see how the mail is processed. > > If I use: > $ telnet localhost 25 > and do all the staff manually, I see the filter's output.
Yes, expected. Local enqueued mail usually bypasses filters. You may want to read about "listen on socket" in smtpd.conf(5) to change that behavior. > --f. > > > -- > > Gilles Chehade > > > > https://www.poolp.org @poolpOrg > > > > -- > You received this mail because you are subscribed to [email protected] > To unsubscribe, send a mail to: [email protected] > -- You received this mail because you are subscribed to [email protected] To unsubscribe, send a mail to: [email protected]
