How to create virtual mail clients on app2.safemobile.com.
There are 3 services that have to be updated:
+ postfix
+ sasl
+ courier
1. POSTFIX
To update the postfix service, you have to:
+ 1. make sure the do 353r175d main is in the /etc/postfix/main.cf file, eg:
virtual_mailbox_domains = app2.safemobile.com airadio.com
Any new domain should be added on this line, separated by a space. If the main.cf file is changed, postfix should be restarted
# service postfix restart
+2. make sure that the user has its own mail location in:
/var/mail/vhosts/<virtual domain name>/<virtual user name>/Maildir
eg:
/var/mail/vhosts/app2.safemobile.com/dragos.anghel/Maildir
Of course, all these directories should belong to postfix.
+3. edit /etc/postfix/vmailbox and map the username to the mail directory where the mail is delivered, as in the example below:
[email protected] app2.safemobile.com/dragos.anghel/Maildir/
After all the users have been added, issue:
# postmap /etc/postfix/vmailbox
2. SASL
Afte this, configure the sasl database
# saslpasswd2 -c -u <domain> -a smtpauth <username>Make sure that:
Each username must have its password generated using:
# userdbpw -md5
Once the password is generated, it should be included in the line in /etc/authlib/userdb, as follows:
dragos.anghel uid=89|gid=89|home=/var/mail/vhosts/app2.safemobile.com/dragos.anghel| shell=/bin/bash|imappw=$1$/i5p9m41$U11L38m83JuRyp298KZWw1|pop3pw=$1$/i5p9m41$U11L38m83JuRyp298KZWw1
Once this has been completed, stop the courier authdaemon:
# authdaemond stop
Make the user database
# makeuserdb
Then restart the authentication daemon
#authdaemond start
Now everything should work. The users can have different passwords for sasl and courier, which are unrelated services.
Mail liam $1$1iFqJco9$tm7NTo.ERD.VqbKNfjUQ3.
$1$cYQt92K6$0osDX/pWZzWAYgKBZkXKZ.
|