On Fri, Apr 03, 2009 at 11:45:17PM -0600, Jason Bailey, Sun Advocate Webmaster 
wrote:

> In just a few portions of my mail log I see the following hostnames:
> 212453-app4.domain.com
> 207113-app1.domain.com
> 205107-app3.domain.com
> 207186-app2.domain.com
> 

This assumes you have PCRE tables, adjusting to ordinary regexps is not
difficult:

    unknown_sender_domain.pcre:
        /^\d+-app\d\.example\.com$/     DUNNO
        /^/                             reject_unknown_sender_domain

    main.cf:
        smtpd_restriction_classes =
            reject_most_unknown_sender_domains

        pcre = pcre:${config_directory}/
        reject_most_unknown_sender_domains =
            check_sender_access ${pcre}unknown_sender_domain.pcre

        smtpd_recipient_restrictions =
            permit_mynetworks,
            permit_sasl_authenticated,
            reject_unauth_destination,
            reject_most_unknown_sender_domains,
            ...

The more selective "restriction class" can be used safely anywhere you
can safely use the underlying "reject_unknown_sender_domain". You can
adjust the exception pattern or add more exceptions.

-- 
        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:[email protected]?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.

Reply via email to