From: Gary Smith on
Currently we are using mysql plugin for this and are switching over to static files (or files generated on a schedule from the database). Anyway, looking at the docs, it says that the entry need only been found in the file to be accepted, otherwise it will be rejected.

"Postfix needs to know only if a lookup string is found or not, but it does not use the result from table lookup.

If this parameter is non-empty, then the Postfix SMTP server will reject mail to unknown relay users. This feature is off by default. "

So, do I need just this format:

jack(a)domain.tld

I know some time ago someone had mentioned for the hash lookup table to work correctly it needed a key pair so I would think:

jack(a)domain.tld jack(a)domain.tld

Which is the proper way to do this. I know I did this a long time ago but memories fad.

My intent is to rsync the source file to the postfix box, compare it to the local and if different replace local and then run postmap on the file, on a 5 minute schedule basis.

Gary-

From: Stan Hoeppner on
Gary Smith put forth on 4/13/2010 7:07 PM:
> Currently we are using mysql plugin for this and are switching over to static files (or files generated on a schedule from the database). Anyway, looking at the docs, it says that the entry need only been found in the file to be accepted, otherwise it will be rejected.
>
> "Postfix needs to know only if a lookup string is found or not, but it does not use the result from table lookup.
>
> If this parameter is non-empty, then the Postfix SMTP server will reject mail to unknown relay users. This feature is off by default. "
>
> So, do I need just this format:
>
> jack(a)domain.tld
>
> I know some time ago someone had mentioned for the hash lookup table to work correctly it needed a key pair so I would think:
>
> jack(a)domain.tld jack(a)domain.tld
>
> Which is the proper way to do this. I know I did this a long time ago but memories fad.
>
> My intent is to rsync the source file to the postfix box, compare it to the local and if different replace local and then run postmap on the file, on a 5 minute schedule basis.
>
> Gary-

All you need in the table is one fully qualified email address per line and
that's it. When email arrives, Postfix checks the RCPT TO: address against
/etc/postfix/relay_recipients and if a match is found Postfix then relays
the message to the host specified in transport_maps as accepting mail for
that TLD.

--
Stan

From: Magnus =?iso-8859-1?Q?B=E4ck?= on
On Wed, April 14, 2010 5:01 am, Stan Hoeppner said:

> Gary Smith put forth on 4/13/2010 7:07 PM:

[...]

> > I know some time ago someone had mentioned for the hash lookup table
> > to work correctly it needed a key pair so I would think:
> >
> > jack(a)domain.tld jack(a)domain.tld
> >
> > Which is the proper way to do this. I know I did this a long time
> > ago but memories fad.
> >
> > My intent is to rsync the source file to the postfix box, compare it
> > to the local and if different replace local and then run postmap on
> > the file, on a 5 minute schedule basis.
>
> All you need in the table is one fully qualified email address per line
> and that's it. When email arrives, Postfix checks the RCPT TO: address
> against /etc/postfix/relay_recipients and if a match is found Postfix
> then relays the message to the host specified in transport_maps as
> accepting mail for that TLD.

No, indexed maps must have a right-hand side but when used with
relay_recipient_maps its contents happens to be ignored.

$ echo foo > table
$ postmap hash:table
postmap: warning: table, line 1: expected format: key whitespace value
$ postmap -q foo hash:table
$ echo $?
1

--
Magnus B�ck
magnus(a)dsek.lth.se

From: Noel Jones on
On 4/13/2010 10:01 PM, Stan Hoeppner wrote:
> Gary Smith put forth on 4/13/2010 7:07 PM:
>> Currently we are using mysql plugin for this and are switching over to static files (or files generated on a schedule from the database). Anyway, looking at the docs, it says that the entry need only been found in the file to be accepted, otherwise it will be rejected.
>>
>> "Postfix needs to know only if a lookup string is found or not, but it does not use the result from table lookup.
>>
>> If this parameter is non-empty, then the Postfix SMTP server will reject mail to unknown relay users. This feature is off by default. "
>>
>> So, do I need just this format:
>>
>> jack(a)domain.tld
>>
>> I know some time ago someone had mentioned for the hash lookup table to work correctly it needed a key pair so I would think:
>>
>> jack(a)domain.tld jack(a)domain.tld
>>
>> Which is the proper way to do this. I know I did this a long time ago but memories fad.
>>
>> My intent is to rsync the source file to the postfix box, compare it to the local and if different replace local and then run postmap on the file, on a 5 minute schedule basis.
>>
>> Gary-
>
> All you need in the table is one fully qualified email address per line and
> that's it. When email arrives, Postfix checks the RCPT TO: address against
> /etc/postfix/relay_recipients and if a match is found Postfix then relays
> the message to the host specified in transport_maps as accepting mail for
> that TLD.
>

No, there must be a "result" with the address, but postfix
doesn't use that result. The file will look like:

user(a)example.com anything
user2(a)example.com anything
user3(a)example.com anything

"anything" can be any text, such as an administrative comment.

-- Noel Jones

From: Gary Smith on
> No, there must be a "result" with the address, but postfix
> doesn't use that result. The file will look like:
>
> user(a)example.com anything
> user2(a)example.com anything
> user3(a)example.com anything
>
> "anything" can be any text, such as an administrative comment.

That's what I thought. I've defaulted it to just use 'OK'.

Thanks,

Gary