[clug-talk] Postix Only Listening on Localhost
Gerard Beekmans
gerard at linuxfromscratch.org
Wed May 31 10:28:10 PDT 2006
Hey Jon,
>> # postconf inet_interfaces
>> The parameter is located in /etc/postfix/main.cf
>
> Yeah - I tried that. I double-checked and did it again when your
> email came in though.
You can look at the inet_interfaces variable as a list of interfaces
Postfix will consider listening on. If it actually listens on them still
remains to be seen.
There is a second file you want to check out, postfix's master process
configuration file /etc/postfix/master.cf
The SMTP daemon process has a line that looks like this and it's
normally the first line (after all the comments and instructions a stock
master.cf file contains):
smtp inet n - n - - smtpd
The first field, 'smtp', is the service which is specified as host:port
or just port. Port can be a symbolic name like you see above. What you
seem in the line above is to listen on the smtp port as defined in the
/etc/services file. Its value is '25.' You can further restrict this by
specifying which host to listen on. It is possible to only accept
connections from localhost by having a line as follows:
localhost:smtp ... smtpd
or
localhost:25 ... smtpd
So I'd check your master.cf file for this. If you want your machine to
accept SMTP connections from other machines than localhost, make sure
the service field only contains smtp.
> produce no output and complete instantly. That's not very
> deamonly, is it?
postfix does its own thing in the background. The script returns right
away while Postfix is setting itself up in the background which may take
an extra second or so to complete.
> Second, the line I'm seeing in my netstat:
>
> tcp 0 0 localhost:smtp *:* LISTEN 1 3150/sendmail: MTA
>
> Is bugging me. I think I'm getting confused between smtp and
> smtpd. If I want to connect to this machine from KMail on another
Yes that's definitely a postfix configuration most likely in master.cf
> machine, isn't it smtpd that I need running and not smtp? In which
> case, the problem isn't that smtp isn't listening on the right
> port, it's that smtpd doesn't appear to be running at all.
smtp is the name of a service. smtpd is a program that runs on your
computer that handles the smtp service requests.
Now what exactly are you trying to do with kmail anyway? SMTP is for
sending email out to other people. Maybe you're trying to simply check
your email? In which case you're wanting to setup POP3 or IMAP.
--
Gerard Beekmans
/* If Linux doesn't have the solution, you have the wrong problem */
More information about the clug-talk
mailing list