Community Discussions and Support
forward for all incoming email

it's true :( anyway both (1 and 2)  don't leave a copy on the server and directly forward the message to the destination server... it not good enough :(

 

i'm working now with the 3......

<P>it's true :( anyway both (1 and 2)  don't leave a copy on the server and directly forward the message to the destination server... it not good enough :(</P> <P mce_keep="true"> </P> <P>i'm working now with the 3......</P>

i'm looking the way (if any) to autoforward all the incoming mail on our old email server (and domain) to the new one (domain and server), both servers have defined the same username structure and naming.

example, the incoming mail to user1@olddomain.com will be automatically forwarded to user1@newdomain.com

 

any idea?

<P>i'm looking the way (if any) to autoforward all the incoming mail on our old email server (and domain) to the new one (domain and server), both servers have defined the same username structure and naming.</P> <P>example, the incoming mail to <A href="mailto:user1@olddomain.com">user1@olddomain.com</A> will be automatically forwarded to <A href="mailto:user1@newdomain.com">user1@newdomain.com</A></P> <P mce_keep="true"> </P> <P>any idea?</P>

i'm looking the way (if any) to autoforward all the incoming mail on

our old email server (and domain) to the new one (domain and server),

both servers have defined the same username structure and naming.

example, the incoming mail to user1@olddomain.com will be automatically forwarded to user1@newdomain.com

There are a number of ways to do this.  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.  

These are NOT a true MX host function since it does not queue and wait for the receiving system to be online to send the mail.  That said, WSMTPEx will keep retrying if the connection to the server and port cannot be made.  I have not tested how long it will continue retrying.  

These processes are actually resending and so a copy of the mail is not retained on the original system unless you are using a 'always' filter to send the mail off to an archive user.

 

1.  First of all is the simplest, you simply re-write the domain in the mercury.ini [Rewrite] section.


[Rewrite]
none-tstephenson.com: [192.168.1.3]

I really was surprised when this one worked since it truly simple and has been there all along.  You learn something new every day.  The brackets are required when using an IP address.  This forwards all mail for anyuser@none-stephenson.com to anyuser@[192.168.1.3] using the normal Mercury/32 send process via port 25.  Works quite well when using MercuryE, cannot work when using MercuryC unless the IP address is a routable IP address.  You must re-boot Mercury/32 for each change since this is only read at startup.  You can probably use olddomain.com : newdomain.com here but I have not tested it.  This one would be the easiest option if it works for you.


2.  The second one is the daemon MercFwd and it essentially does the same thing as the rewrite but this can be done dynamically by changing the domains section.  The [Domains] entry of 

daemon:c:\mercury\mercfwd.dll;[192.168.1.3]: none-tstephenson.com

does essentially the same thing as the rewrite above.  Again it uses Mercury to deliver the mail via port 25 and so you cannot use this with MercuryC when using non-routable IP addresses.  You must use an IP address here since the daemon does not have a resolver.

3.  The third one is the program WSMTPEx.exe (SMTPEX.NLM for Netware)  and this is 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 

<blockquote><p>i'm looking the way (if any) to autoforward all the incoming mail on our old email server (and domain) to the new one (domain and server), both servers have defined the same username structure and naming.</p><p>example, the incoming mail to <a href="mailto:user1@olddomain.com">user1@olddomain.com</a> will be automatically forwarded to <a href="mailto:user1@newdomain.com">user1@newdomain.com</a></p></blockquote><p>There are a number of ways to do this.  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.   These are NOT a true MX host function since it does not queue and wait for the receiving system to be online to send the mail.  That said, WSMTPEx will keep retrying if the connection to the server and port cannot be made.  I have not tested how long it will continue retrying.   </p><p>These processes are actually resending and so a copy of the mail is not retained on the original system unless you are using a 'always' filter to send the mail off to an archive user. </p><p> </p><p>1.  First of all is the simplest, you simply re-write the domain in the mercury.ini [Rewrite] section. </p><blockquote> [Rewrite] none-tstephenson.com: [192.168.1.3] I really was surprised when this one worked since it truly simple and has been there all along.  You learn something new every day.  The brackets are required when using an IP address.  This forwards all mail for anyuser@none-stephenson.com to anyuser@[192.168.1.3] using the normal Mercury/32 send process via port 25.  Works quite well when using MercuryE, cannot work when using MercuryC unless the IP address is a routable IP address.  You must re-boot Mercury/32 for each change since this is only read at startup.  You can probably use <b>olddomain.com : newdomain.com</b> here but I have not tested it.  This one would be the easiest option if it works for you. </blockquote><p> 2.  The second one is the daemon MercFwd and it essentially does the same thing as the rewrite but this can be done dynamically by changing the domains section.  The [Domains] entry of  </p><blockquote>daemon:c:\mercury\mercfwd.dll;[192.168.1.3]: none-tstephenson.com does essentially the same thing as the rewrite above.  Again it uses Mercury to deliver the mail via port 25 and so you cannot use this with MercuryC when using non-routable IP addresses.  You must use an IP address here since the daemon does not have a resolver. </blockquote><p>3.  The third one is the program WSMTPEx.exe (SMTPEX.NLM for Netware)  and this is 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.  </p><blockquote> #  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.  </blockquote><p> 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  </p>

many thanks, it works!!!!!!

 

cheers

<P>many thanks, it works!!!!!!</P> <P mce_keep="true"> </P> <P>cheers</P>

many thanks, it works!!!!!!

Which option did you use?

 

<blockquote>many thanks, it works!!!!!!</blockquote><p>Which option did you use?</p><p> </p>

i use the option 1 with a rule to move first the message to the user folder

the option 2 does not work for me because it add a extra < in the destination address....

the option 3 is the most powerfull but also more complex to implement, i'm working on it....

 

&lt;P&gt;i use the option 1 with a rule to move first the message to the user folder&lt;/P&gt; &lt;P&gt;the option 2 does not work for me because it add a extra &amp;lt; in the destination address....&lt;/P&gt; &lt;P&gt;the option 3 is the most powerfull but also more complex to implement, i&#039;m working on it....&lt;/P&gt; &lt;P mce_keep=&quot;true&quot;&gt;&amp;nbsp;&lt;/P&gt;

[quote user="vmgracia"]i use the option 1 with a rule to move first the message to the user folder
, but that does require a lot of filters, one for each user. Almost easier to setup a forward file for each user.  ;-)

the option 2 does not work for me because it add a extra < in the destination address....

Sorry, that's been fixed, you need to get the latest version of the daemon from Petr's site.

the option 3 is the most powerful but also more complex to implement, i'm working on it....[/quote]

It sure is.  ;-)

&lt;blockquote&gt;[quote user=&quot;vmgracia&quot;]i use the option 1 with a rule to move first the message to the user folder &lt;/blockquote&gt;, but that does require a lot of filters, one for each user. Almost easier to setup a forward file for each user.&amp;nbsp; ;-) &lt;blockquote&gt;&lt;p&gt;the option 2 does not work for me because it add a extra &amp;lt; in the destination address....&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Sorry, that&#039;s been fixed, you need to get the latest version of the daemon from Petr&#039;s site. &lt;/p&gt;&lt;blockquote&gt;&lt;p mce_keep=&quot;true&quot;&gt;the option 3 is the most powerful but also more complex to implement, i&#039;m working on it....[/quote]&lt;/p&gt;&lt;/blockquote&gt;&lt;p mce_keep=&quot;true&quot;&gt;It sure is.&amp;nbsp; ;-) &lt;/p&gt;
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