FreeBSD and MailScanner --lint

Glenn Steen glenn.steen at gmail.com
Wed Aug 8 14:22:53 IST 2007


On 08/08/07, Glenn Steen <glenn.steen at gmail.com> wrote:
> On 08/08/07, Glenn Steen <glenn.steen at gmail.com> wrote:
> > On 08/08/07, Glenn Steen <glenn.steen at gmail.com> wrote:
> > > On 08/08/07, Mikael Syska <mikael at syska.dk> wrote:
> > > > Hi,
> > > >
> > > > Dont knwo if this is intended to be so, but here goes ....
> > > >
> > > > root [/usr/local/etc/MailScanner]# /usr/local/etc/rc.d/mailscanner restart
> > > > Stopping mailscanner.
> > > > Waiting for PIDS: 778, 778.
> > > > Starting mailscanner.
> > > >
> > > > root [/usr/local/etc/MailScanner]# cat /var/run/MailScanner.pid
> > > > 3229
> > > >
> > > > Then running running, with MailScanner still running:
> > > > #MailScanner --lint
> > > >
> > > > Its overwriting:
> > > > root [/usr/local/etc/MailScanner]# cat /var/run/MailScanner.pid ( yes,
> > > > it writes MailScanner in the pid file )
> > > > MailScanner
> > > >
> > > > Is this the way its supposed to be or ? I just noticed this today ...
> > > >
> > > Very likely not.
> > >
> > > I just verified that it does this on Mandriva with the rpm install
> > > method (and hence likely on any rpm-based system, perhaps barring
> > > SuSE...).
> > >
> > > Will have a look.
> > >
> > > Cheers
> >
> > Looking at that init script... it just seems to be set there, never
> > really used... Perhaps check_MailScanner uses it, will look further...
> > Nope, not that I can easily grep/see at a cashual glance. So it should
> > be safe... One can wonder what good it does, setting/managing at
> > all:-).
> >
> The error seems to be only with how the .lint is implemented... Can't
> promise any fix or anything (if Jules don't reappear:-), I've got a
> lot on my plate today...
>
Ok, looked at the code, and as teh following snippet implies:
----
  # Need to find the PidFile before changing uid/gid as its ownership will need
  # to be set to the new uid/gid. It must be created first if necessary.
  # Need     PidFile     to be able to manage pid of parent process
  $PidFile = MailScanner::Config::Value('pidfile');
  WritePIDFile("MailScanner");
  chown $uid, $gid, $PidFile;
-----
...this is all pretty intentional;-).
One could argue that Jules should preserve it by not overwriting it,
but then ... it seems to be used sparingly, if at all.

Cheers
-- 
-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se


More information about the MailScanner mailing list