Quantcast

More quick questions

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

More quick questions

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?

Thanks,

Phil.
--
Philip Rhoades

PO Box 896
Cowra  NSW  2794
Australia
E-mail:  [hidden email]

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: More quick questions

Sam Varshavchik
Philip Rhoades writes:

> 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.


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop

attachment0 (817 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: More quick questions

Philip Rhoades
Sam,


On 2017-04-24 13:11, Sam Varshavchik wrote:

> Philip Rhoades writes:
>
>> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/courier-maildrop

--
Philip Rhoades

PO Box 896
Cowra  NSW  2794
Australia
E-mail:  [hidden email]

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: More quick questions

Sam Varshavchik
Philip Rhoades writes:

>> 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".


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop

attachment0 (817 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: More quick questions

Dimitri Maziuk
In reply to this post by Sam Varshavchik
On 4/23/2017 10:11 PM, Sam Varshavchik wrote:

> Philip Rhoades writes:
>
>> 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 me@gmail, me@work, me@work's_orifice365, root@work,
webmaster@work, and a few others. So no, it's not always the same.

Dima



------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: More quick questions

Philip Rhoades
In reply to this post by Sam Varshavchik
Sam,


On 2017-04-24 20:30, Sam Varshavchik wrote:

> Philip Rhoades writes:
>
>>> 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".


Excellent!  Thanks for that - BTW you don't need the "To:" in:

   log "To: $MATCH"

Regards,

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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/courier-maildrop

--
Philip Rhoades

PO Box 896
Cowra  NSW  2794
Australia
E-mail:  [hidden email]

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
Loading...