[Mimedefang] order of filter_* routines called

2006-11-14 Thread Mike Campbell
I'm trying to figure out what order the various filter_* routines are 
called during a session. I can find where filter_begin and filter_end 
are called but what about the order of the following:


filter_relay
filter_sender
filter_helo (which apparently is going away)
filter_recipient

Can anyone give me the order in which they are executed? Specifically I 
have a filter_relay and looks like I need a filter_sender in my 
environment but need to know how they are evaluated. Would it be best to 
just combine the code from these procedures into a single procedure? If 
so which is the best to use?


--

Mike Campbell



___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


[Mimedefang] counting emails flagged as spam

2004-09-06 Thread Mike Campbell
Anyone have a good way to keep a running count of how many email 
messages have been flagged as spam by spamassassin?

Given that the MD filter is just perl I can easily add in a couple of 
lines that just updates a file count but was wondering if someone had a 
more sophisticated working example.

Thanks
--
___
Mike Campbell
___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


[Mimedefang] Disabling spam checks on outgoing email

2004-07-26 Thread Mike Campbell
I have configured MD and have it properly scanning email using clamav 
and spamassassign. Recently I enabled it to scan both incoming and 
outgoing emails.

I can't think of any reason why I would want to run spamassassign 
against outgoing emails. If I am wrong somebody please let me know what 
I am missing.

Therefore what I want to do is to disable the spam checks for outgoing 
mail. In the filter_end function is where the spam checks are done. Is 
there a way to determine in filter_end if the email is originating from 
my domain and to not spam check it?

I had tried a filter_relay function that would check the IP address and 
this worked but as a side effect it also disabled virus checks for 
outgoing mail as well. What I really want is to virus check incoming and 
outgoing mail while only spam checking incoming mail.

Any ideas???
--
___
Mike Campbell

___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


[Mimedefang] Quarantine management - anyone else working on this?

2004-04-12 Thread Mike Campbell
When trying to use the new v1.2 quarantine management files there seems 
to be some syntax errors. I was getting errors in my apache error_log 
file and when I run 'perl -c quarantine.pl' I get the following errors:

[Mon Apr 12 09:11:01 2004] quarantine.pl: Parentheses missing around 
my list at quarantine.pl line 491.
[Mon Apr 12 09:11:01 2004] quarantine.pl: Useless use of a variable in 
void context at quarantine.pl line 491.
[Mon Apr 12 09:11:01 2004] quarantine.pl: Parentheses missing around 
my list at quarantine.pl line 529.
[Mon Apr 12 09:11:01 2004] quarantine.pl: Useless use of private 
variable in void context at quarantine.pl line 529.
[Mon Apr 12 09:11:01 2004] quarantine.pl: Name main::group used only 
once: possible typo at quarantine.pl line 45.

Now none of these prevent the script from running but everytime I access 
the file from the web browser I get similar errors in the error_log file.
--

___
Mike Campbell


___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


[Mimedefang] new installation confusion

2004-04-08 Thread Mike Campbell
I've just finised installing mimedefang on a Fedora linux box and it 
seems to be working but I have a few questions. If someone could be kind 
enough to offer some insight I would appreciate it.

1 - I've also got spamassassin installed and it seems that I don't need 
the spamd process running for this to work. I understand that it must be 
using perl's spamassassin module. Is this correct? Am I losing any 
functionality by doing it this way instead of calling spamc/spamd?

2 - I've installed the clamav antivirus solution. I was initially using 
the procedure message_contain_virus but it appears that this will try to 
run ALL installed antivirus products. In this case both clamav and clamd 
were detected so it would seem that it is calling both of these which is 
kind of redundant. I have now switched to use 
message_contains_virus_clamd. The question is this: which is better to 
use message_contains_virus_clamav or message_contains_virus_clamd, or 
just the default message_contains_virus???

3 - Currently I check for virus and then do an 
action_quarantine_entire_message followe by an action_discard to not 
deliver the email. I would rather forward the virus email to a special 
email account [EMAIL PROTECTED] rather than put it into a quarantine 
directory. Is there a way to do this without having MD check the email 
again and thus geting into an infinate loop?

4 - Since I am new to this I am using the default mimedefang-filter. My 
end-users will be using outlook express clients. Is there any other 
recommended checks that I should do in the filter?

--

___
Mike Campbell
___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


[Mimedefang] 1st time setup help reqeusted...

2004-04-07 Thread Mike Campbell
As you will probably find out if you read this email I am new to setting 
up MD. I'm looking for some help to get this configured and running but 
want to do it the 'right' way from the outset.

We have a small company of 10 employees all using Outlook express for 
reading mail. The mail server is a linux Fedora FC1 machine that is 
visible to the internet and sendmail has been configured so that ONLY my 
10 users can use it as a relay. All of that is working perfectly.

Now I want to setup MD to filter spam and scan for virus files. I have 
installed spamassassin and clamav and tested them independently and they 
are both working. I have also compiled MD and it compiled/installed with 
no problems.

From what I read all of the work for MD is done via the mimedefant.pl 
script. I am pretty good with perl so I know what is going on but the 
length of the script is a little overwhelming to start with.

Can someone give me some pointers for how to accomplish the following:
1 - Scan incoming mail for virus using clam and if found redirect the 
email to another account called [EMAIL PROTECTED] instead of the original 
recipient? If a virus is not found then add a header to state that the 
message was scanned and found to be clean.

2 - Scan incoming messages for spam using site-wide bayes autolearning 
and auto_whitelisting? If spam is found go ahead and deliver the email 
but change the prepend subject to include '***SPAM***' and include a 
header showing the SA results. If the message is not spam then add a 
header to show the SA results.

Are there any other highly suggested tests that need to be run against 
incoming mail that others are using?

Thanks,
Mike Campbell


___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang