Postfix alias problem
dave at thefletchers.net
Tue Nov 24 10:48:30 UTC 2015
On Tue, 2015-11-24 at 21:06 +1100, Karl Auer wrote:
> On Tue, 2015-11-24 at 09:46 +0000, Colin Law wrote:
> > Having said previously that I had postfix all working for sending
> > email from my server I find I cannot get aliases to work.
> > [...]
> > mydestination = localdomain, localhost, localhost.localdomain, localhost
> > myhostname = <mydomain>.org.uk
> I'm no postfix guru, but I think you may have to add mydomain.co.uk to
> the list in mydestination. mydestination is (I seem to recall) the list
> of domains that will be treated as local ("deliver to this machine").
> An alias will have no effect unless the email is given up for local
> processing. The normal case is to look up the MX record for the
> destination domain and ship the message out to the specified mail
> exchanger... which seems to be what's happening to your test messages.
Revealing more of my main.cf....
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated
myhostname = ServerIII
alias_maps = hash:/etc/aliases
#alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = thefletchers.net, ServerIII, localhost.localdomain,
relayhost = auth.smtp.1and1.co.uk
#mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mynetworks = 192.168.2.0/24 localhost
#mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
message_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
Obviously you can't add an Internet domain name to mydestination, or
edit an MX record, unless you have your own domain name. I consider
myself very lucky indeed to have managed to get the domain name I use
for my email.
If you really want to run your own mail server, you really want to have
your own domain name. This only costs a few pounds, dollars, whatever,
per year and is very well worthwhile. Not only can you run your own mail
server, properly, if you want to make a great impression perhaps with a
prospective employer, giving an email address such as colin at thelaws.net
looks far better than clanlaw at gmail.com. I'm a little surprised to see
that registration of thelaws.net is available and would enable you to
run a server with excellent addresses for both yourself and your family
and, personally, I'd get right onto 1&1 and register it right away.
Of course once you do this and redirect your MX record to your own
hardware you commit yourself to running your server 24/7 and making your
own backups but I think this is well worthwhile, for various reasons.
More information about the ubuntu-users