Posts by Nuxwin

    TheCry


    So, basically, you have something like:


    Mail send by your i-MSCP postfix:

    Code
    1. FROM service@domain-1.tld
    2. TO thecry@gmx.de

    Response from the relay:

    Code
    1. Mar 12 17:28:22 mailgw postfix/smtp[2522]: 9F9481F540: to=<thecry@gmx.de>, relay=mail03.domain-1.tld[***.***.***.***]:25, delay=0.67, delays=0.13/0.02/0.44/0.06, dsn=5.0.0, status=bounced (host mail03.domain-1.tld[***.***.***.***] said: 550 #5.1.0 Address rejected. (in reply to RCPT TO command))

    Well, is the relay configured to accept to relay mail from your Postfix server? Basically put, there are two schools here:

    1. The relay server should accept to relay mails coming from your i-MSCP Postfix server without SASL authentication. This is done by accepting to relay any mail from your i-MSP postfix server IP addresse. I don't recommend that method unless the relay server is on the same network. Also, this is not based on sender domain... and thus, that don't fit with your requirements unless if you setup proper transport map on i-MSCP postfix server.
    2. You provide an SASL authentication sender map for various relays. This is what you tried to do. See https://gist.github.com/zmwangx/2c56aa32be68daf48c2f for more details.

    First option has to be applied on relay server side while second option has to be applied on i-MSCP postfix server side.


    Finally, with the second option, you should have something like:


    /etc/postfix/main.cf

    /etc/postfix/sasl_passwd:

    Code
    1. [mail03.domain-1.tld]:587 service@domain-1.tld:<password>
    2. [mail20.domain-2.tld]:587 service@domain-2.tld:<password>
    3. [mail10.domain-3.tld]:587 service@domain-3.tld:<password>

    /etc/postfix/sender_relay:

    Code
    1. @domain-1.tld mail03.domain-1.tld
    2. @domain-2.tld mail20.domain-2.tld
    3. @domain-3.tld mail10.domain-3.tld

    Note that with the above configuration, the service mail accounts must exist in their respective relay, with a working SALS authentication. Then the i-MSCP Postfix server will select the relay according the sender domain, authenticate using the provided service mail account, and because that mail account is allowed to send mail from the relay, this should works as expected.


    Note also the use of port 587 instead of default port 25. Port 587 is more appropriate there. It is the submission port. When Postfix send mail to the relay servers, it acts like a mail client.

    crafter don't worry, i changed both the domain name and some random characters in the password string(s)

    I've already read that post, i understood some parts of it but not totaly, and i'm a bit afraid to test it on production servers and break something.

    I'm not afraid to admit that creating such a script and actually not f***ing up both installations is a bit above my technical skills, anyone care to help me with this ? For a fair price of course, nothing good in this world is free ^^

    I can do the work. See https://i-mscp.net/wcf/user/650-nuxwin/ for the price (Online support for common tasks such as debugging, patching).

    Good evening,


    As suggested by crafter best would be to create an importer script which would fetch accounts from the old database and insert them into the new database. This require to make the old database reacheable from TCP for a while and run the script from the new server. Basically put, you need mimic the i-MSCP behavior for mail account creation.


    Note that doing such a work through PhpMyAdmin is really not recommended.

    TheCry


    Mar 12 17:28:22 mailgw postfix/smtp[2522]: 9F9481F540: to=<thecry@my-domain.tld>, relay=mail03.domain-1.tld[***.***.***.***]:25, delay=0.67, delays=0.13/0.02/0.44/0.06, dsn=5.0.0, status=bounced (host mail03.domain-1.tld[***.***.***.***] said: 550 #5.1.0 Address rejected. (in reply to RCPT TO command))

    Well, if the thecry@my-domain.tld mail account (recipient) is not known from the relay server, that's normal that it get rejected. The point is: Do you want relay any mail sent to *@my-domain.tld through mail03.domain-1.tld, or just those for the service@my-domain.tld mail account?


    Let's imagine the following scenario:

    1. You create thecry@my-domain.tld mail account through i-MSCP frontEnd (What you've done I think)
    2. You send a mail to thecry@my-domain.tld
    3. Because postfix is configured to relay all mails for @my-domain.tld through mail03.domain-1.tld, that last will be selected as relay server

    Problem:


    If the mail03.domain-1.tld relay server does accept only some specific recipients for that the my-domain.tld, it will reject unknown recipients. Basically put, the relay server needs to known recipient for the my-domain.tld domain.

    Try these two ways, but the problem appears when the installation process attempts to configure user permissions on the database engine

    SQL user permissions? It could be great if you provide us with exact error messages. I will give a try anyway, providing dedicated i-MSCP server adapter if needed.

    vafecitos


    Good evening,


    What's your intent? Having MaxCale proxy installed on your i-MSCP instance, and one or more database servers installed elsewhere? Then, i-MSCP would send SQL statements to MaxScale which would be forwared to real database server?


    Please provide us with more details.