>>Peter S?rensen:
>> Hi
>>
>> I have a policy server restricting access to specific lists. If a
>> user is accepted the policy server return OK status
>> to postfix. The members on the list are found through virtual alias
>> and gets expanded.
>>
>> I would like to put a content filter after this ,  that will grab
>> the orig_to address to do further handling on
>> this mail.
>>
>> I can't manage to make this work before the allias expanding.
>>
>> I have following in master.cf:
>>
>> mailstamp unix     -       n       n       -      -       pipe
>>   -o receive_override_options=no_address_mappings
>>   flags=Rq user=mail   argv=/usr/local/lib/postfix/mailstamp.pl -f $sender 
>> -- $recipient

>receive_override_options is not a documented pipe(8) feature,
>and therefore it is not implemented.
>
>I suggest using an SMTP-based content filter setup, and use
>receive_override_options which is a documented smtpd(8) feature.
>
>        Wietse

I have now changed the filter to be a SMTP based content filter using a 
framework smtpprox written in perl.

I have added the following to master.cf:

smtpprox     unix    -       -       n       -       25      smtp
        -o smtp_data_done_timeout=1200
        -o smtp_send_xforward_command=yes
        -o 
receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_milters,no_address_mappings

127.0.0.1:10026 inet n    -       n       -       200     smtpd
     -o content_filter=
     -o smtpd_delay_reject=no
     -o smtpd_client_restrictions=permit_mynetworks,reject
     -o smtpd_helo_restrictions=
     -o smtpd_sender_restrictions=
     -o smtpd_recipient_restrictions=permit_mynetworks,reject
     -o smtpd_data_restrictions=reject_unauth_pipelining
     -o smtpd_end_of_data_restrictions=
     -o smtpd_restriction_classes=
     -o mynetworks=127.0.0.0/8
     -o smtpd_error_sleep_time=0
     -o smtpd_soft_error_limit=1001
     -o smtpd_hard_error_limit=1000
     -o smtpd_client_connection_count_limit=0
     -o smtpd_client_connection_rate_limit=0
     -o 
receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_milters,no_address_mappings
     -o local_header_rewrite_clients=


and in main.cf added:

content_filter = smtpprox:[127.0.0.1]:10025

The smtpprox is started listening on 127.0.0.1:10025  and forwards to 
127.0.0.1:10026

Still this is not working as I would expect it to. The mail is passed through 
the content filter OK but I would like
to avoid alias expanding in this stage. So what am I missing or doing wrong ?

Peter

Reply via email to