postfix-users

Re: pgsql, reject_unlisted_recipient, and recipient_canonical_maps

Subject: Re: pgsql, reject_unlisted_recipient, and recipient_canonical_maps
From: Michael Monnerie <michael.monnerie AT it-management DOT at>
To: postfix-users AT postfix DOT org
Date: Wed, 8 Aug 2007 16:52:04 +0200
On Mittwoch, 8. August 2007 Michael Monnerie wrote:
> warning: table "pgsql:/etc/postfix/recipients-all.sql": empty lookup
> result for: "asdfff AT monnerie DOT at" -- ignored

I found that I have to return nothing, where I returned NULL, 
which is too much in this case - one of the few occasions 
where NULL is more than nothing :-(

This brings me to the second problem:
recipient_canonical_maps = pgsql:/etc/postfix/recipients-rewrite.sql

I use this to rewrite
user AT alias DOT domain -> user AT real DOT domain
without any other checks

Later, the config
virtual_mailbox_maps = pgsql:/etc/postfix/recipients-all.sql
smtpd_recipient_restrictions = permit_sasl_authenticated, 
 reject_unlisted_recipient, reject_unauth_destination
should tell me if an e-mail exists, but the problem is, 
that reject_unlisted_recipient looks into recipient_canonical_maps 
again:
Aug  8 12:58:47 mailsrv2.zmi.at postfix/smtpd[10475]: maps_find: 
recipient_canonical_maps: 
pgsql:/etc/postfix/recipients-rewrite.sql(0,lock|fold_fix): asdfff AT monnerie 
DOT at = asdfff AT monnerie DOT at
Aug  8 12:58:47 mailsrv2.zmi.at postfix/smtpd[10475]: mail_addr_find: asdfff AT 
monnerie DOT at -> asdfff AT monnerie DOT at
Aug  8 12:58:47 mailsrv2.zmi.at postfix/smtpd[10475]: generic_checks: 
name=reject_unlisted_recipient status=0

But that user doesn't exist. I can't easily check on canonical_maps 
whether a final e-mail exists or not, is there a way to
excempt the recipient_canonical_maps check for reject_unlisted_recipient ?

mfg zmi
-- 
// Michael Monnerie, Ing.BSc    -----      http://it-management.at
// Tel: 0676/846 914 666                      .network.your.ideas.
// PGP Key:         "curl -s http://zmi.at/zmi.asc | gpg --import"
// Fingerprint: EA39 8918 EDFF 0A68 ACFB  11B7 BA2D 060F 1C6F E6B0
// Keyserver: www.keyserver.net                   Key-ID: 1C6FE6B0

Attachment: signature.asc
Description: This is a digitally signed message part.

<Prev in Thread] Current Thread [Next in Thread>