Creating database maps with postmap

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Creating database maps with postmap

Chris Cameron-2
I'm using spf-milter-python, which uses an access map for refining the
SPF policy.

The file is formated as:

SPF-Fail: REJECT
SPF-Softfail: CBV
SPF-Neutral: OK
SPF-PermError: REJECT
SPF-Pass: OK


Running postmap on this gives:

postmap: warning: access, line 1: record is in "key: value" format; is
this an alias file?


But it still creates the expected access.db file. However,
spf-milter-python is unable to use it. Using makemap from another
machine, the resulting file works fine.

What is makemap doing that postmap isn't? How can I use postmap to
create the correct kind of file?


Thanks,
Chris
Reply | Threaded
Open this post in threaded view
|

Re: Creating database maps with postmap

Brian Evans - Postfix List
Chris Cameron wrote:
> I'm using spf-milter-python, which uses an access map for refining the
> SPF policy.
>
> The file is formated as:
>
> SPF-Fail: REJECT
>  

If the lookup key you want is 'SPF-Fail' then do not put a colon.
Colons are normally only used in alias lookups with Postfix
In General, access maps will not use them.

Brian
Reply | Threaded
Open this post in threaded view
|

Re: Creating database maps with postmap

Chris Cameron-2
Fair enough. However the documents for spf-milter-python state that I
could also do:

SPF-Neutral:aol.com REJECT
SPF-Softfail:aol.com REJECT


Would that still be valid considering "SPF-Softfail:aol.com" could be
seen as just one string?


Thank you for your help,

Chris


On Wed, Mar 11, 2009 at 1:54 PM, Brian Evans - Postfix List
<[hidden email]> wrote:

> Chris Cameron wrote:
>> I'm using spf-milter-python, which uses an access map for refining the
>> SPF policy.
>>
>> The file is formated as:
>>
>> SPF-Fail:     REJECT
>>
>
> If the lookup key you want is 'SPF-Fail' then do not put a colon.
> Colons are normally only used in alias lookups with Postfix
> In General, access maps will not use them.
>
> Brian
>
Reply | Threaded
Open this post in threaded view
|

Re: Creating database maps with postmap

Scott Kitterman-4
On Wed, 11 Mar 2009 14:51:02 -0600 Chris Cameron <[hidden email]> wrote:

>On Wed, Mar 11, 2009 at 1:54 PM, Brian Evans - Postfix List
><[hidden email]> wrote:
>> Chris Cameron wrote:
>>> I'm using spf-milter-python, which uses an access map for refining the
>>> SPF policy.
>>>
>>> The file is formated as:
>>>
>>> SPF-Fail:     REJECT
>>>
>>
>> If the lookup key you want is 'SPF-Fail' then do not put a colon.
>> Colons are normally only used in alias lookups with Postfix
>> In General, access maps will not use them.
>>
>> Brian
>>
>Fair enough. However the documents for spf-milter-python state that I
>could also do:
>
>SPF-Neutral:aol.com REJECT
>SPF-Softfail:aol.com REJECT
>
>
>Would that still be valid considering "SPF-Softfail:aol.com" could be
>seen as just one string?
>
>
>Thank you for your help,
>
>Chris

All the documentation for spf-milter-python is written by a Sendmail admin.  If you (sorry, I've been busy and just skimming the list - so this is to all of you discussing this) have suggestions for the documentation for Postfix users, please let me know and I'll get them forwarded upstream (I've packaged this for Debian/Ubuntu, but am not the author).

On a related note, with Postfix this is very easy to do (and much better documented) with the postfix-policyd-spf-python policy server.  Apologies if you've already been down this road.

Scott K