Loading ...
Sorry, an error occurred while loading the content.

206315Re: relay_recipients_maps / generic clash

Expand Messages
  • Sandy Drobic
    Oct 2, 2006
    • 0 Attachment
      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 '@... 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

      --
      List replies only please!
      Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com
    • Show all 15 messages in this topic