nicm / fdm

fdm source code
269 stars 50 forks source link

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

Closed Demosthenexx closed 2 years ago

Demosthenexx commented 2 years ago

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 2 years ago

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.

Demosthenexx commented 2 years ago

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 2 years ago

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

Demosthenexx commented 2 years ago

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