Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Jan 2004 12:09:33 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Adam Bozanich <abozan01@ccsf.edu>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: sendmail help?
Message-ID:  <20040122120933.GD42056@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <Pine.HPX.4.44.0401212324070.24448-100000@hills.ccsf.cc.ca.us>
References:  <Pine.HPX.4.44.0401212324070.24448-100000@hills.ccsf.cc.ca.us>

next in thread | previous in thread | raw e-mail | index | archive | help

--EgVrEAR5UttbsTXg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jan 21, 2004 at 11:33:57PM -0800, Adam Bozanich wrote:
>=20
> Hi all.  I am having a really hard time getting sendmail to work for me.
> I have a dial up DSL account that gives me an outgoing smtp account that
> requires smtp authentication.

Judging by the .mc files and so forth you attached, you seem to have
gone a long way towards achieving that.

You don't mention SASL (Simple Authentication and Security Layer) --
by default, the sendmail on FreeBSD doesn't contain any SASL
functionality, but you will need to add it in order to use
authentication.

First install the security/cyrus-sasl2 port.  Then edit your
/etc/make.conf to change the sendmail(8) compilation to include
linking in the SASL libraries:

    SENDMAIL_CFLAGS=3D-I/usr/local/include -DSASL=3D2
    SENDMAIL_LDFLAGS=3D-L/usr/local/lib
    SENDMAIL_LDADD=3D-lsasl2

Then rebuild and re-install sendmail from the system sources.  Easiest
way to do that is to do a complete 'make buildworld, make
installworld' cycle as documented in the handbook.  Then you need to
add the SASL options to your sendmail configuration, as you have done.

There are some more detailed instructions here:

    http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/smtp-auth.html

(Those instructions actually apply to SASL v1 -- but it works almost
identically with the SASL2 settingd as I showed above).  See also:

    http://www.sendmail.org/~ca/email/auth.html

but those instructions are for an older version of sendmail, so you'll
have to take care to work out what is still applicable. =20
=20
> For now, I'd simply like to be able to send mail from this local machine.
> I think the problem I am having is that the "from:" field in emails still
> has my local user name, rather than the one required by my isp.

That's what the genericstable stuff should fix for you.  It's
something that generally works really easily, so there's not that much
in the way of HOWTOs about.  See items 6 and 7 of:

    http://www.sendmail.org/virtual-hosting.html

You don't need the rest of the stuff described on that page.  Use
sendmail's address test mode (sendmail -bt) to check that the
rewriting is occuring as intended.
=20
> Here is the sendmail section of /etc/rc.conf:
>=20
> ###  Mail Transfer Agent (MTA) options  ######################
> ##############################################################
>=20
> mta_start_script=3D"/etc/rc.sendmail"
> 			# Script to start your chosen MTA, called by /etc/rc.
> # Settings for /etc/rc.sendmail:
> sendmail_flags=3D"-L sm-mta -bd " # Flags to sendmail (as a server)
> sendmail_submit_enable=3D"YES"	# Start a localhost-only MTA for mail subm=
ission
> sendmail_submit_flags=3D"-L sm-mta -bd -ODaemonPortOptions=3DAddr=3Dlocal=
host"
> 				# Flags for localhost-only MTA
> sendmail_outbound_enable=3D"YES"	# Dequeue stuck mail (YES/NO).
> sendmail_outbound_flags=3D"-L sm-queue -q1m " # Flags to sendmail (outbou=
nd only)
> sendmail_msp_queue_enable=3D"YES"	# Dequeue stuck clientmqueue mail (YES/=
NO).
> # sendmail _msp_queue_flags=3D"-L sm-msp-queue -Ac -q30m"
> sendmail_msp_queue_flags=3D"-L sm-msp-queue -Ac -q1m "
=20
> I don't really understand this at all.  I changed the -q1m parts because
> I don't want sendmail to wait to send stuff... but I'm not sure if I shou=
ld
> have.

Eeek! Don't do that.  '-q1m' means "process the queue at a frequency of
once per minute", not "wait for a minute before doing anything".  Sendmail
MSP (Mail Submission Process) will try and send the message
immediately (unless you go out of your way to configure it not to do
that) -- you haven't mentioned any modifications to freebsd.submit.mc,
which probably means you're using the default version.  That's good --
it's quite unlikely you'll need to change that at all.

If the message cannot be delivered at once, sendmail MSP will deposit
it in the queue file for later action.  Running the queue once per
minute is far too often for a typical home user machine.  There's no
point in trying to flush the queue too often, as you need to give the
intended recipients a chance to fix whatever was wrong.

Plus you don't need to copy the defaults out of /etc/defaults/rc.conf
wholesale.  You can put just the settings you've modified into
/etc/rc.conf.
=20
> What does sendmail_msp_que do?  Do I need it?

That's a sendmail process that checks the MSP queue
(/var/spool/clientmqueue) and attempts to inject any as yet
unprocessed messages into your sendmail MTA (Mail Transport Agent).
Yes, you almost definitely need it. =20

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

--EgVrEAR5UttbsTXg
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFAD718dtESqEQa7a0RAnRcAJ0W6K79F485HjyTc339dRqT33DZWQCfeTVj
OQ4W5MSmLA2TXYbPYiLyhjo=
=E2Xo
-----END PGP SIGNATURE-----

--EgVrEAR5UttbsTXg--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040122120933.GD42056>