From owner-freebsd-questions@FreeBSD.ORG Thu Oct 28 13:19:13 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 369721065694 for ; Thu, 28 Oct 2010 13:19:13 +0000 (UTC) (envelope-from Christopher.Illies@ki.se) Received: from smtp6.ki.se (smtp6.ki.se [130.237.98.104]) by mx1.freebsd.org (Postfix) with ESMTP id B75688FC13 for ; Thu, 28 Oct 2010 13:19:12 +0000 (UTC) Received: from KIMSX12.user.ki.se (kimsx12.user.ki.se [130.229.20.29]) by smtp6.ki.se (Postfix) with ESMTP id A4B1CD4C01 for ; Thu, 28 Oct 2010 14:49:35 +0200 (CEST) Received: from KIMSXCLU01.user.ki.se ([fe80::5934:e0d5:1ab1:4cec]) by KIMSX12.user.ki.se ([fe80::38d2:3ad1:d952:430%16]) with mapi; Thu, 28 Oct 2010 14:49:35 +0200 From: Christopher Illies To: "freebsd-questions@freebsd.org" Date: Thu, 28 Oct 2010 14:49:34 +0200 Thread-Topic: Sendmail as client via smarthost and ssl Thread-Index: AQHLdp6SdrNpIE7jYkGA4/F8A4O0Nw== Message-ID: Accept-Language: en-US, sv-SE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US, sv-SE Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Sendmail as client via smarthost and ssl X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Oct 2010 13:19:13 -0000 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 " contains the following error message: ----- The following addresses had permanent fatal errors ----- (reason: 530 5.7.1 Client was not authenticated) ----- Transcript of session follows ----- ... while talking to send.ki.se.: >>> MAIL From: 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, ctladdr=3D (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