2 Replies Latest reply on Jul 10, 2007 11:01 AM by Chris Blanks

    Sendmail.cf Grammar file

    Chris Blanks

      Has anyone developed a grammer file for reading sendmail.cf files? I found the article https://www.bladelogic.com/community/thread.jspa?messageID=6830&#6830 which says that it should not be modified directly, but I would like to be able to audit settings within for specific values.


      For example, I need to verify that needexpnhelo is specified on the PrivacyOption line as follows:

      O PrivacyOptions=authwarnings,novrfy,noexpn,needmailhelo,needvrfyhelo,needexpnhelo


      I am new to BladeLogic, so I am very open to alternative ways at getting the same information, so feel free to point me in a better direction if I am way off in left field here.


      Thanks in advance for any assistance with this "challenge".


        • 1. Re: Sendmail.cf Grammar file

          This grammar file reads the lines starting with 'O'. I'm guessing they're options:


          VAR_EQUAL =
          VAR_TAB \t


          COMMENT #.*
          WS [\t\n ]*
          VAL [^\n\t# ,]+
          VAL_SPACES [^\n\t# ]*
          KEY [^\n\t# =]+
          EQUAL =
          OPT O
          COM [,]*


          comment COMMENT $save_as_comment $0

          ext_val VAL COM $new_field $0 %ext_val

          record OPT WS KEY EQUAL VAL COM $new_field $2 $new_field $4 %ext_val \
          $save_record $0


          add $write_field $0 $write_var $VAR_EQUAL $write_fields $1 $VAR_TAB

          Note that the add rule is incorrect. I've assumed that you won't be needing to add lines to sendmail.cf from your post and the suggested usage of sendmail.cf

          • 2. Re: Sendmail.cf Grammar file
            Chris Blanks

            Sorry for not posting sooner. We've been pretty busy. This worked exactly as you had posted. Thank you very much.