LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 09-08-2013, 05:12 PM   #1
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 284

Rep: Reputation: Disabled
small question about mail clients on same network as mail server


i have postfix/courier-imap running on a local server on my home network. it is behind a router which has a static IP registered with the domainname for which the mail server operates. normally, i would just configure mail clients to use domain.com for the SMTP & IMAP servers, which resolves to this network's external address. since i've forwarded the right ports, this works everywhere in the world, except for on this network, which IS the domain.com network.

the end result is that I have to reconfigure all of my mail clients to use the local email server's IP, and change it back to domain.com whenever I leave here. i've looked around in thunderbird, iOS mail and the android mail client; all of them can use multiple SMTP servers which solves this problem (domain.com as the first, local server IP as the second), but none of them can do this with IMAP.

this seems like it should be easy to get around, maybe by having the local DNS server return a different domain.com MX record ONLY for clients on the LAN that points to the local mail server? or playing with iptables on the router?

any ideas?
 
Old 09-08-2013, 07:51 PM   #2
descendant_command
Member
 
Registered: Mar 2012
Posts: 785

Rep: Reputation: 179Reputation: 179
You just need a local DNS server (dnsmasq is ideal) that returns the local ip, to any queries for domain.com
 
Old 09-08-2013, 08:11 PM   #3
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 284

Original Poster
Rep: Reputation: Disabled
i see.. yeah i've already got bind setup... so adding an A and MX to point to the mail server won't screw up anything? i will try this later on tonight
 
Old 09-08-2013, 10:34 PM   #4
descendant_command
Member
 
Registered: Mar 2012
Posts: 785

Rep: Reputation: 179Reputation: 179
You shouldn't need an MX record, as the clients are simply doing an A lookup on the server name.
Presumably your BIND is only for internal clients, not globally accessible?
 
Old 09-08-2013, 10:57 PM   #5
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 284

Original Poster
Rep: Reputation: Disabled
correct. i actually went ahead and tried to just add "domain.com IN A MAILSERVERNAME" into my local zone file (the domainname locally is actually "domain.site") and BIND complained about it being "out-of-zone data".... so presumably i'm gonna have to create a new zone called "domain.com" on my server for this.... i would imagine i would need to copy the SOA from my DNS registrar.... idk if that sounds like it would work
 
Old 09-09-2013, 01:50 AM   #6
descendant_command
Member
 
Registered: Mar 2012
Posts: 785

Rep: Reputation: 179Reputation: 179
That's why I prefer dnsmasq for local DNS
Just plop whatever names you want in a (the) hosts file and you're done.
 
Old 09-09-2013, 03:50 PM   #7
psycroptic
Member
 
Registered: Aug 2011
Location: USA
Distribution: ArchLinux - 3.0 kernel
Posts: 284

Original Poster
Rep: Reputation: Disabled
word i will give it a think.

thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Small Network configuration with Linux as Server and Windows as Clients gbalaji Linux - Networking 4 07-08-2012 11:04 PM
LXer: Review of “Linux E-Mail – set up, maintain, and secure a small office e-mail server” LXer Syndicated Linux News 0 03-25-2011 05:30 AM
Postfix Mail server to relay mail for dynamic IP clients seventy-7 Linux - Server 2 01-28-2009 02:59 AM
Configure & Connect a Linux mail server from a windows mail clients digihall7 Linux - Networking 4 10-23-2006 12:21 PM
Store mail local and view with several mail clients... elluva Linux - Software 22 05-11-2004 04:27 PM


All times are GMT -5. The time now is 09:13 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration