Koozali.org: home of the SME Server

Mail Local & extern

Lars

Mail Local & extern
« on: April 03, 2003, 02:45:41 PM »
Hi!

First of all, I read most of the posts which could fix the problem, but no one works. Or I can't follow them... ;-)

My Problem:
I want to use same domain-names for local mail transfer AND external Mail transfer.
I want to configure SME to fetch mail from pop3.local-domain.com AND send internal mails from user fred@local-domain.com to andi@local-domain.com without accessing the internet.

With a great piece of software I can access to any mailboxes and forward the messages to the right users. This is a solution.

But if you do a reply an a message you have to decide, if local or external deliverey is needed. And in some cases you have to chance your reply-mailaddress... I know, it's more flexible, but not very comfortable.

A known workaround: Sending ALL messages over internet... (Please NO! :-)

At the moment SME ist not able to access to a domain that ist virtually installed... SME think they are hostet on the local PC, so its no need to access them... But I must!!!!!!!!! I have to connect to the mailbox. e.g. pop3.local-domain.com. (It doesn't work even the host exists or not...)

Has anyone suggestions, how it could work? Perhaps templates are the solution?

CU
Lars

Bill Talcott

Re: Mail Local & extern
« Reply #1 on: April 03, 2003, 06:58:40 PM »
Lars wrote:
>
> Hi!
>
> First of all, I read most of the posts which could fix the
> problem, but no one works. Or I can't follow them... ;-)
>
> My Problem:
> I want to use same domain-names for local mail transfer AND
> external Mail transfer.
> I want to configure SME to fetch mail from
> pop3.local-domain.com AND send internal mails from user
> fred@local-domain.com to andi@local-domain.com without
> accessing the internet.

I don't think this is possible without a lot of custom work. It sounds like you want your SME to handle some of the @domain.com accounts, and want the rest of the @domain.com accounts passed off to the ISP's server.

By default, SME is either set up to be the mail server, or to let another server handle all the mail stuff. You'd need to customize stuff to send @domain.com messages that aren't for certain addresses on to the ISP server instead of saying that those accounts don't exist on the server.

> With a great piece of software I can access to any mailboxes
> and forward the messages to the right users. This is a
> solution.
>
> But if you do a reply an a message you have to decide, if
> local or external deliverey is needed. And in some cases you
> have to chance your reply-mailaddress... I know, it's more
> flexible, but not very comfortable.
>
> A known workaround: Sending ALL messages over internet...
> (Please NO! :-)

Another workaround: Is there any reason you HAVE to use the ISP's mailboxes? If you can set up the SME to act as the domain's MX, everything should work just fine. Any internet mail coming in for user@domain.com will come to your server, and go to the right account. Sending an email from user1@domain.com to user2@domain.com will stay on the SME, while external mail gets sent out to the internet for delivery.

> At the moment SME ist not able to access to a domain that ist
> virtually installed... SME think they are hostet on the local
> PC, so its no need to access them... But I must!!!!!!!!! I
> have to connect to the mailbox. e.g. pop3.local-domain.com.
> (It doesn't work even the host exists or not...)

I'm not sure what you're trying to say here. If you set up a Hostnames entry for pop3.domain.com pointing to the external IP, it should work. If not, something's broken.

> Has anyone suggestions, how it could work? Perhaps templates
> are the solution?

Templates have nothing to do with making something work. It's just a way of dividing the regular Linux configuration files into easily editable (and easily fixable) chunks, and processing those chunks into the final configuration file.

Lars

Re: Mail Local & extern
« Reply #2 on: April 03, 2003, 07:42:25 PM »
> I don't think this is possible without a lot of custom work.

:-(

> It sounds like you want your SME to handle some of the
> @domain.com accounts, and want the rest of the @domain.com
> accounts passed off to the ISP's server.

domain.com is hosted on an ISP. So I have to fetsh mails from there. But on the other hand I want to use das domain local, to make it easier to replay on messages.

Im looking for a solution to reach my ISP with only ONE domain: pop3.domain.com. Al others are local.

My other Mail-servers (under W2K) are configured with the external hostname without blocking access to the external ISP-Mailbox.

> By default, SME is either set up to be the mail server, or to
> let another server handle all the mail stuff. You'd need to
> customize stuff to send @domain.com messages that aren't for
> certain addresses on to the ISP server instead of saying that
> those accounts don't exist on the server.

> Another workaround: Is there any reason you HAVE to use the
> ISP's mailboxes?

Yes ist is: The server is not online permanent.

> If you can set up the SME to act as the
> domain's MX, everything should work just fine.

This doesn't work because my domain is only a virtual Domain without static IP.

> Any internet
> mail coming in for user@domain.com will come to your server,
> and go to the right account. Sending an email from
> user1@domain.com to user2@domain.com will stay on the SME,
> while external mail gets sent out to the internet for delivery.

:-( This is what I want.

> If you set up a
> Hostnames entry for pop3.domain.com pointing to the external
> IP, it should work. If not, something's broken.

I do not have a static IP... :-( That's the problem...

Is there a way to point pop3.domain.com to pop3.xyzdomain.com without using an IP?

CU Lars

Bill Talcott

Re: Mail Local & extern
« Reply #3 on: April 03, 2003, 10:08:20 PM »
I'm still confused about what you want. I do understand that you can't use your server for the main mail server. However, this basically means that you have to use your ISP's mail server, which means you'll have to connect to it every time you want to send mail.

Is pop3.domain.com the ISP's server, or yours?

You may be able to set something up so that your SME has mail accounts that mimic the ISP's mail accounts. The mail for the SME's domain would stay on the SME, and external mail would get sent out from there. Then have each user fetching their mail from the corresponding account on the ISP's server.

The SME would think that it was handling mail for the domain. Same-domain emails would stay on the LAN. But incoming mail from the internet would go to the ISP, the listed MX for the domain. The SME would have to fetch these mails and put them into the the proper SME mailboxes. This would NOT work for any email account @domain.com that weren't on the SME though, if that's an issue.

This is the only reasonably easy way I can see to make this work, without picking one server or the other to use all the time.

del

Re: Mail Local & extern
« Reply #4 on: April 03, 2003, 10:49:34 PM »
Hi Both,
I had a simular problem (I think) before I had a cable modem but my ISP provided a "catch all" mail box where all mail sent to the domain.com that wasn't to any one account got sent here, so I deleted all user accounts on my ISP and let all mail go to this 1 "catch all account". I then got e-smith to check this pop3 box every 15 minutes and e-smith sorted out the emails according to the name before the @domain.com, this worked great, all internal mail went through e-smith and external went over the internet. I left e-smith as the smtp server in Eudora.
Another way around this could be to install Vincent Falali's multipop addon, I have since installed this on a test machine and it also works great. You could then get e-smith to check each individuals account on the ISP's server and e-smith will sort them out from there. Each user can actually have 20 external pop3 boxes checked and sorted out by e-smith. Just a thought, hope this helps (if I've understood your requirements).
Cheers,
Del

Lars

Re: Mail Local & extern
« Reply #5 on: April 04, 2003, 04:34:16 PM »
Hi!

OK. The result of all posted mails is, I have two ways configuring my SME and my client-mailprogram (Eudora).

1. I set the SME-Domain e.g. user1@domain.com as replying-address. With this configuration each user is able to send internal mails correctly, but if sombody send mails to an user outside the LAN, the reply-address ist wrong.

2. I configure EUDORA with my external Domain. So external users can reply correctly, but internal mails would send over the internet.

It's not the best best ways, but both work depending on the more important use.

CU

Lars

Bill Talcott

Re: Mail Local & extern
« Reply #6 on: April 04, 2003, 08:03:32 PM »
Bill Talcott wrote:
>
> You may be able to set something up so that your SME has mail
> accounts that mimic the ISP's mail accounts. The mail for the
> SME's domain would stay on the SME, and external mail would
> get sent out from there. Then have each user fetching their
> mail from the corresponding account on the ISP's server.
>
> The SME would think that it was handling mail for the domain.
> Same-domain emails would stay on the LAN. But incoming mail
> from the internet would go to the ISP, the listed MX for the
> domain. The SME would have to fetch these mails and put them
> into the the proper SME mailboxes. This would NOT work for
> any email account @domain.com that weren't on the SME though,
> if that's an issue.

I think you may be able to do this. Set up the SME with the same domain name as the ISP/real email account. Set up SME users with the same account names as the ISP mail accounts. Set the SME to fetch the emails from the ISP and place them into the proper SME user accounts.

Email to other people in your domain will be handled by the SME. External mails will get sent out to the internet for delivery.

Incoming mails will go to the ISP's mailboxes. SME will fetch those mails and put them into the SME accounts of the same name.

Basically, it will act like the SME is the mail server for the domain, except the ISP mailboxes will catch the internet mail coming in, and the SME will fetch it when it gets online.

Lars

Re: Mail Local & extern
« Reply #7 on: April 04, 2003, 10:59:24 PM »
> I think you may be able to do this. Set up the SME with the
> same domain name as the ISP/real email account. Set up SME
> users with the same account names as the ISP mail accounts.
> Set the SME to fetch the emails from the ISP and place them
> into the proper SME user accounts.

This doesn't work! SME can't access to the ISP-mailbox if the external Domain ist the same as the internal Domain.

My configuration:

Primary domain name: domain.com
ISP Domain name: domain.com

This is the desired configuration. I want to use the "domain" for internal AND externel mails.

I have to connect to pop3.domain.com and right this doesn't work!
SME doesn't route the traffic and think that pop3.domain.com is part of the internal server, but it isn't!!!!

> Email to other people in your domain will be handled by the
> SME. External mails will get sent out to the internet for
> delivery.

> Incoming mails will go to the ISP's mailboxes. SME will fetch
> those mails and put them into the SME accounts of the same
> name.

> Basically, it will act like the SME is the mail server for
> the domain,

Hard to believe!

>except the ISP mailboxes will catch the internet
> mail coming in, and the SME will fetch it when it gets online.

Bill Talcott

Re: Mail Local & extern
« Reply #8 on: April 04, 2003, 11:51:42 PM »
Lars wrote:
>
> This doesn't work! SME can't access to the ISP-mailbox if the
> external Domain ist the same as the internal Domain.
>
> My configuration:
>
> Primary domain name: domain.com
> ISP Domain name: domain.com
>
> This is the desired configuration. I want to use the "domain"
> for internal AND externel mails.
>
> I have to connect to pop3.domain.com and right this doesn't
> work!
> SME doesn't route the traffic and think that pop3.domain.com
> is part of the internal server, but it isn't!!!!

Add it in the Hostnames panel.

Lars

Re: Mail Local & extern
« Reply #9 on: April 05, 2003, 12:28:08 AM »
Hi Bill!

You are the only on left :-) Thank you!

I've added pop3 to the host names...but wrote it befor, the Domain has no own IP it's virtually hosted.

It should be very easy to add a domain with IP, but this is not really possible.

I can try what I want. Its not possible for me to fetch mail from my provider if the primary domain name (or any other) is configured with the same domainname hosted by the ISP.

Thanks for all, trying to solve the problem... :-( I think more the before, there is no solution.

It hard to believe that there is no possibility to tell SME: "Please connect to pop3.domain.com...Please! And SME accept, that this pop3 is not hosted by yourself! Please connect to the Internet and fetch all mail from there...!"

It should be quite easy...but it is difficult for SME.

OK. CU SOON

Lars

Ed Form

Re: Mail Local & extern
« Reply #10 on: April 05, 2003, 04:06:42 AM »
Lars wrote:
>
> Hi Bill!
>
> You are the only on left :-) Thank you!
>
> I've added pop3 to the host names...but wrote it befor, the
> Domain has no own IP it's virtually hosted.
>
> It should be very easy to add a domain with IP, but this is
> not really possible.
>
> I can try what I want. Its not possible for me to fetch mail
> from my provider if the primary domain name (or any other) is
> configured with the same domainname hosted by the ISP.
>
> Thanks for all, trying to solve the problem... :-( I think
> more the before, there is no solution.
>
> It hard to believe that there is no possibility to tell SME:
> "Please connect to pop3.domain.com...Please! And SME accept,
> that this pop3 is not hosted by yourself! Please connect to
> the Internet and fetch all mail from there...!"
>
> It should be quite easy...but it is difficult for SME.

I cannot believe this thread has gone on so long without generating any answers. SME does what you want out of the box!!!!!!!!!!

I am typing this message on a Windows workstation that connects to the internet through an SME server. My domain [workgroupsolutions.co.uk] is hosted by an external ISP and I can collect mail from the boxes there without difficulty. My internal mail is delivered locally without problems and does not leave the building.

The arrangement has one drawback - you cannot access your own website from withing the network because all requests are grabbed by the SME server. this can be solved by altering the hostnames to point www externally but that doesn't solve problems in connecting to things like ISP control panels etc. I have a Howto in the lists on the e-smith.org site that solves this problem also.

You have set the box up incorrectly.

If you want to discuss this mail me offline.

Ed Form

Kelvin

Re: Mail Local & extern
« Reply #11 on: April 05, 2003, 02:00:28 PM »
>I cannot believe this thread has gone on so long without generating any answers.
>SME does what you want out of the box!!!!!!!!!!

I'm inclined to agree, no offence to anyone trying to help. However, part of the problem I see is that Lars unfortunately did not explain his requirements clearly enough at the very beginning and it only started to become clear in later posts.

Lars, my suggestion is as follows :

I will assume your real domain name is larsdomain.com.
I will assume your real domain "mail server" set up by your ISP/domain host is pop3.larsdomain.com.
I will assume you have a mailbox called allmail@pop3.larsdomain.com which receives any mails being sent to your domain by anyone on the internet.

Let's try an experiment.
1. Connect to the internet directly from a PC (ie. dial up through a modem or something, but do NOT go through the SME server).
2. Once logged in, ping pop3.larsdomain.com and record down the IP address.
3. Now, in Eudora (or which ever mail client you use), change your incoming server address to this IP address instead of pop3.larsdomain.com.
4. Try and check mail from the allmail mailbox at the ISP. You should still be able to collect your mail from the ISP. If you cannot collect mail this way (and I really don't see why not), contact your ISP for the IP address of pop3.larsdomain.com.

Now, on the SME server, log into server manager :-
Under E-Mail Retrieval,
a) set retrieval mode to Multi-drop
b) set Secondary Mail server to the IP address of pop3.larsdomain.com
c) set your e-mail retrieval frequency (5minutes, etc. etc.)
d) set Pop user account to your user account (allmail in my example)
e) set Pop user password to your password for that mail account
then SAVE

You MUST have your real domain (ie. larsdomain.com) setup as either the main domain or at least a virtual domain on your SME server.

Provided your ISP/Domain host did NOT mess with the mail headers of the mails being put into the allmail mailbox (I have come across brain dead ISPs that do this), your SME server will be able to distribute the collected e-mails to the correct local users.

Any local users sending mails to another local user will not have the mail go out to the internet before coming back, it stays within the SME server as long as they set their SMTP server to the SME server. If they set it to the ISP's SMTP server then the mails will go out before coming back in.

I hope this is clear enough.

Kelvin

Lars

Re: Mail Local & extern
« Reply #12 on: April 05, 2003, 03:15:41 PM »
Thannnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnks!!!!!! :-)))))))))))))))))))))))

It works!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

First of all: Sorry for my english. I explained the problem not exactly enough. Kelvin moved my wishes from the "dark into light"! :-)

The solution: Simply using the ISP IP instad of the domainname as "Secondary mail server" because I had nevver thought that it could work.

I've never used this feature (I always used the pop3.anything.com).

The only problem (not a SME-problem) could be, if the ISP will change the IP in the future... ;-)

And again: Thanks to all!

The next questions (if there anyone) I will asked more exactly.

Best wishes

Lars