This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Help configuring DMZ Mail Server with Web mail

My Network configuration is as follows

The firewall (ASL 4.0) has three NIC's
The first NIC is connected to a Router which connects to the Internet
The second NIC connects to a DMZ
The third NIC connects to the Internal network

I have two public IP's of which one is used as the Mail Server IP. I have a registered sub domain that is used for checking mails. This sub domain has one MX record so that the mails are delivered to my Mail Server.

The Public IP's  are named as External_Mail_Interface and External_Interface

The DMZ consists of a postfix mail server and a machine that runs Symantec Anti Virus for Gateways (AV Server)

My requirements are :
a. The mail server which runs web mail needs to be accessed from the internet as well as from the internal network. Web mail should be accessed from the internet only through the mail IP.
b. All SMTP mails that come in should route through the AV Server. The AV server then delivers all mail to the mail Server after virus scanning. 
c. The AV server should be able to pick up live updates from the internet.
d. The internal network when sending mails should go through the AV Server. The internal network should be allowed POP3 and IMAP to the mail server.

Currently I have pulled the plug on the AV Server. 

My NAT rules are 
a. Source is Internal Network - > Any Destination - > Change Source to External_Int
b. Any Source - > destination is External mail Int - > Change Source to Ext Mail Int - > Change Destination to Mail Server
c. Source is Mail Server -> Any Destination - > Change Source to Ext Mail Int

The packet filter rules in given order are
a. Internal_Network__ - > any - > any -> Allow
b. Any -> Mail_Group -> Mail Server -> Allow
c. Mail Server -> Mail_Group -> Any -> Allow

where Mail_group is HTTP + HTTPS + DNS + SMTP + IMAP + POP3

The above configuration works fine as long as the AV server does not come into the network.

I have tried a lot of things for the last two weeks to route mails through the AV server. At one point I was able to send mails from the Internet through the AV server. But then I was told that the web mail was not working. Hence I rolled back the entire thing.

I need help on setting up the configuration so that the AV server comes up. My questions are

1. What should the NAT rules be changed to, so that the above mentioned requirements are met ? 
2. What should the packet filter rules be ?

Any help is greatfully accepted.

  


This thread was automatically locked due to age.
  • The test message you composed in telnet on the AV server (going to the mail server): Did it get delivered to the chosen mailbox on the mail server??
      
  • No It did not. The mail was lost without a trace.  
  • When you dialoged with the mail server, did you get the "250...OK..." messages? Unplug the mail server at off peak and try it again (i.e., check that you really are talking to the mail server you think you're talking to!).

    If all that checks, then it appears that your mail server is refusing to cooperate (because the IP address you're coming from is wrong??)
      
  • I did get the OK from the mail server. But I am not sure if the response was from the Mail Server or from the SMTP engine of the AV Server. 

    To give you some more information, in my main.cf file of the Mail Server, mynetworks= 10.10.10.0/24, 127.0.0.0/8, 172.26.200.0/24, x.y.z.122

    where
    10.10.10.0 is the DMZ
    172.26.200.0 is the internal network
    x.y.z.122 is the external static ip assigned by the ISP

    the interesting thing here is that the external ip mentioned here is not the ip through which mails are delivered. That Ip is something else altogether (x.y.z.202). I changed this entry to the mail IP and still there was no difference. 

    Is there anything else I need to check out ?  
  • So when you telnet the Mail Server from the AV Server, you are telnetting 10.10.10.whatever?
    And you tried unplugging the Mail Server before you try it one of the times, and find the telnet does not work? (and thus confirm you are dialogging with the mail server)

    If you confirm all that and it's still not delivering the message (in spite of the fact that you are getting OK acknowledgements and no error messages like "relaying not permitted..."), there is something wrong with you mail server configuration.

    You are doing the telnet to the Mail Server from the very same comupter as the AV??
  • I shall do the tests later in the evening and let you know. 

    As you suspect, If I get the message as Relaying Prohibited then what should I change in the Mail Server?  
  • I don't suspect it; I am just trying to come up with any possible explanation as to why the mail server is not delivering the mail. If the message does not get delivered to the box, post the SMTP dialog, using some anonomous sanitizing of the IPs and domain names...
      
  • I did the following tests
    a. telneted from the AV Server to the mail server and sent a mail to local mail box - Mail was delivered successfully
    b. Used the web interface from the internal network and sent a mail locally - Mail was delivered successfully
    c. Using the web interface sent a mail to yahoo - AV Server gave me an error "Message Delivery Failed"
    d. From Yahoo sent a mail to my office Id - AV Server gave me an error "Message Delivery Failed"
    e. Telnet from AV Server to Mail Server and sent a mail to Yahoo - Mail Server replied with queued as xxxx. But the mail was not found in the out queue of the mail server nor did it reach Yahoo.
      
  • I thought you said (a) wasn't happening; good!

    OK; so the problem is your outbound mail (SMTP);
    now we're getting somewhere!

    Does your mail server deliver directly to the Internet, or does it forward outbound mail to the AV server first?
    I asked this previously and got the impression it did not forward outbound mail to the AV server, but now I am beginning to wonder...
        
  • The mail server sends mail out to the Internet. This is how my existing configuration is. I have not changed any config in the mail server. SO I assume that it still sends mail out without looping back to the AV Server. 

    One doubt that I have is - When the mail server sends mail out it is NATted on the Ext Mail Interface. 

    The NAT is as below :

    SeE_MS Any SMTP Ext_Mail_Int (SNAT)

    Now I wonder if that is re-routing the mail back to the AV Server. Is that possible?