Pregunta
¿Cómo pruebo un mensaje o el filtro del contenido para asegurarlo está funcionando según lo diseñado?
Los filtros se pueden probar para asegurarse que están trabajando correctamente haciendo el debug del filtro. Hacer el debug de un filtro es un proceso de dos pasos que requiere una zona de cuarentena del sistema.
Cree una nueva cuarentena del sistema en el “FilterDebug llamado GUI”. Las cuarentenas se configuran bajo 'Monitor->Quarantines. Si usted tiene cierto espacio de la cuarentena disponible, haga clic en “agregan el botón de las cuarentenas” para configurar la cuarentena de FilterDebug. Si no hay bastante espacio disponible, usted tendrá que editar una cierta otra cuarentena y más bajo el espacio que utiliza para hacer un cierto espacio libre disponible.
Cree el filtro con las reglas (criterios concordantes) que usted espera utilizar y fijar la acción “para quarantine (“FilterDebug ")”.
Para hacer el debug de sus reglas que corresponden con, habilite el filtro en la directiva apropiada del correo (donde usted la piensa para ejecutarse en la producción) y genere el tráfico.
Los mensajes que hacen juego sus reglas entrarán la cuarentena de FilterDebug, donde usted puede examinarlas y satisfacerse que sus reglas están correspondiendo con exacto qué usted quiere. Libere esos mensajes de la cuarentena, y serán entregados normalmente. Si usted quiere mirar esto durante algún tiempo, fije el periíodo de retención de la cuarentena algo ponen en cortocircuito y examinan aceptable la cuarentena a intervalos regulares para ver qué clase de mensajes están correspondiendo con sus criterios.
Para hacer el debug de sus acciones del filtro, cree una nueva directiva del correo que tenga solamente un beneficiario de la prueba. Inhabilite su regla en el resto de las directivas del correo, y habilitela en esta nueva directiva del correo. Edite su regla para tomar medidas que usted quiere. Usted puede quitar la regla de la cuarentena.
Genere el tráfico y marque el mensaje como se entrega (o no, dependiendo de su filtro) al beneficiario de la prueba para verificar esto es lo que usted quiere. Ahora usted puede habilitar la regla completada en las directivas del correo para su implementación de producto y inhabilitarla de la política del receptor de la prueba.
Un procedimiento similar se puede utilizar para hacer el debug de los filtros del mensaje. Comience construyendo los criterios que usted quiere utilizar en la producción:
RedirectEarningsReports:
if (recv-listener == "InboundMail")
and (subject == "(?i)quarterly earnings") {
quarantine ("FilterDebug");
}
Esto se hace en el 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
Examine los mensajes quarantined usando el GUI y los mensajes release. Continue que mira la secuencia de mensaje de esta manera hasta que le satisfagan. Después, agregue a su beneficiario de la prueba a las reglas, y cambie las acciones a lo que usted quiere ejecutarse en la producción:
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");
}
En el CLI, usted necesita borrar y reconstruir el filtro:
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
Verifique las acciones hacen lo que usted quiere. (Dependiendo de su filtro, usted puede también verificar algunas de las acciones en los mail_logs.) Dure, junte el filtro final quitando al beneficiario de la prueba:
RedirectEarningsReports:
if (recv-listener == "InboundMail")
and (subject == "(?i)quarterly earnings") {
alt-rcpt-to ("sam@exchange.scu.com");
}
Un aspecto potencialmente confuso de los filtros y de las cuarentenas es la dirección de los cuerpos del mensaje contra los encabezados del mensaje. En el ESA, tratan al cuerpo del mensaje y la encabezado de por separado. Si usted examina los mensajes en la cuarentena después de aplicar las acciones, usted no verá ninguna manipulación de la encabezado hecha al mensaje (solamente a él será completado sobre la salida.) Esto está porque el proceso de la encabezado se hace por separado, paralelamente, pues un mensaje progresa en la tubería. El mensaje se junta con su encabezado (potencialmente modificada) antes de la salida, pero no se considera en la cuarentena. Usted verá cualquier cambio al cuerpo del mensaje, tal como eliminar de la conexión o pie de página que sella, en la cuarentena.