IMSCP-Auth-Mail / NS per reseller

  • I've two question to the developers:



    1) Some clients do not update their cms on a regular basis. Basically, I don't care, but as such webspaces have been compromised several times in ordner to spread spam, I completely disallowed relaying mails without auth in Postfix. Now, how can I force IMSCP to use Auth? I patched ARPL and engine/PerlLib/iMSCP/Mail.pm also seems to be a target. But there must be a third way where all regular mails (not warnings) are generated.



    2) In future, I want to migrate my Gentoo-installation to Ubuntu or Debian in order to get your updates directly (without having masses of work). However, as I made several custom changes, I'm currently about to get all that stuff integrated.
    On my imscp-installation, there are a couple of resellers that use different nameservers. Using a listener, I'd like to lookup on which reseller a given domain belongs to and set NS accordingly. I think an sql-statement using unions over domain, subdomain, alias-domain and sub-alias-domain should do it. Could you guys please write a short snippet what is necessary to send a sql-request using the imscp-library?
    Note: In general this would be a nice feature to be integrated in imscp.



    Thanks in advance!

  • Now, how can I force IMSCP to use Auth?

    That is not possible with current i-MSCP version because we don't have a SMTP client at the frontEnd side. You can always create a issue on our bug tracker. We could indeed add a PHP SMTP client library and then, provide the administrator with a form allowing to choose how mail must be sent (through SMTP client or using PHP mail function).


    You say that you patched the ARPL and Mail.pm already. Could you share your changes? In the ARPL, as in the Mail.pm Perl package, we use sendmail. Thus, I would be curious to see how you integrated the SMTP SASL authentication part (using a Perl SMTP client, isn't it?).

    On my imscp-installation, there are a couple of resellers that use different nameservers. Using a listener, I'd like to lookup on which reseller a given domain belongs to and set NS accordingly. I think an sql-statement using unions over domain, subdomain, alias-domain and sub-alias-domain should do it. Could you guys please write a short snippet what is necessary to send a sql-request using the imscp-library?


    Note: In general this would be a nice feature to be integrated in imscp.

    We already provide an i-MSCP listener file for global NS (same NS for all customer zones). A reseller has no domain. Thus, it become difficult to implement what you want. Could you clarify a bit? Something like:


    reseller1:
    Any customer zone set with:

    • ns1.reseller1domain.tld
    • ns2.reseller1-domain.tld

    reseller2:
    Any customer zone set with:

    • ns1.reseller2-domain.tld
    • ns2.reseller2-domain.tld

    ...


    ???


    If yes, we could improve the exisitent listener for that.

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

  • Thanks for your quick answer!


    1) What about using phpmailer? It supports auth. I solved it (temporarily) in a pretty dirty way: by using runkit.so (php-extension) it's possible to redeclare functions. So I sorta overwrote mail(). It's transparent, so a user is still able to use PHP's mail() but in the background auth is done. Sure: in the end this doesn't solve my problem so I just used it for clients as a temporary solution where a change from mail() to mail-auth is pretty much work.


    Regarding your question:


    You just have to create that user as regular mail account. Works fine.



    2) Let me outline this a little bit:
    For example I'm using Hetzner for domain-registration. That said, my server acts as primary NS with two backup-NS provided by Hetzner. By adding myself as a reseller, I'd like to set these particular NS as default. Not globally, but for all domains that were added by my reseller-account to IMSCP. Now, another reseller comes into play. He/hse uses Schlund for that purposes. Primary NS is the same, but the backup-NS differ. So at this point it would be helpful to define reseller's own NS.
    That's why I'd like to assign default-nameservers to resellers and I'd absolutely be fine to do this with a listener. Shouldn't be a big thing I guess. Sure, I could patch NS for every client instead but in that case I'd have to enrich the listener for every new user.