Avinash Sultanpur | 2 Jul 21:21

relay_recipient_maps and address verification

Hi,

I have a set of domains for which I am relaying mails through my server. 
The final destination server for some of these domains are always 
available (connected to the internet all the time and powered on) for 
which I would like to implement recipient address verification. There 
are some other destination servers which are not available all the time 
(switched off during the nights and weekends) for which I would like to 
maintain relay_recipient_maps so that I can accept and queue the mails 
till the host is back online.

I have successfully configured both types of recipient verification 
individually. Now I would like to have these working on the same server. 
I have tried the configuration below.

smtpd_recipient_restrictions =
        reject_non_fqdn_sender
        reject_non_fqdn_recipient
        reject_unknown_sender_domain
        reject_unknown_recipient_domain
        reject_unauth_pipelining
        permit_sasl_authenticated
        permit_mynetworks
        reject_unauth_destination
        reject_rbl_client zen.spamhaus.org
        reject_unverified_recipient

relay_recipient_maps = pgsql:recipients

I found that the address verification probes are sent out even for the 
recipients which are listed in the relay_recipient_maps. So I included 
check_recipient_access which returned 'OK' for the valid recipients just 
before reject_unverified_recipient and removed relay_recipient_maps. It 
does work as I expected - accepting listed recipients without a 
verification probe and rejecting unverified recipients.

smtpd_recipient_restrictions =
        ...
        check_recipient_access pgsql:rcpt_access
        reject_unverified_recipient

Is it possible to avoid check_recipient_access and use 
relay_recipient_maps and reject_unverified_recipient without triggering 
a verification probe for the listed recipient? Maybe if there was 
something like permit_listed_recipient?

thanks,
Avinash


Gmane