Re: relay_recipients_maps / generic clash

From: John Knappers (no email)
Date: Mon Oct 02 2006 - 17:02:18 EDT

  • Next message: Steven Peterson: "Re: Sending all email destined for root to external email address"

    >John Knappers wrote:
    >>>
    >>>John Knappers wrote:
    >>>>
    >>>>>John Knappers wrote:
    >>>>>>Hello everyone,
    >>>>>>
    >>>>>>I consolidate a dozen of old domains in 2 domains with the generic
    >>>>>>table function of Postfix at our gateway relay / Mail hub.
    >>>>>>This works fine, but now. at last I finally wanted to implement the
    >>>>>>relay_recipient_maps function. After a night studying the awk syntax
    >>>>>>to convert the virtual table of our internal mailserver to a
    >>>>>>relay_recipients_map table I created a nice script just doing that.
    >>>>>>
    >>>>>>But now the problems starts. Only the mail of the 2 consolidated
    >>>>>>domains is accepted, and the mail to addresses ending with domains in
    >>>>>>the generic table is rejected. Does anyone a way to overcome this? My
    >>>>>>scripting knowledge is not sufficient to take the generic table in
    >>>>>>account when creating a relay_recipient_table.
    >>>>>>
    >>>>>>With other words: Is it possible to accept mail / do the generic
    >>>>>>domain consolidation, and apply the releay_recipients_maps feature
    >>>>>>after that?
    >>>
    >>>At this point I haven't seen the full configuration (postconf -n) and I
    >>>am loath to give advice on incomplete information.
    >>>
    >>>Are the domains domain1.example domain2.example etc in relay_domains, in
    >>>mydestination, in virtual_alias_domains, in virtual_mailbox_domains?
    >>>
    >>>relay_recipient_maps is only used for domains in relay_domains, while
    >>>virtual_alias_maps is used for all domain classes.
    >>>
    >>>generic_maps is applied only to outgoing mails.
    >>>
    >>>Sandy
    >>>--
    >>>List replies only please!
    >>>Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com
    >>
    >>I will try to clarify more:
    >>
    >>Mailgateway receiving is receiving mail for multiple domains. A lot of
    >>them are old, but still frequently used by customers.
    >>Function of mailgateway:
    >>receive mail: scan it / spanassassin it, rewrite old domains to new
    >>domans, and push it the final destination (internal mailserver).
    >>This not a to strange configuration.
    >>At the mailgateway I consolidate a dozen old (by mergers obsoleted, but by
    >>customers still frequently used domains) 2 two domains.
    >>Those to domains are the only domains the internal mailserver know about.
    >>At the mailgateway all domains are in the relay_domains table
    >>Old domains are rewritten to the new domains in the generic table like:
    >>@olddomain1 @newdomain1
    >>@olddomain2 @newdomain1
    >>@olddomain3 @newdomain2
    >>etc etc etc.
    >>
    >>If I create a relay_recpients_maps table based on the virtual table of the
    >>internal mailserver (which only knows about the 2 consolidated domains).
    >>All incoming mail with the old domains (which needs te be rewritten by the
    >>generic funstion) is rejected.
    >>The relay_recipient_maps table is checked before the address rewritting,
    >>which is causing the setup to fail
    >
    >Okay, forgive me for being slow. Now it makes perfect sense. Indeed, unless
    >configured to be checked earlier with relect_unlisted_recipient,
    >relay_recipient_maps is checked at the end of the
    >smtpd_recipient_restrictions, which happens at the end of the RCPT TO
    >during the smtp exchange.
    >
    >Rewriting with generic_maps happen, when the mail leaves the Postfix
    >system.
    >
    >So, if you want to keep the old domains, you need to change your awk script
    >to include valid user addresses for the old domains as well.
    >Just put in a loop to add the extracted user for the old domains as well.
    >
    >>For completenes I include a postconf -n.txt ( with anonymized domains)
    >>
    >>Please advise what the best solution is for this problem, I cannot
    >>imagine, that I'm the first facing this problem.
    >
    >No, this happens indeed every few weeks that someone asks about
    >relay_recipient_maps. Though usually the question is "Why doesn't it work
    >when I put in '@domain.com OK'?"
    >
    >
    >>John
    >>
    >>_________________________________________________________________
    >>De nieuwste Messenger is live! Download nu
    >>http://imagine-msn.com/messenger/launch80/default.aspx?locale=nl-nl
    >>address_verify_map = btree:/var/spool/postfix/verified_senders
    >>alias_maps = hash:/etc/aliases
    >>anvil_rate_time_unit = 60s
    >>anvil_status_update_time = 600s
    >>body_checks =
    >>bounce_size_limit = 1024
    >>canonical_maps = hash:/etc/postfix/maps/canonical
    >>command_directory = /usr/sbin
    >>config_directory = /etc/postfix
    >>daemon_directory = /usr/lib/postfix
    >>debug_peer_level = 2
    >>default_destination_concurrency_limit = 40
    >>disable_dns_lookups = no
    >>disable_vrfy_command = yes
    >>empty_address_recipient = MAILER-DAEMON
    >>header_checks = regexp:/etc/postfix/maps/header_checks_bcc,
    >>regexp:/etc/postfix/maps/header_checks_priv
    >>header_size_limit = 32768
    >>home_mailbox = Maildir/
    >>html_directory = /usr/share/doc/packages/postfix/html
    >>inet_interfaces = all
    >>local_destination_concurrency_limit = 5
    >>local_header_rewrite_clients = permit_mynetworks
    >>local_recipient_maps =
    >
    >Careful, you accept mails for $myhostname but don't verify recipients!
    >Do you have a check to reject Mails from outside your network for
    >$myhostname?
    >
    >Sandy
    >
    >So, if you want to keep the old domains, you need to change your awk script
    >to include valid user addresses for the old domains as well.
    >Just put in a loop to add the extracted user for the old domains as well.

    Now the problem is completely claer, can you (or anyone else) assist me
    with the awk script additions to do this, because my scripting knowledge is
    not suffient for this. :(
    I have a relay_recipients_maps with all valid mail addresses, but only for
    the consolidated domains, and I have a generic_maps file, with what
    olddomains will be rewritten to what newdomains.
    Or is there an other around / better way solve this setup problem?

    >No, this happens indeed every few weeks that someone asks about
    >relay_recipient_maps. Though usually the question is "Why doesn't it work
    >when I put in '@domain.com OK'?"
    It's was not to hard for me to understand this....

    >Careful, you accept mails for $myhostname but don't verify recipients!
    >Do you have a check to reject Mails from outside your network for
    >$myhostname?

    I accept only mail for the standard aliases which RFC want to be present
    (postmaster /abuse / etc)
    If the mailaddress@$myhostname doesn't resolve to a valid mailaddress, it
    bounce with user unknown. What is the problem with it? Or better asked: Do
    I miss anything, what I shouldn't miss?

    _________________________________________________________________
    De nieuwste Messenger is live! Download nu
    http://imagine-msn.com/messenger/launch80/default.aspx?locale=nl-nl


  • Next message: Steven Peterson: "Re: Sending all email destined for root to external email address"





    Hosted Email Solutions

    Invaluement Anti-Spam DNSBLs



    Powered By FreeBSD   Powered By FreeBSD