Community Discussions and Support
Setting up MercuryC to relay to exchange server

Thanks for all your help - I did get what I needed using MercuryC after renaming Mercury Mail local domain.

 

@Rolf

I believe in order to get MercuryE working using options 1 or 2 to work I need to make adjustments to the accepting exchange server so at this time I am just going to use MercuryC.

 

@jbanks

Thanks for all the info on making adjustments to the exchange server end. On the DNS our server at 192.168.0.2 is also our SBS 2011 running our DNS and exchange server so the DNS so it should already be setup to point to the exchange server. The on thing I wanted to avoid if possible was having to make per user changes as I did not what to go into each current and future user settings and make custom settings. I do like having the information in case I would need it in the future as you never know what kinds of setup they may ask for in the future.

 

As always I gained a lot knowledge from all the help here.

Thanks again, Ron

 

<p>Thanks for all your help - I did get what I needed using MercuryC after renaming Mercury Mail local domain.</p><p> </p><p>@Rolf</p><p>I believe in order to get MercuryE working using options 1 or 2 to work I need to make adjustments to the accepting exchange server so at this time I am just going to use MercuryC.</p><p> </p><p>@jbanks</p><p>Thanks for all the info on making adjustments to the exchange server end. On the DNS our server at 192.168.0.2 is also our SBS 2011 running our DNS and exchange server so the DNS so it should already be setup to point to the exchange server. The on thing I wanted to avoid if possible was having to make per user changes as I did not what to go into each current and future user settings and make custom settings. I do like having the information in case I would need it in the future as you never know what kinds of setup they may ask for in the future.</p><p> </p><p>As always I gained a lot knowledge from all the help here.</p><p>Thanks again, Ron</p><p> </p>

I am trying to get Mercury Mail to relay mail to our exchange server using the MercuryC module. We originally had mercury mail set up to get mail from a pop host and put in local user folders and then picked up by a pop client (roundcube) and also get outbound mail from client and send it out using MercuryE. I have disable both the pop modules and switched the E to C. I can not get MercuryC to send mail out. We have emails received and in local users folders but when C polls it does nothing - no error no logs. I figured if I had something wrong in the smart host connection setup I would get en error in a log but it doesn't do anything.

 

Will MercuryC send mail out that is in the local user folders?

How do I test if MercuryC is trying to connect or send anything out?

 

Thanks for any help in getting this set up, Ron

<p>I am trying to get Mercury Mail to relay mail to our exchange server using the MercuryC module. We originally had mercury mail set up to get mail from a pop host and put in local user folders and then picked up by a pop client (roundcube) and also get outbound mail from client and send it out using MercuryE. I have disable both the pop modules and switched the E to C. I can not get MercuryC to send mail out. We have emails received and in local users folders but when C polls it does nothing - no error no logs. I figured if I had something wrong in the smart host connection setup I would get en error in a log but it doesn't do anything.</p><p> </p><p>Will MercuryC send mail out that is in the local user folders?</p><p>How do I test if MercuryC is trying to connect or send anything out?</p><p> </p><p>Thanks for any help in getting this set up, Ron </p>

I use mercuryE to do this and then just have a forwarding rule to send to my exchange server.   Are you setting up this way because you do NOT have a static ip?  What exactly are you trying to accomplish?

<p>I use mercuryE to do this and then just have a forwarding rule to send to my exchange server.   Are you setting up this way because you do NOT have a static ip?  What exactly are you trying to accomplish? </p>

MercuryE and MercuryC both send out outgoing mail by SMTP from the queue directory, not from user directories. The difference between them is that MercuryE sends directly to the destination, whereas MercuryC uses another mail server as relay. More details about this can be found in Mercury help or the PDF manual.

In addition to using forwarding for relaying there are some general relay methods described in this FAQ post: http://community.pmail.com/forums/thread/22614.aspx

 

<p>MercuryE and MercuryC both send out outgoing mail by SMTP from the queue directory, not from user directories. The difference between them is that MercuryE sends directly to the destination, whereas MercuryC uses another mail server as relay. More details about this can be found in Mercury help or the PDF manual.</p><p>In addition to using forwarding for relaying there are some general relay methods described in this FAQ post: http://community.pmail.com/forums/thread/22614.aspx</p><p> </p>

