Santiago Romero wrote:
To summarize it, currently I have 2 files called:
valid_accounts.txt: a list of valid accounts in the primary MX.
domains_to_check_user.txt: Holds a list of domains. Server only checks
RCPT against valid_accounts.txt for the domains present in this file.
When a new email arrives, if the destinatary domain is in
"domains_to_check_user.txt", then I check the RCPT TO against
"valid_accounts.txt" (and return NO SUCH USER or ACCEPT the email).
If the domain is not in "domains_to_check_user.txt", I accept it (if
it's in qmail's rcpthosts's, of course).
Postfix calls domains that it accepts mail for but delivers
elsewhere (such as MX backups) relay_domains. You can use a
plain text file or any supported postfix map type.
http://www.postfix.org/postconf.5.html#relay_domains
A sample configuration is described here:
http://www.postfix.org/STANDARD_CONFIGURATION_README.html#firewall
The list if valid recipients in those domains is specified in
relay_recipient_maps. Specify one or more map files listing
the valid recipients; all other recipients are rejected.
http://www.postfix.org/postconf.5.html#relay_recipient_maps
If this file is scp'ed as a plain text file, you will need to
postmap it to create the indexed table.
-- Noel Jones