From: mouss (no email)
Date: Mon Oct 02 2006 - 17:12:17 EDT
John Knappers wrote:
>
>> John Knappers wrote:
>>> Hello everyone,
>>>
>>> I consolidate a dozen of old domains in 2 domains with the generic
>>> table function of Postfix at our gateway relay / Mail hub.
>>> This works fine, but now. at last I finally wanted to implement the
>>> relay_recipient_maps function. After a night studying the awk syntax
>>> to convert the virtual table of our internal mailserver to a
>>> relay_recipients_map table I created a nice script just doing that.
>>>
>>> But now the problems starts. Only the mail of the 2 consolidated
>>> domains is accepted, and the mail to addresses ending with domains
>>> in the generic table is rejected. Does anyone a way to overcome
>>> this? My scripting knowledge is not sufficient to take the generic
>>> table in account when creating a relay_recipient_table.
>>>
>>> With other words: Is it possible to accept mail / do the generic
>>> domain consolidation, and apply the releay_recipients_maps feature
>>> after that?
>>
>>
>> post concrete examples and you'll get concrete answers...
>>
>> if your a map contains things like
>> foo at domain1 dot example bar at domain2 dot example
>>
>> and you want to add "bar at domain2 dot example" then
>>
>> grep -v "^#" $map| grep @ | awk '{print $2 " something"}'
>>
>> will do. if you want to add both key and value, then
>>
>> grep -v "^#" $map| grep @ | awk '{print $1 " got1"; print $2 "
>> got2"}'
>>
>> This assumes that you do not use addresses with spaces (such as "foo
>> bar"@example.com).
>>
> Sorry, if my explanation was not clear enough:
> Generic at the mailbub:
> @domain1.ccom @newdomain1.com
> @domain2.com @newdomain1.com
> @domain3.com @newdomain2.com
> @domain4.com @newdomain2.com
> and so on
but which of these would you want to add to relay_recipient_maps? these
are domain addresses. you can add them, but this means you'll accept any
address for the added domain. if you want so, awk is enough. (print $1 "
ok" or print $2 " ok" depending on which one you want to add) but see if
you can get a real list of users addresses.
|
|
|