Skip to main content

HOW TO: Set Up and Configure an SMTP Virtual Server in Windows 2000

Install Microsoft Internet Information Services (IIS) and Microsoft SMTP Service
Because Microsoft SMTP Service is a component of Microsoft Internet Information Services (IIS), you must install IIS to use Microsoft SMTP Service. To install IIS and Microsoft SMTP service, follow these steps: 1. Click Start, point to Settings, and then click Control Panel.
2. Double-click Add/Remove Programs.
3. Click Add/Remove Windows Components.
4. In the Windows Components Wizard, click Internet Information Services (IIS), and then click Details.
5. Click to select the following check boxes: • Common Files
• Documentation
• Internet Information Services Snap-In
• Internet Services Manager (HTML)
• SMTP Service
• World Wide Web Server


6. Click OK, and then click Next on the Windows Components page.
7. On the Completing the Windows Components Wizard page, click Finish.
8. Click Close.

Back to the top

Configure the SMTP Virtual Server
When you install Microsoft SMTP Service, a default SMTP virtual server is created to handle basic mail delivery functions. The SMTP virtual server is automatically configured with default settings that enable it to accept local client computer connections and to process messages. You can either accept the default settings or change the SMTP virtual server configuration. You can configure the SMTP virtual server to meet your messaging requirements; this article describes basic configuration and security settings that you may want to consider.

This section includes the following topics: • How to assign an Internet Protocol (IP) address.
• How to configure the default domain.
• How to enable transaction logging.
• How to set relay restrictions.
• How to set up a smart host.

How to Assign an IP Address
To assign an IP address to your SMTP virtual server, follow these steps: 1. Click Start, point to Programs, point to Administrative Tools, and then click Internet Services Manager.

Alternatively, start the IIS snap-in.
2. Right-click Default SMTP Virtual Server, and then click Properties.
3. Click the General tab. • If you want the SMTP virtual server to respond to connection requests for all IP addresses that are configured on the computer, click (All Unassigned). This is the default setting.
• If you want to assign a specific IP address to the SMTP virtual server, click the IP address that you want to use in the IP address box.
• If you want to assign additional IP addresses to the virtual server, follow these steps: a. Click Advanced, and then click Add.
b. Specify the IP address and the Transmission Control Protocol (TCP) port number.

NOTE: The default TCP port is 25.
c. Click OK, and then click OK.


4. Click OK.

How to Configure the Default Domain
SMTP virtual servers must have one local default domain. The default domain is used to stamp messages from addresses that do not contain a domain. By default, the name that you specify on the Network Identification tab of the System tool in Control Panel is used as the default domain name.

All incoming mail messages that are designated for the default domain are placed in the Drop folder. By default, the Drop folder is located in the Inetpub\Mailroot folder.

To change the location of the Drop folder, follow these steps: 1. Click Start, point to Programs, point to Administrative Tools, and then click Internet Services Manager.

Alternatively, start the IIS snap-in.
2. Double-click Default SMTP Virtual Server, and then click Domains.
3. Right-click the default domain, and then click Properties.
4. Click Browse, locate a folder that you want to use for your Drop folder, and then click OK.

NOTE: You must place the Drop folder in a folder on the local computer on which Microsoft SMTP Service is installed.
5. Click OK.

How to Enable Transaction Logging
Log files keep a record of all of the messages that are received and sent on your computer. To turn on logging, follow these steps: 1. Click Start, point to Programs, point to Administrative Tools, and then click Internet Services Manager.

Alternatively, start the IIS snap-in.
2. Right-click Default SMTP Virtual Server, and then click Properties.
3. Click the General tab.
4. Click to select the Enable logging check box.
5. In the Active log format box, click the log format in which you want to record information. The default log format is W3C Extended Log File Format.
6. Click Properties.
7. Specify the settings that you want to use. You can specify settings to include log time period and the location and the name of the log file.
8. Click OK, and then click OK.

How to Set Relay Restrictions
By default, all computers are denied relay access. Microsoft SMTP Service does not allow computers to relay unwanted mail through the virtual server. Also, all computers are denied relay access except those that meet the authentication requirements that are specified in the Authentication box on the Access tab, by default. If your virtual server is on the Internet, it is not recommended that you grant relay access. If you do so, unsolicited mail may be propagated.

To grant or deny permissions to relay messages through the SMTP virtual server, follow these steps: 1. Click Start, point to Programs, point to Administrative Tools, and then click Internet Services Manager.

Alternatively, start the IIS snap-in.
2. Right-click Default SMTP Virtual Server, and then click Properties.
3. Click the Access tab.
4. Under Relay restrictions, click Relay.
5. Do one of the following steps: • Click Only the list below.

-or-
• Click All except the list below.

