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

Sendmail and passwd-like file.

2 views
Skip to first unread message

Zuzanna K. Filutowska

unread,
Feb 3, 2008, 6:16:54 PM2/3/08
to
Hello.

Is there any way to make sendmail to use a passwd-like password file to
look up the usernames instead of using getpwnam?


Regards.

--
Zuzanna K. Filutowska
Home page: http://platyna.platinum.linux.pl/.
NIC-HDL: ZKF-RIPE, IRC nick: Platyna, Linux RU: #289909.
What does not destroy me makes me stronger. -- F. Nietzsche

Claus Aßmann

unread,
Feb 3, 2008, 6:40:12 PM2/3/08
to
Zuzanna K. Filutowska wrote:

> Is there any way to make sendmail to use a passwd-like password file to
> look up the usernames instead of using getpwnam?

doc/op/op.*:

MailboxDatabase
[no short name] Type of lookup to find
information about local mailboxes, defaults
to ``pw'' which uses getpwnam. Other types
can be introduced by adding them to the
source code, see libsm/mbdb.c for details.

Zuzanna K. Filutowska

unread,
Feb 4, 2008, 2:30:00 AM2/4/08
to

Well, I have already read this one, as well as that source file, but the
problem is I am not a programmer, and I am unable to hack sendmail's
source code at all, especially that it using getpwnam function to access
the passwd files, which would require me to write own function or modify
getpwnam, so it is easy to say "modify the source code to add new
functionality".

Andrzej Adam Filip

unread,
Feb 4, 2008, 4:00:11 PM2/4/08
to
"Zuzanna K. Filutowska" <pla...@platinum.linux.pl> wrote:
> Is there any way to make sendmail to use a passwd-like password file
> to look up the usernames instead of using getpwnam?

[ based also on info provided in another thread]

Have you considered using custom (perl?) script to convent plain text
/etc/passwd-dovecot to
* virtusertable entries
*OR*
* custom map listing "domain-less users" user for LUSER_RELAY
http://groups.google.com/group/comp.mail.sendmail/msg/c6ce04d354feedad


You can create simple makefile and choose one of the following
* run it every 10m from cron
* run it manually after changing /etc/passwd-dovecot
* write simple (perl?) daemon to monitor the file every minute and
execute makefile when needed

P.S.
Remember that SMTP-AUTH integration is a separate story.

--
[pl>en: Andrew] Andrzej Adam Filip : an...@priv.onet.pl : an...@xl.wp.pl
Open-Sendmail: http://open-sendmail.sourceforge.net/
The plot was designed in a light vein that somehow became varicose.
-- David Lardner

Message has been deleted
Message has been deleted

Andrzej Adam Filip

unread,
Feb 5, 2008, 3:28:11 AM2/5/08
to
Henning Hucke <h_hucke+...@remove.aeon.icebear.org> wrote:

> On Mon, 4 Feb 2008, Zuzanna K. Filutowska wrote:
>
>> [...]


>> Well, I have already read this one, as well as that source file, but
>> the problem is I am not a programmer, and I am unable to hack

>> sendmail's source code at all, [...]
>
> So learn it! Probably earlier than later you'll come across a
> situation where you'll not be able so say so easily that you are no
> programmer so take this as your fist opportunity...

Would you state it is one of the best opportunities?

I have attempted a few time (2+) to "*fully* understand/read" sendmail
code. Every time I came to conclusion it would not be "cost effective".

I would not dare to state that sendmail code has been written in open
development requirements in mind.

[ Feel free to disagree :-) ]

>> [...]


--
[pl>en: Andrew] Andrzej Adam Filip : an...@priv.onet.pl : an...@xl.wp.pl
Open-Sendmail: http://open-sendmail.sourceforge.net/

/* dbmrefcnt--; */ /* doesn't work, rats */
-- Larry Wall in hash.c from the perl source code

Zuzanna K. Filutowska

unread,
Feb 5, 2008, 8:47:13 AM2/5/08
to
On Mon, 4 Feb 2008, Henning Hucke wrote:

> On Mon, 4 Feb 2008, Zuzanna K. Filutowska wrote:
>
>> [...]

