LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux > 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

Tags used in this thread
Popular LQ Tags , , , ,

Closed Thread
 
Thread Tools
Old 06-05-2009, 05:21 AM   #1
rajesh.bahl
Member
 
Registered: Jan 2007
Posts: 71
Thanked: 0
Need Help in constructing a Script


[Log in to get rid of this advertisement]
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
rajesh.bahl is offline  
Tag This Post , , , ,
Old 06-05-2009, 06:08 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 16,722
Blog Entries: 30
Thanked: 285
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/.
unSpawn is offline    

Closed Thread

Bookmarks


Thread Tools

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 08: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 09:40 AM
MySQL Updates With Null When Perl Script Run From Shell Script ThisGuyIKnow Programming 6 08-12-2008 10:56 AM
constructing a beowolf cluster Goatdemon Linux - General 16 12-31-2005 12:30 PM
linux 9 and java script error - premature end of script header sibil Linux - Newbie 0 01-06-2004 05:21 PM


All times are GMT -5. The time now is 05:45 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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration