Ispconfig postfix e-mail routing for specific destination domain

Discussion in 'Server Operation' started by gkoo, Sep 30, 2014.

  1. gkoo

    gkoo New Member

    Dear howtoforge members,

    We have had an unpleasant situation where one of our customer's emails was hacked and they've sent spam to various yahoo and gmail addresses. The issue has been fixed and yahoo has lifted the ban. Unfortunately certain gmail servers still block us and there's no way to contact them in order to fix the issue.

    It seems that our IP is banned so i was wondering if there is an easy way to forward all the e-mail that our users are sending to gmail.com domain through another SMTP server. Is this something that Advanced Routing in IspConfig3 can handle without creating an open relay ?

    We also have a secondary IP address available on our server which has never been used to send e-mails. Can we direct messages sent to certain domains to exit postfix through this address ?

    Thank you,
    GKoo
     
  2. gkoo

    gkoo New Member

    In order to reply to my own question, maybe it will be of help for others:

    In IspConfig3 under Email -> Global Filters / Relay Recipients i've added an entry as follows:

    Server: my current server
    Recipient address: @gmail.com

    This enables the relay of e-mails on the local postfix server to the gmail.com domain.

    Now under E-mail Routing -> Add New Transport i've added the following:

    Server: my current server
    Domain: here you have 2 options. 1 you can enter gmail.com and all e-mail to gmail will be redirected through the server mentioned below. You can also add individual addresses such as [email protected] in order to transport only e-mails to certain addresses through the secondary server. In my case this was better as i've only faced problems when sending to certain gmail addresses not all of them.
    Type: smtp
    No MX lookup
    Destination: secondary postfix server

    As a final note double check your smtpd_recipient_restrictions in postfix. Also make sure you protect your server against brute force attacks on sasl_auth using fail2ban.

    In the end i want to ask if there is a mechanism in IspConfig 3 to limit the number of outbound e-mails per user/domain.

    Thanks
     
  3. sergiocambra

    sergiocambra New Member

    I had this setting but I realized my server became an open relay. Are you sure your server is not open relay with that setting? What is your recipient restrictions?

    Thanks
     

Share This Page