anomy-list

Re: the magic variables

From: Bjarni R. Einarsson (12374@xyz.molar.is)
Date: Sun 22 Apr 2001 - 22:36:38 UTC

  • Next message: Ewald Beekman: "exit value on virus detection"

    On 2001-04-21, 23:51:52 (+0000), alex morris wrote:
    >
    > what are the variables ${@+"$@"} ???

    I'm really not sure - the ${@+"$@"} construct simply expands to
    "all arguments passed to the shell script" - which originally come
    from either procmail or sendmail itself.

    > on anomyBox in DMZ, make the .cf file utilize FEATURE(`mailertable')
    > make mailertable say
    >
    > mydomain.com sanitize:[insideBox.mydomain.com]
    >
    > then hack upon the sanitize script, thusly
    >
    > sanitizer.pl $MCFG | sendmail -v -oi -f ${@+"$@"@insideBox.mydomain.com}
    >
    > It works. Users who are not local to anomyBox, but who are local to
    > insideBox receive sanitized email.
    >
    > But, this won't work for users who live on otherBox, because I have
    > hard-coded it to insideBox in the script.
    >
    > but how best to pass this magic variable back to the script?

    This is very similar to the hack within sendmail.cf as documented
    in the sanitizer manual - I suggest you take a closer look at it.

    Since you are handling multiple domains you will want to configure
    a "class" as suggested in the sendmail chapter instead of matching
    on single domains.

    I'm doing almost the exact same thing as you, using the hack in the
    manual and mailertable entries - without the hackish ending, since it
    is stripped off again by sendmail after sanitization.

    -- 
    Bjarni R. Einarsson                           PGP: 02764305, B7A3AB89
     12499@xyz.molar.is                -><-              http://bre.klaki.net/
    

    Check out my open-source email sanitizer: http://mailtools.anomy.net/



    hosted by molar.is