Re: relay_recipients_maps / generic clash

From: John Knappers (no email)
Date: Tue Oct 03 2006 - 01:20:21 EDT

  • Next message: George Sitov: "RE: i create virtual mail box, and after i can't redirect mail from /etc/aliases"

    >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
    >virtual.
    >- 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.
    YES!
    >
    >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
    >account?

    When I started this, the first thing I encounterd was the need to eliminate
    "domain linking in virtual table"on the internal server like
    @domain1 @domain2
    user at domain2 user

    So I already has expanded the 2 domains on the Internal mailserver in the
    virtual table like:
    user1 at newdomain1 user1
    user1 at newdomain2 user1
    Etc.

    But it do not mean that every old domain resolved to the two new domains.
    On the mailgateway:
    Example:
    @olddomain1.com @newdomain1.com
    @olddomian1.com @newdomain1.com
    @olddomain2.com @newdomain2.com
    @olddomain3.com @newdomain1.com

    >>>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 the same as ?
    Not always,
    Depents on how generic table. This makes it more difficult
    >
    >>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=("@example1.com" "@example2.com" "@example3.com")
    >#
    >cat in_complete_relay_recipient_maps | while read line;
    >do
    >{
    > user_name=`echo $line|cut -f1 -d"@"`
    > for i in `echo ${domains[*]}`; do
    > echo -e "$user_name$i" >> /etc/postfix/relay_recipients
    > done
    >}
    >done
    >
    Tonight I'm gonna try this.

    This looks almost complete, but now every user has an mailaddress in every
    oldmaildomain. If this the limit for scripting maybe I need to accept this
    compromise.

    >If you have a long list to process you might want to use a perl script.
    >This shell script is not the fastest.
    The table is not to large, So I think shell scripting will do for me, But if
    someone is willing to write a perl script for this, it would maybe a good
    idea to publish it somewhere in the howto and faqs page on the postfix
    website. The their effort servers a larger comunity.
    >
    >
    >>>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?
    >
    >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?
    >
    You mean if you don't specify a local_repipient_maps, mail for non local
    users will be accepted and rejected afterwards, resulting that my
    gatewaymailserver is responsible for delivering the Delvery Notification,
    which of cause fail by faked sender addresses?
    I will check this out.

    >Sandy
    >--
    >List replies only please!
    >Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com

    _________________________________________________________________
    Gratis bellen van PC naar PC? Download de nieuwste Messenger!
    http://imagine-msn.com/messenger/launch80/default.aspx?locale=nl-nl


  • Next message: George Sitov: "RE: i create virtual mail box, and after i can't redirect mail from /etc/aliases"





    Hosted Email Solutions

    Invaluement Anti-Spam DNSBLs



    Powered By FreeBSD   Powered By FreeBSD