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

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

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.