[debian-edu-commits] [Git][debian-edu/debian-edu-config][personal/gber/fix-ldap-createuser-krb5] ldap-createuser-krb5: send welcome email in order to create maildir

Guido Berhörster (@gber) gitlab at salsa.debian.org
Mon Aug 7 09:18:38 BST 2023



Guido Berhörster pushed to branch personal/gber/fix-ldap-createuser-krb5 at Debian Edu / debian-edu-config


Commits:
276da7f7 by Guido Berhoerster at 2023-08-07T10:15:43+02:00
ldap-createuser-krb5: send welcome email in order to create maildir

Without this the maildir in /var/mail/<user> will not exist and Dovecot will
refuse to let the user log in as it cannot create this directory.

- - - - -


1 changed file:

- ldap-tools/ldap-createuser-krb5


Changes:

=====================================
ldap-tools/ldap-createuser-krb5
=====================================
@@ -176,4 +176,22 @@ if echo "$ldif" | ldapmodify -ZZ -D "$admindn" -W -v -x ; then
 
     # add Samba user
     smbpasswd -a -n -s $USERNAME
+
+    # Send welcome mail in order to create maildir for dovecot
+    /usr/lib/sendmail "${USERNAME}@postoffice.intern" <<EOF
+Subject: Welcome to the mail-system
+
+Hello $GECOS,
+
+welcome to the mail-system.
+
+Your userID is $USERNAME, and your email address is:
+
+    $USERNAME at postoffice.intern
+
+Regards,
+
+    Debian-Edu SysAdmin
+
+EOF
 fi



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/276da7f7b714efb0c0af383dd4924e289784a2de

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/276da7f7b714efb0c0af383dd4924e289784a2de
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20230807/ebc80306/attachment-0001.htm>


More information about the debian-edu-commits mailing list