Re: Web Server Using Postfix #networking


David Ranch <dranch@...>
 


Hello Don,

Ok.. the Rpi is the email server and your phone is the client. 

What kind of phone?  Android?  iPhone?  When you're trying to have your phone get email from the Rpi, I assume your phone is on your home wifi.



If I use the local lan address for the PI the email client (which is on my phone) everything works fine with ports 25 and 110. If I use w9jun.ampr.org (44.48.210.1), the client doesn't setup.

You didn't provide any DNS test results from your phone which is what matters but assuming your Windows laptop is on the same Wifi network, it seems like you can resolve things.

You have also shown that you can connection to port 465 (smtps) [encrypted smtp] and port 110 (pop3) [non-encrypted pop3].  Technically speaking, you should be fine at this point.  Configure your email client on the phone to use port 465 for SMTP and it should work.  If it MUST have port 25, then try the following in the raspberry pi:

   - run the command:

       netstat -an | grep -e 25 -e 465


I see:
      $ netstat -an | grep -e 25 -e 465
      tcp        0      0 192.168.0.11:465            0.0.0.0:*                   LISTEN
      tcp        0      0 127.0.0.1:465               0.0.0.0:*                   LISTEN
      tcp        0      0 192.168.0.11:25             0.0.0.0:*                   LISTEN
      tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN

What the above shows is that I have both port 465 and 25 listening on IP address 192.168.0.11 and 127.0.0.1.  What you need on your machine to show is 44.48.210.1 and 127.0.0.1.  You would configure that in the /etc/postfix/main.cf file under the inet_interfaces stanza.  It would look like:

   inet_interfaces = 44.48.210.1, localhost

Then run:

   /etc/init.d/postfix restart


and try the "netstat -an | grep -e 25 -e 465" command again.


If I switch to data on my cell I can connect to 25, 465, and 110.

If the testing above was all correct in the first place, all that and be left is a forwarding or filtering issue.  What is the output of the following commands:

   #Should be a 0
   cat /proc/sys/net/ipv4/ip_forward

   sudo /sbin/iptables -L

--David
KI6ZHD

Join RaspberryPi-4-HamRadio@groups.io to automatically receive all group messages.