wrong symlinks for spamassassin-spamc.rc

On debian flavours there is no /etc/mail/spamassassin/spamassassin-spamc.rc which all your symlinks /etc/webmin/virtual-server/spam/DOMAIN-ID/spamassassin-spamc.rc uses.

/etc/mail/spamassassin/spamassassin-spamc.rc is only installed on RH flavours.

That file contains

# send mail through spamassassin
:0fw
| /usr/bin/spamc

Which is ok on debian flavours so I would suggest having VM create that file if its missing or simply not use that hard coded symlink.

Status: 
Closed (fixed)

Comments

Actually virtualmin doesn't have that path hard-coded - it only creates links for files that it seems existing in /etc/mail/spamassassn .

Did spamassassin-spamc.rc ever exist on your system? Or perhaps on another system that a backup was transferred from?

No -- this system has always been debian. Only 2 domains were initially imported from cpanel the rest were created through VM.

That's odd .. if you create a new domain, does it also create that invalid symlink?

I just tested this today and yes it creates these symlinks

Domain name testing.com
Administration username testing
Administration group testing
Created on 15/Oct/2010 11:57 by sgrayban
Home directory /home/testing

Then I list what is under /etc/webmin/virtual-server/spam/128716181910453 and I get...

lrwxrwxrwx 1 root    root    30 2010-10-15 11:57 65_debian.cf -> /etc/spamassassin/65_debian.cf
lrwxrwxrwx 1 root    root    26 2010-10-15 11:57 init.pre -> /etc/spamassassin/init.pre
lrwxrwxrwx 1 root    root    26 2010-10-15 11:57 local.cf -> /etc/spamassassin/local.cf
lrwxrwxrwx 1 root    root    32 2010-10-15 11:57 sa-update-keys -> /etc/spamassassin/sa-update-keys
lrwxrwxrwx 1 root    root    41 2010-10-15 11:57 spamassassin-default.rc -> /etc/spamassassin/spamassassin-default.rc
lrwxrwxrwx 1 root    root    40 2010-10-15 11:57 spamassassin-helper.sh -> /etc/spamassassin/spamassassin-helper.sh
lrwxrwxrwx 1 root    root    39 2010-10-15 11:57 spamassassin-spamc.rc -> /etc/spamassassin/spamassassin-spamc.rc
lrwxrwxrwx 1 root    root    26 2010-10-15 11:57 v310.pre -> /etc/spamassassin/v310.pre
lrwxrwxrwx 1 root    root    26 2010-10-15 11:57 v312.pre -> /etc/spamassassin/v312.pre
lrwxrwxrwx 1 root    root    26 2010-10-15 11:57 v320.pre -> /etc/spamassassin/v320.pre
-rwxr-xr-x 1 testing testing 51 2010-10-15 11:57 virtualmin.cf

and you can see it creates the symlinks.

I have checked under webmin config -> Operating System and Environment

and made sure that it was set for debian and it is so I am lost why its creating symlinks for a redhat flavour.

If you want to look at this I enabled support access until the 18th -- server is mx0.tech-shield.net

So that file /etc/mail/spamassassin/spamassassin-spamc.rc does exist on your system .. and Virtualmin just creates symlinks from /etc/webmin/virtual-server/procmail/XXX to all files in /etc/mail/spamassassin .

So what is the problem exactly?

No that file did NOT exist until I looked around and found them on a centos box.

Debian does not have nor use them.

On other debian box I have

$ ll /etc/spamassassin/
total 28
-rw-r--r-- 1 root root  939 2008-11-17 06:56 65_debian.cf
-rw-r--r-- 1 root root 1299 2008-11-17 06:56 init.pre
-rw-r--r-- 1 root root 1270 2010-01-03 01:04 local.cf
drwx------ 2 root root 4096 2010-01-03 01:13 sa-update-keys
-rw-r--r-- 1 root root 2603 2008-11-17 06:56 v310.pre
-rw-r--r-- 1 root root 1195 2008-11-17 06:56 v312.pre
-rw-r--r-- 1 root root 2416 2008-11-17 06:56 v320.pre

And the symlinks the other debian boxes have

lrwxrwxrwx   1 root                   root                     30 2010-09-25 15:02 65_debian.cf -> /etc/spamassassin/65_debian.cf
lrwxrwxrwx   1 root                   root                     26 2010-09-25 15:02 init.pre -> /etc/spamassassin/init.pre
lrwxrwxrwx   1 root                   root                     26 2010-09-25 15:02 local.cf -> /etc/spamassassin/local.cf
lrwxrwxrwx   1 root                   root                     32 2010-09-25 15:02 sa-update-keys -> /etc/spamassassin/sa-update-keys
lrwxrwxrwx   1 root                   root                     26 2010-09-25 15:02 v310.pre -> /etc/spamassassin/v310.pre
lrwxrwxrwx   1 root                   root                     26 2010-09-25 15:02 v312.pre -> /etc/spamassassin/v312.pre
lrwxrwxrwx   1 root                   root                     26 2010-09-25 15:02 v320.pre -> /etc/spamassassin/v320.pre

Completely different links which is why I am wondering why one debian box is creating

lrwxrwxrwx 1 root    root    41 2010-10-15 11:57 spamassassin-default.rc -> /etc/spamassassin/spamassassin-default.rc
lrwxrwxrwx 1 root    root    40 2010-10-15 11:57 spamassassin-helper.sh -> /etc/spamassassin/spamassassin-helper.sh
lrwxrwxrwx 1 root    root    39 2010-10-15 11:57 spamassassin-spamc.rc -> /etc/spamassassin/spamassassin-spamc.rc

and the others aren't.

These files do not exist on debian and never have.

/etc/spamassassin/spamassassin-default.rc
/etc/spamassassin/spamassassin-helper.sh
/etc/spamassassin/spamassassin-spamc.rc

In order for the symlinks to work I had to copy

/etc/spamassassin/spamassassin-default.rc
/etc/spamassassin/spamassassin-helper.sh
/etc/spamassassin/spamassassin-spamc.rc

from a centos box.

Follow now ?

So if you delete the files :

/etc/spamassassin/spamassassin-default.rc
/etc/spamassassin/spamassassin-helper.sh
/etc/spamassassin/spamassassin-spamc.rc

and then create a new domain with spam enabled, do links still get created to those non-existent files?

Ahh no they dont !! So how do I get rid of the bad symlinks ? I think those domains that have them were imported domains from cpanel which would have been a red hat flavour which does use them.

I used find to remove the bad symlinks

Looks like if a domain is backed up on a redhat system and restored on debian, bad links will be brought across. I will fix Virtualmin in the 3.81 release to clean these up ..

Automatically closed -- issue fixed for 2 weeks with no activity.