Untangle Networks [home]


Go Back   Untangle Forums > General Forums > Tip of the Day!

Closed Thread
 
LinkBack Thread Tools
Old 07-10-2009, 02:35 PM   #1 (permalink)
Untangle Ninja

 
WebFooL's Avatar
 
Join Date: Jan 2009
Location: Sweden (Eskilstuna)
URLs submitted: 57
Posts: 2,933
WebFooL is on a distinguished road
Send a message via MSN to WebFooL
Default Create your own MX backup server.

I needed a MX backup server so that i can move my exchange server.
I came up with this:

Download and install Ubuntu server 9.04. (Virtual or hardware)

When the installation is done run:
Code:
sudo -s
Typ your root password
Now when you have a root terminal run:
Code:
apt-get update
After the upgrade run:
Code:
apt-get install postfix
Now it is configure time.
Code:
nano /etc/postfix/main.cf
go to the buttom and add in one line:
Code:
smtpd_recipient_restrictions = permit_mynetworks reject_unauth_destination
Then add another line:
Code:
relay_domains = $mydestination domain1.com domain2.net domain3.org
*change domainname to your domains.
And the last line:
Code:
transport_maps = hash:/etc/postfix/transport
Now save the file ctrl + O the exit ctrl + x.

Now we need to create the transport file so run:
Code:
nano /etc/postfix/transport
Enter this to the file:
Code:
domain1.com smtp:mail.domain1.com
domain2.net smtp:mail.domain2.net
domain3.org smtp:mail.domain3.org
*Change to your domains and smtp addresses.
Now save the file ctrl + O the exit ctrl + X.

Now we have to create a binary database for the transport.
Code:
cd /etc/postfix/
then run:
Code:
postmap transport
Now reboot the server or run:
Code:
postfix reload
Good commands to know of:
mailq (List the mail queue)
postsuper -r queueid (sends that mail from the queue)

From a external ip portforward port 25 to this unit.
Now add that external ip to your MX records. (with a higer value than your standard mailserver)
When the main MX record server goes down email will be sent to the backup server.
When the primery server gets back online again postfix will send all mails to the smtp specified in "/etc/postfix/transport".

Try to see that it works.
download mailsend.exe
http://www.muquit.com/muquit/softwar.../mailsend.html
Enter the ip to the backupserver and follow the instructions.
if it works it will relay the mail to your server.

GL

Last edited by WebFooL; 07-10-2009 at 02:39 PM..
WebFooL is offline  
Old 09-07-2009, 08:26 PM   #2 (permalink)
Master Untangler
 
Join Date: Jan 2008
Location: Sydney Australia
URLs submitted: 3
Posts: 111
Bumblebee is on a distinguished road
Default

Hi WebFool, I tried following your instruction, but have a question at the installing postfix part. What did you select at the postfix configuration screen that comes up?
Or did you just tell it that you will configure later. I think I tried the " smart host" option,
but I'm not sure of what other options should be changed in the main.cf file.
Bumblebee is offline  
Old 09-07-2009, 11:54 PM   #3 (permalink)
Untangle Ninja

 
WebFooL's Avatar
 
Join Date: Jan 2009
Location: Sweden (Eskilstuna)
URLs submitted: 57
Posts: 2,933
WebFooL is on a distinguished road
Send a message via MSN to WebFooL
Default

If i remember right.
I first install it as a local server.
After all configurations where done i change the network access in the "/etc/postfix/main.cf" so that my loacl network can relay thru it.

My setup is on a remote location.
I can access it later to night and verify how my main.cf file looks.

Last edited by WebFooL; 09-08-2009 at 09:37 AM..
WebFooL is offline  
Old 09-08-2009, 09:37 AM   #4 (permalink)
Untangle Ninja

 
WebFooL's Avatar
 
Join Date: Jan 2009
Location: Sweden (Eskilstuna)
URLs submitted: 57
Posts: 2,933
WebFooL is on a distinguished road
Send a message via MSN to WebFooL
Default

Can you post a copy of your main.cf then i can have a look.
WebFooL is offline  
Old 09-08-2009, 12:53 PM   #5 (permalink)
Master Untangler
 
raditude's Avatar
 
Join Date: Jan 2009
Location: Eugene, OR
Posts: 782
raditude is on a distinguished road
Default

WebFooL - I followed your instructions and made a VM of this, and everything is working great. Thanks for this!
raditude is online now  
Old 09-10-2009, 08:20 PM   #6 (permalink)
Master Untangler
 
Join Date: Jan 2008
Location: Sydney Australia
URLs submitted: 3
Posts: 111
Bumblebee is on a distinguished road
Default

Thanks for the offer WebFool. I'm going to start from scratch on that PC, I stuffed things up on it anyway, and it was only a test.
If I have any problems, I'll post the main.cf file for you to have a look at.
Bumblebee is offline  
Old 09-25-2009, 12:29 PM   #7 (permalink)
Untangle Ninja

 
WebFooL's Avatar
 
Join Date: Jan 2009
Location: Sweden (Eskilstuna)
URLs submitted: 57
Posts: 2,933
WebFooL is on a distinguished road
Send a message via MSN to WebFooL
Default

Ok, So my main site hade some problems today and it resolved in that my MX backup server came in use.
And it workt :P

about 30-40 mails during 1 h for 3 different domains.
So i can really recommend creating one.

If you want a custom Virtual host created for you just hook me up with a pm and i will help you.
WebFooL is offline  
Old 10-19-2009, 06:00 PM   #8 (permalink)
Untangler
 
Join Date: Oct 2008
Posts: 80
kirkcaine is on a distinguished road
Default

nice 1 - i will add to notes
kirkcaine is offline  
Old 10-19-2009, 09:27 PM   #9 (permalink)
Untangler
 
jcoffin's Avatar
 
Join Date: Aug 2008
Location: San Mateo, CA
URLs submitted: 1
Posts: 863
jcoffin is on a distinguished road
Default

Very nice! Excellent backup! Thanks for the detail instructions.
jcoffin is offline  
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 03:10 PM.


© 2010 Untangle, Inc. All Rights Reserved.   SEO by vBSEO 3.3.2