nicm/fdm

Verbose debugging, what message was received and where was it filed?

Demosthenexx opened this issue · 4 comments

During debugging I've been trying to find a way to print details of what message was received, and where it was filed away to.

So far I've only managed to print selective mail headers, but because I can't hook the maildir action I can't print where the message was delivered to the log.

If I increase the verbosity too much, it jumps from just the number of messages to every line sent/received from the mailserver. This is more of a middle ground.

With the following, I see in the output who the mail was from and the subject, but of course it can repeat if there are quoted messages in the message.

##### Echo out what's incoming, only pipe preserves stderr, stdout is discarded
match all action pipe "egrep '^(From|Subject): ' 1>&2" continue

I've looked at other searchable fdm.conf files and found nothing similar. What's the proper approach?

nicm commented

I'm not sure what you are trying to get at here, you should be able to figure out everything that is happening with various levels of -v.

With -v I can see rule numbers and match, but nothing about the message.

With -vv I see overwhelming debug information as each line is parsed, and then parent/child processes.

I'm just trying to see a line or two per message delivered, message from, subject, saved to $maildir.

nicm commented

There is only what is available at the three -v levels, I don't have any plans to change them.

Ok, so pipe to grep to stderr is likely the best method at the moment.