[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dynamic IP's, IP masq and mail, can it be done?



On 2000-01-25 01:29:55, Ethan Benson wrote:

> I have a small network connected to the internet via a IP masq 
> gateway, and would like to get mail working, but the above setup is a 
> nightmare for mail it would seem.

Why?  Sounds like mail masq'ing.

> is it even possible for mail to work in such a setup or am i wasting 
> my time?

Depends on what you are trying to do.  Outgoing mail should be "easy",
incoming mail wouldn't make sense unless you have a domain name (of
some sort).

> I got the gateway machine to send mail, but my fake domain still
> shows up in various places, such as the message ID and a second From
> line.

Hmm... sounds like you didn't masq the envelope.

> and in order to do that i had to setup a virtual table for all the
> local user accounts, otherwise when cron or something send mail to
> root it would go to root@alaska.net ...

I used:

	canonical_maps = hash:/etc/postfix/canonical

to map root to my normal email (in case my box dies,
it might have left a clue there).

	root my_real_email_address@some.domain

and 

	sender_canonical_maps = hash:/etc/postfix/canonical_sender

to map a user without a real email adderss to my email address

	user my_real_email_address@some.domain

and finally:

	recipient_canonical_maps = hash:/etc/postfix/canonical_receiver

to have mail to the user without email be delivered locally
if send from my box.

> should I just get a static IP and a real domain name or is there some 
> way to make this work that is not too ugly?

There's no way around specifying your local acconuts as you have to
tell your mta that it's only authorative for a set of accounts.  You
could automative things using something like make with a dependency on
your /etc/passwd and some script to filter out the accounts that you
don't care about.

> (the way i got mail to work partially, was to disable dns lookups in 
> postfix, which allows mail to get delivered within the fake network, 
> and setting myorigin to alaska.net on the gateway

Ok.

> and setting the vitual table to redirect root and such to localhost
> but other machines cannot send mail still. and the gateway i think
> does not send correct mail since it has all this fake crap in it...)

You probaly need to enable relay for your local network, but otherwise
it sounds like you're on the right path.


/Allan
-- 
Allan M. Wind			Email: wind@freewwweb.com
P.O. Box 2022			Phone: 781.279.4513 (home)
Woburn, MA 01888-0022		Phone: 781.274.7000 ext. 368 (work)


Reply to: