LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Closed Thread
 
Search this Thread
Old 06-05-2009, 04:21 AM   #1
rajesh.bahl
Member
 
Registered: Jan 2007
Posts: 99

Rep: Reputation: 15
Need Help in constructing a Script


Am using postfix running on CentOS 5.3. It has the "always_bcc" function enabled for backup of the mails. The "mailbox_size_limit" is set to 1GB.

When this limit for "backup" is reached, the system starts giving error and we transfer the contents of this "backup file" which is /var/spool/mail/backup to some other file and make this as an empty file to start over again.

I need to automate the whole process in the sense that the system should check for the size of /var/spool/mail/backup file every one hour and when the size reaches to 1GB, it should execute the commands as:

service postfix stop
cp /var/spool/mail/backup /home/backup/<some_name>
> /var/spool/mail/backup
service postfix start

I am not having much idea about shell scripting - Can any one help in constructing such a script ?



thnaking in advance
rajesh.bahl
 
Old 06-05-2009, 05:08 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,984
Blog Entries: 54

Rep: Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742Reputation: 2742
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate of http://www.linuxquestions.org/questi...script-730865/.
 
  


Closed Thread

Tags
forum, linux, servers


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
Need help with script to organise files into folders as part of DVD backup script jasybee2000 Linux - Newbie 5 06-15-2009 07:29 PM
How to get full path to script file inside script itself? And in case of sym links? maggus Linux - Newbie 3 05-28-2009 08:40 AM
MySQL Updates With Null When Perl Script Run From Shell Script ThisGuyIKnow Programming 6 08-12-2008 09:56 AM
constructing a beowolf cluster Goatdemon Linux - General 16 12-31-2005 11:30 AM
linux 9 and java script error - premature end of script header sibil Linux - Newbie 0 01-06-2004 04:21 PM


All times are GMT -5. The time now is 01:17 PM.

Main Menu
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