Page 1 of 2

Disclaimer

Posted: Thu Jul 27, 2006 11:41 am
by trig
Ey up,

Has anyone managed to get any disclaimer type software working with Scalix? im running 10.0 on FC 4 and I cant get any to run..

Any how-tos would be usefull..

Posted: Thu Jul 27, 2006 12:18 pm
by btisdall
Have you tried MIMEDefang? It has the capability you need & is a sendmail milter so should work fine with Scalix.

I haven't tried it myself I'm afraid.

HTH.

Posted: Thu Jul 27, 2006 12:31 pm
by trig
I have yeah..

Its installed, but for somereason I cant get mail to pass via it.. saying that tho, I dont have a linux.mc file so im editing sendmail.cf directly to include the filter for Xmimedefang and it just doesnt cycle it.. it goes out without injecting the disclaimer..

this is the one im pulling my hair out right now..

Posted: Thu Jul 27, 2006 5:16 pm
by btisdall
Can you post the output of ps aux | grep -i mime after you've started the milter plus the relavent portion of /var/logmaillog when you send a mail.

If you/re running FC4 you should be doing your sendmail configuration using /etc/mail/sendmail.mc - linux.mc is applicable to SuSE.

Posted: Fri Jul 28, 2006 3:31 am
by btisdall
Hi again Trig,

I was able to get this going just now on a system running FC5 very easily (the system wasn't running Scalix, but that's irrelevant in this context).

I'm confident the same steps would work perfectly on FC4, so here's a very mini HOWTO:

NB: The following 3 lines have been edited:

Install perl-MLDBM & sendmail-cf using YUM or whatever.

Install the FC4 mimedefang package from:

http://mirrors.ircam.fr/pub/dag/dries/p ... /fc4-i386/

Add the following line to the bottom of /etc/mail/sendmail.mc:

Code: Select all

INPUT_MAIL_FILTER(`mimedefang', `S=unix:/var/spool/MIMEDefang/mimedefang.sock, F=T, T=S:1m;R:1m')dnl


Rebuild sendmail.cf & reinsert Scalix mailer definitions:

Code: Select all

cd /etc/mail
m4 sendmail.mc > sendmail.cf
omsendin


Edit /etc/mail/mimedefang-filter (fragment):

Code: Select all

sub filter_end {
    my($entity) = @_;
   append_text_boilerplate($entity, "All information contained in " .
    "this email is confidential and may be used by the intended " .
    "recipient only.", 0);
   append_html_boilerplate($entity, "All information contained in " .
    "this email is confidential and may be used by the intended " .
    "recipient only.", 0);

    # If you want quarantine reports, uncomment next line


Restart the mimedefang service.

Restart sendmail.

'Tail -f' your maillog, send a message & you should see a line like:

Jul 28 08:18:05 jerry mimedefang.pl[4034]: filter: k6S7I4Tn005047: append_text_boilerplate=1

And:

Jul 28 08:18:05 jerry sendmail[5047]: k6S7I4Tn005047: Milter message: body replaced

The disclaimer should then be visible when you view the message.

Once you get this far it should be a simple matter to replace the disclaimer text in the filter script with text from a separate file.

Let me know how you get on.

Posted: Fri Jul 28, 2006 4:04 am
by trig
Hi Ben,

I'm getting the following error when attempting to run omsendin.

Code: Select all

[root@scalix mail]# omsendin
WARNING: [OMINST 255] Unable to determine where to put Scalix
WARNING:              lines in sendmail configuration file

Unable to find ruleset 0
WARNING: [OMINST 279] Modify /opt/scalix/newconfig/om_sendmail.cf. Use the script
WARNING:              /opt/scalix/bin/omsendin for guidance.


Any idea?

If I run

Code: Select all

cat /etc/mail/sendmail.cf

Its empty

Posted: Fri Jul 28, 2006 4:07 am
by btisdall
Make sure you have the sendmail-cf package installed & try building your sendmail.cf again.

Posted: Fri Jul 28, 2006 4:11 am
by trig
sendmail-cf RPM was missing [dry]

Posted: Fri Jul 28, 2006 4:17 am
by trig
Now im getting an interesting one

Code: Select all

Jul 28 06:44:36 scalix mimedefang.pl[3174]: k6S5iZaK003317: Could not connect to clamd daemon at /var/spool/MIMEDefang/clamd.sock
Jul 28 06:44:36 scalix mimedefang.pl[3174]: Problem running virus scanner: code=999, category=cannot-execute, action=tempfail
Jul 28 06:44:36 scalix mimedefang.pl[3174]: filter: k6S5iZaK003317:  append_html_boilerplate=1 append_text_boilerplate=1 tempfail=1
Jul 28 06:44:36 scalix mimedefang[3188]: k6S5iZaK003317: Tempfailing because filter instructed us to
Jul 28 06:44:36 scalix sendmail[3317]: k6S5iZaK003317: Milter: data, reject=451 4.3.0 Problem running virus-scanner
Jul 28 06:44:36 scalix sendmail[3317]: k6S5iZaK003317: to=<trig@domain.local>, delay=00:00:00, pri=31318, stat=Problem running virus-scanner
Jul 28 06:44:36 scalix sendmail[3316]: k6S5iZnT003316: to=<trig@domain.local>, delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=31117, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: 451 4.3.0 Problem running virus-scanner


Posted: Fri Jul 28, 2006 4:28 am
by btisdall
I suspect rpm was careful not to overwrite your existing /etc/mail/mimedefang-filter

Look for files with today's date in /etc/mail.

Posted: Fri Jul 28, 2006 4:32 am
by trig
The following files were changed:

mimedefang btw was not installed by RPM, i used the build source and it was already installed..

Files:

access.db
domaintable.db
mailertable.db
mimedefang-filter
sendmail.cf
sendmail.mc
virtualusertable.db

mimedefang-filter I edited to allow for the append statement

Posted: Fri Jul 28, 2006 4:37 am
by btisdall
Ok, what does:

Code: Select all

grep -iC5 clam /etc/mail/mimedefang-filter


give?

Posted: Fri Jul 28, 2006 4:42 am
by trig

Code: Select all

[root@scalix mail]# grep -iC5 clam /etc/mail/mimedefang-filter
                $score = "*" x 40;
            }
            # We add a header which looks like this:
            # X-Spam-Score: 6.8 (******) NAME_OF_TEST,NAME_OF_TEST
            # The number of asterisks in parens is the integer part
            # of the spam score clamped to a maximum of 40.
            # MUA filters can easily be written to trigger on a
            # minimum number of asterisks...
            if ($hits >= $req) {
                action_change_header("X-Spam-Score", "$hits ($score) $names");
                md_graphdefang_log('spam', $hits, $RelayAddr);
[root@scalix mail]#


Which as you can see, isn't a lot

Posted: Fri Jul 28, 2006 4:47 am
by btisdall
We're getting closer... how about:

Code: Select all

grep -iC5 clam /etc/mail/sendmail.mc

Posted: Fri Jul 28, 2006 4:49 am
by trig
Empty...

I also ran it against the startup script in /etc/init.d/.. empty

The only file to contain information about Clam, is the mimedefang.pl file, but that brings out a lot