Directorys in /var/spool/MailScanner/incoming

Paul Houselander paul_houselander at BRISTOL-LEA.ORG.UK
Tue Oct 29 10:01:57 GMT 2002


MessageI didnt replace it I just placed it below e.g.

  # Next try "pidof"
        pid=`pidof $1`
        if [ "$pid" != "" ] ; then
                echo $pid 
                return 0
        fi

   # Next try "pidof"
        pidof -o $$ -o $PPID -o %PPID -x $1 || \
        pidof -o $$ -o $PPID -o %PPID -x ${base}

Cheers

Paul
  ----- Original Message ----- 
  From: Gavin Nelmes-Crocker 
  To: MAILSCANNER at JISCMAIL.AC.UK 
  Sent: Tuesday, October 29, 2002 9:51 AM
  Subject: Re: Directorys in /var/spool/MailScanner/incoming


  could you just make it a bit clearer for me please - where exactly did you insert this in below - do you replace the current #next try pidof ? - I'm using a dev box but its easier to get it right first time :-)

  Thanks Gavin

  # A function to find the pid of a program.
  pidofproc() {
          # Test syntax.
          if [ $# = 0 ] ; then
                  echo "Usage: pidofproc {program}"
                  return 1
          fi
                         
          # First try "/var/run/*.pid" files
          if [ -f /var/run/$1.pid ] ; then  
                  pid=`head -1 /var/run/$1.pid`
                  if [ "$pid" != "" ] ; then
                          echo $pid
                          return 0
                  fi
          fi
                                             
          # Next try "pidof"
          pid=`pidof $1`
          if [ "$pid" != "" ] ; then
                  echo $pid 
                  return 0
          fi
                  
          # Finally try to extract it from ps
          ps ax | awk 'BEGIN { prog=ARGV[1]; ARGC=1 }
                             { if ((prog == $5) || (("(" prog ")") == $5) ||
                               (("[" prog "]") == $5) ||
                             ((prog ":") == $5)) { print $1 ; exit 0 } }' $1
  }
          
    -----Original Message-----
    From: MailScanner mailing list [mailto:MAILSCANNER at JISCMAIL.AC.UK] On Behalf Of Paul Houselander
    Sent: 29 October 2002 08:48
    To: MAILSCANNER at JISCMAIL.AC.UK
    Subject: Re: Directorys in /var/spool/MailScanner/incoming


    My initial question did not relate to a cobalt, but I do have access to a Raq4 so tried it out and have the same problem with the init script not successfully stopping MailScanner, however it does work fine on my RedHat 7.2 system.

    On the cobalt, the pidofproc function in /etc/rc.d/init.d/functions does not return anything. 

    However, after comparing the pidofproc function on the cobalt and redhat systems I added (after making a backup of "functions")

       # Next try "pidof"
            pidof -o $$ -o $PPID -o %PPID -x $1 || \
            pidof -o $$ -o $PPID -o %PPID -x ${base}

    To the pidofproc function on the cobalt, now the init script works fine and is able to stop mailscanner.

    As Cobalts are strange beasts I dont know whether this is going to break anything else, but seems ok at the moment.

    Cheers

    Paul

    ----- Original Message ----- 
      From: Gavin Nelmes-Crocker 
      To: MAILSCANNER at JISCMAIL.AC.UK 
      Sent: Monday, October 28, 2002 5:32 PM
      Subject: Re: Directorys in /var/spool/MailScanner/incoming


      this also matches with mine and a a couple of others problem but on a Cobalt RaQ in the the init script doesn't stop the mailscanner has the init script got broken somewhere? this section seems to be related to all the PIDs for mailscanner but its commented out and I couldn't find any killproc info for Mailscanner in the init file - but then this bit is a bit of mystery for me anyway.

      # Get a string of all the PIDs of MailScanner
      #MailScannerPids() {
      #       cd $PIDDIR || return 1
      #       PIDLIST=`ls | grep '^MailScanner.' | sed -e 's/MailScanner.//g'`
      #       echo PIDLIST
      #       return 0
      #}

      Regards

      Gavin
      ps I also have a whole bunch of PIDs in /var/spool/Mailscanner which don't get deleted



        -----Original Message-----
        From: MailScanner mailing list [mailto:MAILSCANNER at JISCMAIL.AC.UK] On Behalf Of Paul Houselander
        Sent: 28 October 2002 16:50
        To: MAILSCANNER at JISCMAIL.AC.UK
        Subject: Directorys in /var/spool/MailScanner/incoming


        Im using

        RedHat 7.2 and the rpm MailScanner 4.03-1

        I seem to recall this being discussed but cant find any previous mention of it.

        Directorys with the same name as the pid are being created in /var/spool/MailScanner/incoming, but are not being cleaned up on a restart or stop - is this as it should be?.

        Is their any resason I should not delete them in the stop and restart parts of /etc/rc.d/init.d/MailScanner

        Thanks

        Paul



        -- 
        This message has been scanned for viruses and 
        dangerous content by MailScanner, and is
        believed to be clean. 

      -- 
      This message has been scanned for viruses and 
      dangerous content by MailScanner, and is
      believed to be clean. 

    -- 
    This message has been scanned for viruses and 
    dangerous content by MailScanner, and is
    believed to be clean. 

  -- 
  This message has been scanned for viruses and 
  dangerous content by MailScanner, and is
  believed to be clean. 
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mailscanner.info/pipermail/mailscanner/attachments/20021029/a3f1d5b3/attachment.html


More information about the MailScanner mailing list