Secondary MX with Smart Relay and authentication

Discussions on webmail and the Professional version.
Post Reply
infoal
Posts: 13
Joined: Thu Mar 19, 2009 9:46 pm

Secondary MX with Smart Relay and authentication

Post by infoal »

Sorry for my english...

I was looking for a solution to install a secondary MX server using the Smart Relay option of MailEnable. In this forum you can find some post asking for it, with no solution at the moment. It looks like MailEnable's future versions will do it, but I have a "provisional solution" that can work in some cases to solve this really enoying problem with the smart relay function:

Scenario:
My little hosting company with a Mailenable Pro mail server. 100 domains, 2000 accounts. This server have all the services activated: imap, pop3, webmail, smtp... with antivirus and antispam, and, of course, the authentication is required to send emails trought the smtp server... this is not an open relay! the name of the server is mail1.mycompany.com, is the main MX server

We want to offer a better quality service to our customers, and our idea is to install a secondary MX server. This secondary server can offer SMTP service if the main server fails down, and our customers dont lose any email and can continue sending messages during the fail time, without change nothing in their configurations. Finally, when the main server works again, all the messages received during this time, will be at the customer's inboxes...

If you have tried... you know that MailEnable can not do it by himself, because the secondary MX server can not do the authentication required by the SMTP service. There are no solution, you can deactivate the SMTP authentication (having an open relay server) or configure the autentication manually domain by domain.... but in both cases the customers need to change the email client configuration.... as described in documentation: http://www.mailenable.com/kb/content/vi ... D=ME020157

Well, but if the 2 servers are in the same local lan, we can solve it doing this:

Main server: mx1.mycompany.com, Mailenable Pro installed with all the accounts configured and working
Secondary server: mx2.mycompany.com, Mailenable Free, with clean installation.
The DNS MX records are correctly configured for both.

Step 1: In MX2, configure SMTP service as SmartHost:
Go to Mailenable Management -> Servers -> localhost -> connectors -> SMTP
Go to Smart Host tab, activate it, set the MX1 address in IP/Domain fields, set a valid MX1 username and password and uncheck "domain smart hosting takes priority"

Step 2: In MX2, stop all maienable services except SMTP CONNECTOR SERVICE, all the other mailenable services need to be stoped! and it's a good idea to go to Windows Services and disable it. Close Mailenable management.

Step 3: Share the mailenable's folder in the MX2, we will need to access to it from the mx1 server. We will need write permission.

Step 4: In MX1, map a network drive pointing to the shared folder in mx2, make it persistent, and try if it works. Verify that you have write permisions.

Step 5: Go to mailenable's config folder in MX1, ex: c:\mailenable\config, and copy this files to the mx2 config folder:
ADDRESS-MAP.TAB, AUTH.TAB, DOMAIN.TAB and POSTOFFICE.TAB
Copying this 4 files to the secondary server will copy the configuration of the postoffices, domains.... and the SMTP authentication in the secondary server starts to work.

This is what happens if MX1 server fails down: our customers can not access to the accounts to read messages, but if your DNS MX records are correctly configured, all the SMTP trafic, in and out, goes to the MX2 server. The SMTP authentication works with the same user's account that in MX1, and customers dont need to change their configurations.... and we dont need to have an open relay sending spam around the world... And this is the trick: the MTA service is stoped! it means that all the inbound messages will be saved in the Queue/SMTP/Inbound folder, not in the Postoffices of the mx2 folder :)
And, when the MX1 starts to work again, we need to do this:

Step 6: Move the messages from MX2 Inbound queue folder, to MX1 Inbound queue folder.
Warning, very important!!!: YOU NEED TO MOVE FIRST THE FILES IN MESSAGES FOLDER (ex: c:\mailenable\queues\smtp\inbound\messages),
AND WHEN IT FINISHES, THEN MOVE THE FILES IN INBOUND FOLDER!!! (ex: c:\mailenable\queues\smtp\inbound )
It's very important to do it in the correct order, if not, you will loose the messages!

Well, the magic think is that you can create a couple of scripts that automatically do the work, for example:
An script in MX1 that repeats step 5 every night to automatically copy accounts configuration from MX1 to MX2.
Another script in MX1 that repeats step 6 every hour to automatically move the messages from MX2 to MX1.

Of course it's not an "ellegant" solution... but it works like a charm! I really really hope that it helps and that MailEnable's programmers can finally modify the Smart host functionallity to make it work correctly in "the real world".

Thanks!

MailEnable-Ian
Site Admin
Posts: 9738
Joined: Mon Mar 22, 2004 4:44 am
Location: Melbourne, Victoria, Australia

Re: Secondary MX with Smart Relay and authentication

Post by MailEnable-Ian »

Regards,

Ian Margarone
MailEnable Support

calfordgreen
Posts: 62
Joined: Sun Jun 13, 2004 1:34 pm

Re: Secondary MX with Smart Relay and authentication

Post by calfordgreen »

So.. can I ask, with the 2 ME posts mentioned on the subject, if the master server goes down, how has the aux/slave/backup server managed to configure all the postoffices, domains, mailboxes, passwords and redirection emails been configured?

Is this somehow done automatically by ME? Or if infoal's method is not adopted, does this mean we need to manually add a mailbox/password to both the master and aux/backup server every time a new mailbox is required??

cmiller@atcomm.com
Posts: 23
Joined: Wed Aug 27, 2008 3:33 pm

Re: Secondary MX with Smart Relay and authentication

Post by cmiller@atcomm.com »

Neither of those articles are very helpful. I've followed what little instructions are there and my secondary MX box may or may not be queuing legitimate messages for later delivery, but I doubt it's working as advertised.

Post Reply