Community Discussions and Support
Can we set up Mercury as a secondary MX Server?

For SMTP forwarding of messages in a domain mailbox you can use WSMTPEx.exe, as mentioned in the link I posted before:

Thomas R. Stephenson:

The third one is the program WSMTPEx.exe (SMTPEX.NLM for Netware)  and this a a separate program that takes mail for a email account and forwards it to any port and any hostname/IP address.  I use this with my domains to forward the mail to a Linux system (must use high ports as non-root) and to a second instance of Mercury/32 running on my system (can't share port 25)  Here's a sample of the ini file I use for forwarding all mail to Mercury/32 running on Ubuntu v8.10 and Wine.  

 #  You can rename this tool, but name of following section must remain [WSMTPEx]
[WSMTPEx]
Version=0.10
#  TCP port, on which SMTP server listens
Port=8025
#  Number of seconds to delay between searches for emails
LoopDelay=30
#  Folder, under which is most of user's mailboxes
UserFolder=
Domains=1
# Users mail address domain part
Domain1=linux-tstephenson.com
LogName=c:\Mercury\WSMTPEx.log
SMTPServer=192.168.1.4
MailBoxes=1
Badmails=c:\pmail\mail\BadMail

[linux-tstephenson.com]
# When user name start with "DM:", WSMTPEx will try to find SMTP envelope address in mail file
Mb1addr=dm:ubunto
Mb1dir=c:\pmail\mail\ubunto


This takes all the mail in the domain account "UBUNTO"  and sends it to port 8025 on 192.168.1.4 to be received by MercuryS.  The directory BADMAIL I have specified must exist.  You can run multiple instances of this tool and and it can be run as a service.  If run as a service and running multiple instances the name of the program should be changed.  I use WSE-UBUNTO to rename the program and ini file for this one.  

Many thanks to Petr Jaklin for the development of these tools.  You can get these tools at the community download areas or directly from Petr Jaklin's site http://www.3net.cz/software/softe.htm
  

/Rolf 

<p>For SMTP forwarding of messages in a domain mailbox you can use WSMTPEx.exe, as mentioned in the link I posted before:</p><p><i>Thomas R. Stephenson:</i> </p><blockquote><p><i><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">The third one is the program WSMTPEx.exe (SMTPEX.NLM for Netware)  and this a a</span><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"> separate program that takes mail for a email account and forwards it to any port and </span><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">any hostname/IP address.  I use this with my domains to forward the mail to a Linux </span><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">system (must use high ports as non-root) and to a second instance of Mercury/32 </span><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">running on my system (can't share port 25)  Here's a sample of the ini file I use for </span><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">forwarding all mail to Mercury/32 running on Ubuntu v8.10 and Wine.  </span><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"> #  You can rename this tool, but name of following section must remain [WSMTPEx]</span><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">[WSMTPEx]</span><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">Version=0.10</span><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">#  TCP port, on which SMTP server listens</span><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">Port=8025</span><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">#  Number of seconds to delay between searches for emails</span><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">LoopDelay=30</span><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">#  Folder, under which is most of user's mailboxes</span><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">UserFolder=</span><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">Domains=1</span><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"># Users mail address domain part</span><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">Domain1=linux-tstephenson.com</span><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">LogName=c:\Mercury\WSMTPEx.log</span><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">SMTPServer=192.168.1.4</span><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">MailBoxes=1</span><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">Badmails=c:\pmail\mail\BadMail</span><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">[linux-tstephenson.com]</span><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"># When user name start with "DM:", WSMTPEx will try to find SMTP envelope address in mail file</span><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">Mb1addr=dm:ubunto</span><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">Mb1dir=c:\pmail\mail\ubunto</span><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">This takes all the mail in the domain account "UBUNTO"  and sends it to port 8025 on </span><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">192.168.1.4 to be received by MercuryS.  The directory BADMAIL I have specified </span><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">must exist.  You can run multiple instances of this tool and and it can be run as a </span><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">service.  If run as a service and running multiple instances the name of the program </span><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">should be changed.  I use WSE-UBUNTO to rename the program and ini file for this </span><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">one.  </span><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><br style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">Many thanks to Petr Jaklin for the development of these tools.  You can get these </span><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;">tools at the community download areas or directly from Petr Jaklin's site </span><a href="http://www.3net.cz/software/softe.htm" title="http://www.3net.cz/software/softe.htm" style="color: rgb(0, 0, 0); text-decoration: none; font-family: Tahoma,Arial,Helvetica; font-size: 12px;" mce_href="http://www.3net.cz/software/softe.htm">http://www.3net.cz/software/softe.htm</a></i><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"><i> </i> </span></p></blockquote><p>/Rolf </p><span style="font-family: Tahoma,Arial,Helvetica; font-size: 12px;"></span>

If so how?

 

-Chris

 

<p>If so how?</p><p> </p><p>-Chris</p><p> </p>

There is an example on how to configure a secondary mail server in this thread:

http://community.pmail.com/forums/thread/4772.aspx

/Rolf 

<p>There is an example on how to configure a secondary mail server in this thread:</p><p><a href="http://community.pmail.com/forums/thread/4772.aspx">http://community.pmail.com/forums/thread/4772.aspx</a></p><p><a href="http://community.pmail.com/forums/thread/4772.aspx"></a>/Rolf </p>

Hi Rolf.

 Perhaps I'm missing something, but that's not quite what I had in mind.

This is my DNS setup:

C:\MERCURY>nslookup

Default Server:  gateway.warpspeed.com.au
Address:  203.27.78.133

> set q=mx
> warpspeed.com.au
Server:  gateway.warpspeed.com.au
Address:  203.27.78.133

Non-authoritative answer:
warpspeed.com.au        MX preference = 20, mail exchanger = main.warpspeed.com.au
warpspeed.com.au        MX preference = 5, mail exchanger = vhost.warpspeed.com.au
warpspeed.com.au        MX preference = 10, mail exchanger = inet.warpspeed.com.au

warpspeed.com.au        nameserver = wendy.virtual.net.au
warpspeed.com.au        nameserver = ns.virtual.net.au
warpspeed.com.au        nameserver = inet.warpspeed.com.au
warpspeed.com.au        nameserver = main.warpspeed.com.au
vhost.warpspeed.com.au  internet address = 203.27.78.1
inet.warpspeed.com.au   internet address = 203.27.78.4
main.warpspeed.com.au   internet address = 203.27.78.129
>

Mercury is running on vhost.

Ideally, I'd like all mail to go to vhost first, hence the lowest MX weight, and then forwarded to inet, the real primary server. Main, which is not running mercury, is still a further secondary.

The other thread is talking about using MercuryD, the pop server to achieve this, which is not what I had in mind.

I'm at a loss as how to configure a "Domain User".

Or have I just missed something really, really simple and obvious?

-Chris

<p>Hi Rolf.</p><p> Perhaps I'm missing something, but that's not quite what I had in mind.</p><p>This is my DNS setup:</p>C:\MERCURY>nslookup <blockquote><p>Default Server:  gateway.warpspeed.com.au Address:  203.27.78.133 > set q=mx > warpspeed.com.au Server:  gateway.warpspeed.com.au Address:  203.27.78.133 Non-authoritative answer: warpspeed.com.au        MX preference = 20, mail exchanger = main.warpspeed.com.au warpspeed.com.au        MX preference = 5, mail exchanger = vhost.warpspeed.com.au warpspeed.com.au        MX preference = 10, mail exchanger = inet.warpspeed.com.au warpspeed.com.au        nameserver = wendy.virtual.net.au warpspeed.com.au        nameserver = ns.virtual.net.au warpspeed.com.au        nameserver = inet.warpspeed.com.au warpspeed.com.au        nameserver = main.warpspeed.com.au vhost.warpspeed.com.au  internet address = 203.27.78.1 inet.warpspeed.com.au   internet address = 203.27.78.4 main.warpspeed.com.au   internet address = 203.27.78.129 > </p></blockquote><p>Mercury is running on vhost.</p><p>Ideally, I'd like all mail to go to vhost first, hence the lowest MX weight, and then forwarded to inet, the real primary server. Main, which is not running mercury, is still a further secondary.</p><p>The other thread is talking about using MercuryD, the pop server to achieve this, which is not what I had in mind.</p><p>I'm at a loss as how to configure a "Domain User".</p><p>Or have I just missed something really, really simple and obvious?</p><p>-Chris </p>

Here is what Mercury help says about setting up a domain mailbox:

Mercury supports the idea of a domain mailbox, or a mailbox that accepts mail addressed to any user at a given domain. To create a domain mailbox, first create the user account that is to receive all mail addressed to the domain, then place an entry in the Domains recognized as local by this server section in the following format:

    DM=username        domain address

username can be any valid reference to a single local user on your system. So, to create a domain mailbox where user mailserver receives all mail addressed to any user in the domain fish.net, you would create this entry:

DM=mailserver        fish.net

With this entry in place, mail sent to [any address]@fish.net will be delivered into user mailserver's mailbox.

This setup normally works well for a secondary mail server. Some more direct SMTP approaches can be found in this thread:


http://community.pmail.com/forums/post/22615.aspx

 

/Rolf

<p>Here is what Mercury help says about setting up a domain mailbox:</p><blockquote><i>Mercury supports the idea of a domain mailbox, or a mailbox that accepts mail addressed to any user at a given domain. To create a domain mailbox, first create the user account that is to receive all mail addressed to the domain, then place an entry in the Domains recognized as local by this server section in the following format:</i> <i>    DM=username        domain address</i> <i>username can be any valid reference to a single local user on your system. So, to create a domain mailbox where user mailserver receives all mail addressed to any user in the domain fish.net, you would create this entry:</i> <i>DM=mailserver        fish.net</i> <i>With this entry in place, mail sent to [any address]@fish.net will be delivered into user mailserver's mailbox.</i> </blockquote><p>This setup normally works well for a secondary mail server. Some more direct SMTP approaches can be found in this thread:</p><p> <a href="http://community.pmail.com/forums/post/22615.aspx">http://community.pmail.com/forums/post/22615.aspx</a></p><p> </p><p>/Rolf </p>

Part of the issue in creating a Domain Mailbox, is that I've not been able to find it. Certainly, I've not seen anything where I can set the "Domains recognized as local by this server section", as specified in the help.

Or am I missing something?

I'll have a look at the other link, thanks!

-Chris

<p>Part of the issue in creating a Domain Mailbox, is that I've not been able to find it. Certainly, I've not seen anything where I can set the "Domains recognized as local by this server section", as specified in the help.</p><p>Or am I missing something?</p><p>I'll have a look at the other link, thanks!</p><p>-Chris </p>

Is the statement from that thread:

"You are talking about Mercury/32 as a MX host. Mercury/32 currently does

not provide MX services.  David's looking into this for a future

enhancement but until that happens here's 3 possible work arounds."

Still true?

Yes, that is exactly what I am trying to do, set up Mercury as a secondary MX to feed into my primary MX. So it needs to receive all mail, and forward it. Ideally, after having been checked for spam etc (which is what is driving all of this).

-Chris

<p>Is the statement from that thread:</p><p>"You are talking about Mercury/32 as a MX host. Mercury/32 currently does not provide MX services.  David's looking into this for a future enhancement but until that happens here's 3 possible work arounds."</p><p>Still true?</p><p>Yes, that is exactly what I am trying to do, set up Mercury as a secondary MX to feed into my primary MX. So it needs to receive all mail, and forward it. Ideally, after having been checked for spam etc (which is what is driving all of this).</p><p>-Chris </p>

You will find it in the "Local domains" tab in Core configuration.

/Rolf 

<p>You will find it in the "Local domains" tab in Core configuration.</p><p>/Rolf </p>

Personally I prefer using domain mailboxes for forwarding mail from a secondary mail server to the primary, but the SMTP solutions described in the other thread

will work as well. As you might guess I wouldn't have linked it if it was obsolete. Until Mercury v5 is out these are the available options.

/Rolf 

<p>Personally I prefer using domain mailboxes for forwarding mail from a secondary mail server to the primary, but the SMTP solutions described in the other thread will work as well. As you might guess I wouldn't have linked it if it was obsolete. Until Mercury v5 is out these are the available options.</p><p>/Rolf </p>

Oh, fair enough.

So back to one of my original questions:

 

How does one set up a domain mailbox?

 

-Chris

<p>Oh, fair enough.</p><p>So back to one of my original questions:</p><p> </p><p>How does one set up a domain mailbox?</p><p> </p><p>-Chris </p>

Oops. Sorry. I missed your response above.

I've created the three variants of the domain (host, FQDN and IP).

However, I have been able to work out where to set the "Domains recognized as local by this server section" bit.

Is this to be set via the GUI or via editing the INI file directly?

The help is unclear (to me at least).

-Chris

<p>Oops. Sorry. I missed your response above.</p><p>I've created the three variants of the domain (host, FQDN and IP).</p><p>However, I have been able to work out where to set the "Domains recognized as local by this server section" bit.</p><p>Is this to be set via the GUI or via editing the INI file directly?</p><p>The help is unclear (to me at least).</p><p>-Chris </p>

[quote user="ChrisGWarp"]However, I have been able to work out where to set the "Domains recognized as local by this server section" bit.

Is this to be set via the GUI or via editing the INI file directly?

The help is unclear (to me at least).[/quote]

Go to the menu bar: Configuration / Mercury core module, then click on the Local domains tab.

There are many configuration items to set up but most can be left on their default setting.  Local domains is not one of those - you must fill it in or no mail will be accepted.

[quote user="ChrisGWarp"]However, I have been able to work out where to set the "Domains recognized as local by this server section" bit. <P>Is this to be set via the GUI or via editing the INI file directly?</P> <P>The help is unclear (to me at least).[/quote]</P> <P>Go to the menu bar: Configuration / Mercury core module, then click on the Local domains tab.</P> <P>There are many configuration items to set up but most can be left on their default setting.  Local domains is not one of those - you must fill it in or no mail will be accepted.</P>

Ok, I'd already done that. I'd set up the local machine as it's own domain, with the three variants of the domain (host, FQDN and IP).

However, I have been able to work out where to set the "Domains recognized as local by this server section" bit.

Is this to be set via the GUI or via editing the INI file directly?

The help is unclear (to me at least).

 -Chris

<p>Ok, I'd already done that. I'd set up the local machine as it's own domain, with the three variants of the domain (host, FQDN and IP).</p><p>However, I have been able to work out where to set the "Domains recognized as local by this server section" bit.</p><p>Is this to be set via the GUI or via editing the INI file directly?</p><p>The help is unclear (to me at least). </p><p> -Chris</p>

Most settings can be made either via the GUI or by editing the ini file. If you want to create an entry for a domain mailbox via the GUI you go to the "Local domains" tab in Core configuration and click "Add new domain". A new dialog window with two empty text boxes will open. In "Local host or server" you should enter "DM=" followed by the name of the mailbox you have created for the domain, for instance "DM=mydomainmailbox". In "Internet name" you should enter the name of the domain, for instance "mydomain.com". Then click OK, verify that the new entry has appeared in the Local domains tab, and click OK again. Restart Mercury to make the new rule active.

/Rolf 

 

<p>Most settings can be made either via the GUI or by editing the ini file. If you want to create an entry for a domain mailbox via the GUI you go to the "Local domains" tab in Core configuration and click "Add new domain". A new dialog window with two empty text boxes will open. In "Local host or server" you should enter "DM=" followed by the name of the mailbox you have created for the domain, for instance "DM=mydomainmailbox". In "Internet name" you should enter the name of the domain, for instance "mydomain.com". Then click OK, verify that the new entry has appeared in the Local domains tab, and click OK again. Restart Mercury to make the new rule active.</p><p>/Rolf </p><p> </p>

Ok, I appear to have done that. Thank for very much for the detailed instructions.

The next step, and this is one that I have not seen covered elsewhere (the other thread is pick up via POP, whereas I need a SMTP push), is how do we now tell Mercury to forward all of the mail that it receives for that domain mail box.

-Chris

 

<p>Ok, I appear to have done that. Thank for very much for the detailed instructions.</p><p>The next step, and this is one that I have not seen covered elsewhere (the other thread is pick up via POP, whereas I need a SMTP push), is how do we now tell Mercury to forward all of the mail that it receives for that domain mail box.</p><p>-Chris</p><p> </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