David F. Skoll | 1 Jun 2010 01:57
Favicon

Re: obtaining the senders IP address within filter_begin

TLD MimeDefang wrote:

>   Does mimedefang provide the IP address of the sender within
> filter_begin?

Of course.

> If so, I cannot find where.

man mimedefang-filter

Then search for GLOBAL VARIABLES SET BY MIMEDEFANG.PL

>   I see $RelayAddr as a global, but is only available in
> _relay, _sender, and _recipient and that doesn't do me any good.

Umm?  What makes you think it's only available there?

-- David.
Jan-Pieter Cornet | 1 Jun 2010 16:06

Re: obtaining the senders IP address within filter_begin

On 2010 Jun 1, at 1:57 , David F. Skoll wrote:
>>  I see $RelayAddr as a global, but is only available in
>> _relay, _sender, and _recipient and that doesn't do me any good.
>
> Umm?  What makes you think it's only available there?

Probably because the docs are slightly unclear if you quick search them:

        $RelayAddr
               The  IP  address of the sending relay (as a string  
consisting of
               four dot-separated  decimal  numbers.)   One   
potential  use  of
               $RelayAddr is to limit mailing to certain lists to  
people within
               your organization.  This variable is available in   
filter_relay,
               filter_sender and filter_recipient.

That doesn't say the variable is also available in filter_begin,  
filter, filter_end, etc. That only becomes clear if you read the start  
of that section, which says:

GLOBAL VARIABLES SET BY MIMEDEFANG.PL
        The following global variables are set by mimedefang.pl and  
are  avail‐
        able  for use in your filter.  All of these variables are  
always avail‐
        able to filter_begin,  filter,  filter_multipart  and   
filter_end.   In
(Continue reading)

TLD MimeDefang | 1 Jun 2010 17:54
Favicon

Re: obtaining the senders IP address within filter_begin

David F. Skoll wrote:
>>   I see $RelayAddr as a global, but is only available in
>> _relay, _sender, and _recipient and that doesn't do me any good.
> Umm?  What makes you think it's only available there?

 From the man page (* added for highlight):
-----------------------------------------------------------
       $RelayAddr
               The  IP  address of the sending relay (as a string 
consisting of four dot-separated decimal numbers.)  One potential use of 
$RelayAddr is to limit mailing
               to certain lists to people within your organization. 
***This variable is available in filter_relay, filter_sender and 
filter_recipient.***

-----------------------------------------------------------

So that is not correct?
David F. Skoll | 1 Jun 2010 18:30
Favicon

Re: obtaining the senders IP address within filter_begin

TLD MimeDefang wrote:

> ***This variable is available in filter_relay, filter_sender and
> filter_recipient.***

It's correct.  However, the top of the section says:

"All of these variables are always available to filter_begin, filter,
 filter_multipart and filter_end.  In addition, some of them are
 available in filter_relay, filter_sender or filter_recipient.  If this
 is the case, it will be noted below."

As Jan-Pieter Cornet pointed out, the wording could be improved.

Regards,

David.
TLD MimeDefang | 1 Jun 2010 21:03
Favicon

Re: obtaining the senders IP address within filter_begin

David F. Skoll wrote:
> It's correct.  However, the top of the section says:
> "All of these variables are always available to filter_begin, filter,
>  filter_multipart and filter_end.  In addition, some of them are
>  available in filter_relay, filter_sender or filter_recipient.  If this
>  is the case, it will be noted below."

Drat.  I thought I was so thorough too. :)

I appreciate the assistance!

Brad/TLD
- | 2 Jun 2010 01:07
Picon
Favicon

Re: obtaining the senders IP address within filter_begin

--- On Tue, 6/1/10, TLD MimeDefang <tld.mimed <at> stimulacra.com> wrote:
> > ... in addition, some of them are available in filter_relay,
> > filter_sender or filter_recipient.  If this is the case, it will
> > be noted below."

Although accurate, replacing "If this is ..." with "Where this is..." is better diction.

- | 2 Jun 2010 01:05
Picon
Favicon

Re: obtaining the senders IP address within filter_begin

--- On Tue, 6/1/10, TLD MimeDefang <tld.mimed <at> stimulacra.com> wrote:
> RE: $RelayAddr documentation.

I consider the documentation as accurate as written.  However, English is my first language.  Maybe
non-native speakers have a different view.

Jan-Pieter Cornet | 2 Jun 2010 17:16

Re: obtaining the senders IP address within filter_begin

On 2010 Jun 2, at 1:05 , - wrote:
> --- On Tue, 6/1/10, TLD MimeDefang <tld.mimed <at> stimulacra.com> wrote:
>> RE: $RelayAddr documentation.
>
> I consider the documentation as accurate as written.  However,  
> English is my first language.  Maybe non-native speakers have a  
> different view.

I have a slightly different view. I consider the documentation  
accurate, but occasionally unclear when used as a reference manual. I  
do not believe that the fact that I'm not a native english speaker has  
much to do with this, but that might be hubris on my part :)

--

-- 
Jan-Pieter Cornet <johnpc <at> xs4all.net>
Systeembeheer XS4ALL Internet bv
Internet: www.xs4all.nl
Contact: www.xs4all.nl/contact

Kevin A. McGrail | 2 Jun 2010 17:36
Favicon

Re: obtaining the senders IP address within filter_begin

On 6/2/2010 11:16 AM, Jan-Pieter Cornet wrote:
> On 2010 Jun 2, at 1:05 , - wrote:
>> --- On Tue, 6/1/10, TLD MimeDefang <tld.mimed <at> stimulacra.com> wrote:
>>> RE: $RelayAddr documentation.
>>
>> I consider the documentation as accurate as written.  However, 
>> English is my first language.  Maybe non-native speakers have a 
>> different view.
>
> I have a slightly different view. I consider the documentation 
> accurate, but occasionally unclear when used as a reference manual. I 
> do not believe that the fact that I'm not a native english speaker has 
> much to do with this, but that might be hubris on my part :)
>
My opinion is that the manual is accurate, efficient & easy to 
maintain.  However, this approach isn't always user-friendly.  Likely, 
the user-friendly way is to duplicate the information under each section.

regards,
KAM
TLD MimeDefang | 2 Jun 2010 17:46
Favicon

Re: obtaining the senders IP address within filter_begin

> Although accurate, replacing "If this is ..." with "Where this is..." is better diction.

   In my particular case, I just missed this part... or overlooked it. 
:)  I'm certain I saw the beginning line " The  following  global 
variables are set by mimedefang.pl [snip]" and said to myself "OK this 
is the correct section" and then began thumbing through the list of 
variables.

Brad/TLD

Gmane