Академический Документы
Профессиональный Документы
Культура Документы
1. Installation of PostfixAdmin:
[root@mail~]# vi config.inc.php
And change these lines
$CONF['admin_email'] = 'postmaster@eta.in';
$CONF['encrypt'] = 'cleartext';(make it cleartext)
'abuse' => 'postmaster@eta.in',
'hostmaster' => 'postmaster@eta.in', (note: here era.in is your domain
naume)
'postmaster' => 'postmaster@eta.in',
'webmaster' => 'postmaster@eta.in'
$CONF['domain_path'] = 'YES';
$CONF['domain_in_mailbox'] = 'YES';
$CONF['vacation_domain'] = 'autoreply.change-this-to-your.domain.tld';
$CONF['footer_text'] = 'www.keenable.in';
$CONF['footer_link'] = 'www.keenable.in';
$CONF['show_footer_text'] = 'NO';
[root@mail~]# cd templates
[root@mail~]# copy header.tpl & footer.tpl
[root@mail~]# cp header.tpl header.tplold
[root@mail~]#cp footer.tpl footer.tplold
edit header.tpl
[root@mail~]# vi header.tpl
and make changes:
edit footer.tpl
[root@mail~]# vi footer.tpl
</body>
</html>
d-) Create Sql postfix Database:
be in the same directory
[root@mail~]# cd /var/www/html/postfixadmin/postfixadmin-*
Rename setup.php
http://localhost/postfixadmin
login (enter admin username & password)
[post@mail~]$ cd /home/post/rpm/SPECS
[post@mail~]$ vi postfix.spec
(Make changed on following line like this--line 86 & 89)
%define with_mysql_redhat 1
%define with_sasl 2
[post@mail~]$ su - root
[root@mail~]# cd /home/post/rpm/RPMS/i386
(Then check with the following command that postfix is compiled with mysql)
http://easynews.dl.sourceforge.net/sourceforge/courier/courier-imap-
4.1.1.tar.bz2
[root@mail~]# cd Desktop
[root@mail~]# cp Desktop/courier-imap-4.1.1.tar.bz2 /home/post
[root@mail~]# chown post.post /home/post/courier-imap-4.1.1.tar.bz2
http://easynews.dl.sourceforge.net/sourceforge/courier/courier-authlib-0.58.tar.bz2
[post@mail~]$ cd /rpm/SPECS/
now become root & go to RPMS & install all related rpms through root:
[post@mail~]$ su - root
[root@mail~]# cd /home/post/rpm/RPMS/i386
[root@mail~]# rpm -ivh courier-imap-4.1.1-1.5Server.i386.rpm
[root@mail~]# vi /etc/passwd
virtual:x:1001:1001::/home/virtual:/bin/bash
edit /etc/group
[root@mail~]# vi /etc/group
virtual:x:1001:
[root@mail~]# cd /etc/postfix
[root@mail~]# cp main.cf main.cf_org
[root@mail~]# vi main.cf
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:1001
virtual_mailbox_base = /home/virtual
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 1001
virtual_transport = virtual
virtual_uid_maps = static:1001
#Additional for quota support
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps =
mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his
diskspace quota, please try again later.
virtual_overquota_bounce = yes
relay_domains = mysql:/etc/postfix/mysql_relay_domains_maps.cf
relayhost = mail.keenable.com
[root@mail~]#vi mysql_relay_domains_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
query = SELECT domain FROM domain WHERE domain='%s' and backupmx
= '1'
[root@mail~]# vi mysql_virtual_mailbox_limit_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
query = SELECT quota FROM mailbox WHERE username='%s'
[root@mail~]# vi mysql_virtual_alias_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
query = SELECT goto FROM alias WHERE address='%s' AND active = 1
[root@mail~]# vi mysql_virtual_mailbox_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
query = SELECT maildir FROM mailbox WHERE username='%s' AND active
=1
[root@mail~]# vi mysql_virtual_domains_maps.cf
user = postfix
password = postfix
hosts = localhost
dbname = postfix
query = SELECT domain FROM domain WHERE domain='%s'
#optional query to use when relaying for backup MX
#query = SELECT domain FROM domain WHERE domain='%s' and
backupmx = '0' and active = '1'
MYSQL_SERVER localhost
MYSQL_USERNAME postfix
MYSQL_PASSWORD postfix
MYSQL_PORT 0
MYSQL_OPT 0
MYSQL_DATABASE postfix
MYSQL_USER_TABLE mailbox
#MYSQL_CRYPT_PWFILED crypt
MYSQL_CLEAR_PWFIELD password
MYSQL_UID_FIELD 1001
MYSQL_GID_FIELD 1001
MYSQL_LOGIN_FIELD username
MYSQL_HOME_FIELD '/home/virtual'
MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD maildir
10) to fetch the mails of user in case its not global server.
vi /root/.fetchmailrc
edit:
set logfile /var/log/fetchmail.log
poll mail.keenable.in proto POP3