HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Connecting to imap/pop3 available inside LAN not over Internet (http://www.howtoforge.com/forums/showthread.php?t=59735)

enmi 29th November 2012 11:11

Connecting to imap/pop3 available inside LAN not over Internet
 
Hi, i have the following setup, A ispconfig server located behind a pfsense router. I have port forwarded the following ports from the wan to the ispconfig server:


tcp 80
tcp 21
tcp 143
tcp 110
tcp 465
tcp 443
tcp 53 (tcp/udp)
tcp 993
tcp 995

My webpage shows but my email-client cant retrieve emails when I'm "mobile" only when I'm on the LAN,

In the text i have replaced my actual domain name with "example.com"

I get the following result when i dig @ns1.loopia.se example.com MX
Code:

; <<>> DiG 9.3.2 <<>> @ns1.loopia.se olandicum.se MX
 ; (1 server found)
 ;; global options:  printcmd
 ;; Got answer:
 ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35337
 ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
 
 ;; QUESTION SECTION:
 ;example.com.                        IN        MX
 
 ;; ANSWER SECTION:
 example.com.                600        IN        MX        10 mail.example.com.
 
 ;; Query time: 43 msec
 ;; SERVER: 93.188.0.20#53(93.188.0.20)
 ;; WHEN: Thu Nov 29 10:16:44 2012
 ;; MSG SIZE  rcvd: 51

the ns1.loopia.se is the nameserver of my domain name provider

so it seems the mx record is ok, and the portforwarding is ok. the firewalls both on Wan and the ispconfig server have the right ports open.

The dns setup on the ispconfig server is:
Code:


        A        mail        192.168.80.50        0       
        A        ns1        192.168.80.50        0       
        A        example.com.        192.168.80.50        0       
        A        www        192.168.80.50        0       
        MX        example.com.        mail.example.com.        10       
        NS        example.com.        ns1.example.com        0       
        NS        example.com.        ns2.loopia.se.        0

An idea i got was about the setup of the LAN dhcp and the pfsense nameserver.

so for my ispconfig server the ifcfg-eth0 is:

Code:

DEVICE=eth0
BOOTPROTO=none
NM_CONTROLLED=yes
ONBOOT=yes
TYPE=Ethernet
IPADDR=192.168.80.50
PREFIX=24
GATEWAY=192.168.80.1
DNS1=192.168.80.50
DNS2=192.168.80.1
DOMAIN=enmi.me
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
NETMASK=255.255.255.0
USERCTL=no

and the dhcp server leases addresses where dns-server 192.168.80.50 and 192.168.80.1 is specified.

when i try to connect to "mail.example.com" from my smartphone, its not available.

So for starters i cant retrieve mail from my server either by imap or pop3, when im outside the firewall/router LAN. I also cant send by smtp, (this is probably because my ISP only allows its own stmp-server on port 25 so i will test running smtp/s at port 465 instead, is it enough to edit /etc/postfix/master.cf and uncommenting the following line:

smtps inet n - n - - smtpd

and do a postfix reload or do i have to make any other changes in the setup?

Hope you understand my dilemma, my priority is the imap/pop3 retrival.

by the way where do you check if the ssl is activated for pop3/s or imap/s or smtp/s i get a "no valid certificate sometimes even do i haven't specified that a certificate should be used.

Best regards

Mikael


All times are GMT +2. The time now is 08:39.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.