Pegasus Mail & Mercury

Welcome to the Community for Pegasus Mail and
The Mercury Mail Transport System, the Internet's longest-serving PC e-mail system!
Welcome to Pegasus Mail & Mercury Sign in | Join | Help
in
Home Blogs Forums Downloads Pegasus Mail Overview Mercury Overview Wiki

Setting up MercuryC to relay to exchange server

Last post 07-18-2014, 15:04 by rgtech. 16 replies.
Page 1 of 2 (17 items)   1 2 Next >
Sort Posts: Previous Next
  •  07-15-2014, 22:53

    • rgtech is not online. Last active: 04-20-2015, 14:34 rgtech
    • Top 200 Contributor
    • Joined on 09-12-2008
    • Member
    • Points 520

    Setting up MercuryC to relay to exchange server

    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

  •  07-16-2014, 0:05

    • jbanks is not online. Last active: 09-12-2019, 16:55 jbanks
    • Top 50 Contributor
    • Joined on 06-09-2007
    • Prince Edward Island, Canada
    • Member
    • Points 1,290

    Re: Setting up MercuryC to relay to exchange server

    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?

  •  07-16-2014, 3:42

    • Rolf Lindby is not online. Last active: 2019-09-21, 18:34 Rolf Lindby
    • Top 10 Contributor
    • Joined on 05-08-2007
    • Stockholm, Sweden
    • SuperStar
    • Points 26,350
    • BetaTeam Moderator SystemAdministrator

    Re: Setting up MercuryC to relay to exchange server

    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

     

  •  07-16-2014, 14:01

    • rgtech is not online. Last active: 04-20-2015, 14:34 rgtech
    • Top 200 Contributor
    • Joined on 09-12-2008
    • Member
    • Points 520

    Re: Setting up MercuryC to relay to exchange server

    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.
  •  07-16-2014, 14:06

    • rgtech is not online. Last active: 04-20-2015, 14:34 rgtech
    • Top 200 Contributor
    • Joined on 09-12-2008
    • Member
    • Points 520

    Re: Setting up MercuryC to relay to exchange server

    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?

  •  07-16-2014, 15:08

    • jbanks is not online. Last active: 09-12-2019, 16:55 jbanks
    • Top 50 Contributor
    • Joined on 06-09-2007
    • Prince Edward Island, Canada
    • Member
    • Points 1,290

    Re: Setting up MercuryC to relay to exchange server

    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?

     

  •  07-16-2014, 15:41

    • rgtech is not online. Last active: 04-20-2015, 14:34 rgtech
    • Top 200 Contributor
    • Joined on 09-12-2008
    • Member
    • Points 520

    Re: Setting up MercuryC to relay to exchange server

    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.

  •  07-16-2014, 16:06

    • jbanks is not online. Last active: 09-12-2019, 16:55 jbanks
    • Top 50 Contributor
    • Joined on 06-09-2007
    • Prince Edward Island, Canada
    • Member
    • Points 1,290

    Re: Setting up MercuryC to relay to exchange server

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

  •  07-16-2014, 20:54

    • Rolf Lindby is not online. Last active: 2019-09-21, 18:34 Rolf Lindby
    • Top 10 Contributor
    • Joined on 05-08-2007
    • Stockholm, Sweden
    • SuperStar
    • Points 26,350
    • BetaTeam Moderator SystemAdministrator

    Re: Setting up MercuryC to relay to exchange server

    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?

     

    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.

  •  07-16-2014, 22:32

    • rgtech is not online. Last active: 04-20-2015, 14:34 rgtech
    • Top 200 Contributor
    • Joined on 09-12-2008
    • Member
    • Points 520

    Re: Setting up MercuryC to relay to exchange server

    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

  •  07-17-2014, 3:10

    • Rolf Lindby is not online. Last active: 2019-09-21, 18:34 Rolf Lindby
    • Top 10 Contributor
    • Joined on 05-08-2007
    • Stockholm, Sweden
    • SuperStar
    • Points 26,350
    • BetaTeam Moderator SystemAdministrator

    Re: Setting up MercuryC to relay to exchange server

    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. 

     

  •  07-17-2014, 17:13

    • rgtech is not online. Last active: 04-20-2015, 14:34 rgtech
    • Top 200 Contributor
    • Joined on 09-12-2008
    • Member
    • Points 520

    Re: Setting up MercuryC to relay to exchange server

    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

     

  •  07-17-2014, 21:03

    • Rolf Lindby is not online. Last active: 2019-09-21, 18:34 Rolf Lindby
    • Top 10 Contributor
    • Joined on 05-08-2007
    • Stockholm, Sweden
    • SuperStar
    • Points 26,350
    • BetaTeam Moderator SystemAdministrator

    Re: Setting up MercuryC to relay to exchange server

    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.

     

  •  07-17-2014, 21:53

    • rgtech is not online. Last active: 04-20-2015, 14:34 rgtech
    • Top 200 Contributor
    • Joined on 09-12-2008
    • Member
    • Points 520

    Re: Setting up MercuryC to relay to exchange server

    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

  •  07-17-2014, 22:44

    • Rolf Lindby is not online. Last active: 2019-09-21, 18:34 Rolf Lindby
    • Top 10 Contributor
    • Joined on 05-08-2007
    • Stockholm, Sweden
    • SuperStar
    • Points 26,350
    • BetaTeam Moderator SystemAdministrator

    Re: Setting up MercuryC to relay to exchange server

    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.

     

Page 1 of 2 (17 items)   1 2 Next >
View as RSS news feed in XML

Contact | Advertise | Host provider: PraktIT | Terms of Use | Privacy Statement
Copyright © 2007-2011 David Harris / Peter Strömblad. | Pegasus Mail Home Page