I need to send e-mails from my website and the hosting company does not have any mail servers so I am trying a DIY with postfix. I have uninstalled sendmail but every time I try to connect it still seems to be using it:
telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 vps-cp.blacknight.com ESMTP Sendmail 8.14.1/8.14.1/SuSE Linux
I don’t even know if this is the best way to go about it… all suggestions welcome…
There you can enter the setting (last screen of the basic setup I think) to allow remote SMTP connections. By default only the localhost is allowed to connect.
Do make sure relaying is not allowed from the outside world or you will get spam and other nastiness relayed through your server.
For more detailed configuration you can run the MTA tool in Advanced mode or dive into the config found in /etc/postfix. master.cf & main.cf are the files to start with -but I’m guessing that’s overkill for what you are wanting to do.
Ok… sorry & I misread your question. I’ve re-read your first post making me realize you are still connecting to sendmail.
if you’ve uninstalled sendmail you probably need to reboot (easiest) or kill the sendmail process to release the sendmail daemon.
Also set postfix to start at boot with:
chkconfig postfix on
or start if after killing sendmail with:
service postfix start
You probably wont need to have to run the YaST > Mail Transfer Agent as postfix is running on your mailserver? So give the steps mentioned above a try first & retry the telnet thingy.
Telnet’ing to localhost presents the Postfix greeting… so you are set there!
As for secure…, double check that localhost is the only one allowed to connect. A simple test: telnet to the server with a remote pc. You should not be able to send mail or connect that way.
Also have a look at the config files I mentioned in /etc/postfix.
Run through the options to see if you have not set anything you don’t want to. By default postfix is set up to be secure.
If you want to dive into this you can read though the basic setup parameters here : Postfix Basic Configuration
Others might be able to give better pointers as I don’t do too much detail postfix configuration. Most important rule: make sure others can not relay using your host & keep packges up to date.