Op Sun, 17 Apr 2016 21:05:49 +0200 schreef Joerg Jung <[email protected]>:
On Fri, Apr 15, 2016 at 11:35:27AM +0200, Boudewijn Dijkstra wrote:
But the amount of information written per session to /var/log/syslog
oops I meant maillog
didn't change. How should I turn on said tracing?
Add the flags to the smtpd startup, either manually or via rc.conf(8),
e.g. smtpd -dv -Tall
smtpd -v -Tall
doesn't seem to make it more verbose, but I understand that there are a
several open issues related to logging. With -d it works though. I'll
report findings to github issue #674.
Now, I noticed that the -T flag got lost from man page as well... I will
investigate and bring it back.
Great.
[...]
Can you confirm that an errno raised by the socketpair() call in
filter_dispatch() will be propagated to a filter callback before the
message is definitely accepted?
Nope, probably it will not be propagated, because libc errno is highly
temporarily. Next libc call will overwrite it.
Otherwise I will have to prevent data loss by
monitoring the open file count.
If the socketpair() error happens the pipe will be closed and your next
filter callback should be on_rollback or on_disconnect, so you will
notice something went wrong (because you expected different state in
your filter, right?).
My filter doesn't really have expectations, it just keeps (naive) state of
information gathered and inserts a dataline when it has all the info it
needs.
Curious? Read code here:
https://github.com/bdijkstra82/OpenSMTPD-extras/tree/master/extras/wip/filters/filter-spf
(If you want to run it, then patch libspf2 first
https://github.com/bdijkstra82/libspf2/commit/84a0682b8d8a98daf074b710229e58a692352d29
)
Even if next callback is on_dataline() you may be
able to check and notice the broken pipe.
How? filter_api_writeln() doesn't have a return value. Does it set errno?
So you can just clean up the
required things in this case to avoid data loss.
However, all this is duck tape around the original problem, which needs
to be fixed.
Sure, but I'm trying to develop a filter, so if a work-around is quicker,
I'll take it.
--
Gemaakt met Opera's e-mailprogramma: http://www.opera.com/mail/
--
You received this mail because you are subscribed to [email protected]
To unsubscribe, send a mail to: [email protected]