On 2/28/2012 11:51 AM, Tugdual de Lassat (ML) wrote:
> Hello the list..
> 
>  
> 
> I’m asking your support for a problem we are facing using Postfix
> server configuration…
> 
>  
> 
> We are trying to setup an internal CRM Solution, that has to manage
> mail returns depending type of message…
> 
> We have actually 2 sorts of email types :
> 
> bounce.xxxxx-xxxx-x...@mydomain.tld
> <mailto:bounce.xxxxx-xxxx-x...@mydomain.tld> that can be also
> @anydomain.anytld (we have several communication methods and domains)
> 
> return.xxxxx-xxxx-x...@mydomain.tlmd
> <mailto:return.xxxxx-xxxx-x...@mydomain.tlmd> (same as above).
> 
>  
> 
> Both addresses must pipe to a script in order to
> 
> -          cope bounces and remove know clients from our CRM database
> 
> -          Send mail returns to the right person linked to the CRM
> Database (and moreover undertake CRM actions)
> 
>  
> 
> I have a transport regex : transportregex
> 
>  
> 
> /bounce.*@*/ <mailto:/bounce.*@*/>    bounceh:
> 
> /return.*@*/ <mailto:/return.*@*/>    bouncer:

(plain text only please)

Wildcard domain transports are probably a mistake, quite likely to
come back and bite you later.

Anyway, your regexp is wrong.


> 
>  
> 
> Called in main.cf :
> 
> transport_maps = regexp:/etc/postfix/transportregex
> 
>  
> 
> And corresponding pipes in master.cf
> 
> bounceh   unix  -       n       n       -       -      pipe
> 
>   flags=DRhu user=www-data argv=/usr/bin/php
> /home/samba/test/get_bounces.php
> 
> bouncer   unix  -       n       n       -       -      pipe
> 
>   flags=DRhu user=www-data argv=/usr/bin/php
> /home/samba/test/get_return.php
> 
>  
> 
> Yet when I send a mail to the transport (SMTP mails outside the
> server, not locally which weirdly seems to work), I always get the
> following return :
> 
> 550 5.1.1 <bounce.xxxxx-xxxx-x...@domain.tld
> <mailto:bounce.xxxxx-xxxx-x...@domain.tld>>:     Recipient address
> rejected: User unknown in local recipient table

So the user is unknown for a domain listed in $mydestination.
http://www.postfix.org/ADDRESS_CLASS_README.html
http://www.postfix.org/LOCAL_RECIPIENT_README.html

You can use a regexp alias_maps something like
/^bounce\./   bounce@localhost
/^return\./   return@localhost

in which case your transport map becomes simpler non-regexp

bounce@localhost  bounceh:
return@localhost  bouncer:




  -- Noel Jones

Reply via email to