On 12/9/2016 9:11 AM, Harald Glanzer wrote: > hi all! > > i am using virtual_alias_maps for a simple 'mainlinglist' configuration, i.e. > lookup a list adress and get the expanded (local) recipients. > > the lookup is based on mysql: > SELECT recipients FROM forwardings WHERE listadress='%s' > > is there any way to restrict this expansion s.t. it only occurs for a speficic > sender domain. for example, i would love to do something like that > SELECT recipients FROM forwardings WHERE listadress='%s' AND sender = > '%INTERNAL_VARIABLE' > > where INTERNAL_VARIABLE contains the domain of the sender. i want to restrict > this s.t. > a virtual_alias_maps expansion occurs _only_ if the sender belongs to a > certain domain (and has > used SMTP auth)... >
It is possible to restrict internal lists to a specific sender using restriction classes. Here's an example: http://www.postfix.org/RESTRICTION_CLASS_README.html#internal -- Noel Jones