>> Well, I have already read this one, as well as that source file, but the
>> problem is I am not a programmer, and I am unable to hack sendmail's source

>> code at all, [...]
>
> So learn it! Probably earlier than later you'll come across a situation where
> you'll not be able so say so easily that you are no programmer so take this
> as your fist opportunity...

Thanks for the tip about my professional career. Not to be rude, but maybe
I should drop my job and start learning how to produce cars, build houses,
perform brain surgery etc. just because it is useful? I could even
try...but, since I have to drop my job, untill I would finish my education
I will die from starvation.

Zuzanna K. Filutowska

unread,
Feb 5, 2008, 9:25:02 AM2/5/08
to
On Mon, 4 Feb 2008, Andrzej Adam Filip wrote:

> "Zuzanna K. Filutowska" <pla...@platinum.linux.pl> wrote:
>> Is there any way to make sendmail to use a passwd-like password file
>> to look up the usernames instead of using getpwnam?
>
> [ based also on info provided in another thread]
>
> Have you considered using custom (perl?) script to convent plain text
> /etc/passwd-dovecot to
> * virtusertable entries
> *OR*
> * custom map listing "domain-less users" user for LUSER_RELAY
> http://groups.google.com/group/comp.mail.sendmail/msg/c6ce04d354feedad
> You can create simple makefile and choose one of the following
> * run it every 10m from cron
> * run it manually after changing /etc/passwd-dovecot
> * write simple (perl?) daemon to monitor the file every minute and
> execute makefile when needed

Actually I am using sendmail to minimize wild hacks count.

> P.S.
> Remember that SMTP-AUTH integration is a separate story.

Yep. I remember this. And it makes me sad, that almost everything
(including ftp and imap daemon) supports alternate passwd but not
sendmail.

Andrzej Adam Filip

unread,
Feb 5, 2008, 10:27:52 AM2/5/08
to
"Zuzanna K. Filutowska" <pla...@platinum.linux.pl> wrote:

> On Mon, 4 Feb 2008, Andrzej Adam Filip wrote:
>
>> "Zuzanna K. Filutowska" <pla...@platinum.linux.pl> wrote:
>>> Is there any way to make sendmail to use a passwd-like password file
>>> to look up the usernames instead of using getpwnam?
>>
>> [ based also on info provided in another thread]
>>
>> Have you considered using custom (perl?) script to convent plain text
>> /etc/passwd-dovecot to
>> * virtusertable entries
>> *OR*
>> * custom map listing "domain-less users" user for LUSER_RELAY
>> http://groups.google.com/group/comp.mail.sendmail/msg/c6ce04d354feedad
>> You can create simple makefile and choose one of the following
>> * run it every 10m from cron
>> * run it manually after changing /etc/passwd-dovecot
>> * write simple (perl?) daemon to monitor the file every minute and
>> execute makefile when needed
>
> Actually I am using sendmail to minimize wild hacks count.

Are interested in *testing* new (via sendmail.cf *only*) sendmail and
"dovecot with passwd file" integration?
a) sendmail will check /etc/passwd-dovecot *directly*
b) sendmail will support "domanized aliases" in domains handled by
dovecot

It will require:
1) applying 6 lines patch to cf/m4/proto.m4
2) adding one new file to cf/feature/ directory

