(yes, I *should* have used Net::LDAP... but I didn't)

Heh, I was about to say as much, then I saw that comment. I initially did the same thing as you: munged the output of ldapsearch. But when I had a spare tuit I rewrote the code to use Net::LDAP. The result is much more satisfying, at two levels.

Firstly, there's no external program to rely on. That's always a big plus in my books. And I also found that the code became simpler, because the munging disappeared.

The main difference in my approach is that I generate the access map every twenty minutes. I then compare the it to the current version and move it over only if there are changes.

There's one bit in the code that puzzles me, the part containing if( $some_condition ) { $_ = 0 } and then below you have if( /some_pattern/ ) {...}. I might be missing something subtle, but it seems to me that this would be better written as next if $some_condition.

But ++ anyway for the code. Having your legitimate recipients known on the perimeter is an excellent way of cutting down on undeliverable crud.

- another intruder with the mooring of the heat of the Perl


In reply to Re: legitimail.pl by grinder
in thread Legitimail.pl - Make Postfix relay recipient tables from Exchange smtp addresses by BravoTwoZero

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.