Problem with the mail server/mx/ip

  • Hello evryone!


    For the last few months I have the surprise that my server is listed in CBL. After a few investigations, I saw that despite that every domain is hosted on his dedicated IP address, everyone is sending mail from the default IP (the one iMSCP is using for default).
    To be more exactly, let's say that the server has 3 public IP addresses IP1 IP2 IP3, every one has a domain. IP1 is also the default imscp address.
    If the domain hosted on IP2 is doing something bad, like spam, despite his own MX/IP address, he send mail from IP1. Unfortunately all other domains are blacklisted.


    Below I'll attached a part of the email header that can give you a better view of the issue. In this case, domeniu.tld is not linked to IP1-DEFAULT but the mail was sent from this address.


    ....
    Received: from server4.domeniu.tld (server4.domeniu.tld. [IP1-DEFAULT])
    by mx.google.com with ESMTP id g10si14964610pay.56.2013.01.21.11.18.23;
    Mon, 21 Jan 2013 11:18:24 -0800 (PST)
    Received-SPF: pass (google.com: domain of [email protected] designates IP1-DEFAULT as permitted sender) client-ip=IP1-DEFAULT;
    Authentication-Results: mx.google.com;
    spf=pass (google.com: domain of [email protected] designates IP1-DEFAULT as permitted sender) [email protected]
    ....


    I wonder if there is a solution to fix this, so that if a domain/client is making spam, the rest of the domains are not affected by blacklisting.


    Thanks!

  • You'd have to configure your mail transfer agent (Postfix?) so that it sends mail for client A via the network address of client A.

  • Thanks for the answer. Probably must be something like this in the postfix main.cf
    smtp_bind_address = $IP , where ip is the one used by the MX in the dns zone, ex the ip who answer on mail.domain-example.tld.


    I'm quite sure that someone is using a spammy newsletter to "improve" his business. It would be a good idea to throttle so somehow the mail server to a max number of mails/hour on each domain/ip.


    Returning to the issue, how to solve smtp_bind_address = $IP :)
    Thanks!

  • Hello ;


    See the sender_dependent_default_transport_maps parameter.
    Sorry, french here: https://admin-serv.net/blog/62…-du-domaine-de-lemetteur/

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

    Edited once, last by Nuxwin ().

  • Hmm, where do I find this input? In main.cf and master.cf there isn't any line that looks like that.


    Later edit: OK, now I see...

    Edited once, last by Delta04 ().


  • Hmm, where do I find this input? In main.cf and master.cf there isn't any line that looks like that.


    Re ;


    Sure, you must add them. Look at the howto (french link).


    I can add such config as addon if you want.


    Thank you for using i-MSCP.[hr]Also:


    Any ip set for the smtp_bind_address must have a correct PTR


    For instance


    host.domain.tld ---> 192.168.5.110
    192.168.5.110 ---> host.domain.tld (Reverse DNS)


    http://www.faqforge.com/tag/smtp_bind_address/


    You must note that if you follow the howto (french link), you will have many smtp instances.


    I'll try such configuration and provide an addon if it's ok.


    Thank you for using i-MSCP.


    [hr]


    http://www.kutukupret.com/2010…ated-outgoing-ip-address/


    https://www.benjaminwiedmann.n…postfix-the-easy-way.html

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

    Edited once, last by Nuxwin ().

  • Yes Nuxwin, I know about reverse DNS / name mail server. It's all OK from this side, only issue is that postfix must use the MX IP address as a sent server.


    I saw the french tutorial and I understand what it's all about but the idea is to integrate somehow in the i-mscp engine not to add manually the ip and hello name for each domain.


    If we figure this out somehow it would be a great idea to implement it in the next version of i-mscp. :)


  • Yes Nuxwin, I know about reverse DNS / name mail server. It's all OK from this side, only issue is that postfix must use the MX IP address as a sent server.


    I saw the french tutorial and I understand what it's all about but the idea is to integrate somehow in the i-mscp engine not to add manually the ip and hello name for each domain.


    If we figure this out somehow it would be a great idea to implement it in the next version of i-mscp. :)


    It's exactly for why I proposed such configuration as addon. ;)


    You can open a ticket if you want.


    Thank you for using i-MSCP.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206