Re: your mail

From: Victor Duchovni (no email)
Date: Mon Nov 01 2004 - 11:34:23 EST


On Mon, Nov 01, 2004 at 04:08:01PM +0000, Gerard Whelan wrote:

> I wondering if you could help me with the problem below. I am fairly
> new to Postfix and this is probably a trivial problem for you Postfix
> experts but I cannot get it to work. Your help is greatly
> appreciated.
>
> I have it set up as an MX backup server. I have about 40 domains
> specified in the /etc/postfix/relay_recipients file e.g @domain.com.
> The problem is that these domains have subdomains such as
> @staff.domain.com and the server is refusing to accept these mails
> (correctly) as the domain @staff.domain.com is not specified in the
> relay_recipients file. How do I get the MX backup server to accept all
> mail to a particular domain and it's subdomains without having to
> input all the subdomains manually for each 1st level domain which
> would take forever? I have tried putting in @*.domain.com into the
> relay_recipients file but this doesn't work - I would be grateful to
> get some help on this as I have been trying to get this fixed for a
> long time now. Thanks for your help in advance.
>

While you could use regular expression maps:

    http://www.postfix.org/regexp_table.5.html
    http://www.postfix.org/pcre_table.5.html

You are better off replacing relay_recipient_maps with acces(5)
tables:

  /etc/postfix/main.cf:

    # empty
    relay_recipient_maps =

    # Use on the RHS of the relay_domains table instead of "OK"!
    #
    smtpd_restriction_classes = relay_user

    # For relay domains either REJECT or resolve to "relay_user"
    # For "local" recipients the usual policy.
    #
    smtpd_recipient_restrictions =
        check_recipient_access hash:/etc/postfix/relay_domains
        permit_mynetworks,
        reject_unauth_destination
        ...

    # Safety: reject_unauth_destination just in case the relay_domains
    # table accidentally lists non-relay domains. Final "permit" allows
    # mail to valid recipients.
    #
    relay_user =
        permit_mynetworks,
            reject_unauth_destination,
        ... UCE checks for relay recipients ...
        permit

    # empty! Always use ".sub.domain" when desired.
    parent_domains_matches_subdomains =

  /etc/postfix/relay_domains:
        # Domain only with explicit valid users
        #
        example.com REJECT invalid recipient
                relay_user
         relay_user
        ...

        # Domain only, wildcard users
        #
        example.net relay_user

        # Domain and subdomains, wildcard users
        example.org relay_user
        .example.org relay_user

-- 
	Viktor.
Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.
To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:?body=unsubscribe%20postfix-users>







Hosted Email Solutions

Invaluement Anti-Spam DNSBLs



Powered By FreeBSD   Powered By FreeBSD