[Exim] Help with Administrator Approval of emails

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Gareth C. Fowler
Data:  
Para: exim-users
Assunto: [Exim] Help with Administrator Approval of emails
I wanted the ability to filter out emails for outgoing mail only. Which
means all email sent out externally which are not listed in an approved list
would automatically get their message freezen, and a copy sent to the
postmaster for approval.

We have been using the script below, but when it gets to the end it freezes
the message before the postmaster gets the message. Could anyone amend or
assist in any way?

Any help would be apphriated.

Rgds.

Gareth C. Fowler
Network Operations, Discovery Net Solutions.

Filter File
=======

# Exim filter
# /usr/local/exim/system_filter

# Only check this filter on the first pass
if not first_delivery
then
finish
endif

# Define my logfile
logfile "/var/log/exim_filterlog"

# Freeze outgoing mail and send a copy to the moderator
if $header_to: does not contain "@domain1.com" and
$header_to: does not contain "@domain2.com" and

${lookup{$sender_address_local_part:approved}lsearch{/usr/local/servlet-data
/configure/ApprovedMailers}{$value}} is "no"
then
logwrite "$tod_log Message frozen"
headers add "X-Needs-Approval: $message_id"
unseen deliver moderator@localhost
freeze
finish
endif