Discussion:
sendmail and authinfo
Harry Putnam via illumos-zfs
2014-05-20 13:00:22 UTC
Permalink
head -1 /etc/release
OpenIndiana Development oi_151.1.9 X86 (powered by illumos)

Attempting to setup sendmail to use a certain auth scheme that my
SmartHost requires.

When I try to build the sendmail.cf from the test sendmail.mc which
contains this lines:

FEATURE(`authinfo', `hash /etc/mail/authinfo')dnl

I run into a problem.. It seems on the oi setup for sendmail the m4
processor expects to find a script or macro under /etc/mail/cf/feature
That answers the need of any FEATURE requested in sendmail.mc

These is no /etc/mail/cf/feature/authinfo.m4

So I see this:
make oi.cf
test ! -f oi.cf || /usr/bin/mv oi.cf oi.cf.prev
/usr/ccs/bin/m4 ../m4/cf.m4 oi.mc > oi.cf

/usr/ccs/bin/m4:oi.mc:29 cannot open file: No such file or directory
include(../feature/authinfo.m4)
make: *** [oi.cf] Error 1

So, what do I need to do to get the authinfo information processed in
sendmail.cf?

As it is the oi.cf produced is just commented lines.

In case it is helpful I've included the test oi.mc (sendmail.mc) at
the end. Some of the lines in it have been imported from a working
linux system... so not sure how to integrate things to work with oi
sendmail arrangement.

------- ------- ---=--- ------- -------
divert(0)dnl
VERSIONID(`sendmail.mc (Sun)')
OSTYPE(`solaris8')dnl
DOMAIN(`solaris-generic')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
divert(-1)
divert(0)dnl
VERSIONID(`sendmail.mc (Sun)')
OSTYPE(`solaris8')dnl
DOMAIN(`solaris-generic')dnl
dnl define(`confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
FEATURE(`authinfo', `hash /etc/mail/authinfo')dnl
define(`confAUTH_MECHANISMS',`LOGIN PLAIN')dnl
define(`SMART_HOST',`[mail.messagingengine.com]')dnl

MAILER(`local')dnl
MAILER(`procmail')dnl
MAILER(`smtp')dnl
Jonathan Adams via illumos-zfs
2014-05-20 13:54:42 UTC
Permalink
I noticed that the "authinfo.m4" file is in the sendmail tar-ball on the
sendmail website ...

however the authinfo appears to be baked into standard sendmail ... have
you tried it without that line and seeing if it works?

you probably need to define DefaultAuthInfo though.

Jon
Post by Harry Putnam via illumos-zfs
head -1 /etc/release
OpenIndiana Development oi_151.1.9 X86 (powered by illumos)
Attempting to setup sendmail to use a certain auth scheme that my
SmartHost requires.
When I try to build the sendmail.cf from the test sendmail.mc which
FEATURE(`authinfo', `hash /etc/mail/authinfo')dnl
I run into a problem.. It seems on the oi setup for sendmail the m4
processor expects to find a script or macro under /etc/mail/cf/feature
That answers the need of any FEATURE requested in sendmail.mc
These is no /etc/mail/cf/feature/authinfo.m4
make oi.cf
test ! -f oi.cf || /usr/bin/mv oi.cf oi.cf.prev
/usr/ccs/bin/m4 ../m4/cf.m4 oi.mc > oi.cf
/usr/ccs/bin/m4:oi.mc:29 cannot open file: No such file or directory
include(../feature/authinfo.m4)
make: *** [oi.cf] Error 1
So, what do I need to do to get the authinfo information processed in
sendmail.cf?
As it is the oi.cf produced is just commented lines.
In case it is helpful I've included the test oi.mc (sendmail.mc) at
the end. Some of the lines in it have been imported from a working
linux system... so not sure how to integrate things to work with oi
sendmail arrangement.
------- ------- ---=--- ------- -------
divert(0)dnl
VERSIONID(`sendmail.mc (Sun)')
OSTYPE(`solaris8')dnl
DOMAIN(`solaris-generic')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
divert(-1)
divert(0)dnl
VERSIONID(`sendmail.mc (Sun)')
OSTYPE(`solaris8')dnl
DOMAIN(`solaris-generic')dnl
dnl define(`confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
FEATURE(`authinfo', `hash /etc/mail/authinfo')dnl
define(`confAUTH_MECHANISMS',`LOGIN PLAIN')dnl
define(`SMART_HOST',`[mail.messagingengine.com]')dnl
MAILER(`local')dnl
MAILER(`procmail')dnl
MAILER(`smtp')dnl
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/26066496-a38d048a
https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
Harry Putnam via illumos-zfs
2014-05-20 17:24:05 UTC
Permalink
Post by Jonathan Adams via illumos-zfs
I noticed that the "authinfo.m4" file is in the sendmail tar-ball on the
sendmail website ...
however the authinfo appears to be baked into standard sendmail ... have
you tried it without that line and seeing if it works?
you probably need to define DefaultAuthInfo though.
I did try it before posting .. it appeared not to work but I'm having
trouble finding what is happening at the other end.

I have yet to find where logging about mail appears.
The log indicated by svcs -l sendmsil:
/var/svc/log/network-smtp:sendmail.log

Only shows activity when sendmail starts or stops I see no activity
when attempting to send mail.

Ditto for /var/adm/syslog

Other logs at /var/log and /var/adm/log do not appear related to mail.

The verbose smtp conversation produced by testing the config (posted
at the end)

/usr/lib/sendmail -C /etc/mail/cf/cf/oi.cf -v \
***@newsguy.com <~/Test_mail_from_oi

Shows every thing is hunkydory.... it just never shows up at the other
end.

But before giving any more thought to this please see the new approach
at or near the end of this post.
Post by Jonathan Adams via illumos-zfs
Post by Harry Putnam via illumos-zfs
When I try to build the sendmail.cf from the test sendmail.mc which
FEATURE(`authinfo', `hash /etc/mail/authinfo')dnl
I run into a problem.. It seems on the oi setup for sendmail the m4
processor expects to find a script or macro under /etc/mail/cf/feature
That answers the need of any FEATURE requested in sendmail.mc
These is no /etc/mail/cf/feature/authinfo.m4
make oi.cf
test ! -f oi.cf || /usr/bin/mv oi.cf oi.cf.prev
/usr/ccs/bin/m4 ../m4/cf.m4 oi.mc > oi.cf
/usr/ccs/bin/m4:oi.mc:29 cannot open file: No such file or directory
include(../feature/authinfo.m4)
make: *** [oi.cf] Error 1
So, what do I need to do to get the authinfo information processed in
sendmail.cf?
[...]
Post by Jonathan Adams via illumos-zfs
Hi Harry,
you're on the wrong mailing list. This one is for ZFS.
Yes, it was a liberty... but if you've seen what has happened to the
appropriate oi list on gmane... it seemed unlikely I'd get any input there.

[...]
Post by Jonathan Adams via illumos-zfs
The same functionality can be achieved by using access_db and putting
the authinfo in there (same format). Or you could just get yourself the
authinfo.m4 file from the sendmail distribution and drop it into
/etc/mail/cf/feature.
That is good news. Thanks for the input. It may not be required with
my new approach reported below... but will really useful on a few
other hosts I've setup sendmail on.

[...]

"Bob Friesenhahn via illumos-zfs" <***@lists.illumos.org> writes:

[...]
Post by Jonathan Adams via illumos-zfs
The obvious first step is to find a authinfo.m4 file. It is not clear
why Solaris is missing this file, but it seems to be included in the
official sendmail source distribution. Perhaps Solaris sendmail
originates from before sendmail 8.12 when this feature was introduced.
Yes it was obviously a thing to try and I did get a sendmail tarball
and investigate before posting. However, since I'm not that
knowledgeable about solaris (or sendmail for that matter), I thought
it would be wise to ask about it before gumming things up further.

------- ------- ---=--- ------- -------

Since my OP, I've belatedly realized I don't really need to send any
further than my own desktop from the solaris host, which will not
require authinfo.

So, looking into how that might be done now.

PS - Where in the heck does the smtp output go?

------- ------- ---=--- ------- -------
smtp conversation from testing with out authinfo

/usr/lib/sendmail -C /etc/mail/cf/cf/oi.cf -v \
***@newsguy.com <~/Test_mail_from_oi

reader... Connecting to local...
220 oi LMTP ready
Post by Jonathan Adams via illumos-zfs
Post by Harry Putnam via illumos-zfs
LHLO oi.local
250-oi
250-8BITMIME
250-ENHANCEDSTATUSCODES
250 PIPELINING
Post by Jonathan Adams via illumos-zfs
Post by Harry Putnam via illumos-zfs
MAIL From:<>
250 2.5.0 ok
Post by Jonathan Adams via illumos-zfs
Post by Harry Putnam via illumos-zfs
RCPT To:<reader>
DATA
250 2.1.5 ok
354 go ahead
Post by Jonathan Adams via illumos-zfs
Post by Harry Putnam via illumos-zfs
.
250 2.1.5 reader OK
reader... Sent
Closing connection to local
Jonathan Adams via illumos-zfs
2014-05-20 19:38:42 UTC
Permalink
On 20 May 2014 18:24, Harry Putnam via illumos-zfs <***@lists.illumos.org>wrote:

<snip>
Post by Harry Putnam via illumos-zfs
Since my OP, I've belatedly realized I don't really need to send any
further than my own desktop from the solaris host, which will not
require authinfo.
So, looking into how that might be done now.
PS - Where in the heck does the smtp output go?
sendmail outputs to /var/log/syslog ... check /etc/syslog.conf and you'll
see "mail.info" or "mail.debug" or such like in there. I have mine set to
mail.info because I get fed up of all the verbose LDAP queries going into
it.

your best bet though is probably to "snoop -o" the interface, then
interrogate the file that has been output from snooping the connection

otherwise get the authinfo.m4 file (in the tarball it's in
<sendmail>/cf/features/authinfo.m4) and put it in /etc/mail/cf/features
directory.

Jon



-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com

Hans Rosenfeld via illumos-zfs
2014-05-20 13:29:44 UTC
Permalink
Hi Harry,

you're on the wrong mailing list. This one is for ZFS.

Regarding your question, authinfo is missing from sendmail in illumos.
(I think this was just missed when sendmail was last updated by Sun.)

The same functionality can be achieved by using access_db and putting
the authinfo in there (same format). Or you could just get yourself the
authinfo.m4 file from the sendmail distribution and drop it into
/etc/mail/cf/feature.


Hans
Post by Harry Putnam via illumos-zfs
head -1 /etc/release
OpenIndiana Development oi_151.1.9 X86 (powered by illumos)
Attempting to setup sendmail to use a certain auth scheme that my
SmartHost requires.
When I try to build the sendmail.cf from the test sendmail.mc which
FEATURE(`authinfo', `hash /etc/mail/authinfo')dnl
I run into a problem.. It seems on the oi setup for sendmail the m4
processor expects to find a script or macro under /etc/mail/cf/feature
That answers the need of any FEATURE requested in sendmail.mc
These is no /etc/mail/cf/feature/authinfo.m4
make oi.cf
test ! -f oi.cf || /usr/bin/mv oi.cf oi.cf.prev
/usr/ccs/bin/m4 ../m4/cf.m4 oi.mc > oi.cf
/usr/ccs/bin/m4:oi.mc:29 cannot open file: No such file or directory
include(../feature/authinfo.m4)
make: *** [oi.cf] Error 1
So, what do I need to do to get the authinfo information processed in
sendmail.cf?
As it is the oi.cf produced is just commented lines.
In case it is helpful I've included the test oi.mc (sendmail.mc) at
the end. Some of the lines in it have been imported from a working
linux system... so not sure how to integrate things to work with oi
sendmail arrangement.
------- ------- ---=--- ------- -------
divert(0)dnl
VERSIONID(`sendmail.mc (Sun)')
OSTYPE(`solaris8')dnl
DOMAIN(`solaris-generic')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
divert(-1)
divert(0)dnl
VERSIONID(`sendmail.mc (Sun)')
OSTYPE(`solaris8')dnl
DOMAIN(`solaris-generic')dnl
dnl define(`confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
FEATURE(`authinfo', `hash /etc/mail/authinfo')dnl
define(`confAUTH_MECHANISMS',`LOGIN PLAIN')dnl
define(`SMART_HOST',`[mail.messagingengine.com]')dnl
MAILER(`local')dnl
MAILER(`procmail')dnl
MAILER(`smtp')dnl
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23717143-a19725d9
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
--
%SYSTEM-F-ANARCHISM, The operating system has been overthrown
Bob Friesenhahn via illumos-zfs
2014-05-20 13:52:17 UTC
Permalink
Post by Harry Putnam via illumos-zfs
These is no /etc/mail/cf/feature/authinfo.m4
make oi.cf
test ! -f oi.cf || /usr/bin/mv oi.cf oi.cf.prev
/usr/ccs/bin/m4 ../m4/cf.m4 oi.mc > oi.cf
/usr/ccs/bin/m4:oi.mc:29 cannot open file: No such file or directory
include(../feature/authinfo.m4)
make: *** [oi.cf] Error 1
So, what do I need to do to get the authinfo information processed in
sendmail.cf?
The obvious first step is to find a authinfo.m4 file. It is not clear
why Solaris is missing this file, but it seems to be included in the
official sendmail source distribution. Perhaps Solaris sendmail
originates from before sendmail 8.12 when this feature was introduced.

Bob
--
Bob Friesenhahn
***@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Loading...