Avinash Sultanpur wrote:
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've been using smtpd_restriction_classes and check_recipient_access to apply different rules to different domains.

You place the domains that are always online in one group, the domains that are not always online in a second group, and then place check_recipient_access at the bottom of your smtpd_recipient_restrictions.

smtpd_restriction_classes =
   always_online_domains,
   sometimes_online_domains

smtpd_recipient_restrictions=
   ...
   check_recipient_access hash:/etc/postfix/domain_to_classes_mapfile

/etc/postfix/domain_to_classes_mapfile:
   example1.com always_online_domains
   example2.com sometimes_online_domains


Unless someone comes along and says its a terrible thing to do to a server, it works for me!

--
Andrew Thompson

Reply via email to