sendmail help?

fbsd_user fbsd_user at a1poweruser.com
Thu Jan 22 06:05:23 PST 2004


I think you are barking up the wrong tree.
I don't think you  understand how your ISP works.
ISP's do not allow direct smtp access to their email servers,
they consider it an security risk to their environment.
Did your ISP tech support tell you they allow direct smtp access to
their
email services, or are you confusing pop3 access with smtp?
You have to use fetchmail to retrieve your email from your ISP's
pop3 server
to populate your sendmail server. This is how all non-commercial
users do it.
Beside it's a whole lot easier to install the fetchmail package then
reinstall
sendmail with sasl support.

-----Original Message-----
From: owner-freebsd-questions at freebsd.org
[mailto:owner-freebsd-questions at freebsd.org]On Behalf Of Matthew
Seaman
Sent: Thursday, January 22, 2004 7:10 AM
To: Adam Bozanich
Cc: freebsd-questions at freebsd.org
Subject: Re: sendmail help?

On Wed, Jan 21, 2004 at 11:33:57PM -0800, Adam Bozanich wrote:
>
> 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=-I/usr/local/include -DSASL=2
    SENDMAIL_LDFLAGS=-L/usr/local/lib
    SENDMAIL_LDADD=-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.

> 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.

> Here is the sendmail section of /etc/rc.conf:
>
> ###  Mail Transfer Agent (MTA) options  ######################
> ##############################################################
>
> mta_start_script="/etc/rc.sendmail"
>                       # Script to start your chosen MTA, called by
/etc/rc.
> # Settings for /etc/rc.sendmail:
> sendmail_flags="-L sm-mta -bd " # Flags to sendmail (as a server)
> sendmail_submit_enable="YES"  # Start a localhost-only MTA for
mail submission
> sendmail_submit_flags="-L
sm-mta -bd -ODaemonPortOptions=Addr=localhost"
>                               # Flags for localhost-only MTA
> sendmail_outbound_enable="YES"        # Dequeue stuck mail
(YES/NO).
> sendmail_outbound_flags="-L sm-queue -q1m " # Flags to sendmail
(outbound only)
> sendmail_msp_queue_enable="YES"       # Dequeue stuck clientmqueue
mail (YES/NO).
> # sendmail _msp_queue_flags="-L sm-msp-queue -Ac -q30m"
> sendmail_msp_queue_flags="-L sm-msp-queue -Ac -q1m "

> 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 should
> 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.

> 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.

        Cheers,

        Matthew

--
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



More information about the freebsd-questions mailing list