OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Ulisses T V Guedes (utvgterra.com.br)
Date: Mon Jun 03 2002 - 12:02:27 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    Thanks Wietse,

    Motivated by my stupid question, I start to study and how to solve my
    problem modifying few lines.

    What I have in mind?
    The line read from message is, as you said, once at a time and
    transfered to cleanup functions.
    The patch creates two new states at CLEANUP: NEXTB and ENDNEX.
    The NEXTB sets an internal variable next_body_line when the expression
    match. ENDNEX checks the regexp expression. If this last matches and the
    next_body_line (first matching) are set then some rule may be applied.
    I'm testing making ENDNEX to reject with success.

    A preliminary patch version for postfix-1.1.11-20020602 is available in
    ftp://ftp.dem.inpe.br/pub/postfix-patch/patch-ulisses.diff
    (transfer in passive mode only)

    Reproducing:
    a) apply the patch
    b) Inserting the expressions at end of file
    In main.cf
    body_check = regexp:/etc/postfix/regexp_testing

    in regexp_testing:
    ...... regexps ....
    /content-type: (text|plain)\/(plain|text|html)/ NEXTB
    /content-transfer-encoding: base64/ ENDNEX rejected by dual matching

    Trying for header_check it works!

    Problem (or feature) detected
    - If the second condition occurs after 2 or more lines then the reject
    is applied. This may be fixed storing the pointer, size or counter of
    the line read for the first (NEXTB) and the pointer or counter of the
    line that satisfy ENDNEX. This info may be included (or is available)
    in CLEANUP_STATE structure.

    - only valid for one "dual matching". To use more dual-expressions
    next_body_line must be changed to array (not yet implememted)

    - NEXTB may be indexed. The index may be included in "optional_text"
    (not yet implemented).

    Comment, suggestion and improvement are welcome.

    Best regards..

    Ulisses

    -
    To unsubscribe, send mail to majordomopostfix.org with content
    (not subject): unsubscribe postfix-users