Replacing original(s) with *.rpmnew

Craig Pratt craig at STRONG-BOX.NET
Sat Mar 8 02:45:26 GMT 2003


The "by the seat of your pants" form, in sh:

   for file in *.rpmnew; do mv $file $(basename "$file" .rpmnew); done

Just make sure there aren't filenames with spaces in them.

A better version, which will backup any overwritten files and deal with
names with spaces:

for file in *.rpmnew; do newname=$(basename "$file" .rpmnew); mv -f
"$newname" "$newname.rpmold" ; mv "$file" "$newname" ; done

Just be careful with such a thing. .rpmnew files are generated because
intelligent choices often need to be made when incorporating the
.rpmnew. For me, upgrading MS means merging all the conf files in
/etc/MailScanner and leaving the report files as-is - since I've
customized them. I just check the .rpmnew report files to ensure there
are no surprises in there.

Craig


On Friday, March 7, 2003, at 03:46  PM, Nathan Johanson wrote:
> Hello,
>
> The other day I upgraded from 4.11-x to 4.13-3. As expected, Julian's
> upgrade script simplified the process. However, I noticed several
> reports had been replaced. While replacing the originals with the
> *.rpmnew files, I figured there must be a better way to do it than "mv
> filename.rpmnew filename" ; rm filename.rpmnew" for each file.
>
> There must be a way to do all *.rpmnew files in a directory with a
> short
> shell script or compound command. Can someone give me a hand with this?
> It would only be usefuly for files or reports I haven't changed, but
> could potentially save me a lot of keyboard tapping.
>
> Thanks in advance!
>
> Sincerely,
> Nathan Johanson
> nathan at tcpnetworks.net
>
>
> -----Original Message-----
> From: Julian Field [mailto:mailscanner at ECS.SOTON.AC.UK]
> Sent: Friday, March 07, 2003 4:22 AM
> To: MAILSCANNER at JISCMAIL.AC.UK
> Subject: Re: MailScanner and Horde/IMP
>
>
> At 23:23 07/03/2003, you wrote:
>> Hi,
>>        I installed MailScanner on my RedHat 7.3 box running Horde/IMP
> cvs
>> version.
>> When I send mails through Outlook or Eudora , the mails get scanned by
>> MailScanner, does both Anti-Virus and Anti-Spam checks.
>> But when I send through Horde/IMP mailscanner does not get executed.
> The
>> mails goes without a scan via sendmail.
>>
>> Why is this happening?
>>
>> My horde configuration conf.php
>>
>> $conf['mailer']['type'] = 'sendmail';
>> $conf['mailer']['params'] = array();
>>  $conf['mailer']['params'] = array('sendmail_path' =>
> '/usr/sbin/sendmail');
>
> You either need to upgrade to a more recent version of sendmail, or
> else
> set this instead of your 3 lines above:
>
> $conf['mailer']['type'] = 'smtp';
> $conf['mailer']['params'] = array();
> $conf['mailer']['params'] = array('host' => 'localhost');
>
> This will force IMP to talk SMTP to the host it is running on, which
> will
> get all its mail scanned.
> --
> Julian Field
> www.MailScanner.info
> MailScanner thanks transtec Computers for their support
>
> --
> This message checked for dangerous content by MailScanner on StrongBox.
>


--
This message checked for dangerous content by MailScanner on StrongBox.



More information about the MailScanner mailing list