Solved

Mcafee VirusScan Enterprise 8.7i With Antisparyware blocked Asp.Net SMTP(Not Local) server

Posted on 2009-06-27
11
1,480 Views
Last Modified: 2013-11-30
I Have installed McAfee 8.7 VirusScan Enterprise with Antisprayware. and i Uses Asp.Net 2.0 for for mail sending for my developing website i have remote site smtp settings.

when i send email it display it is failed.
even i set settings on VirusConsole>AccessProtection>Antivirus Standard Protection>Prevent mass mailing worms form sending mails
block checkbox is removed bu i still not sending emails.
0
Comment
Question by:Kashyap Makadia
  • 5
  • 5
11 Comments
 
LVL 23

Expert Comment

by:ComputerTechie
Comment Utility
what is the error you are getting and how are your setting the email?

CT
0
 

Author Comment

by:Kashyap Makadia
Comment Utility
Error : Failure sending mail.



SendMail(MailFrom, MailTo, MailSubject, MailBody)

{

            try

                {

                

                if(MailFrom==null)

                    {

                    MailFrom="Some Email address of my website";

                    }

                MailMessage msg = new MailMessage(MailFrom, MailTo, MailSubject, MailBody);

                msg.IsBodyHtml = true;
 

                SmtpClient clnt = new SmtpClient();

                clnt.Credentials = new NetworkCredential("USERNAME", "PASSWORD");

                clnt.Send(msg);

                msg.Dispose();

                return 1;

                }

            catch

                {

                return -1;

                }

}

Open in new window

0
 
LVL 23

Expert Comment

by:ComputerTechie
Comment Utility
Here a sample of how we do it.

CT
<?php 
 

    $fileloc="pdf/11000028.pdf";

    $filename="11000028.pdf"; 

    $filetype=="application/octet-stream";
 

if ($filetype>"") {
 

	$message= 'Test message';
 

    // MAIL SUBJECT 
 

    $subject = "Mail with doc file attachment"; 
 

    // TO MAIL ADDRESS 
 

    $to="to@mail.com"; 
 

    // MAIL HEADERS 
 

    $headers  = "MIME-Version: 1.0\n"; 

    $headers .= "Content-type: text/html; charset=iso-8859-1\n"; 

    $headers .= "From: Name <name@name.com>\n"; 
 

    // MAIL HEADERS with attachment 
 

    $fp = fopen("pdf/11000028.pdf", "rb"); 

    $file = fread($fp); 

    $file = chunk_split(base64_encode($file)); 

    $num = md5(time()); 
 

        //Normal headers 
 

       $headers  = "From: Name<test@test.com>\r\n"; 

       $headers  .= "MIME-Version: 1.0\r\n"; 

       $headers  .= "Content-Type: multipart/mixed; "; 

       $headers  .= "boundary=".$num."\r\n"; 

       $headers  .= "--$num\r\n"; 
 

        // This two steps to help avoid spam    
 

       $headers .= "Message-ID: <".$now." TheSystem@".$_SERVER['SERVER_NAME'].">\r\n"; 

       $headers .= "X-Mailer: PHP 5".phpversion()."\r\n";          
 

        // With message 
 

    $headers .= "Content-Type: text/html; charset=iso-8859-1\r\n"; 

    $headers .= "Content-Transfer-Encoding: 8bit\r\n"; 

    $headers .= "".$message."\n"; 

    $headers .= "--".$num."\n";  
 

    // Attachment headers 

    $headers  .= "Content-Type:".$filetype." "; 

    $headers  .= "name=\"".$filename."\"r\n"; 

    $headers  .= "Content-Transfer-Encoding: base64\r\n"; 

    $headers  .= "Content-Disposition: attachment; "; 

    $headers  .= "filename=\"".$fileloc."\"\r\n\n"; 

    $headers  .= "".$file."\r\n"; 

    $headers  .= "--".$num."--"; 

    

   // SEND MAIL 

    

   @mail($to, $subject, $message, $headers); 

   fclose($fp); 

   echo '<font style="font-family:Verdana, Arial; font-size:11px; color:#333333; font-weight:bold">Attachment has been sent Successfully.<br /></font>'; 
 

} 
 

else 
 

    { 

echo '<font style="font-family:Verdana, Arial; font-size:11px; color:#F3363F; font-weight:bold">Wrong file format. Mail was not sent.</font>'; 
 

        //echo "<script>window.location.href='somewhere.html';</script>"; 
 

    } 

?>

Open in new window

0
 

Author Comment

by:Kashyap Makadia
Comment Utility
Dear

I want solution in the Asp.Net

My Code is works fine but not form local when McAfee installed

When I send mail form my local IIS 5.1 SMTP which is not blocked.
0
 
LVL 23

Accepted Solution

by:
ComputerTechie earned 125 total points
Comment Utility
Ah ok I missed that part. Let me know if this test works.

CT
 
<%@ Import Namespace="System.Web.Mail" %>

<script language="c#" runat="server"> 
 

private void btnSend_Click(object sender, System.EventArgs e) 
 

