Solved

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

Posted on 2009-06-27
11
1,490 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
ID: 24729077
what is the error you are getting and how are your setting the email?

CT
0
 

Author Comment

by:Kashyap Makadia
ID: 24733685
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
ID: 24737109
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:Kashyap Makadia
ID: 24742365
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
ID: 24744370
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
 

Author Comment

by:Kashyap Makadia
ID: 24753940
There is no error returns

it displays that mail sent successfully

but mail is not received.
0
 
LVL 23

Expert Comment

by:ComputerTechie
ID: 24754179
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
ID: 24754263
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
ID: 24760496
Hi ComputerTechie

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

Thank you very much.
0
 

Expert Comment

by:knappkin
ID: 25212992
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
ID: 25213222
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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is Usenet? There are many different opinions on exactly what Usenet is an isn't. Many opinions are incorrect simply out of ignorance. The Wikipedia listing about Usenet does a good job of explaining it, so instead of repeating it all here I wi…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

772 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