[plain text only please]

Fat Bear Mail Services wrote:
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?

Don't use wildcard "@domain @domain" mapping in virtual_alias_maps; rather use 1-1 user mappings such as you already have with DomainA.

[Note: please don't ask me to change the /etc/postfix/virtual file... it is not possible at this time].

Well, that's the way to fix the problem. Use your scripting skills to let the computer build the list for you.


A (poor) alternative is to use awk/perl/whatever to build a separate check_recipient_access map with the existing DomainA user names and reject any that don't match. The file must look like :
[EMAIL PROTECTED]  DUNNO
[EMAIL PROTECTED]  DUNNO
domainB   REJECT

but that's more work than fixing virtual_alias_maps, and messier to boot.



--
Noel Jones

Reply via email to