LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 08-24-2004, 05:04 AM   #1
Sammy2ooo
Member
 
Registered: Jan 2003
Location: nearby switzerland
Distribution: Suse 8.0 / Suse 9.0 / Slackware 9.1 / Debian Sarge testing / Gentoo 1.4.10
Posts: 165

Rep: Reputation: 30
Whats wrong with this script???


hello

i have written the following dirty script to keep my spamassassin local.cf up to date. The problem is that all mail suddenly keep stuck in the mailq (btw i am running postfix). I have recognized that my script doesnt append the "whitelist_from" lines. What the hack is wrong with this script????

any hints on this???


Code:
#/bin/bash

# Parameter
CONFIG_FILE="local.cf"
SA_FILE="http://www.stearns.org/sa-blacklist/sa-blacklist.current"
WGET_PARA="-q" #fuer debug Zwecke -q durch -v (verbose) ersetzen

# blacklist herunterladen
wget $WGET_PARA -O /etc/mail/spamassassin/$CONFIG_FILE $SA_FILE

# Eigene Eintraege an die Datei anhaengen
echo "whitelist_from = *@mydomain.com" >> $CONFIG_FILE
echo "whitelist_from = *@mydomain.fr"  >> $CONFIG_FILE
echo "whitelist_from = *@mydomain.org" >> $CONFIG_FILE
echo "whitelist_from = *@mydomain.nl"  >> $CONFIG_FILE

# Logt die Ausfuehrung
date >> /etc/mail/spamassassin/sa_rotate.log
 
Old 08-24-2004, 07:01 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
The only 'error' I see is in the first line:

#/bin/bash

Should be:

#!/bin/bash

But both 'versions' do what you want if I run them.
 
Old 08-24-2004, 07:20 AM   #3
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
wget output is
/etc/mail/spamassassin/$CONFIG_FILE
echo output is
$CONFIG_FILE
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Whats wrong with my dialing script? pen^2 Linux - General 13 09-16-2004 03:34 AM
Whats wrong with this PERL script? VisionZ Linux - Newbie 25 03-25-2004 09:58 AM
whats wrong with the keyboard?? masand Linux - General 5 03-19-2004 10:22 AM
Whats wrong with this? OlRoy Programming 2 05-28-2003 02:21 PM
whats wrong w/ my slack? Flawless Slackware 8 03-01-2003 04:21 PM


All times are GMT -5. The time now is 03:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration