I'm using a FortiGate FGT-60D firewall (V 5.0) and I configured a local mailserver (192.168.40.20) for my e-mail traffic. For this purpose I set up a MX record for my domains pointing to my external IP (connected to WAN1 of my firewall). I also defined a so-called 'Virtual IP' which forwards from external IP address/range 0.0.0.0 to internal ip address/range 192.168.40.20, protocol TCP and external service port 25 mapped to port 25.
Mail gets through correctly, but when I'm viewing my logs, every mail seems to come from 192.168.40.1, which is my firewall. That's a problem when people tries to spam or attack me, because I can't block that address. When my mailserver does, no more mail is received.
I guess there's a setting in my firewall for the original sender's IP address being passed to the mailserver, but I can't find it right now.
Any experts? :)