best way to only alias postmaster@ for local domains?

From: Justin McAleer (no email)
Date: Thu Mar 01 2007 - 11:17:01 EST

  • Next message: Glenn English: "Re: Outbound mail saturating T1 link"

    I'm setting up a server that all of our customers will use for outbound
    mail. For domains that we host, it will send the messages to our
    internal servers, and otherwise out to wherever the MX record points.
    The problem I'm dealing with is I want postmaster/abuse/root@<local
    domains> to all be redirected to a handler address. So, I have a pcre
    map included in the virtual alias maps like so:

    /^postmaster@/

    The problem is that virtual alias expansion is done to all recipients,
    not just those hosted by us, so we would end up intercepting messages to
    , for example. What is the best way to only redirect mail
    to our domains? I'd like to avoid listing postmaster/abuse/root for the
    hungreds of domains we host, so I thought I'd ask for any other
    suggestions for a more static solution.

    While I'm asking stuff, I have clamsmtpd running on this server as a
    content filter, reinjecting back into Postfix. Could I only send the
    non-hosted mail through clamsmtpd, and just pass on hosted mail to the
    internal servers (they do AV scanning)?

    Thanks for any ideas!

    Here is postconf -n, just in case:

    alias_maps = hash:/etc/postfix/aliases
    anvil_rate_time_unit = 60s
    bounce_queue_lifetime = 3h
    bounce_size_limit = 1
    broken_sasl_auth_clients = yes
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    content_filter = smtp-clam:[127.0.0.1]:10024
    daemon_directory = /usr/libexec/postfix
    debug_peer_level = 2
    default_delivery_slot_cost = 2
    default_destination_concurrency_limit = 15
    header_checks = pcre:/etc/postfix/maps/pre_filter_header_checks.pcre
    mail_owner = postfix
    mailbox_command = /usr/bin/procmail -d "$USER"
    mailq_path = /usr/bin/mailq
    manpage_directory = /usr/local/man
    maximal_backoff_time = 600s
    maximal_queue_lifetime = 3d
    message_size_limit = 15728640
    minimal_backoff_time = 300s
    mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, train.neonova.net
    mydomain = $myhostname
    mynetworks = 137.118.16.6 137.118.16.7
    newaliases_path = /usr/bin/newaliases
    queue_directory = /var/spool/postfix
    queue_minfree = 104857600
    queue_run_delay = 180s
    relay_domains = $mydestination
    sendmail_path = /usr/sbin/sendmail
    setgid_group = postdrop
    smtpd_client_connection_count_limit = 2
    smtpd_client_connection_rate_limit = 30
    smtpd_client_message_rate_limit = 60
    smtpd_client_recipient_rate_limit = 120
    smtpd_client_restrictions = check_client_access cdb:/etc/postfix/maps/client_restrictions
    smtpd_data_restrictions = reject_unauth_pipelining reject_multi_recipient_bounce
    smtpd_delay_reject = yes
    smtpd_discard_ehlo_keywords = pipelining
    smtpd_error_sleep_time = 1
    smtpd_hard_error_limit = 8
    smtpd_helo_required = yes
    smtpd_helo_restrictions = reject_invalid_helo_hostname check_helo_access cdb:/etc/postfix/maps/helo_restrictions
    smtpd_junk_command_limit = 5
    smtpd_peername_lookup = yes
    smtpd_recipient_limit = 200
    smtpd_recipient_restrictions = reject_non_fqdn_recipient permit_mynetworks permit_sasl_authenticated check_client_access cdb:/etc/postfix/maps/client_restrictions check_client_access cidr:/etc/postfix/maps/relay_ips.cidr reject_unauth_destination check_recipient_access cdb:/etc/postfix/maps/recipient_exceptions reject
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_sasl_path = private/auth
    smtpd_sasl_type = dovecot
    smtpd_sender_restrictions = reject_non_fqdn_sender reject_unknown_sender_domain check_sender_access cdb:/etc/postfix/maps/sender_exceptions reject_unlisted_sender
    smtpd_soft_error_limit = 5
    smtpd_timeout = 10
    strict_rfc821_envelopes = yes
    unknown_local_recipient_reject_code = 550
    virtual_alias_domains = cdb:/etc/postfix/maps/aliasonly_domains cdb:/etc/postfix/maps/dropbox_domains cdb:/etc/postfix/maps/domalias_domains
    virtual_alias_maps = pcre:/etc/postfix/maps/role_accounts proxy:mysql:/etc/postfix/maps/mysql-aliasonly.cf proxy:mysql:/etc/postfix/maps/mysql-dropbox.cf proxy:mysql:/etc/postfix/maps/mysql-domalias.cf
    virtual_mailbox_domains = cdb:/etc/postfix/maps/real_domains
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/maps/mysql-mailboxes.cf
    virtual_transport = smtp-in:[relay-v.neonova.net]


  • Next message: Glenn English: "Re: Outbound mail saturating T1 link"





    Hosted Email Solutions

    Invaluement Anti-Spam DNSBLs



    Powered By FreeBSD   Powered By FreeBSD