Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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 ?
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/.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.