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

206339Re: relay_recipients_maps / generic clash

Expand Messages
  • Sandy Drobic
    Oct 2, 2006
      John Knappers wrote:

      >>> 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

      I think my coffeine input is reaching the neccessary level.
      So the situation is as follows:

      - internal server (knows only the two domains) and has the valid users in
      - gateway accepts mails for all domains (including the old domains), but
      doesn't have a list of valid users and thus accepts all the invalid users.

      You want to extract the valid users from the virtual on the internal
      server and apply the users to all domains, so that only valid recipients
      for all domains are accepted.

      Question: does the internal server knows two separate domains, or does it
      simply combine the mails for the two domains for each user into one single

      >>> 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?
      >> 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. :(

      Is user1@... the same as user1@...?

      > 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?

      So you just need to grab the local part of each address in the incomplete
      relay_recipient_maps and add the generics domains to it, write the address
      into a new file and then postmap it and set it up as relay_recipient_maps.

      # Just add these lines to your script
      domains=("@..." "@..." "@...")
      cat in_complete_relay_recipient_maps | while read line;
      user_name=`echo $line|cut -f1 -d"@"`
      for i in `echo ${domains[*]}`; do
      echo -e "$user_name$i" >> /etc/postfix/relay_recipients

      If you have a long list to process you might want to use a perl script.
      This shell script is not the fastest.

      >> 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'?"
      > 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?

      Does it really REJECT mails to invalid addresses or does it accept the
      mails first and then BOUNCE the mails to the forged sender of the spam?

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