On 02/28/2012 04:57 PM, Robert Schetterer wrote:
Am 28.02.2012 16:33, schrieb Jef Driesen:

Hi,

I'm trying to setup a mailserver for a small home network. But before going 
into the problems, let's start with a description of the situation.

My network is a typical home network with a cable modem and a dynamic ip. There 
is no domain name or mx records. All users on the network have existing 
mailboxes provided by my ISP. Those external mailboxes are downloaded with POP3 
(fetchmail) and delivered to a local imap server (dovecot). The main purpose of 
the local imap server is to have a centralized mail store that can be accessed 
easily from any machine on my network.

With some help from a dyndns account, I can even access my imap server from 
outside my network. This works great, except that I can't send mails from 
outside my network. Therefore, I would like to setup an smtp server that simply 
forwards all mail to my ISP.

The first and main obstacle I encounter is the fact that I don't have a real 
domain name. I know I can configure some fantasy name:

myhostname = barracuda.home.lan
mydomain = home.lan
myorigin = $mydomain
mynetworks = 127.0.0.0/8 192.168.0.0/24
mydestination = $myhostname localhost.$mydomain localhost $mydomain
relayhost = [smtp.isp.tld]

But I wonder if it's possible to setup postfix without a domain name at all. 
For all other purposes (ssh, etc), I'm just using the non-fqdn hostnames (e.g. 
user@machine), and that works perfectly.

According to the docs, I'll also need the smtp_generic_maps setting to map 
fantasy names to real addresses. But in my case, users should use the real 
adddress directly. Any outgoing mail with a fantasy name may simply be blocked. 
To my users, it should appear as if the local smtp server isn't even there. Is 
this possible, and how can I achieve this?

All the other settings like SSL and SASL I can easily figure out, but this 
domain name stuff is causing me lots of trouble.                                
     

thats not  a question of domain/hostnaame etc

you need the right mapping tables
i think i did it with virtual and sender_canonical_maps

but i lost exact how to, its too long passed last i did it

I think you are referring to this document:

http://www.postfix.org/SOHO_README.html#fantasy

This is the smtp_generic_maps that I mentioned. But I think I'm not really looking for mappings. If I can send mail locally using the u...@home.lan fantasy domain that's fine, but I expect my users to use their isp email address (e.g. usern...@isp.tld). Exactly like they are doing now. In that case no mapping is necessary.

And if someone tries to send a mail using the fantasy domain name to the outside (e.g. through the isp relayhost), I want to have it refused by my local postfix server rather than having some mapping to a real address.

Jef

Reply via email to