On 3/13/2014 5:33 AM, ML mail wrote:
> Hello,
> 
> I am using the recipient_canonical_maps as PCRE map in order to
> convert some recipient e-mail addresses. I have it configured like
> this in my main.cf:
> 
> recipient_canonical_maps        =
> pcre:/etc/postfix/recipient_canonical_domains
> 
> and use the following single entry:
> 
> /^newsletter(-.+)?@domain.com$/ newsletter-domaincom${1}@domain.com
> 
> using postmap to test this rule works as you can see below:
> 
> /usr/sbin/postmap -q "newslet...@domain.com"
> pcre:/etc/postfix/recipient_canonical_domains
> newsletter-domain...@domain.com
> 
> but then when I send a real e-mail to newslet...@domain.com postfix
> throws the following error:
> 
> postfix/cleanup[19947]: warning: 3BE1C22A08: unreasonable
> recipient_canonical_maps map nesting for
> newsletter-domaincom-domaincom-domaincom-domaincom-domaincom-domaincom-domaincom-domaincom-domaincom-domain...@domain.com
> 
> Any idea what I could be doing wrong?
> 
> Best regards
> ML

canonical_maps lookups are recursive. Your result matches your input
pattern, causing a loop. You should protect your pattern inside an
IF..ENDIF section to prevent the result address from being rewritten.


  -- Noel Jones

Reply via email to