IMAP/SMTP Issue with Exim and Dovecot

Discussion in 'Server Operation' started by zimmer, Jan 3, 2020.

Tags:
  1. zimmer

    zimmer New Member

    Hello,
    I'm facing issue with IMAP/SMTP and it's very strange that I can't access my e-mail from my mail app. Well, the problem is that when I'm on wi-fi it's working for 5-10 mins and then stops, but when I'm switching to Cellular Data then it doesn't work at all. All what I noticed is that when I'm on wi-fi I'm getting real IP like this :
    Code:
    imap-login: Info: Login: user=<[email protected]> method=PLAIN, rip=90.100.234.61, lip=90.100.234.15, mpid=1581, secured,
    but when I'm on Cellular Data I'm getting this :
    Code:
    imap-login: Info: Login: user=<[email protected]> method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=1581, secured,
    I've checked everything from iptables to fail2ban but I'm sure that it's not the issue. something wrong with configuration of exim and dovecot :(
    Does anyone have any ideas?

    Thanks
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You wrote in topic "Issue with Exim and Dovecot", but it looks more like an issue with network settings.
    Where is your e-mail server in relation to your workstation where you try to access it? Is it perhaps in the same local network with the WiFI?
    Which e-mail app is that?
    Does your Internet connection work both with WiFI and Cellular, it is just this accessing e-mail server that does not work?
    You wrote it works a while and then stops. How exactly do you know it is working? How do you know it has stopped working?
     
  3. zimmer

    zimmer New Member

    Sorry I forgot to add details :( ..
    I'm running it on VPS, Centos 7 server with fixed global IP + DNS + Reverse DNS.. from mail-test.com I'm getting 10/10 so basically mail server works fine except mail application. By mail application, I mean integrated iPhone mail app.
    From the beginning, I thought it was a network issue, that I messed up somewhere with fail2ban but when I checked iptables -n -L and I didn't find my ip there, even more, I thought maybe range of my ip was blocked but no :( .. so I decided to stop service iptables and fail2ban, but it didn't help, same issue, again and again. And the most mysterious is that I can't find any error, or fail message not even in dovecon or in exim.
    So, how I know that it works on wifi? cuz when I'm using working wi-fi it works great I can receive and send mails .
    But I'm facing the same problem at home with wi-fi.
    I'm stuck now :( dunno what to do next.
     
  4. Steini86

    Steini86 Active Member

    Do you use a VPN? Your own DNS settings (on iPhone)? It look like a client issue, not a server issue.
    When you get a log entry on the server, then the connection works. RIP=LIP=127.0.0.1 looks like you use a proxy on the server or a webmail application. On your first log, your two IPs are both DSL/Dialup from Paris. This is not a static IP and both of them are in the same network.... I would not recommend that ;)
     
  5. zimmer

    zimmer New Member

    Oh, that’s awesome thought!!I’m not using VPn but I’m using apache + nginix so maybe nginix is messing something. I’ll check it today and get back to you soon.
    But one more strange point is why it’s not working at my home wifi. At home I have FTTH with fixed global IP. :( but I didn’t check logs from home, so that’s what I’ll do as well.
    Thanks for idea ;)
     
  6. Steini86

    Steini86 Active Member

    Somehow what you are telling is very confusing. I do not understand your setup, I think I cannot help anymore. What does apache+nginx have to do with your mail setup? Are you using a webmail client? Or your mobile phone? Does it work from a computer? What do which logs say? All very confusing, sorry..
     
    zimmer likes this.
  7. zimmer

    zimmer New Member

    Sorry for confusing you ) .. you're right apache is not related to my problem at all.
    But your idea moved me forward to re-check once again FW on server-side and I found that Fail2Ban is blocking permanently IP's with ban_time = -1 and stores IP's to separate file where after restart it'll read it from there and puts back to the jail.. Dunno if it's a good idea or not but I found that it's blocking my Ip's as well but only for specific ports only.

    Thanks everyone for help ;)
     

Share This Page