With:

   virtual_alias_maps = hash:/etc/postfix/virtual

and:

   /etc/postfix/virtual:
      ...
      domainA.com domainA.com
      [EMAIL PROTECTED] mailboxForUser1-A
      [EMAIL PROTECTED] mailboxForUser2-A
      domainB.com domainB.com
      @domainB.com @domainA.com

Doing:

   # telnet mailserver 25
   Trying /A.B.C.D/...
   Connected to /mailServer/.
   Escape character is '^]'.
   220 /mailServer/ ESMTP Postfix
   helo name
   250 /mailServer/
   mail from: [EMAIL PROTECTED]
   250 2.1.0 Ok
   rcpt to: [EMAIL PROTECTED]
   550 5.1.1 <[EMAIL PROTECTED]>: Recipient address rejected: User
   unknown in virtual alias table
   quit
   221 Closing connection. Good bye.
   Connection closed by foreign host.
   #

gives me exactly the results I want.  But doing:

   # telnet mailserver 25
   Trying /A.B.C.D/...
   Connected to /mailServer/.
   Escape character is '^]'.
   220 /mailServer/ ESMTP Postfix
   helo name
   250 /mailServer/
   mail from: [EMAIL PROTECTED]
   250 2.1.0 Ok
   rcpt to: [EMAIL PROTECTED]
   *250 2.1.5 Ok*
   quit
   221 Closing connection. Good bye.
   Connection closed by foreign host.
   #

gives an undesired 250 status for the unknown [EMAIL PROTECTED] Is there a way to configure Postfix, leaving the file /etc/postfix virtual unchanged, so that the response to an unknown user via a whole-domain mapping results in a 550 status? [Note: please don't ask me to change the /etc/postfix/virtual file... it is not possible at this time].

Many thanks,
Steve Amerige
Fat Bear

postconf -n:

   alias_database = hash:/etc/aliases
   alias_maps = hash:/etc/aliases
   broken_sasl_auth_clients = yes
   command_directory = /usr/sbin
   config_directory = /etc/postfix
   daemon_directory = /usr/libexec/postfix
   debug_peer_level = 2
   disable_vrfy_command = yes
   home_mailbox = Maildir/
   html_directory = no
   mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
   mailq_path = /usr/bin/mailq.postfix
   manpage_directory = /usr/share/man
   mydestination = $myhostname, localhost.$mydomain, localhost,
   fat7.fatbear.com
   mynetworks = /A.B.C.D/
   newaliases_path = /usr/bin/newaliases.postfix
   readme_directory = /usr/share/doc/postfix-2.4.5/README_FILES
   relayhost = k2smtpout.secureserver.net
   sample_directory = /usr/share/doc/postfix-2.4.5/samples
   sender_bcc_maps = hash:/etc/postfix/bcc
   sendmail_path = /usr/sbin/sendmail.postfix
   setgid_group = postdrop
   smtpd_helo_required = yes
   smtpd_recipient_restrictions =
       permit_mynetworks,
       permit_sasl_authenticated,
       reject_unknown_sender_domain,
       reject_non_fqdn_sender,
       reject_non_fqdn_recipient,
       reject_invalid_hostname,
       reject_unauth_destination,
       check_helo_access hash:/etc/postfix/smtp_helo_blacklist,
       reject_unlisted_recipient,
       check_policy_service inet:127.0.0.1:2501,
       reject_unknown_recipient_domain,
       reject_rbl_client zen.spamhaus.org,
       permit
   smtpd_sasl_auth_enable = yes
   smtpd_tls_CAfile =
   /home/mailserver/ssl/mailserver.com/sf_intermediate_bundle.crt
   smtpd_tls_cert_file =
   /home/mailserver/ssl/mailserver.com/_.mailserver.com.pem
   smtpd_tls_key_file =
   /home/mailserver/ssl/mailserver.com/_.mailserver.com.key
   smtpd_use_tls = yes
   unknown_local_recipient_reject_code = 550
   virtual_alias_maps = hash:/etc/postfix/virtual

Reply via email to