Author Topic: SMTP and webmail on same server  (Read 4311 times)

Offline MHz

  • Newbie
  • *
  • Posts: 3
SMTP and webmail on same server
« on: September 18, 2009, 08:24:47 AM »
Hi all,

I have a mailserver with fail2ban on it. Some days ago I installed apache and roundcube webmail. It works fine, but when there are f.e. 5 failed logins fail2ban tries to ban the external IP, but because the request is coming from the webserver that is on the same server as my SMTP server, it bans its own external IP/ is there any way that roundcube could send out the external client IP, so that the connecting cliënt gets banned? I just dont want to host my webmail elsewhere.

Thanks!

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
SMTP and webmail on same server
« Reply #1 on: September 19, 2009, 12:52:52 AM »
Download myroundcube @ myroundcube - Project Hosting on Google Code. Look at "dblog' plugin. It is not what you are looking for, but it shows you how to manipulate the logs. So it should be easy to create specific log entries for fail2ban.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline MHz

  • Newbie
  • *
  • Posts: 3
SMTP and webmail on same server
« Reply #2 on: September 19, 2009, 10:16:39 AM »
Thanks for your help. I haven't been able to find that plugin. However, I came acros this one: RoundCube Fail2Ban Plugin – Matt Rude . Does this plugin do what I want: Block the external IP of the client that is connecting and not it's own external IP? Thanks!

Offline mdr

  • Jr. Member
  • **
  • Posts: 12
SMTP and webmail on same server
« Reply #3 on: September 19, 2009, 12:33:10 PM »
Correct, the RoundCube Fail2Ban Plugin will output the offenders IP address to your logs so Fail2ban will block the correct IP address and not your webservers.    you may want to white list your RoundCube/Email server's IP so you don't get locked out.

-Matt Rude
« Last Edit: September 19, 2009, 02:01:04 PM by mdr »

Offline MHz

  • Newbie
  • *
  • Posts: 3
SMTP and webmail on same server
« Reply #4 on: September 19, 2009, 03:24:59 PM »
Thank you! This works like a charm!

Offline mdr

  • Jr. Member
  • **
  • Posts: 12
SMTP and webmail on same server
« Reply #5 on: September 19, 2009, 08:21:01 PM »
Wonderful, im glad it works well for you:)