Groups | Search | Server Info | Login | Register
Groups > comp.mail.sendmail > #8244
| From | kalevi@kolttonen.fi (Kalevi Kolttonen) |
|---|---|
| Newsgroups | comp.mail.sendmail |
| Subject | Re: praliases file permission check |
| Date | 2026-01-31 23:24 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <10lm2uj$3a6d7$1@dont-email.me> (permalink) |
| References | <20260130125150.06f0bcd0@ryz.dorfdsl.de> <10ll3l4$2t9od$1@dont-email.me> <10lll4g$35m36$1@dont-email.me> <20260131220629.2ae3c779@ryz.dorfdsl.de> |
Marco Moock <mm@dorfdsl.de> wrote:
> On 31.01.2026 19:28 Uhr Kalevi Kolttonen wrote:
>
>> 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.
>
>
> Because I am not familiar with that and have no need for it. The
> aliases will be updated when needed by me.
Okay. I got tired of BerkeleyBD/OracleDB/whatever issues and migrated
everything to OpenLDAP. I have simple shell scripts to create, add and
delete aliases. I will show them here in case someone else is interested
in LDAP + Sendmail integration:
fbsd15:~ $ cat /root/bin/sm_add_alias
#!/usr/local/bin/bash
PROG=$(basename $0)
[ $# -eq 2 ] || { echo "$PROG usage: $PROG alias value"; exit 1; }
KEY=$1
VALUE=$2
ldapadd -x -D cn=root,dc=fbsd15,dc=local -w pw -H ldap://fbsd15.local -f <(cat <<EOF
dn: sendmailMTAKey=$KEY,dc=fbsd15,dc=local
objectClass: sendmailMTA
objectClass: sendmailMTAAlias
objectClass: sendmailMTAAliasObject
sendmailMTAAliasGrouping: aliases
sendmailMTACluster: mtacluster
sendmailMTAKey: $KEY
sendmailMTAAliasValue: $VALUE
description: foo
EOF
)
fbsd15:~ $ cat /root/bin/sm_add_alias_value
#!/usr/local/bin/bash
PROG=$(basename $0)
[ $# -eq 2 ] || { echo $PROG usage: $PROG alias value; exit 1; }
ALIAS=$1
VALUE=$2
ldapmodify -ZZ -D cn=root,dc=fbsd15,dc=local -w pw -h fbsd15.local -f <(cat <<EOF
dn: sendmailMTAKey=$ALIAS,dc=fbsd15,dc=local
changetype: modify
add: sendmailMTAAliasValue
sendmailMTAAliasValue: $VALUE
EOF
)
fbsd15:~ $ cat /root/bin/sm_delete_alias
#!/usr/local/bin/bash
PROG=$(basename $0)
[ $# -eq 1 ] || { echo $PROG usage: $PROG alias; exit 1; }
ALIAS=$1
ldapdelete -x -H ldap://fbsd15.local -w3 -D cn=root,dc=fbsd15,dc=local -w pw sendmailMTAKey=$ALIAS,dc=fbsd15,dc=local
br,
KK
Back to comp.mail.sendmail | Previous | Next — Previous in thread | Next in thread | Find similar
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