On Thursday 27 March 2008 19:04:02 Giulio Troccoli wrote:
I have just installed CentOS 5.1 on my home server and I am trying to set a mail server.
I have diligently followed the instructions on the Wiki - How To on the CentOS website (http://wiki.centos.org/HowTos/postfix). However I cannot send internal email (I haven't yet tried externally).
Do you have any suggestions on what to check? To test it I used two normail user: giulio and federica. I logged in as federica and sent an email to giulio with the mail programme. Is this correct (i.e. using the mail programme)?
There is one thing that I don't quite understand from the instructions. In section 3.1 it's suggested to set
mynetworks = 192.168.0.0/24, 127.0.0.0/8
in the /etc/postfix/main.cf file. My home network however is 192.168.69.0 and actually the IP assigned to any computers in the networks start from 192.168.69.20. So I changed mynetworks to 192.168.69.0/24 and also 192.168.69.19/30 (as my server IP address is actully 192.168.69.25). I don't think this is the cause of my problem anyway, because it didn't work even with the value suggested by the Wiki page.
No, you are misunderstanding this. Your line needs to be
mynetworks = 192.168.69.0/24, 127.0.0.0/8
The /24 denotes a Class C network, which yours is, and the final part is the loopback address.
Now for the mail sending. Have you got a file called 'transport' under /etc/postfix? And one called transport.db? This last one is what tells postfix where to send things. The transport file needs lines like
lydgate.lan smtp:[192.168.0.40] .lydgate.lan smtp:[192.168.0.40] * smtp:[smtp:mailhost.zen.co.uk]
where the first two lines define that anything addressed to anyone@lydgate.lan is local, and should be delivered onto my imap server. The last one sends everything else to my ISP.
When they are ready, you just run 'postmap transport' and it creates the database.
You also need to make sure that your system knows you want to use postfix.sendmail, instead of just sendmail.
HTH
Anne