mmv

mailserver bootstrap script
git clone git://git.yotsev.xyz/mmv.git
Log | Files | Refs | README | LICENSE

newuser (337B)


      1 #!/bin/sh
      2 
      3 echo -n "Username: "
      4 read -r user
      5 echo -n "Password: "
      6 read -r password
      7 
      8 record="$(smtpctl encrypt "$password")"
      9 record="$user@<domain>:$record:vmail:2000:2000:/var/vmail/<domain>/$user::userdb_mail=maildir:/var/vmail/<domain>/$user"
     10 echo "$record" >> /etc/mail/credentials
     11 
     12 echo "$user@<domain>: vmail" >> /etc/mail/virtuals