misc

[root@mbox /home/anujstha]# cat CreateMaildir.sh
#!/bin/bash

echo “Enter username”
read USER
echo “Enter qmail uid”
read QMAILUID

initial=$(echo ${USER:0:1})
mkdir -p /mbox/$initial/$USER
/var/qmail/bin/maildirmake /mbox/$initial/$USER/Maildir/

echo “|/usr/bin/qmailquota” > /mbox/$initial/$USER/.qmail
echo “./Maildir/” >> /mbox/$initial/$USER/.qmail

echo “10000″ /mbox/$initial/$USER/.quota

chown ${QMAILUID}:55 /mbox/$initial/$USER
chown -R ${QMAILUID}:55 /mbox/$initial/$USER/Maildir/

echo “User : ${USER}”
echo “QMAILUID : ${QMAILUID}”
echo “Initials : ${initial}”

########################################

CREATE A SELF-SIGNED CERTIFICATE WITH OpenSSL:
Generating an RSA key

% openssl genrsa -out cert.key 1024
Generating RSA private key, 1024 bit long modulus
………………..++++++
…++++++
e is 65537 (0×10001)
% openssl req -new -key cert.key -out cert.csr

#### Self-signing the certificate

% openssl x509 -req -in cert.csr -days 365 -signkey cert.key -out cert.crt
Signature ok
subject=/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd
Getting Private key

========================================================================================
Query Operation Master Roles
netdom query fsmo

Twitter Digg Delicious Stumbleupon Technorati Facebook

Comments are closed.

Random Pages By Best Accounting Services