Delete email recd


 
Thread Tools Search this Thread
Operating Systems Solaris Delete email recd
# 1  
Old 09-23-2009
Delete email recd

Hello All,

For many users, .forward file has been created to forward the emails from UNIX (SUN 5.8) to Exhcnage server.
Is there any way to delete the email as soon as it comes to the mailbox on UNIX (without the same being forwarded to the Exchange Server)?

Thanks!
suismilyadon
# 2  
Old 09-23-2009
RE:Delete email recd

Hi Suismilyadon

One way would be to change the .forward file to pass the mail to a script as follows:

|<script_name>

as the first line in the .forward file. The script could be a simple delete command such as :

while read <varable>
do
echo $<variable> >>/dev/null
done

Hope this helps

Greg
# 3  
Old 09-24-2009
Thanks for the reply.

The catch is that not all users have the ".forward" created.

So, we need to find a way to delete any email coming from a particular email ID for all such users.

suismilyadon

---------- Post updated 09-24-09 at 03:15 AM ---------- Previous update was 09-23-09 at 10:39 PM ----------

Another query, I wanted to know if .forward can be customized so that only emails coming from the user: "mac@server.com"and having text "Submitted CR", are deleted and all other emails are forwarded to the Exchange server.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Using top command to email if process is exceeding 25% and sending an email alert if so

This is my first time writing a script and Im having some trouble, Im trying to use the top command to monitor processes and the amount of CPU usage they require, my aim is to get an email if a process takes over a certain percentage of CPU usage I tried grep Obviosly that hasnt worked, Any... (8 Replies)
Discussion started by: jay02
8 Replies

2. Shell Programming and Scripting

ftp, archive, email and delete from shell script

Hello, I found the forum’s information very helpful and informative. I am relatively new to UNIX programming. I am researching how to write a UNIX shell script to ftp all files from specific host folder to a client server. Also need to archive all transferred files, send a message (email) if any... (4 Replies)
Discussion started by: Lenora2009
4 Replies

3. UNIX for Dummies Questions & Answers

Cron to delete email help needed

I would like to know if I can place a cron job (and what it might be of course) to delete all the mail in an inbox? Here are the servers specs: Operating systemLinuxService StatusClick to ViewKernel version2.6.28.9Machine Typei686Apache version2.2.11 (Unix)PERL version5.8.8Path to... (2 Replies)
Discussion started by: markmatu
2 Replies

4. UNIX for Dummies Questions & Answers

how can i recd error log on my sent mails?

I am using the following command to send mail which comprises of a message body (mail_msgbody.txt), Subject(rtf attachment) and a RTF attachment. uuencode ${FILE_NAME} ${FILE_NAME} >> mail_msgbody.txt mailx -s"rtf attachement" aaa@yahoo.com < mail_msgbody.txt When I send mail ...how can I... (0 Replies)
Discussion started by: Amruta Pitkar
0 Replies

5. UNIX for Dummies Questions & Answers

How to delete all email messages at ONE time?

These are some of the mail command: Usage: ? print this help message # display message number # - print previous + next (no delete) ! cmd execute cmd <CR> next (no delete) a position at and read... (5 Replies)
Discussion started by: bobo
5 Replies

6. UNIX for Advanced & Expert Users

Unable to send eMail from a UNIX-Host ( using mailx ) to a Outlook-email-addres(Win)

Hi A) I am able to send eMail using mailx from a UNIX ( solaris 8 ) host to my Outlook-email-ID : FName.Surname@Citigroup.com ( This is NOT my actual -eMail-ID). But in Outlook the "From :" eMail address is displayed as " usr1@unix-host1.unregistered.email.citicorp.com " .i.e the words... (2 Replies)
Discussion started by: Vetrivela
2 Replies

7. UNIX for Dummies Questions & Answers

How to delete old email addresses?

Help! Need to delete old email addresses from address book on Dell Windows 98............. -------- The subject line was one long string - I inserted spaces - oombera (1 Reply)
Discussion started by: Deede
1 Replies

8. Programming

How to delete email addresses

I need to delete old email addresses and can't them them out of my address I have a dell and am served by MSN? (Email address removed... Neo) (4 Replies)
Discussion started by: Deede
4 Replies

9. UNIX for Dummies Questions & Answers

Delete All email

If I have thousands of email to delete on the mail server POP3, is there a quick way to delete it all in one command instead of going into pine and deleting them one at a time?:cool: (2 Replies)
Discussion started by: foothillnet
2 Replies

10. UNIX for Dummies Questions & Answers

How do we delete spam email on mmdf

Please advise on how to delete spam email from mmdf email, and The Unix spec below: System = SCO_SV Release = 3.2v5.0.5 (2 Replies)
Discussion started by: esh
2 Replies
Login or Register to Ask a Question