send all mail to files instead of relaying out


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users send all mail to files instead of relaying out
# 1  
Old 06-09-2009
send all mail to files instead of relaying out

I had a wierd request from one of our guys. We are running on RedHat EL5. He asked that all mail originating from 3 servers he owns be sent to files instead of being sent out. My first thought is to set "Smart" relay host in sendmail.cf on each of the 3 servers so all messages are sent to a 4th server. On the 4th server setup a smtp server to archive all the messages.

I probably won't go this route because ALL messages, including emails SA's may have coming out of cron jobs or scripts, will not get delivered properly. But, I'm working on a way to just send the messages coming out of his app to the "blackhole" smtp server. If I can do that:

1) Do you know of a way to setup a smtp server so that it stores all incoming messages in files (queue?) but doesn't ever relay them?
2) Any better solutions? I could just send them to files local to each of the 3 servers and then consolidate them some other way but I don't know how to send them all to a file locally either.

Thanks,

MG
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Client was not authenticated to send anonymous mail during MAIL FROM (in reply to MAIL FROM comm

I am having trouble getting mail to work on a red hat server. At first I was getting this message. Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies

2. Shell Programming and Scripting

Remove files send through mail

I wan't to remove last 5 and 10 days files from two directory and send the remove files list in mail Output send through mail find /kalia/cd/ -type f -mtime +5 exec rm {} \; find /kalia/uk/ -type f -mtome +10 exec rm {} \; Output send through mail File has been deleted ... (1 Reply)
Discussion started by: Kalia
1 Replies

3. Shell Programming and Scripting

Script for checking files for last hour and send a mail

Hello, I need to write a script to check the files in one folder , if that folder doesn't have files generated from last 1 hr then we need to send mail to particular persons. So Can you please help me to write script to check the files and send email. Thank you.. (1 Reply)
Discussion started by: archana23
1 Replies

4. UNIX for Advanced & Expert Users

Zip the files if count is more than 0 and send a mail

All, I am new to shell scripting and trying to get the count of files that starts with error and with extension .out, if the count is greater than 0 and zip the file and send an email with the content of error.out file, here is my script cd /temp testcount =$('find . -name '*.out' -print |... (4 Replies)
Discussion started by: luckydoll
4 Replies

5. Shell Programming and Scripting

want to send 4 files output in one mail

Hi All , i have a wrapper HTML script -FS_CHECK_HTML_SCIPT_WT_Statusbar.sh which read a TXT file (script_KB.txt) and sends output to a mail in tabular format. TXT file is having 6 columns and so wrapper script create a table with 6 columns and supplies those 6 columns data from TXT file .... (2 Replies)
Discussion started by: deepakiniimt
2 Replies

6. Shell Programming and Scripting

How to send mail with multiple files attached?

Hi, I would like to send a mail with multiples files attached. Until now i was doing a "find" and then a "tar" of the text files. As I need to be able to read them on a mobile device such as Blackberry for instance, i would like to send them in one single mail, but without taring them. is... (2 Replies)
Discussion started by: Pierrito
2 Replies

7. UNIX for Dummies Questions & Answers

550 5.7.1 Relaying denied During Send mail in UNIX

Hi , I am new to Send mail concept in UNIX , when ever am trying to send a mail am getting this errors , Could anyone please help me . reason: 550 5.7.1 .. Relaying denied (2 Replies)
Discussion started by: thana
2 Replies

8. AIX

Send mail with attachment having csv files

Hi, Could anyone please help me to send multiple files of .csv format in one mail. Thanks Aj (2 Replies)
Discussion started by: atinjain05
2 Replies

9. Shell Programming and Scripting

Script needed which will send a mail with attachment files

Hello, I need a shell script which need to send a mail with 4 *.csv files as attachments.Anybody can help me? At present i have a script which is sending only one file as attachments.But i need a script which send 4 files in a shot. #!/bin/ksh /bin/mail xxxx@xx.xom << EOF Subject:... (4 Replies)
Discussion started by: Mar1006
4 Replies

10. UNIX for Dummies Questions & Answers

problem relaying email to client mail exchanger from online forms

We are having a mail issue on our shared web server. We have a $40/mo. web hosting reseller account with a company called F r o g e e . c o m. We host 50+ domains there and only have this problem with two. We don't get much support from them so I am turning to outside help. We are not web... (1 Reply)
Discussion started by: ken_brainstorm
1 Replies
Login or Register to Ask a Question
BUNDLE(1)						      General Commands Manual							 BUNDLE(1)

NAME
bundle - collect files for distribution SYNOPSIS
bundle file ... DESCRIPTION
Bundle writes on its standard output a shell script for rc(1) or a Bourne shell which, when executed, will recreate the original files. Its main use is for distributing small numbers of text files by mail(1). Although less refined than standard archives from ar(1) or tar(1), a bundle file is self-documenting and complete; little preparation is required on the receiving machine. EXAMPLES
bundle mkfile *.[ch] | mail kremvax!boris Send a makefile to Boris together with related and files. Upon receiving the mail, Boris may save the file sans postmark, say in gift/horse, then do cd gift; rc horse; mk SOURCE
/rc/bin/bundle SEE ALSO
ar(1), tar(1), mail(1) BUGS
Bundle will not create directories and is unsatisfactory for non-text files. Beware of gift horses. BUNDLE(1)