External mail server function

  • Hi,


    I've found a problem with the external mail server function.


    I've configured i-MSCP to use a external name server and when i set the external mail server this function does not work, because it supposed to use the internal DNS.


    In /etc/postfix/imscp/relay_domains i found correctly the domain desired to redirect, but postfix is not able to relay.


    The /etc/postfix/imscp/transport file is empty and to correctly relay the domain i must to edit this file with, eg:


    Code
    1. example.com smtp:bar.example:2025


    and run


    Code
    1. postmap /etc/postfix/imscp/transport



    It's possible to fix this problem?



    My i-MSCP configuration:


    System: Ubuntu 14.04 (trusty tahr)
    i-MSCP Git 1.1.x Build: 20140915
    Server implementation: Apache/2.4.7 with php5-fpm 5.5.9 , dovecot 2.2.9



    Thank you very much

  • Hello ;


    What you're describing is not a bug...


    When you sets an external MX host for a domain, i-MSCP do the following things:

    • It remove the default MX in the DNS zone file
    • It adds the external MX in the DNS zone file
    • It remove the domain entry from the domain map (postfix)
    • It add the domain entry in the relay_domains map (postfix)


    Then, once it's done, the workflow is as follow:


    If a mail is sent from the i-MSCP server for the domain, postfix relay it through the external MX host (as specified in the DNS zone file). This supposes that the MX host can be resolved.
    If you are using an external DNS server for the domain, you must add the MX record yourself in the DNS zone file using your registrar interface.

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

  • Hi Nuxwin,


    thank you very much for your reply. Sorry, but I don't understand very well...


    How it work it's clear, but if i want to use i-MSCP as spam filter to relay to another mail server, i must to have the mx record that point to the i-MSCP server and not to the real mail server.


    This function, without the name server installed and configured as default DNS on the ethernet, work only with the domains that are hosted by i-MSCP self, but does not work with the others mail servers because they read as MX record the real mail server and not the i-MSCP server


    So, it's this the real function desired to work?


    Thank you very much

  • Re;


    In your previous post, you do not have mentioned that you want use imscp server as spam filter.
    The external server feature is providing a spam filter option. I'll give a try.

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

  • @sport80


    I've checked and the result is: This feature is not supported by i-MSCP.


    By using the external mail feature, you can relay mail to external server or setup an external spam filter server but you cannot use the i-MSCP server as filter and relay to another server. You must so create a ticket for feature request.

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

  • Hi Nuxwin,


    thank you very much for clarification.


    So, with this setting, i-MSCP work only when a valid MX record are alredy defined


    Code
    1. Domain: Setup a DNS MX record to relay mail of your entire domain, including subdomains.
    2. Spam Filter: Setup a DNS MX record to relay mail of your entire domain, including subdomains, but retains our server as final mailhost.
    3. Wildcard: Setup a DNS MX record to relay mail for inexistent subdomains.


    This means that this feature work exactly in a inverse mode that i need, correctly? :P



    Ok, i create a ticket for this request


    Thank you very much

  • Hello Nuxwin,


    I have a question concerning the external mail feature workflow you described here:


    Then, once it's done, the workflow is as follow:


    If a mail is sent from the i-MSCP server for the domain, postfix relay it through the external MX host (as specified in the DNS zone file). This supposes that the MX host can be resolved.
    If you are using an external DNS server for the domain, you must add the MX record yourself in the DNS zone file using your registrar interface.


    If the domain is put into the relay_domains maps than the i-MSCP Server not only relays mails sent from this server itself but also relays mail from any other server to that domain. In fact it becomes a backup mx for that domain. Is that right or am I missing something? Is this the wanted behaviour? Is it possible to enable the external mail feature without making the i-MSCP server a backup mx?


    Cheers
    Dominik