{                                                 
 

    MailMessage msg = new MailMessage();

  
 

    msg.To = txtTo.Text; 
 

    msg.From = txtFrom.Text; 
 

    msg.Subject = txtSubject.Text; 
 

    msg.Body = txtContent.Value;

    lblStatus.Text = "Sending...";

                                              
 

    SmtpMail.Send(msg); 
 

    lblStatus.Text = "Sent email (" + txtSubject.Text + ") to " +txtTo.Text;                                          
 

} 
 

</script>  
 

<html> 
 

<body> 
 

    <h3> 
 

        Email From ASP.NET</h3> 
 

    <form id="MailForm" method="post" runat="server"> 
 

        <asp:Label ID="Label1" Style="left: 100px; position: absolute; top: 100px" runat="server">From:    
 

        </asp:Label> 
 

        <asp:TextBox ID="txtFrom" Style="left: 200px; position: absolute; top: 100px" 
 

          runat="server"></asp:TextBox> 
 

        <asp:RequiredFieldValidator ID="FromValidator1" Style="left: 100px; position: absolute; 
 

            top: 375px" runat="server" ErrorMessage="Please Enter the Email From." Width="200px" 
 

            Height="23px" ControlToValidate="txtFrom"></asp:RequiredFieldValidator> 
 

        <asp:RegularExpressionValidator ID="FromValidator2" Style="left: 100px; position: absolute; 
 

            top: 400px" runat="server" ErrorMessage="Please Enter a Valid From Email address" 
 

            ControlToValidate="txtFrom" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+) 
 

            *"></asp:RegularExpressionValidator> 
 

        <asp:Label ID="Label2" Style="left: 100px; position: absolute; top: 125px" runat="server">To:  
 

        </asp:Label> 
 

        <asp:TextBox ID="txtTo" Style="left: 200px; position: absolute; top: 125px" 
 

          runat="server"></asp:TextBox> 
 

        <asp:RequiredFieldValidator ID="ToValidator1" Style="left: 100px; position: absolute; 
 

            top: 425px" runat="server" ErrorMessage="Please Enter the Email To." Width="200px" 
 

            Height="23px" ControlToValidate="txtTo"></asp:RequiredFieldValidator> 
 

        <asp:RegularExpressionValidator ID="ToValidator2" Style="left: 100px; position: absolute; 
 

            top: 450px" runat="server" ErrorMessage="Please Enter a Valid To Email address" 
 

            ControlToValidate="txtTo" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+) 
 

            *"></asp:RegularExpressionValidator> 
 

        <asp:Label ID="Label3" Style="left: 100px; position: absolute; top: 150px" 
 

          runat="server">Subject</asp:Label> 
 

        <asp:TextBox ID="txtSubject" Style="left: 200px; position: absolute; top: 150px" 
 

            runat="server"></asp:TextBox> 
 

        <asp:Label ID="Label4" Style="left: 100px; position: absolute; top: 175px" runat="server">Mail: 
 

        </asp:Label> 
 

        <textarea runat="server" id="txtContent" style="left: 200px; width: 400px; position: absolute; 
 

            top: 175px; height: 125px" rows="7" cols="24"> 
 

                </textarea> 
 

        <asp:Button ID="btnSend" Style="left: 200px; position: absolute; top: 350px" runat="server" 
 

            Text="Send" OnClick="btnSend_Click"></asp:Button> 
 

        <asp:Label ID="lblStatus" Style="left: 250px; position: absolute; top: 350px" runat="server">  
 

        </asp:Label> 
 

    </form> 
 

</body> 
 

</html>

Open in new window

0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:Kashyap Makadia
Comment Utility
There is no error returns

it displays that mail sent successfully

but mail is not received.
0
 
LVL 23

Expert Comment

by:ComputerTechie
Comment Utility
It seem you antivirus is blocking local email too. check it to see if there is a a setting that opens up local request.
I will do more research on this.

CT
0
 
LVL 23

Expert Comment

by:ComputerTechie
Comment Utility
Ah check this setting.

https://kc.mcafee.com/corporate/index?page=content&id=KB54134

Solution
To enable HTTP response inspection:

Launch the IntruShield Manager.
In the left hand pane, open Sensors.
Select the Sensor to configure, click Advanced, then click the HTTP Response Settings tab.
Choose a Sensor port to configure in the drop-down list.
For each Sensor port, select Inbound or Outbound  to choose the direction in which HTTP response packets will be inspected.
Select Apply to confirm the changes.

CT
0
 

Author Comment

by:Kashyap Makadia
Comment Utility
Hi ComputerTechie

You tried very well but I didn't get any solution.

Thank you very much.
0
 

Expert Comment

by:knappkin
Comment Utility
Have you tried to telnet to your SMTP server from the box in question?  Ie: telnet yoursmtpserverip:25  This would allow you to quickly test if it is a Access Control Rule still blocking you or if it something else.
0
 

Author Comment

by:Kashyap Makadia
Comment Utility
Dear its done
but i need to stop three mcafee servuces
1)Access Protection
2)Buffer Overflow Protection
3)On-Delivery Email Scanner
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Junk folder 23 108
antivirus on mac 8 63
Virus Kronos 4 62
Mutually exclusive checkbox in a gridview 18 40
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Hello Friends, My friends and relatives always ask me how to delete all the various types of emails at once in our g-mail  or windows live account.  So I researched this topic to find a unique solution to this query.  Here it is for those who do …
This video discusses moving either the default database or any database to a new volume.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now