Error in upgrade

Jerry Benton jerry.benton at mailborder.com
Mon Apr 13 13:56:34 UTC 2015


Thanks. There might be a syntax error in the spec file in the %post section. You upgrade should be ok though. Can someone double check this for me? Fresh eyes might help.


# Create the SpasAssassin sym-link to mailscanner.cf
SADIR=`perl -MMail::SpamAssassin -e 'print Mail::SpamAssassin->new->first_existing_path(@Mail::SpamAssassin::site_rules_path)' 2>/dev/null`
if [ "x$SADIR" = "x" ]; then
  echo No SpamAssassin installation found.
else
  #mkdir -p ${RPM_BUILD_ROOT}${SADIR}
  if [ -e ${SADIR}/mailscanner.cf ]; then
    echo Leaving mailscanner.cf link or file alone.
  else
    ln -s -f /etc/MailScanner/spam.assassin.prefs.conf ${SADIR}/mailscanner.cf
  fi
  echo SpamAssassin site rules found in ${SADIR}
fi

# Create the incoming and quarantine dirs if needed
for F in incoming quarantine incoming/Locks
do
  if [ \! -d /var/spool/MailScanner/$F ]; then
    mkdir -p /var/spool/MailScanner/$F
    chown root.root /var/spool/MailScanner/$F
    chmod 0755 /var/spool/MailScanner/$F
  fi
done

-
Jerry Benton
www.mailborder.com



> On Apr 13, 2015, at 9:36 AM, Denis Beauchemin <Denis.Beauchemin at usherbrooke.ca> wrote:
> 
> Hello,
> 
> I just upgraded from 4.85.2-0 to 4.85.2-1 on RHEL 6.6 and got the following errors at the end of the process :
> Installing the MailScanner RPM ... 
> Preparing...                ##################################################
> mailscanner                 ##################################################
> 
> Leaving mailscanner.cf link or file alone.
> SpamAssassin site rules found in /etc/mail/spamassassin
> 
> To activate MailScanner run the following commands:
> 
> service sendmail stop
> chkconfig sendmail off
> chkconfig MailScanner on
> service MailScanner start
> 
> Note that you will need to replace the sendmail option
> above with your respective MTA. Sendmail, Postfix, Exim, etc.
> 
> If you are using Clam AV, ensure that you check that the user
> and group specified in /usr/share/MailScanner/clamav-wrapper
> matches the user specified in /etc/passwd.
> 
> /var/tmp/rpm-tmp.0GUhjw: line 7: syntax error near unexpected token `fi'
> /var/tmp/rpm-tmp.0GUhjw: line 7: `fi'
> warning: %postun(mailscanner-4.85.2-0.noarch) scriptlet failed, exit status 2
> ClamAV update process started at Mon Apr 13 08:59:20 2015
> main.cvd is up to date (version: 55, sigs: 2424225, f-level: 60, builder: neo)
> daily.cld is up to date (version: 20317, sigs: 1369028, f-level: 63, builder: neo)
> bytecode.cld is up to date (version: 250, sigs: 42, f-level: 63, builder: neo)
> Upgrading /etc/MailScanner/MailScanner.conf
> 
> Your old configuration file will be saved as:
> /etc/MailScanner/MailScanner.conf.old.40032
> 
> Substitution pattern not terminated at -e line 1.
> Usage:
> 
> RPM
> ===
> If you are using the RPM distributions then try this:
> 
> cd /etc/MailScanner
> upgrade_MailScanner_conf MailScanner.conf MailScanner.conf.rpmnew > MailScanner.new
> mv -f MailScanner.conf MailScanner.old
> mv -f MailScanner.new  MailScanner.conf
> 
> TAR
> ===
> If you are using the tar distribution so that the old version is in
> /opt/MailScanner and the new one is in /opt/MailScanner.new then:
> 
> cd /opt/MailScanner.new/etc
> ../bin/upgrade_MailScanner_conf /opt/MailScanner/etc/MailScanner.conf /opt/MailScanner.new/etc/MailScanner.conf > MailScanner.new
> mv -f MailScanner.conf MailScanner.old
> mv -f MailScanner.new  MailScanner.conf
> 
> NOTE
> ====
> To keep your old comments in your original file, add "--keep-comments"
> to the command line.  Note that this will mean you don't get to find
> out any extra new values you might be able to use in existing "improved"
> configuration options.
> 
> No .rpmnew file, so just copying your existing .conf file.
> 
> ----------------------------------------------------------
> Installation Complete
> 
> See http://www.mailscanner.info for more information and  
> support via the MailScanner mailing list.
> 
> 
> 
> -- 
> MailScanner mailing list
> mailscanner at lists.mailscanner.info
> http://lists.mailscanner.info/listinfo/mailscanner
> 



More information about the MailScanner mailing list