We have a custom program that has been hard coded to send mail to the Mercury Mail computer and we are looking for temporary set up to get all message sent to this system to just be relayed to the new system until we can get the program updated. The problem with the forwarding rule is the new exchange server has the same email addresses so if we tell user1@company.com to forward to user1@company.com it is just going to stay locally on the Mercury mail system.

We have a custom program that has been hard coded to send mail to the Mercury Mail computer and we are looking for temporary set up to get all message sent to this system to just be relayed to the new system until we can get the program updated. The problem with the forwarding rule is the new exchange server has the same email addresses so if we tell user1@company.com to forward to user1@company.com it is just going to stay locally on the Mercury mail system.

I tried using option 1 from the post but it didn't send any of the mail to the new IP. It seems the mail is moved from the queue to local folders before E or C can send them out.

How do I get the queued mail to send to the relay instead of going to local users folders? Do I have to remove all local users or is there some way to get E or C to run first?

<p>I tried using option 1 from the post but it didn't send any of the mail to the new IP. It seems the mail is moved from the queue to local folders before E or C can send them out. </p><p>How do I get the queued mail to send to the relay instead of going to local users folders? Do I have to remove all local users or is there some way to get E or C to run first? </p>

Just setup a second email address for the exchange user, which again is what I do

user1@exchange.company.com

then forward to that address.

What version of exchange do you have?

 

<p>Just setup a second email address for the exchange user, which again is what I do</p><p>user1@exchange.company.com </p><p>then forward to that address.</p><p>What version of exchange do you have? </p><p> </p>

We have exchange 2010.

Forwarding to a second address would work. I could add the second address to the users alias on exchange. Since I believe we only have 4 users getting emails form the program it would not be that bad to maintain. This would require configuring both Mercury and exchange if we need to change any users that get emails from the program which is why I looking at something that was not user based but would just send all incoming messages to the new system. Also if all mail was sent to new system I wouldn't have to worry about something else out there automatically sending mail to the old system.

The problem I am dealing with is the prior IT guy that spent years setting this up is no longer available to ask what and how things were set up. He was very good at customizing things to do what he needed but trying to go back and figure out all the customized set ups is not easy to do.

 

Thanks for the suggestion since if I can't get E or C to work I will be testing this set up.

<p>We have exchange 2010.</p><p>Forwarding to a second address would work. I could add the second address to the users alias on exchange. Since I believe we only have 4 users getting emails form the program it would not be that bad to maintain. This would require configuring both Mercury and exchange if we need to change any users that get emails from the program which is why I looking at something that was not user based but would just send all incoming messages to the new system. Also if all mail was sent to new system I wouldn't have to worry about something else out there automatically sending mail to the old system.</p><p> The problem I am dealing with is the prior IT guy that spent years setting this up is no longer available to ask what and how things were set up. He was very good at customizing things to do what he needed but trying to go back and figure out all the customized set ups is not easy to do.</p><p> </p><p>Thanks for the suggestion since if I can't get E or C to work I will be testing this set up. </p>

 You will also have to update your DNS record so it knows where to find exchange.company.com

<p> You will also have to update your DNS record so it knows where to find exchange.company.com </p><p><img src="http://files.apm.ca/exchange/addEmailAddress.jpg" mce_src="http://files.apm.ca/exchange/addEmailAddress.jpg" height="615" width="650"></p>

[quote user="rgtech"]

I tried using option 1 from the post but it didn't send any of the mail to the new IP. It seems the mail is moved from the queue to local folders before E or C can send them out.

How do I get the queued mail to send to the relay instead of going to local users folders? Do I have to remove all local users or is there some way to get E or C to run first?

[/quote]

 

Did you really do everything it said in the instructions? You should use MercuryE (not MercuryC), and restart Mercury after adding the line in the Rewrite section of mercury.ini.

The 3rd option uses a different approach. In that case there should be a common domain mailbox instead of separate mailboxes for each user.

