sendmail config

Giorgos Keramidas keramida at
Wed Jan 23 17:51:32 PST 2008

On 2008-01-23 19:54, Steven Friedrich <FreeBSD at> wrote:
> I configured KMail with SSL to send mail from a foreign network thru my 
> broadband ISP.  This works fine.
> I want to be able to use send-pr, and thought I might me able to configure 
> sendmail as outgoing only. I have sendmail_enable="NO" in /etc/rc.conf.
> local mail works fine.  I don't want incoming from the Internet.
> I copied /etc/mail/ to and set SMART_HOST to  
> and moved to sendmailcf.sav.  I compiled 
> with m4 /usr/share/sendmail/cf/m4/cf.m4
> I then copied to and rebooted.

There's a much easier way to generate `' and `' on
FreeBSD.  After reading the comments in `/etc/mail/Makefile', especially
the part shown below:

  # ------------------------------------------------------------------------
  # This Makefile uses `<HOSTNAME>.mc' as the default MTA .mc file.  This
  # can be changed by defining SENDMAIL_MC in /etc/make.conf, e.g.:
  #       SENDMAIL_MC=/etc/mail/
  # If '<HOSTNAME>.mc' does not exist, it is created using ''
  # as a template.
  # It also uses '<HOSTNAME>' as the default mail submission .mc
  # file.  This can be changed by defining SENDMAIL_SUBMIT_MC in
  # /etc/make.conf, e.g.:
  #       SENDMAIL_SUBMIT_MC=/etc/mail/
  # If '<HOSTNAME>' does not exist, it is created using
  # '' as a template.
  # ------------------------------------------------------------------------

You can set up a `' and `' file by:

  0. Set up the `rc.conf' options for local delivery only, and to
     forward all other messages to the SMART_HOST relay.


  1. Editing `/etc/make.conf' and setting SENDMAIL_MC and

	SENDMAIL_MC?= /etc/mail/
	SENDMAIL_SUBMIT_MC?= /etc/mail/

  2. Backup your current `' and `' if any.

  3. Copy the original `' to `' and the original
     `' to `' in `/etc/mail':

	# cd /etc/mail
	# cp
	# cp

  4. Edit the new `' file and set SMART_HOST.

  5. Use the standard `Makefile' to build and install the new *.cf files:

	# cd /etc/mail
	# make all && make install

Now you should be able to start Sendmail with:

	# /etc/rc.d/sendmail stop
	# /etc/rc.d/sendmail start

> Now, the response is "Service not available", but I think it's because
> I don't have sendmail configured to use SSL, like KMail.

The standard `' distributed with FreeBSD sources doesn't force
the use of SSL or TLS.  You should be able to use it without SSL.

If you have made modifications to the original `' file, you
can restore it by copying a fresh version of the same file from their
pristine copies included in the source tree of FreeBSD:



More information about the freebsd-questions mailing list