질문
메시지 또는 콘텐츠 필터가 정상적으로 작동하는지 테스트하려면 어떻게 해야 합니까?
필터를 디버깅하여 필터가 제대로 작동하는지 확인하기 위해 필터를 테스트할 수 있습니다.필터 디버깅은 시스템 격리 영역이 필요한 2단계 프로세스입니다.
'FilterDebug'라는 GUI에서 새 시스템 격리를 만듭니다. 격리는 'Monitor(모니터링)->Quarantines(격리)에서 구성됩니다. 사용 가능한 쿼런틴 공간이 있는 경우 '쿼런틴 추가' 버튼을 클릭하여 FilterDebug 격리를 구성합니다. 사용 가능한 공간이 부족한 경우 다른 격리를 수정하고 사용 가능한 공간을 확보하기 위해 사용 중인 공간을 줄여야 합니다.
사용할 규칙(일치하는 기준)으로 필터를 만들고 작업을 "Quarantine('FilterDebug')"으로 설정합니다.
일치하는 규칙을 디버깅하려면 적절한 메일 정책(프로덕션 환경에서 실행하려는 위치)에서 필터를 활성화하고 트래픽을 생성합니다.
규칙과 일치하는 메시지는 FilterDebug 쿼런틴으로 이동하며, 여기에서 해당 메시지를 검사하고 규칙이 원하는 것과 정확히 일치하는지 확인할 수 있습니다. 이러한 메시지를 격리에서 릴리스하면 정상적으로 전달됩니다. 잠시 동안 이 내용을 관찰하려면 쿼런틴 보존 기간을 허용 가능한 짧은 기간으로 설정하고 정기적으로 격리를 검사하여 어떤 종류의 메시지가 기준과 일치하는지 확인합니다.
필터 작업을 디버깅하려면 테스트 수신자가 하나만 있는 새 메일 정책을 만듭니다.다른 모든 메일 정책에서 규칙을 비활성화하고 이 새 메일 정책에서 규칙을 활성화합니다. 원하는 작업을 수행하려면 규칙을 편집합니다. 격리 규칙을 제거할 수 있습니다.
트래픽을 생성하고, 메시지가 테스트 수신자에게 전달될 때(또는 필터에 따라 전달되지 않음) 이를 확인하여 원하는 것임을 확인합니다.이제 프로덕션 배포에 대해 메일 정책에서 완료된 규칙을 활성화하고 테스트 수신자 정책에서 비활성화할 수 있습니다.
유사한 절차를 사용하여 메시지 필터를 디버깅할 수 있습니다. 먼저 프로덕션에 사용할 기준을 작성합니다.
RedirectEarningsReports:
if (recv-listener == "InboundMail")
and (subject == "(?i)quarterly earnings") {
quarantine ("FilterDebug");
}
이는 CLI에서 수행됩니다.
smtp.example.com>filters
Choose the operation you want to perform:
- NEW - Create a new filter.
- DELETE - Remove a filter.
- IMPORT - Import a filter script from a file.
- EXPORT - Export filters to a file
- MOVE - Move a filter to a different position.
- SET - Set a filter attribute.
- LIST - List the filters.
- DETAIL - Get detailed information on the filters.
- LOGCONFIG - Configure log subscriptions used by filters.
- ROLLOVERNOW - Roll over a filter log file.
[]> new
Enter filter script. Enter '.' on its own line to end.
RedirectEarningsReports:
if (recv-listener == "InboundMail")
and (subject == "(?i)quarterly earnings") {
quarantine ("FilterDebug");
}
.
1 filters added.
Choose the operation you want to perform:
- NEW - Create a new filter.
- DELETE - Remove a filter.
- IMPORT - Import a filter script from a file.
- EXPORT - Export filters to a file
- MOVE - Move a filter to a different position.
- SET - Set a filter attribute.
- LIST - List the filters.
- DETAIL - Get detailed information on the filters.
- LOGCONFIG - Configure log subscriptions used by filters.
- ROLLOVERNOW - Roll over a filter log file.
[]>
smtp.example.com >commit
Please enter some comments describing your changes:
[]> add RedirectEarningsReports filter test actions (incomplete)
Changes committed: Wed Nov 24 12:00:10 2004 MST
GUI 및 릴리스 메시지를 사용하여 격리된 메시지를 검사합니다. 만족될 때까지 이 방법으로 메시지 스트림을 계속 확인합니다. 그런 다음 테스트 수신자를 규칙에 추가하고 작업을 프로덕션에서 실행할 작업으로 변경합니다.
RedirectEarningsReports:
if (recv-listener == "InboundMail")
and (subject == "(?i)quarterly earnings")
and (rcpt-to == "(?i)alan@exchange\\.scu\\.com$") {
alt-rcpt-to ("sam@exchange.scu.com");
}
CLI에서 필터를 삭제하고 다시 생성해야 합니다.
smtp.example.com> filters
Choose the operation you want to perform:
- NEW - Create a new filter.
- DELETE - Remove a filter.
- IMPORT - Import a filter script from a file.
- EXPORT - Export filters to a file
- MOVE - Move a filter to a different position.
- SET - Set a filter attribute.
- LIST - List the filters.
- DETAIL - Get detailed information on the filters.
- LOGCONFIG - Configure log subscriptions used by filters.
- ROLLOVERNOW - Roll over a filter log file.
[]> list
Num Active Valid Name
1 N Y betatest
2 N Y StripInboundExes
3 Y Y RedirectEarningsReports
Choose the operation you want to perform:
- NEW - Create a new filter.
- DELETE - Remove a filter.
- IMPORT - Import a filter script from a file.
- EXPORT - Export filters to a file
- MOVE - Move a filter to a different position.
- SET - Set a filter attribute.
- LIST - List the filters.
- DETAIL - Get detailed information on the filters.
- LOGCONFIG - Configure log subscriptions used by filters.
- ROLLOVERNOW - Roll over a filter log file.
[]> delete
Enter the filter name, number, or range:
[]> 3
1 filters deleted.
Choose the operation you want to perform:
- NEW - Create a new filter.
- DELETE - Remove a filter.
- IMPORT - Import a filter script from a file.
- EXPORT - Export filters to a file
- MOVE - Move a filter to a different position.
- SET - Set a filter attribute.
- LIST - List the filters.
- DETAIL - Get detailed information on the filters.
- LOGCONFIG - Configure log subscriptions used by filters.
- ROLLOVERNOW - Roll over a filter log file.
[]> new
Enter filter script. Enter '.' on its own line to end.
RedirectEarningsReports:
if (recv-listener == "InboundMail")
and (subject == "(?i)quarterly earnings")
and (rcpt-to == "(?i)alan@exchange\\.scu\\.com$") {
alt-rcpt-to ("sam@exchange.scu.com");
}
.
1 filters added.
Choose the operation you want to perform:
- NEW - Create a new filter.
- DELETE - Remove a filter.
- IMPORT - Import a filter script from a file.
- EXPORT - Export filters to a file
- MOVE - Move a filter to a different position.
- SET - Set a filter attribute.
- LIST - List the filters.
- DETAIL - Get detailed information on the filters.
- LOGCONFIG - Configure log subscriptions used by filters.
- ROLLOVERNOW - Roll over a filter log file.
[]>
smtp.example.com> commit
Please enter some comments describing your changes:
[]> set RedirectEarningsReports to test recipient
Changes committed: Wed Nov 24 12:10:07 2004 MST
작업을 원하는 대로 수행하는지 확인합니다. (필터에 따라 mail_logs의 일부 작업을 확인할 수도 있습니다.) 마지막으로 테스트 수신자를 제거하여 최종 필터를 함께 넣습니다.
RedirectEarningsReports:
if (recv-listener == "InboundMail")
and (subject == "(?i)quarterly earnings") {
alt-rcpt-to ("sam@exchange.scu.com");
}
필터 및 격리의 혼동을 일으킬 수 있는 한 가지 측면은 메시지 본문 대 메시지 헤더를 처리하는 것입니다. ESA에서는 메시지 본문과 헤더가 별도로 처리됩니다.작업을 적용한 후 격리의 메시지를 검사하면 메시지에 대해 수행된 헤더 조작은 표시되지 않지만 전달 시 완료됩니다. 이는 메시지가 파이프라인을 통해 진행되면서 헤더 처리가 별도로 수행되기 때문입니다. 메시지가 전달되기 전에 (잠재적으로 수정 가능) 헤더와 재결합되지만 격리에 표시되지 않습니다. 격리에서 첨부 파일 스트리핑 또는 바닥글 스탬프 등의 메시지 본문에 대한 변경 사항이 표시됩니다.