[quote user="rgtech"]<p>I tried using option 1 from the post but it didn't send any of the mail to the new IP. It seems the mail is moved from the queue to local folders before E or C can send them out. </p><p>How do I get the queued mail to send to the relay instead of going to local users folders? Do I have to remove all local users or is there some way to get E or C to run first? </p><p>[/quote]</p><p> </p><p><span style="font-size: 10pt;">Did you really do everything it said in the instructions? You should use MercuryE (not MercuryC), and restart Mercury after adding the line in the </span><span style="font-family: Tahoma, Arial, Helvetica; font-size: 12px;">Rewrite section of </span><span style="font-size: 10pt;">mercury.ini.</span></p><p>The 3rd option uses a different approach. In that case there should be a common domain mailbox instead of separate mailboxes for each user.</p>

I need to do some more testing but I could not get options 1 or 2 to work for what I needed. It seems these do not work for the local domain as Mercury Mail processes these emails to the local users folders before MercuryE or C can send them onto the new IP. If I send to an outside domain using option 1 or 2 then MercuryE just sends them out normally and not to the new IP as option 1 and 2 are only processing emails for the one domain.

 

What I am looking for is to have all mai,l local and none local domains, to just be sent to the new IP not directly to the internet or processed to local users folders. This is so I can monitor all emails coming into the mercury mail until I can make sure I know what systems have been set up to automatically send emails to the mercury mail system. Then I can see how to get each system changed over. Most systems (ie. copiers, NAS,...) are easily changed by just changing the IP in them directly but as I mention before we have a custom program that is hard coded that is going to take some time to get changed and there may be other systems that I don't know about.

 

Thanks, Ron

<p>I need to do some more testing but I could not get options 1 or 2 to work for what I needed. It seems these do not work for the local domain as Mercury Mail processes these emails to the local users folders before MercuryE or C can send them onto the new IP. If I send to an outside domain using option 1 or 2 then MercuryE just sends them out normally and not to the new IP as option 1 and 2 are only processing emails for the one domain. </p><p> </p><p>What I am looking for is to have all mai,l local and none local domains, to just be sent to the new IP not directly to the internet or processed to local users folders. This is so I can monitor all emails coming into the mercury mail until I can make sure I know what systems have been set up to automatically send emails to the mercury mail system. Then I can see how to get each system changed over. Most systems (ie. copiers, NAS,...) are easily changed by just changing the IP in them directly but as I mention before we have a custom program that is hard coded that is going to take some time to get changed and there may be other systems that I don't know about. </p><p> </p><p>Thanks, Ron </p>

If messages aren't relayed using option 1 the rewrite line is probably not exactly correct. Note as well that MercuryE should be used, not MercuryC, and that program restart is required. 

 

<p>If messages aren't relayed using option 1 the rewrite line is probably not exactly correct. Note as well that MercuryE should be used, not MercuryC, and that program restart is required. </p><p> </p>

For the options in the relay post I am using MercuryE. I was also doing testing with MercuryC in general (not using the options from the relay post) because I was just trying to get something work. Here is the line I put in the Rewrite section of the Mercury.ini file.

 

 company.com: [192.168.0.2]

 

"company" has our actual domain name and I verified that it was spelled correctly. I don't know if it matters but company.com is also the domain at 192.168.0.2 because we "moved" the email system from mercury to a new server but Mercury Mail still has all the local users entered.

 

Trying to make sure understand what is supposed to happen by adding this line to the Mercury.ini [Rewrite] section and rebooting the system all mail received by MercuryS should now be sent to 192.168.0.2 by MercuryE regardless if it is a local user or non-local user?

This line is not making any changes as to how Mercury Mail is processing incoming mail. Local users mail sits in queue until Core module processes and moves to local user folder. Non-local domain mail is sent directly to the internet not 192.168.0.2 system. Is there something else that can be overriding this setting?

Thanks, Ron

 

<p>For the options in the relay post I am using MercuryE. I was also doing testing with MercuryC in general (not using the options from the relay post) because I was just trying to get something work. Here is the line I put in the Rewrite section of the Mercury.ini file.</p><p> </p><p> company.com: [192.168.0.2] </p><p> </p><p>"company" has our actual domain name and I verified that it was spelled correctly. I don't know if it matters but company.com is also the domain at 192.168.0.2 because we "moved" the email system from mercury to a new server but Mercury Mail still has all the local users entered. </p><p> </p><p>Trying to make sure understand what is supposed to happen by adding this line to the Mercury.ini [Rewrite] section and rebooting the system all mail received by MercuryS should now be sent to 192.168.0.2 by MercuryE regardless if it is a local user or non-local user?</p><p>This line is not making any changes as to how Mercury Mail is processing incoming mail. Local users mail sits in queue until Core module processes and moves to local user folder. Non-local domain mail is sent directly to the internet not 192.168.0.2 system. Is there something else that can be overriding this setting?</p><p>Thanks, Ron </p><p> </p>

