Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

help with SMTP AUTH

49 views
Skip to first unread message

Anton Shterenlikht

unread,
Jul 10, 2017, 9:44:43 AM7/10/17
to
Please help set up sendmail SMTP AUTH.

I'm on FreeBSD 11.0-RELEASE-p9 with
sendmail 8.15.2 installed via mail/sendmail:

# pkg info -xo send
sendmail+tls+sasl2-8.15.2_3 mail/sendmail
#

# sendmail -d0,1 < /dev/null
Version 8.15.2
Compiled with: DNSMAP IPV6_FULL LOG MAP_REGEX MATCHGECOS MILTER
MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETINET6 NETUNIX NEWDB NIS
PICKY_HELO_CHECK PIPELINING SASLv2 SCANF STARTTLS TCPWRAPPERS
USERDB XDEBUG

so sendmail is built with SASLv2 and STARTTLS

I follow http://www.sendmail.org/~ca/email/auth.html#smtpclient
"Using sendmail as a client with AUTH"

I have:

# cat /etc/mail/auth/client-info
AuthInfo:smtp.office365.com "U:me...@bristol.ac.uk" "I:me...@bristol.ac.uk" "P:<my passwd>"

Q1: Is the ISP name ok without a port,
or should I use smtp.office365.com:587 ?

I've run

# makemap hash client-info < client-info

I added these lines to freebsd.mc:

dnl set SASL options
TRUST_AUTH_MECH(`GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN')dnl
define(`confAUTH_MECHANISMS', `GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN')dnl
define(`SMART_HOST', `smtp.office365.com')dnl
FEATURE(`authinfo',`hash /etc/mail/auth/client-info')dnl

Q2. Does port 587 need to be specified in SMART_HOST?

Then

# make all install restart

Q3. Do "user open" fields in ps -axwwdd indicate a problem?

# ps -axwwdd
*skip*
93786 - Is 0:00.00 |-- sendmail: ./v6ACqKa4093217 smtp.office365.com: user open (sendmail)
93909 - Is 0:00.00 |-- sendmail: Queue runner@00:30:00 for /var/spool/clientmqueue (sendmail)
93911 - Ss 0:00.00 |-- sendmail: accepting connections (sendmail)
93912 - S 0:00.00 | `-- sendmail: ./v6ACMbKQ092046 smtp.office365.com: user open (sendmail)
93917 - Is 0:00.00 |-- sendmail: Queue runner@00:01:00 for /var/spool/mqueue (sendmail)
93918 - I 0:00.00 | `-- sendmail: ./v6ACF9Bo091887 smtp.office365.com: user open (sendmail)


There doesn't seem to be any indication
of errors in /var/log/maillog.

# mailq
/var/spool/mqueue (11 requests)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
v6ADgB0k093947* 0 Mon Jul 10 14:42 <me...@mech-as222.men.bris.ac.uk>
<me...@bris.ac.uk>
v6ACqKa4093217* 0 Mon Jul 10 13:52 <me...@mech-as222.men.bris.ac.uk>
(Deferred: Operation timed out with smtp.office365.com)
<me...@bris.ac.uk>
*skip*

Please advise

Thanks

Anton

Andrea Venturoli

unread,
Jul 10, 2017, 11:01:29 AM7/10/17
to
On 07/10/17 15:44, Anton Shterenlikht wrote:
> Please help set up sendmail SMTP AUTH.

Disclaimer: I'm not sure how to do what you want to do, but I've seen
your messages in several places with no other answers, so I'll try...





> I have:
>
> # cat /etc/mail/auth/client-info
> AuthInfo:smtp.office365.com "U:me...@bristol.ac.uk" "I:me...@bristol.ac.uk" "P:<my passwd>"
>
> Q1: Is the ISP name ok without a port,
> or should I use smtp.office365.com:587 ?

I don't think you can/should put the port in the authinfo file.



> Q2. Does port 587 need to be specified in SMART_HOST?

I don't think you can do this either.

See
> https://unix.stackexchange.com/questions/132711/using-port-587-with-sendmail

(I haven't tried this).




bye

Anton Shterenlikht

unread,
Jul 10, 2017, 11:08:24 AM7/10/17
to
Andrea Venturoli <ml.die...@netfence.it> writes:

>See
>> https://unix.stackexchange.com/questions/132711/using-port-587-with-sendmail

I actually saw this before, but read it again, and
yes, this is the miracle line:

define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl

Now works fine.

Thanks!

Anton
0 new messages