Page 1 of 8

Scalix & Amavisd-New HOWTO - Wiki updated

Posted: Fri May 05, 2006 10:13 am
by btisdall
Hi,

I've just put this up on the wiki:

http://www.scalix.com/wiki/index.php?ti ... -New_HOWTO

Scalix folks: Are you going to improve the formatting options? I found making it look decent a bit of a struggle.

Regards,

Posted: Sat May 06, 2006 12:23 pm
by florian
Hi,

thanks for your good work - i haven't read through, but it certainly looks useful.

On the wiki formatting, we can't do much; we decided to use the Mediawiki software (on which Wikipedia is run), so we're bound to what they provide. Maybe you should just click on editing help inside each editor window and try to learn a bit more about the formatting options available. It's pretty rich, though.

Also, have you created a link to your page in the Community Documents home page yet? This will make it easier to find for people.

-- F.

Posted: Sun May 07, 2006 1:39 pm
by btisdall
florian wrote:Maybe you should just click on editing help inside each editor window and try to learn a bit more about the formatting options available.


Well, I clicked again today & this time I actually spotted the link back to mediawiki's website :)

florian wrote:Also, have you created a link to your page in the Community Documents home page yet? This will make it easier to find for people.


Done.

B.

Posted: Mon May 08, 2006 3:52 am
by burhankhalid
Thanks for this one! :D

Scalix/Sendmail & Amavisd-New HOWTO - Updated

Posted: Mon May 08, 2006 5:56 pm
by btisdall
I've discovered an error in the initscript which causes the MILTER_SOCKET variable not be passed. Since the value in the supplied sysconfig script is actually the same as the hardcoded default the problem won't come to light unless you try to set it to something else.

To fix it edit the line that reads:

Code: Select all

daemon --user "$AMAVIS_USER" $prog2dir/$prog2 -p "$MILTER_SOCKET" $MILTER_FLAGS


to:

Code: Select all

daemon --user "$AMAVIS_USER" $prog2dir/$prog2 -s "$MILTER_SOCKET" $MILTER_FLAGS


The script on the website has been updated.

Posted: Thu May 11, 2006 12:18 pm
by btisdall
Pardon the bump, but there's a fairly major revision in the 'initscript...' section which I advise following.

RPM/Yum is likely to stomp on the combined init. script when upgrading amavisd-new so the the milter init script is now separate. It therefore seemed logical to separate the sysconfig script too.

There are also some tweaks to accomodate the fact that amavisd-new's homedir (which the milter needs to know) might not always be /var/amavis.

You can go with packager's versions of the amavisd-new files but I've left mine (with the milter stuff removed) up for completeness.

Best,

Posted: Fri May 12, 2006 4:58 am
by Juan
Goodday,

well my locations for sock is correct but i don't have the same init script for milter startup in /etc/rc.d/init.d/amavisd

i have

Code: Select all

 sudo -u amavis "$AMAVIS_USER" $prog2dir/$prog2 -s "$MILTER_SOCKET" $MILTER_FLAGS -d 4


i have to sudo otherwhise i am not getting the milter thing to start

Posted: Fri May 12, 2006 5:31 am
by btisdall
Juan wrote:i have

Code: Select all

 sudo -u amavis "$AMAVIS_USER" $prog2dir/$prog2 -s "$MILTER_SOCKET" $MILTER_FLAGS -d 4


This line tells the amavisd-milter daemon to be run as user 'amavis', which is the desired behaviour (it's just achieved a slightly different way in the script I provided).

In order for a process to be run as a particular user, the init. script (as with any init. script) firstly needs to be run by the root user, either by becoming root and doing:

Code: Select all

service <name> start


or (better practice) using sudo:

Code: Select all

sudo service <name> start


For the second method to work sudo needs to be configured correctly, but it sounds like you've done that (let me know if not).

When you boot your machine or change runlevels the init. scripts are run by the init process, which itself runs as root so you don't normally need to worry about any of this.

Posted: Sat May 13, 2006 12:31 pm
by florian
assume all the good changes suggested here were also made in the Wiki?

thx,
Florian.

Posted: Sat May 13, 2006 2:31 pm
by btisdall
Indubitably!

Posted: Sat May 13, 2006 2:34 pm
by florian
Beautiful.

great weekend for you,

Florian.

Posted: Sun May 14, 2006 12:55 pm
by btisdall
Please be aware in sections 2 & 7 the group memberships should in fact be adjusted so that the clamav user is added to the amavis group - the opposite of what was originally stated.

Sorry if this has caused any headaches, I'll spare you the details of how it slipped through repeated testing...

Note that your package manager may've done the right thing and you have a working setup anyway. In this case all you need to do is tighten things up by removing the amavis user from the clamav group and re-test.

Wiki updated.

Posted: Fri May 19, 2006 7:12 am
by btisdall
Changed the following line in /etc/sysconfig/amavisd-milter

From:

Code: Select all

MILTER_PID="/var/run/amavis/amavisd-milter.pid"


To:

Code: Select all

MILTER_PID="$AMAVISD_HOME/amavisd-milter.pid"


This has the effect of writing the PID file in /var/amavis (by default), removing the need to manually create the directory /var/run/amavis with correct permissions, which was not documented.

NB: since the milter doesn't run as root it can't write directly in /var/run unless you're running with relaxed perms on that dir (probably not wise).

Wiki updated.

Problem with amavisd-milter

Posted: Wed May 24, 2006 11:05 am
by interways1
Hello!

After installing amavisd-milter from sourceforge, I can not find any amavisd.conf file. It is not in /etc nor anywhere else for that matter.

What can I do?


Thanks

Chris

Re: Problem with amavisd-milter

Posted: Wed May 24, 2006 12:35 pm
by btisdall
interways1 wrote:After installing amavisd-milter from sourceforge, I can not find any amavisd.conf file. It is not in /etc nor anywhere else for that matter.


amavisd.conf is the conffile for amavisd-new, not amavisd-milter.

You must also install amavisd-new using yum/rpm/etc.