OK, I think I see the problem. The rewrite option will only work for domains that are not declared as local (local delivery takes precedence), so "company.com" should be removed from the domain tab in core configuration. Note that domain changes require restart.

 

<p>OK, I think I see the problem. The rewrite option will only work for domains that are not declared as local (local delivery takes precedence), so "company.com" should be removed from the domain tab in core configuration. Note that domain changes require restart.</p><p> </p>

I thought having Mercury domain same as domain I was trying to send to was part of the problem. After renaming mercury domains to "old" I was able to get MercuryC working (not using rewrite option - just normal set up).

 

When I was trying to use the Rewrite option with MercuryE the message was rejected due to an invalid address since it was sending the mail 'TO: user@[192.168.0.2]' the new system said that is an invalid address . I have another matter to get to and will do more testing later but unless I get our new system recognize '@[192.168.0.2]' as equal to '@company.com' I don't how this setup is supposed to work.

 

Well at least with you help I was able to get MercuryC to work. I would still like find out how to get MersuryE to work since it seems this works for other people.

 

Thanks, Ron

<p>I thought having Mercury domain same as domain I was trying to send to was part of the problem. After renaming mercury domains to "old" I was able to get MercuryC working (not using rewrite option - just normal set up). </p><p> </p><p>When I was trying to use the Rewrite option with MercuryE the message was rejected due to an invalid address since it was sending the mail 'TO: user@[192.168.0.2]' the new system said that is an invalid address . I have another matter to get to and will do more testing later but unless I get our new system recognize '@[192.168.0.2]' as equal to '@company.com' I don't how this setup is supposed to work.</p><p> </p><p>Well at least with you help I was able to get MercuryC to work. I would still like find out how to get MersuryE to work since it seems this works for other people. </p><p> </p><p>Thanks, Ron </p>

I've tested the rewrite option with another Mercury server, which seems to work fine. I can't help with Exchange settings unfortunately. Option 3 together with MercuryE should work though, but if you are happy to relay all messages (for company.com and all other) through the server at 192.168.0.2 there is perhaps no need for further attempts.

 

<p>I've tested the rewrite option with another Mercury server, which seems to work fine. I can't help with Exchange settings unfortunately. Option 3 together with MercuryE should work though, but if you are happy to relay all messages (for company.com and all other) through the server at 192.168.0.2 there is perhaps no need for further attempts.</p><p> </p>

I still think the easiest way is to use mercuryE  and it really shouldn't take more than 10 minutes to get this going.  I think the part of the puzzle you are missing is that you need to update your DNS records to tell it where the exchange server is located.  Even though your exchange server is on your internal network it is still external to your mercury server.

You need to add an A record for exchange.company.com pointing to 192.168.0.2
then add an A record for mail.exchange.company.com pointing to 192.168.0.2
and you also need to add MX record saying that mail.exchange.company.com looks after mail for exchange.company.com

then everything should work as you expect it to when configured for MercuryE but note you would still have to add the address user@exchange.company.com to your exchange server. 

You could of course also use your external static ip if you have one on the exchange server, although it should work this way.  You can't really have 2 different servers accepting email for the same domain at the same time.

<p>I still think the easiest way is to use mercuryE  and it really shouldn't take more than 10 minutes to get this going.  I think the part of the puzzle you are missing is that you need to update your DNS records to tell it where the exchange server is located.  Even though your exchange server is on your internal network it is still external to your mercury server.</p><p>You need to add an A record for exchange.company.com pointing to 192.168.0.2 then add an A record for mail.exchange.company.com pointing to 192.168.0.2 and you also need to add MX record saying that mail.exchange.company.com looks after mail for exchange.company.com </p><p>then everything should work as you expect it to when configured for MercuryE but note you would still have to add the address user@exchange.company.com to your exchange server.  </p><p>You could of course also use your external static ip if you have one on the exchange server, although it should work this way.  You can't really have 2 different servers accepting email for the same domain at the same time. </p>
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft