add command line

This commit is contained in:
Michel Roux 2016-10-06 00:40:56 +02:00
parent 21f60ecfdf
commit 28fe0cb271
4 changed files with 33 additions and 1 deletions

10
commands/exim_passwd.sh Normal file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
echo "Username: "
read username
echo "Domain: "
read domain
echo "Password: "
userdbpw -md5 | userdb "$username@$domain" set systempw
makeuserdb

12
commands/exim_useradd.sh Normal file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
echo "Username: "
read username
echo "Domain: "
read domain
echo "$username" >> "/etc/exim4/domains/$domain"
echo "Password: "
userdb "$username@$domain" set uid=$(id -u mail) gid=$(id -g mail) home="/var/vmail/$domain/$username" mail="/var/vmail/$domain/$username"
userdbpw -md5 | userdb "$username@$domain" set systempw
makeuserdb

10
commands/exim_userdel.sh Normal file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
echo "Username: "
read username
echo "Domain: "
read domain
sed "/$username/d" "/etc/exim4/domains/$domain"
userdb "$username@$domain" del
makeuserdb

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
date >> /var/log/exim4/sa-learn date >> /var/log/exim4/sa-learn
find /var/vmail -type d -name '.Junk' | xargs -I junk sa-learn --spam junk/{cur,new} >> /var/log/exim4/sa-learn find /var/vmail -type d -name '.Junk' | xargs -I junk sa-learn --spam junk/{cur,new} >> /var/log/exim4/sa-learn