It will be a variation of FEATURE(`anfi/vcyrus') available at
http://open-sendmail.sourceforge.net/
[ expected delivery time: this week or never :-) ]

>> P.S.
>> Remember that SMTP-AUTH integration is a separate story.
>
> Yep. I remember this. And it makes me sad, that almost everything
> (including ftp and imap daemon) supports alternate passwd but not
> sendmail.

--

[pl>en: Andrew] Andrzej Adam Filip : an...@priv.onet.pl : an...@xl.wp.pl
Open-Sendmail: http://open-sendmail.sourceforge.net/

Work is the curse of the drinking classes.
-- Mike Romanoff

Erich Titl

unread,
Feb 5, 2008, 2:37:57 PM2/5/08
to
Zuzanna K. Filutowska schrieb:

> On Mon, 4 Feb 2008, Andrzej Adam Filip wrote:
>
...

>
>> P.S.
>> Remember that SMTP-AUTH integration is a separate story.
>
> Yep. I remember this. And it makes me sad, that almost everything
> (including ftp and imap daemon) supports alternate passwd but not sendmail.

I may be wrong, but I _believe_ to remember that sasl2 supports
saslauthd as an authentication daemon and this one can be configured to
use PAM. Now with PAM you can go lengths.

HTH

Erich

Zuzanna K. Filutowska

unread,
Feb 5, 2008, 3:48:14 PM2/5/08
to

This is Slackware, and Slackware is a synonym for "PAM-hell-no" (which I
happen to agree with).

Regarding to suggestions to use LDAP, well I know I may use LDAP, and I
have even configured LDAP or SQL with Sendmail, but the whole issue is
that I don't like these (I am migrating a site from exim+SQL now).

However, I have found a willing programmer to help, I have explained him
how does Sendmail's mbdb works and we have worked out a solution:

Here is the link:
http://platyna.platinum.linux.pl/blog/?p=4

Zuzanna K. Filutowska

unread,
Feb 5, 2008, 3:50:22 PM2/5/08
to
On Tue, 5 Feb 2008, Andrzej Adam Filip wrote:

> "Zuzanna K. Filutowska" <pla...@platinum.linux.pl> wrote:
>
>> On Mon, 4 Feb 2008, Andrzej Adam Filip wrote:

> Are interested in *testing* new (via sendmail.cf *only*) sendmail and
> "dovecot with passwd file" integration?
> a) sendmail will check /etc/passwd-dovecot *directly*
> b) sendmail will support "domanized aliases" in domains handled by
> dovecot
>
> It will require:
> 1) applying 6 lines patch to cf/m4/proto.m4
> 2) adding one new file to cf/feature/ directory
>
> It will be a variation of FEATURE(`anfi/vcyrus') available at
> http://open-sendmail.sourceforge.net/
> [ expected delivery time: this week or never :-) ]

I would gladly test it.

Message has been deleted
Message has been deleted

Zuzanna K. Filutowska

unread,
Feb 5, 2008, 8:01:21 PM2/5/08
to
On Wed, 6 Feb 2008, Res wrote:

> On Tue, 5 Feb 2008, Zuzanna K. Filutowska wrote:
>
>>
>> On Mon, 4 Feb 2008, Andrzej Adam Filip wrote:
>>
>>> "Zuzanna K. Filutowska" <pla...@platinum.linux.pl> wrote:
>>>> Is there any way to make sendmail to use a passwd-like password file
>>>> to look up the usernames instead of using getpwnam?
>>>
>>> [ based also on info provided in another thread]
>>>
>>> Have you considered using custom (perl?) script to convent plain text
>>> /etc/passwd-dovecot to
>>> * virtusertable entries
>>> *OR*
>>> * custom map listing "domain-less users" user for LUSER_RELAY
>>> http://groups.google.com/group/comp.mail.sendmail/msg/c6ce04d354feedad
>>> You can create simple makefile and choose one of the following
>>> * run it every 10m from cron
>>> * run it manually after changing /etc/passwd-dovecot
>>> * write simple (perl?) daemon to monitor the file every minute and
>>> execute makefile when needed
>>
>> Actually I am using sendmail to minimize wild hacks count.
>>
>>> P.S.
>>> Remember that SMTP-AUTH integration is a separate story.
>>
>> Yep. I remember this. And it makes me sad, that almost everything
>> (including ftp and imap daemon) supports alternate passwd but not sendmail.
>

> This is why my main servers use Sendmail as front-line MTA with mailscanner
> for spam/virus/phishing/etc.. then pass it on to a Qmail vpopmail backend,
> its so much less hassle, and Dovecot intergrates with vpopmail so its all
> maintenance free once setup.
>
> I've been as good as told mysql wont be incorporated into sendmail,
> so dont expect dovecots stuff to be :) which is sad sicne even the 9yo
> abandonded Qmail supports mysql.

