On 02/28/2012 04:33 PM, Jef Driesen wrote:
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.
Jef
Just to clarify, what is most important for me is the inbound smtp service.
However I don't need the standard smtp service on port 25 (which is blocked by
the isp anyway). Receiving incoming mail is already covered with the isp
mailboxes, and I don't intend to change that. What I'm after is more like a
submission service.
My isp doesn't provide a submission service and when not on their network the
regular smtp server can't be used for outgoing mail (for good reasons of
course). Thus when I'm traveling for example, I can read mails on my imap
server, but I can't send mails because there is no usable smtp server. Running
my own submission service would solve that.
For outgoing email I can easily use the ISP smtp server directly from the client
machines. But if I have a local postfix server, I can equally well use it for
all outgoing mail of course.
Jef