Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Oct 2010 14:49:34 +0200
From:      Christopher Illies <Christopher.Illies@ki.se>
To:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Sendmail as client via smarthost and ssl
Message-ID:  <F3AFB0E3A0FF1F44833C16C79ED54F724BE42A5C70@KIMSXCLU01.user.ki.se>

next in thread | raw e-mail | index | archive | help
To send email from my computer at work I need to send through a
smarthost. In the past I had added the line:

define(`SMART_HOST', `[smpt.ki.se]')

to my mc file, plus some address rewriting for outgoing mail.  This
has worked for years.

Now the mail system has changed and it requires some authentication,
connection via ssl to a different server and via a different port
(587). Since then I have not been able to get my computer to send
email via the smarthost.

Not knowing much about sendmail, I tried google and more or less
blindly followed suggestions.  Here is what I have done so far, but
sending email still does not work:

1. recompiled sendmail with sasl by adding the following lines to
/etc/make.conf + installing security/cyrus-sasl2 + recompiling
sendmail:

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

2. Adding the following line to my mc file (+ make all install
restart):

define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5
LOGIN PLAIN')dnl FEATURE(`authinfo',`hash /etc/mail/auth/client-info')dnl

dnl Set port define(`RELAY_MAILER_ARGS', `IPC $h 587')

I also changed the smarthost to the new name:

define(`SMART_HOST', `[send.ki.se]')

3. create the file /etc/mail/auth/client-info + run "makemap hash
client-info < client-info":

AuthInfo:[send.ki.se] "I:LOGIN" "P:PASSWORD"


When trying to send email the returned email from the
"Mail Delivery Subsystem <MAILER-DAEMON>" contains the following
error message:

   ----- The following addresses had permanent fatal errors -----
<christopher.illies@web.de>
    (reason: 530 5.7.1 Client was not authenticated)

   ----- Transcript of session follows -----
... while talking to send.ki.se.:
>>> MAIL From:<christopher.illies@ki.se> SIZE=3D473 AUTH=3D<>
<<< 530 5.7.1 Client was not authenticated
554 5.0.0 Service unavailable


In /var/log/maillog the following error messages appear:

Oct 28 13:52:53 muck sm-mta[19110]: STARTTLS=3Dclient, relay=3Dsend.ki.se.,
version=3DTLSv1/SSLv3, verify=3DFAIL, cipher=3DAES128-SHA, bits=3D128/128
Oct 28 13:52:58 muck sm-mta[19110]: o9SBqqHs019108:
to=3D<christopher.illies@web.de>, ctladdr=3D<chris@muck.ks.se> (1001/1001),
delay=3D00:00:06, xdelay=3D00:00:06, mailer=3Drelay, pri=3D30473,
relay=3Dsend.ki.se. [130.229.20.26], dsn=3D5.0.0, stat=3DService unavailabl=
e
Oct 28 13:52:58 muck sm-mta[19110]: o9SBqqHs019108: o9SBqwHs019110:
DSN: Service unavailable

Any suggestions to help me send email from my computer are gratefully
appreciated. The system is 8-stable.

Christopher



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