A brief search of this forum will get you several posts that describe port-forwarding setup that will do what you want, though they might not actually mention your particular port numbers.
Even though your Linux server is connected between two Private Internets, the scheme is pretty simple:
1. When SMTP or IMAP packets arrive from the 10.0.0.x network, you need to tell the Linux machine to send them onto the 192.168.1.x subnet, even though that machine does not normally allow traffic between those two networks. To do this, you need
port-forwarding specified in iptables, thus:
Code:
#iptables -t nat -A PREROUTING -p tcp -d 10.0.0.1 --dport 25 -j DNAT --to-destination 192.168.1.1:25
#iptables -t nat -A PREROUTING -p tcp -d 10.0.0.1 --dport 143 -j DNAT --to-destination 192.168.1.1:143
This tells the boundary machine what to do with this traffic. Then, if your other rules prevent forwarding between the two sides of this boundary machine (the normal case), you need to permit these packets to be forwarded:
Code:
#iptables -A FORWARD -p tcp -m multiport --dports 25,143 -j ACCEPT
Finally, you may need to turn IP forwarding on the boundary machine. I am not sure exactly how you make that permanent on a Debian machine, but I am certain that Google will tell you: you need to set a kernel flag thus:
Code:
# echo 1 > /proc/sys/net/ipv4/ip_forward
If this value is 0, no forwarding will occur, regardless of how many rules you put into the iptables FORWARD chain.
HTH