Difference between revisions of "Test System DNS"

From GWAVA Technologies Training
Jump to: navigation, search
(Created page with "At some point, you may need to have different email system talk to each other. So they have to know where each other are. At the simplest level, you can add an entry to each s...")
 
(Sending Mail Between Multiple Test Email Servers)
 
(One intermediate revision by one user not shown)
Line 6: Line 6:
 
*Linux: /etc/hosts
 
*Linux: /etc/hosts
 
And add the IP address followed by the hostname: E.g. 192.168.1.100 exchange.example.com
 
And add the IP address followed by the hostname: E.g. 192.168.1.100 exchange.example.com
 
  
 
==DNS Forward Lookup Zone==
 
==DNS Forward Lookup Zone==
Line 37: Line 36:
 
*Linux: On the command line, type: <code>/etc/init.d/nscd restart</code>, <code>service nscd restart</code>, or <code>service nscd reload</code>
 
*Linux: On the command line, type: <code>/etc/init.d/nscd restart</code>, <code>service nscd restart</code>, or <code>service nscd reload</code>
 
*Window: On the command line, type: <code>ipconfig /flushdns</code>
 
*Window: On the command line, type: <code>ipconfig /flushdns</code>
 +
 +
==Sending Mail Between Multiple Test Email Servers==
 +
Once DNS is setup it becomes easier to simulate more sophisticated systems. Create multiple email servers and set things up so they can talk to each other.
 +
 +
===SMTP===
 +
The SMTP server will need to be configured to allow relaying and anonymous access (but make sure it is not exposed to the internet, spammers are always on the lookout for open relays.)
 +
 +
===Forwarding emails===
 +
Test users can be set to forward mail automatically in the web client.
 +
 +
In Exchange auto-forwarding is disabled by default.
 +
To enable, open an Exchange Management Shell:
 +
Set-RemoteDomain Default –AutoForwardEnabled $true
 +
 +
Powershell cmdlets can be used to forward all incoming message for a user to another address. For example, to create a rule to forward all mail to internal user "test0" to an external account at "test0@domain.test" use the following cmdlet:
 +
Set-Mailbox -Identity "test0" -DeliverToMailboxAndForward $true -ForwardingSMTPAddress test0@domain.test
  
 
----
 
----
  
 
Return to [[Retain Training]]
 
Return to [[Retain Training]]

Latest revision as of 19:35, 23 May 2017

At some point, you may need to have different email system talk to each other. So they have to know where each other are. At the simplest level, you can add an entry to each server's hosts file so they know each other exist.

Contents

[edit] Host File

You can edit the hosts files to add the new server:

  • Windows: %SystemRoot%\system32\drivers\etc\hosts
  • Linux: /etc/hosts

And add the IP address followed by the hostname: E.g. 192.168.1.100 exchange.example.com

[edit] DNS Forward Lookup Zone

As your system grows, and it will, wouldn't it be easier if there was only one place you had to change instead of all of them. That is where DNS comes in handy. Since Exchange requires a DNS to be available we might as well use that one. Then as each machine is set up you can set the DNS to go to this one and they are all updated.

On Windows Server 2012 R2, create a Forward Lookup Zone for the new server:

  1. Open DNS manager from Server Manager/Tools or from Start
  2. Open the server
  3. Right-click on Forward Lookup Zones to create a new zone, this will bring up the New Zone Wizard.
  4. Zone Type is Primary zone
  5. Active Directory Zone Replication Scope is To all DNS servers rung on domain controllers in this domain
  6. Zone Name: give it the name of the domain of the receiving email system. E.g. ex13-2.sf.support.gwava.net
  7. Dynamic Update: the default of All only secure dynamic updates is sufficient.
  8. And finish.

Create an A Record:

  1. Right-Click in the zone and select New Host (A or AAAA)...
  2. Name: hostname of the destination server e.g ex13-2srv.sf.support.gwava.net
  3. IP address: IP address of the destination server e.g 10.1.200.215
  4. Press Add Host, Ok that success dialog, and Done

Create an MX Record:

  1. Right-Click in the zone and select New Mail Exchanger (MX)...
  2. Leave Host or child domain blank
  3. Set Fully qualified domain name of mail server: to server hostname and domain e.g. ex13-2srv.sf.support.gwava.net
  4. Click OK

[edit] Flush DNS Cache

Flush the DNS cache on each machine after making changes on the DNS:

  • Linux: On the command line, type: /etc/init.d/nscd restart, service nscd restart, or service nscd reload
  • Window: On the command line, type: ipconfig /flushdns

[edit] Sending Mail Between Multiple Test Email Servers

Once DNS is setup it becomes easier to simulate more sophisticated systems. Create multiple email servers and set things up so they can talk to each other.

[edit] SMTP

The SMTP server will need to be configured to allow relaying and anonymous access (but make sure it is not exposed to the internet, spammers are always on the lookout for open relays.)

[edit] Forwarding emails

Test users can be set to forward mail automatically in the web client.

In Exchange auto-forwarding is disabled by default. To enable, open an Exchange Management Shell:

Set-RemoteDomain Default –AutoForwardEnabled $true

Powershell cmdlets can be used to forward all incoming message for a user to another address. For example, to create a rule to forward all mail to internal user "test0" to an external account at "test0@domain.test" use the following cmdlet:

Set-Mailbox -Identity "test0" -DeliverToMailboxAndForward $true -ForwardingSMTPAddress test0@domain.test

Return to Retain Training

Personal tools
Namespaces

Variants
Actions
Home
Exchange
GroupWise
JAVA
Linux
MTK
Retain
GW Monitoring and Reporting (Redline)
GW Disaster Recovery (Reload)
GW Forensics (Reveal)
GWAVA
Secure Messaging Gateway
GW Mailbox Management (Vertigo)
Windows
Other
User Experience
Toolbox
Languages
Toolbox