Groups | Search | Server Info | Login | Register


Groups > comp.mail.sendmail > #8239

Re: praliases file permission check

From kalevi@kolttonen.fi (Kalevi Kolttonen)
Newsgroups comp.mail.sendmail
Subject Re: praliases file permission check
Date 2026-01-31 19:28 +0000
Organization A noiseless patient Spider
Message-ID <10lll4g$35m36$1@dont-email.me> (permalink)
References <20260130125150.06f0bcd0@ryz.dorfdsl.de> <10ll3l4$2t9od$1@dont-email.me>

Show all headers | View raw


Hugo Villeneuve-Lapointe <hugo_villap@email.invalid> wrote:
> Good luck, maybe others can chip in. Or may have beter understanding of 
> the Sendmail code.

Why not use LDAP for all the DBs and aliases? It is easy to set up and
avoids having to run makemap and praliases. File sendmail.schema just
has to be included in OpenLDAP. Probably works fine 389ds too.

Here is the LDAP related stuff in my sendmail configuration:

fbsd15:~ $ grep -i ldap /etc/mail/sendmail.mc
define(`confLDAP_DEFAULT_SPEC',`-x -H ldap://fbsd15.local -w3 -b dc=fbsd15,dc=local -d cn=sendmail,dc=fbsd15,dc=local -M simple -P /etc/mail/ldap-secret -s sub')dnl
define(`confLDAP_CLUSTER', `mtacluster')dnl
define(`ALIAS_FILE', `ldap:')dnl
FEATURE(mailertable, `LDAP')dnl
FEATURE(`virtusertable', `LDAP')dnl
FEATURE(authinfo, `LDAP')dnl
FEATURE(genericstable, `LDAP')dnl

Instead of praliases, we can use a simple shell script like this:

fbsd15:~ $ cat /root/bin/sm_list_aliases 
#!/usr/local/bin/bash

PROG=$(basename $0)

[ $# -eq 0 ] || { echo $PROG usage: $PROG; exit 1; }

ldapsearch -o ldif-wrap=no -LLL -x -D cn=root,dc=fbsd15,dc=local -w passwordhere -H ldap://fbsd15.local -b dc=fbsd15,dc=local -S sendmailMTAKey "(objectClass=sendmailMTAAliasObject)" sendmailMTAKey sendmailMTAAliasValue Description | egrep -v '^(dn:|#)' | sed '$d'

br,
KK

Back to comp.mail.sendmail | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

praliases file permission check Marco Moock <mm@dorfdsl.de> - 2026-01-30 12:51 +0100
  Re: praliases file permission check jayjwa <jayjwa@atr2.ath.cx.invalid> - 2026-01-30 14:15 -0500
    Re: praliases file permission check Marco Moock <mm@dorfdsl.de> - 2026-01-30 20:53 +0100
      Re: praliases file permission check jayjwa <jayjwa@atr2.ath.cx.invalid> - 2026-01-31 11:26 -0500
        Re: praliases file permission check Marco Moock <mm@dorfdsl.de> - 2026-01-31 22:10 +0100
          Re: praliases file permission check Hugo Villeneuve-Lapointe <hugo_villap@email.invalid> - 2026-01-31 22:42 +0000
  Re: praliases file permission check Hugo Villeneuve-Lapointe <hugo_villap@email.invalid> - 2026-01-31 14:29 +0000
    Re: praliases file permission check kalevi@kolttonen.fi (Kalevi Kolttonen) - 2026-01-31 19:28 +0000
      Re: praliases file permission check Marco Moock <mm@dorfdsl.de> - 2026-01-31 22:06 +0100
        Re: praliases file permission check kalevi@kolttonen.fi (Kalevi Kolttonen) - 2026-01-31 23:24 +0000
          Re: praliases file permission check kalevi@kolttonen.fi (Kalevi Kolttonen) - 2026-01-31 23:30 +0000
    Re: praliases file permission check Hugo Villeneuve-Lapointe <hugo_villap@email.invalid> - 2026-01-31 22:55 +0000

csiph-web