Discussion:
[maildropl] More quick questions
Philip Rhoades
2017-04-24 02:35:51 UTC
Permalink
People,

Is there a reason why the maildrop.log file does not include the "To:"
header line? I couldn't find a configuration anywhere that would cause
it to be included - is it possible?

Thanks,

Phil.
--
Philip Rhoades

PO Box 896
Cowra NSW 2794
Australia
E-mail: ***@pricom.com.au
Sam Varshavchik
2017-04-24 03:11:53 UTC
Permalink
Post by Philip Rhoades
People,
Is there a reason why the maildrop.log file does not include the "To:"
header line? I couldn't find a configuration anywhere that would cause
it to be included - is it possible?
Since To: should always be the same – this would be you – it makes little
sense to log it.

You can always explicitly execute the "log" statement, before "to", to add
something to the log file prior to what gets written by defualt.
Philip Rhoades
2017-04-24 04:17:12 UTC
Permalink
Sam,
Post by Philip Rhoades
People,
Is there a reason why the maildrop.log file does not include the "To:"
header line? I couldn't find a configuration anywhere that would cause
it to be included - is it possible?
Since To: should always be the same – this would be you – it makes
little sense to log it.
That's not the case - it IS the case for the envelope recipient but not
necessarily for the "To:" field in the email header - that can be
anything. I block more than 99% of spam with my spamdyke filters (which
DOES look at the envelope recipient address and cam reject the mail form
being accepted into the local system) but of the stuff that gets through
that, most is, of course addressed to me but there are significant
percentages of:

- a high number of one particular spam "To:" address

- random spam "To:" addresses

- empty "To:" addresses
You can always explicitly execute the "log" statement, before "to", to
add something to the log file prior to what gets written by defualt.
Not sure what you mean by that - could you elaborate?

Thanks,

Phil.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Courier-maildrop mailing list
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
--
Philip Rhoades

PO Box 896
Cowra NSW 2794
Australia
E-mail: ***@pricom.com.au
Sam Varshavchik
2017-04-24 10:30:40 UTC
Permalink
Post by Philip Rhoades
Post by Sam Varshavchik
You can always explicitly execute the "log" statement, before "to", to
add something to the log file prior to what gets written by defualt.
Not sure what you mean by that - could you elaborate?
See the "log" command in the maildropfilter man page.

Before the "to" statement that delivers the mail and logs the delivery in
the log file, just execute the "log" statement, to prepend your own message
to the log file. You can extract the contents of the To: header yourself,
and include it in the message.

/^To:(.*)/
log "To: $MATCH"
to "Maildir"

or something like that.

If you want the message to appear after the default log entry, use "cc"
instead of "to", followed by "log", followed by an explicit "exit".
Philip Rhoades
2017-04-25 06:30:23 UTC
Permalink
Sam,
Post by Sam Varshavchik
Post by Philip Rhoades
Post by Sam Varshavchik
You can always explicitly execute the "log" statement, before "to", to
add something to the log file prior to what gets written by defualt.
Not sure what you mean by that - could you elaborate?
See the "log" command in the maildropfilter man page.
Before the "to" statement that delivers the mail and logs the delivery
in the log file, just execute the "log" statement, to prepend your
header yourself, and include it in the message.
/^To:(.*)/
log "To: $MATCH"
to "Maildir"
or something like that.
If you want the message to appear after the default log entry, use
"cc" instead of "to", followed by "log", followed by an explicit
"exit".
Excellent! Thanks for that - BTW you don't need the "To:" in:

log "To: $MATCH"

Regards,

Phil.
Post by Sam Varshavchik
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Courier-maildrop mailing list
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
--
Philip Rhoades

PO Box 896
Cowra NSW 2794
Australia
E-mail: ***@pricom.com.au
Dmitri Maziuk
2017-04-24 19:59:39 UTC
Permalink
Post by Philip Rhoades
People,
Is there a reason why the maildrop.log file does not include the "To:"
header line? I couldn't find a configuration anywhere that would cause
it to be included - is it possible?
Since To: should always be the same – this would be you – it makes
little sense to log it.
I get mail for ***@gmail, ***@work, ***@work's_orifice365, ***@work,
***@work, and a few others. So no, it's not always the same.

Dima
Continue reading on narkive:
Loading...