I don't like flaming, especially flames Sendmail vs. Rest Of The
World...but when I hear/read compilation of "Qmail" and
"main/large/corporate servers" it gives me shudders. I am running a site
that server 250-500k emails a day, and I can't imagine any Qmail
"backend".

Anyway, I have solved the SASL issue too, for the interested people I will
post it tommorow.

Thanks for everyone, participating in the discussion, for their help.

Message has been deleted

Zuzanna K. Filutowska

unread,
Feb 6, 2008, 1:26:59 PM2/6/08
to
On Wed, 6 Feb 2008, Zuzanna K. Filutowska wrote:

> Anyway, I have solved the SASL issue too, for the interested people I will
> post it tommorow.

Here is the link that describes how to hack SASL. Any imput is welcome
(especially concerning autotools):
http://platyna.platinum.linux.pl/blog/?p=5

Andrzej Adam Filip

unread,
Feb 6, 2008, 3:09:26 PM2/6/08
to
"Zuzanna K. Filutowska" <pla...@platinum.linux.pl> wrote:

> On Tue, 5 Feb 2008, Andrzej Adam Filip wrote:
>
>> "Zuzanna K. Filutowska" <pla...@platinum.linux.pl> wrote:
>>
>>> On Mon, 4 Feb 2008, Andrzej Adam Filip wrote:
>
>> Are interested in *testing* new (via sendmail.cf *only*) sendmail and
>> "dovecot with passwd file" integration?
>> a) sendmail will check /etc/passwd-dovecot *directly*
>> b) sendmail will support "domanized aliases" in domains handled by
>> dovecot
>>
>> It will require:
>> 1) applying 6 lines patch to cf/m4/proto.m4
>> 2) adding one new file to cf/feature/ directory
>>
>> It will be a variation of FEATURE(`anfi/vcyrus') available at
>> http://open-sendmail.sourceforge.net/
>> [ expected delivery time: this week or never :-) ]
>
> I would gladly test it.
>
> Regards.

It is available:
http://open-sendmail.cvs.sourceforge.net/*checkout*/open-sendmail/open-sendmail/cf/feature/anfi/vdevcot_plain.m4

Installation procedure:
1) copy vdevcot_plain.m4 file to created anfi subdirectory of
cf/feature/ directory
2) copy sendmail.mc to sendmail-test.mc
3) in sendmail-test.mc add

FEATURE(`anfi/vdevcot_plain')
LOCAL_CONFIG
C{VDovecotDomain}domain1.handled.by.dovecot domain2.handled.by.dovecot
divert(-1)

3) generate sendmail-test.cf
4) check that if "dovecot user map" works
echo '/map dovecot existi...@domain1.handled.by.dovecot' | \
sendmail -C sendmail-test.cf -bt
echo '/map dovecot non-exis...@domain1.handled.by.dovecot' | \
sendmail -C sendmail-test.cf -bt
DOES NOT WORK? => EXIT [ASK FOR ADDITIONAL INSTRUCTIONS]
5) patch cf/m4/proto.m4 with local-domain-routing.patch
http://open-sendmail.cvs.sourceforge.net/*checkout*/open-sendmail/open-sendmail/cf/m4/local-domain-routing.patch
6) generate sendmail-test.cf *AGAIN*
7) test it using
sendmail -C sendmail-test.cf -bv existi...@domain1.handled.by.dovecot
sendmail -C sendmail-test.cf -bv non-exis...@domain1.handled.by.dovecot
DOES NOT WORK? => EXIT [ASK FOR ADDITIONAL INSTRUCTIONS]
8) apply the fixes to sendmail.mc, generate new sendmail.cf, restart
sendmail daemon

P.S.
It is a trivial modification of FEATURE(`anfi/vcyrus')

--
[pl>en: Andrew] Andrzej Adam Filip : an...@priv.onet.pl : an...@xl.wp.pl
Open-Sendmail: http://open-sendmail.sourceforge.net/

Women treat us just as humanity treats its gods. They worship us and are
always bothering us to do something for them.
-- Oscar Wilde

Message has been deleted
Message has been deleted
0 new messages