Need to Take Sent Mail Backup in Linux Sever


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need to Take Sent Mail Backup in Linux Sever
# 1  
Old 08-17-2015
Question Need to Take Sent Mail Backup in Linux Sever

Everyday my code will send 100's* of mails from linux server to outlook using*sendmail command .
I need to take a backup of those mails which are exactly sent from my linux server.
This is needed for backup purpose.
backuplocation is my local home dir.Is it possible to do this.
I dont have root access to view the mail logs .
So please give some solution to resolve this issue.
# 2  
Old 08-17-2015
One way would be to add a bcc (blind carbon copy) to yourself on each message your application sends. This way you get a copy of the sent message immediately.
# 3  
Old 08-17-2015
I have used bcc command along with my mail -s command and mail was successfully sent.
after that i have checked in these location /var/spool/mail and var/log/ for finding my bcc copy mail.but i didn't found any mail.
I dont have root access to view the mail logs .
So please give some solution to resolve this issue.
# 4  
Old 08-17-2015
Where did you bcc it to? Might something else have downloaded it first?

If you don't have root access, you're not really going to be able to reconfigure anything.
# 5  
Old 08-18-2015
So you wrote a number of shell scripts that send emails? Have you thought about writing a wrapper script for sending emails and have that script archive each email in a directory on disk?

You can then change all of your scripts to use your new wrapper script. The best part is that when the requirements change again you will then only need to change one script. :-)

Last edited by Corona688; 08-18-2015 at 04:14 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

i am working on migration project, 8.5 sever able to embedded HTML report to mail body with below sy

i am working on migration project, 8.5 sever able to embedded HTML report to mail body with below syntax. $ mail -s "subject "recipient mail -- -f sender mail < xyz.html But above syntax is not working in 11.5 server and changed to below. $ mail -s "subject" -r recipient mail sender mail <... (0 Replies)
Discussion started by: JatinInfy
0 Replies

2. UNIX for Advanced & Expert Users

LAMP Sever

How do I install a LAMP server on a new installation of Debian 9 using the lalest versions of AMP? Here is what I have. Corrections please. MYSQL apt-get install mysql-server mysql-client You can verify the MySQL server status using command: systemctl status mysql ------- PHP7... (0 Replies)
Discussion started by: Meow613
0 Replies

3. Shell Programming and Scripting

rsync backup mode(--backup) Are there any options to remove backup folders on successful deployment?

Hi Everyone, we are running rsync with --backup mode, Are there any rsync options to remove backup folders on successful deployment? Thanks in adv. (0 Replies)
Discussion started by: MVEERA
0 Replies

4. Shell Programming and Scripting

check mail backup cron job

i have just installed a cron job to run at 3 in the morning once a week. It's difficult for me to test if it works because the email backup program takes the email service down before running the backup. I wondered if i could ask you gurus if this would work? 0 3 * * 0 ... (1 Reply)
Discussion started by: timgolding
1 Replies

5. UNIX for Advanced & Expert Users

Linux NIS sever not binding with Solaris client

I am installing a NIS master server with a linux SLES 10 SP1. And it was pretty straight forward. (Simple since it GUI ) The server can bind to itself when issue with ypwhich command. But on solaris 10 box, I set up the defaultdomain (/etc/defaultdomain) and also issue ypinit -c to startup the... (3 Replies)
Discussion started by: ibroxy
3 Replies

6. AIX

find the IP's on the sever

Hi , I am working on AIx server which is connected to another network which is a stock market via leased line , From my side I connect to the server locally but what i need is to know the ip whic the server connect to the stock market how I can Know this ???? Thanks (1 Reply)
Discussion started by: habuzahra
1 Replies

7. Shell Programming and Scripting

Can somebody advise any free Linux sever for shell programming?

Hi, everybody. I just wonder whether there are a couple of free Linux servers running as terminals where people can practice Unix Shell Programming? I'd like to set up one myself but unfortunatly can't do it. I can't switch to Linux now coz I run a couple of servers on my machine. Cygwin is... (3 Replies)
Discussion started by: belgampaul
3 Replies

8. OS X (Apple)

OS X Server: Trouble restoring mail from backup...

So I had some bad RAM in my server. Of course I didn't know it at the time. And it kept making the 10.3.5 updater crash. And that last crash did it. My drive was messed up. So I had to reformat and reinstall. Luckily I had a whole slew of fresh backups. But I'm really hung up on the mail. I backed... (0 Replies)
Discussion started by: l008com
0 Replies

9. Shell Programming and Scripting

Running a script on a different Sever

Guys, I want to run a script located on a different server from my pc. Let say the server has an IP of 1.1.10.2/16 and the script path is: /home/user/bin/check.sh The script scans for all available devices on the lan. My pc has an IP of 1.1.15.4/16 and I can ping the sever and can... (3 Replies)
Discussion started by: tony3101
3 Replies

10. UNIX for Advanced & Expert Users

backup command that will send e-mail to mount 2nd tape

Hi, I'm trying to come out with a script that uses the 'backup' command to backup large filesystems. Most of the time this data takes two or three DLT tapes to complete. The backup takes too long because operations never sees the message to mount 2nd tape. I have a script that uses sysback and... (1 Reply)
Discussion started by: mvilla0993
1 Replies
Login or Register to Ask a Question