NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Listening on port 25 to receive mail
On Fri, 5 Dec 2014, Rocky Hotas wrote:
> I tried to send an e-mail from a host in a LAN to another host in the
> *same* LAN which runs NetBSD. But the connection was refused because
> the NetBSD host is not listening on port 25.
> How could I make it possible?
Your subject says to receive mail and your need is to "relay" mail. Both
can be done by default with already installed software.
/etc/rc.d/postfix rcvar
Set "postfix=YES" like in your /etc/rc.conf (or in
/etc/rc.conf.d/postfix).
Make sure you have the original /etc/mailer.conf and then run the start
script:
/etc/rc.d/postfix start
This may rebuild your mail aliases database and start the Postfix mail
system, which includes, by default, the postfix master, pickup, and qmgr
daemons. But none of these offer the SMTP listening service. Edit the
/etc/postfix/master.cf file and you can uncomment the first "#smtp" line
by removing the "#" hash mark. Tell postfix to reload with:
postfix reload
(or /etc/rc.d/postfix reload)
Then you should see the *.25 port listening with netstat. (No smtpd
daemon is started yet; it will be started when needed. Other postfix
processes may start too, like smtp, proxymap, cleanup, trivial-rewrite,
and/or bounce,)
You may need to study postfix documentation to learn more, but by
default it should relay for networks as seen by running:
postconf mynetworks
You don't need official Sendmail sendmail from packages. But I do have
some comments below:
> First I installed sendmail from pkg. Then, following the instructions
> at the end of the installation, I forced the symbolic link
>
> /usr/sbin/sendmail (which initially pointed to /usr/sbin/mailwrapper)
>
> to point to /usr/pkg/libexec/sendmail/sendmail.
You don't need to createthe symlink. When installing the package, there
should be a message about the mailwrapper and mailer.conf. You should
have a /usr/pkg/share/examples/sendmail/mailer.conf that
you can copy to /etc/mailer.conf (instead of doing symlinks for all).
(Be sure to backup original first).
> Next, I put the line
>
> sendmail=YES
>
> in /etc/rc.conf. However, after rebooting, in the output of
>
> netstat -an -f inet |grep LISTEN
>
> there was anything about port 25.
I assume you have no /etc/rc.d/ script for sendmail and your startup
configuration doesn't know to look at scripts under /usr/pkg/etc/rc.d/
(see rc_directories setting) --- and also probably sendmail rc.d script
wasn't copied there. There are more simple steps for this, but I will
stop here. Because maybe the postfix ideas above will work for you
quickly.
Home |
Main Index |
Thread Index |
Old Index