6. Click Add.
7. Click the settings that you want to use, add the computers, the group of computers, or the domain that you want to specify as exceptions to the access setting that you selected in step 6, and then click OK three times.

How to Set Up a Smart Host
If you want to designate another SMTP server to handle all outgoing messages, you can set up a smart host to perform this task. After you set up the smart host, all outgoing messages that are designated for remote domains are routed through it.

To configure a smart host, follow these steps: 1. Click Start, point to Programs, point to Administrative Tools, and then click Internet Services Manager.

Alternatively, start the IIS snap-in.
2. Right-click Default SMTP Virtual Server, and then click Properties.
3. Click the Delivery tab, and then click Advanced.
4. In the Smart host box, type either the fully qualified domain name (FQDN) or the IP address of the smart host server.

If you type an IP address, enclose the address in brackets (for example, [192.168.188.228]). When you do so, you can increase performance because Microsoft SMTP Service does not perform name resolution.
5. If you want Microsoft SMTP Service to attempt to deliver the remote messages directly before it forwards them to the smart host, click to select the Attempt to direct delivery before sending to smart host check box. By default, this check box is not selected.
6. Click OK, and then click OK.

Back to the top

Troubleshooting
Issue: Messages are not sent to the Drop folder.

This issue can occur because of either of the following conditions: • The path to the Drop folder is incorrect.

To troubleshoot this issue, follow these steps: 1. Click Start, point to Programs, point to Administrative Tools, and then click Internet Services Manager.

Alternatively, start the IIS snap-in.
2. Double-click Default SMTP Virtual Server, and then click Domains.
3. Right-click the default domain, and then click Properties.
4. In the Drop directory box, verify that the path to the Drop folder is valid.

• Either the Drop folder or the hard disk in which the Drop folder is located is full.

To troubleshoot this issue, free hard disk space in either the Drop folder or on the hard disk in which the Drop folder is located.For additional information about how to troubleshoot Microsoft SMTP Service, click the article number below to view the article in the Microsoft Knowledge Base:
297954 (http://support.microsoft.com/kb/297954/EN-US/) HOW TO: Troubleshoot the Web Server in Windows 2000
For additional information about how to test Microsoft SMTP Service, click the article number below to view the article in the Microsoft Knowledge Base:
286421 (http://support.microsoft.com/kb/286421/EN-US/) HOWTO: Test Windows 2000 IIS SMTP Services Manually

Comments

Popular posts from this blog

URL Rewritting

http://www.simple-talk.com/dotnet/asp.net/a-complete-url-rewriting-solution-for-asp.net-2.0/ http://msdn.microsoft.com/en-us/library/ms972974.aspx URL Rewriting in ASP.NET Summary: Examines how to perform dynamic URL rewriting with Microsoft ASP.NET. URL rewriting is the process of intercepting an incoming Web request and automatically redirecting it to a different URL. Discusses the various techniques for implementing URL rewriting, and examines real-world scenarios of URL rewriting. (31 printed pages) Download the source code for this article. Contents Introduction Common Uses of URL Rewriting What Happens When a Request Reaches IIS Implementing URL Rewriting Building a URL Rewriting Engine Performing Simple URL Rewriting with the URL Rewriting Engine Creating Truly "Hackable" URLs Conclusion Related Books Introduction Take a moment to look at some of the URLs on your website. Do you find URLs like http://yoursite.com/info/dispEmployeeInfo.aspx?EmpID=459-099&type=summ...

SEND A PDF FILE AS AN ATTACHEMENT OF MAIL!

System.Net.Mail.MailMessage m1 = new System.Net.Mail.MailMessage(); m1.From = "manpreet@gmail.com" m1.Subject = "Test mail "; m1.Body = str.ToString(); m1.IsBodyHtml = true; m1.To.Add("jasdeep@gmail.com"); m1.CC.Add("jasdeep123@gmail.com"); m1.Attachments.Add(new Attachment(strserverpath + @"\pdf\" + PdfFileName)); smtp.Send(m1);

Sql Server Tips

IF WE WANT TO SELECT  TOP N ROWS  FROM A TABLE ,  WE USE THE FETCH NEXT  SELECT    * FROM  table1   ---//First m rows ignore first n rows ORDER BY id OFFSET n ROWS FETCH NEXT m ROWS ONLY if n=0, m=10 then first  10 rows if n=10, m=10 then first  10 rows start from 11th row Row_number()   SELECT  ROW_NUMBER() OVER(order by db.id) Insertion Simultaneouly in temp table with output clause DECLARE @table1 table (   Id int,   name nvarchar(50) ); DECLARE @table2 table (  Id int,  name nvarchar(50) ); INSERT INTO @table2 OUTPUT INSERTED.*   INTO @table1   select top 10 id, name  from FinalTable SELECT * FROM @table2; SELECT * FROM @table1;