Forcefully recalculate/update message counts and disk quota - MDaemon




Situation:

I have removed some mails from the MDaemon server from the backend,ie, browsed through the mail box and deleted some mails maunally without using MDeamon's application. In this case, the new mail box count and quota will not reflect in the wordclient and MDaemon's backend application. You can follow the steps shown below to update the message counts and disk quota manually.

Solution:


1. The results of user quota checks are maintained in the 'MDaemon\App\quotacounts.dat' file.

Create a file named 'ClearQuotaCounts.sem'.
If you wish to clear the cached quota value for a user, add the user’s email address to this SEM file and then place it in the MDaemon\App directory.
If you wish to clear all cached counts, just place a single  * character in it. and then place 'ClearQuotaCounts.sem' file in the MDaemon\App directory.

2. Then open MDaemon and go into the Queues >> Queue and Statistics Manager



3. Once you click the 'User Page', the page will start to update with new quota and message counts. The file 'quotacounts.dat' will updated with new values once the 'User Page' is fully loaded.





Reference:
http://mdaemon.dutaint.com/9.0/RouteSlips.html

require_once(Cache/Lite.php) : failed to open stream - Joomla


Joomla Error:


Warning: require_once(Cache/Lite.php) [function.require-once]: failed to open stream: No such file or directory in /home/test/public_html/libraries/joomla/cache/storage/cachelite.php on line 75

Fatal error: require_once() [function.require]: Failed opening required 'Cache/Lite.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/test/public_html/libraries/joomla/cache/storage/cachelite.php on line 75


Fix:


Install cachelite using the following command.


[root@server ~]# pear install Cache_Lite-1.7.15

Install 'MailParse' extension - cPanel




The following installation will work with php-5.3.x

root@server [~]# cd /usr/local/src
root@server [/usr/local/src]# wget http://pecl.php.net/get/mailparse-2.1.5.tgz
root@server [/usr/local/src]# tar xvzf mailparse-2.1.5.tgz
root@server [/usr/local/src]# cd mailparse-2.1.5
root@server [/usr/local/src/mailparse-2.1.5]# phpize
root@server [/usr/local/src/mailparse-2.1.5]# ./configure
root@server [/usr/local/src/mailparse-2.1.5]# make
root@server [/usr/local/src/mailparse-2.1.5]# make install
Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20090626/


Once the installation is completed, you can find 'mailparse.so' file in a directory like /usr/local/lib/php/extensions/no-debug-non-zts-20090626/.

Open the php.ini file and add this extesnion. Here in my case i added an entry like the following.


root@server [~]# vi /usr/local/lib/php.ini
.
.
extension = "/usr/local/lib/php/extensions/no-debug-non-zts-20090626/mailparse.so"
.
.


Restart Apache to make the changes in effect.

root@server [~]# /etc/init.d/httpd restart


Verify wheter the extesnions is loaded or not.

root@server [~]# php -m | grep mailparse
mailparse

That's it...

Install railo3.2 in cPanel Server


Install Railo 3.2


Railo 3.2 32bit

root@railo [~]# wget http://www.getrailo.org/down.cfm?item=/railo/remote/download/3.2.1.000/tomcat/linux/railo-3.2.1.000-pl0-linux-installer.run


Railo 3.2 64bit

root@railo [~]# wget http://www.getrailo.org/down.cfm?item=/railo/remote/download/3.2.1.000/tomcat/linux/railo-3.2.1.000-pl0-linux-x64-installer.run


Give executable permission to the bianry file.

root@railo [~]# chmod +x *.run

Execute the binary file to install railo

root@railo [~]# ./railo-*-installer.run


It is better to give the default settings while the installation.

Configure Apache to load Railo


1. Add an additional conf for railo's mod_jk module in apache.
Open apache configuration file (httpd.conf) and add the following entry in it. Here in my case it is '/usr/local/apache/conf/httpd.conf'.

Include conf/mod_jk.conf

2. Add railo configuration entries.
Create a file, '/usr/local/apache/conf/mod_jk.conf' with the following contents in it.

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

<IfModule !mod_jk.c>
    LoadModule jk_module /usr/lib/httpd/modules/mod_jk.so
</IfModule>

<IfModule mod_jk.c>
    JkMount /*.cfm ajp13
    JkMount /*.cfc ajp13
    JkMount /*.do ajp13
    JkMount /*.jsp ajp13
    JkMount /*.cfchart ajp13
    JkMount /*.cfres ajp13
    JkMount /*.cfm/* ajp13
    JkMount /*.cfml/* ajp13
    # Flex Gateway Mappings
    # JkMount /flex2gateway/* ajp13
    # JkMount /flashservices/gateway/* ajp13
    # JkMount /messagebroker/* ajp13
    JkMountCopy all
    JkLogFile /var/log/httpd/mod_jk.log
</IfModule>

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

3. You have to distill apache configuration.

root@railo [~]# /usr/local/cpanel/bin/apache_conf_distiller --update
root@railo [~]# /etc/init.d/httpd restart

Check if jk module is loaded with Apache. If it is enabled you will get a result like as follows.

root@railo [~]# httpd -M | grep  jk
 Syntax OK
 jk_module (shared)



Once the installation completed, you can access railo administrator control panel using the following url.

http://<server ip>/railo-context/admin/server.cfm


Enable Railo for a cPanel Account


** Railo is enabling domain basis not account basis. You have to given the document root of your domain in the railo configuration to enable railo.

Here i am showing you how to enable railo for the domain, 'sudosu.in'. Document root of sudosu.in is '/home/sudosu/public_html'.

Open /opt/railo/tomcat/conf/server.xml in your favourite editor like vim or nano and add the following code section in it. There will be a sample code in  /opt/railo/tomcat/conf/server.xml. You can give the following code just below the sample code.

Make changes in the following code by your domain name and it's document root.

<Host name="sudosu.in" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
   <Context path="" docBase="/home/sudosu/public_html" />
   <Alias>www.sudosu.in</Alias>
</Host>


Restart railo service once you have sone the above changes.


root@railo [~]# /etc/init.d/railo_ctl restart

Once you have restarted railo, check if the service is started or not. If there is any errors the service will ne be started and it will show 'No PID found' while checking the railo status.

root@railo [~]# /etc/init.d/railo_ctl status
 * Railo/Tomcat is running (PID: 1979)

If the PID of railo is not running even after restarting railo, you have to check railo log to sort out the issue.
The following log wil help to find the issue.

root@railo [~]# tail -f /opt/railo/tomcat/logs/catalina.out


It will take time to completly UP the railo service, depending upon the number of sites added in server.xml it will vary.
Once you have done the above steps, the following url will be available for you.

http://www.sudosu.in/railo-context/admin/web.cfm

You can create a test cfm page using the following code. Save these contents in test.cfm file and copy it in the document root of the domain and access www.sudosu.in/test.cfm.

Test CFM Page

<cfset myVar="Hello World!">
<cfoutput>#myVar#</cfoutput>
<cfoutput>#Now()#</cfoutput>

Install and Configure Nagios - CentOS




Nagios is an open source computer system monitoring, network monitoring and infrastructure monitoring software application. Nagios offers monitoring and alerting services for servers, switches, applications, and services. It alerts the users when things go wrong and alerts them a second time when the problem has been resolved.


Here i am installing and configuring Nagios in CentOS 6.4, 64 bit. Depending upon the versions, make changes in the installation steps. Here in this case both the client and servers are CentOS 6.4, 64 bit.


Server Side Configuration


Server IP: 192.168.1.100
Server Hostname: server.arun.com

Install Nagios


[root@nagios-server ~]# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
[root@nagios-server ~]# yum install nagios nagios-plugins

You can find nagios configuration files in /etc/nagios and plugins under /usr/lib64/nagios/plugins/ after the installation.

Configure Nagios


Create 'nagiosadmin' user

[root@nagios-server ~]# htpasswd /etc/nagios/passwd nagiosadmin
New password:
Re-type new password:
Updating password for user nagiosadmin

Now you can access nagios via browser using the following url. You can use 'nagiosadmin' and it's password to login to nagios webpanel.
http://<IP>/nagios


You can find nagios configuration files in /etc/nagios and plugins under /usr/lib64/nagios/plugins/


Change Notification Mail Address

[root@nagios-server ~]# vim /etc/nagios/objects/contacts.cfg
.
.
define contact{
        contact_name             nagiosadmin       ; Short name of user
        use                             generic-contact         ; Inherit default values from generic-contact template (defined above)
        alias                           Nagios Admin            ; Full name of user

        email                           nagios@localhost        ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
        }
.
.


Add or Edit Commands for Monitoring

**Commands must be defined before use. We can use a command once it is defined in the commands.cfg file. You cannot use any other commands which is not defined here. Here is the commands which is defined in my server.

[root@nagios-server ~]# egrep -v '^#|^$' /etc/nagios/objects/commands.cfg
define command{
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
}
define command{
command_name notify-service-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}
define command{
        command_name    check-host-alive
        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
        }
define command{
        command_name    check_local_disk
        command_line    $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
        }
define command{
        command_name    check_local_load
        command_line    $USER1$/check_load -w $ARG1$ -c $ARG2$
        }
define command{
        command_name    check_local_procs
        command_line    $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
        }
define command{
        command_name    check_local_users
        command_line    $USER1$/check_users -w $ARG1$ -c $ARG2$
        }
define command{
command_name check_local_swap
command_line $USER1$/check_swap -w $ARG1$ -c $ARG2$
}
define command{
command_name check_local_mrtgtraf
command_line $USER1$/check_mrtgtraf -F $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$
}
define command{
        command_name    check_ftp
        command_line    $USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$
        }
define command{
        command_name    check_hpjd
        command_line    $USER1$/check_hpjd -H $HOSTADDRESS$ $ARG1$
        }
define command{
        command_name    check_snmp
        command_line    $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$
        }
define command{
        command_name    check_http
        command_line    $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
        }
define command{
command_name check_ssh
command_line $USER1$/check_ssh $ARG1$ $HOSTADDRESS$
}
define command{
command_name check_dhcp
command_line $USER1$/check_dhcp $ARG1$
}
define command{
        command_name    check_ping
        command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
        }
define command{
        command_name    check_pop
        command_line    $USER1$/check_pop -H $HOSTADDRESS$ $ARG1$
        }
define command{
        command_name    check_imap
        command_line    $USER1$/check_imap -H $HOSTADDRESS$ $ARG1$
        }
define command{
        command_name    check_smtp
        command_line    $USER1$/check_smtp -H $HOSTADDRESS$ $ARG1$
        }
define command{
command_name check_tcp
command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
}
define command{
command_name check_udp
command_line $USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
}
define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
}
define command{
command_name check_mysql
command_line $USER1$/check_mysql -H $HOSTADDRESS$
}
define command{
command_name            check_nrpe
command_line            $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
define command{
command_name process-host-perfdata
command_line /usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> /var/log/nagios/host-perfdata.out
}
define command{
command_name process-service-perfdata
command_line /usr/bin/printf "%b" "$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n" >> /var/log/nagios/service-perfdata.out
}


Add New Client's for Monitoring

I am adding all the client's configuration in a new directory, ie, /etc/nagios/servers . I have to add the new directory in the nagios configuration.

[root@nagios-server ~]# echo "cfg_dir=/etc/nagios/servers" >> /etc/nagios/nagios.cfg
Once you have done the above step, all the files with extension .cfg in  /etc/nagios/servers will be loaded with nagios.


Client IP: 192.168.1.101
Client Hostname: client.arun.com

For easy to understand, i am creating the configuration file for 'client.arun.com' as 'client.arun.com.cfg'. Here is a sample configuration template for adding new clients to the nagios server. The following configuration file will monitor FTP, HTTP, POP3, IMAP, SMTP, MYSQL, SSH, PING, Current Load, Current Users, Root Partition, Total Processes, Zombie Processes. You can add new services in this and remove unwanted services.

[root@nagios-server ~]# cat /etc/nagios/servers/client.arun.com.cfg
# First of all client server is to be defined using host defintion.
define host{
use linux-server
host_name client.arun.com
alias client.sudosu.in
address 192.168.1.101
max_check_attempts 5
check_period 24x7
notification_interval 30
notification_period 24x7
}

#Once all the host is defined. Then proceed with the monitored services.
define service{
use generic-service
host_name client.arun.com
service_description PING
check_command check_ping!100.0,20%!500.0,60%
}

define service{
use generic-service
host_name client.arun.com
service_description HTTP
check_command check_http
}

define service{
use generic-service
host_name client.arun.com
service_description FTP
check_command check_ftp
}

define service{
use generic-service
host_name client.arun.com
service_description SSH
check_command check_ssh
}

define service{
use generic-service
host_name client.arun.com
service_description SMTP
check_command check_smtp
}

define service{
use generic-service
host_name client.arun.com
service_description POP3
check_command check_pop
}

define service{
use generic-service
host_name client.arun.com
service_description IMAP
check_command check_imap
}

define service{
use generic-service
host_name client.arun.com
service_description MYSQL
check_command check_mysql
}

#nrpe and nagios plugins need not to be installed in the client side for the above services.
#====================================================================
#nrpe and nagios plugins need to install in the client side for the following services.

define service{
    use generic-service
  host_name client.arun.com
  service_description Current Users
    check_command check_nrpe!check_users
}
define service{
    use generic-service
    host_name client.arun.com
    service_description Current Load
    check_command check_nrpe!check_load
}
define service{
    use generic-service
    host_name client.arun.com
    service_description Root Partition
    check_command check_nrpe!check_xvda
}
define service{
    use generic-service
    host_name client.arun.com
    service_description Zombie Processes
    check_command check_nrpe!check_zombie_procs
}
define service{
    use generic-service
    host_name client.arun.com
    service_description Total Processes
    check_command check_nrpe!check_total_procs
}


Once you have made all the above changes, restart nagios and httpd service.

[root@nagios-server ~]# /etc/init.d/httpd restart
[root@nagios-server ~]# /etc/init.d/nagios restart


Client Side Configuration

Install nrpe and Nagios Plugins


**You do not want to do anything in the client server if you want to monitor ssh, smtp, pop3, imap, http, ping, mysql services. ie, do not want to install nrpe and nagios-plugins. You can check the status of these service outside the client server without any additional services. One of the example is 'telnet', it help you to check whether a service is listening in the server or not.

**If you want to monitor process, load, disk usage, swap memory, ie, for all the information which is returned inside the client server. you have to configure the client as follows.


[root@nagios-client ~]# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
[root@nagios-client ~]# yum install nrpe nagios-plugins

You can find nrpe configuration files in /etc/nagios and plugins under /usr/lib64/nagios/plugins/ after the installation.

Here is my sample nrpe.cfg file.

[root@nagios-client ~]# egrep -v '^#|^$' /etc/nagios/nrpe.cfg
log_facility=daemon
pid_file=/var/run/nrpe.pid
server_port=5666
nrpe_user=nagios
nrpe_group=nagios
allowed_hosts= 192.168.1.0/24

dont_blame_nrpe=0
allow_bash_command_substitution=0
debug=0
command_timeout=60
connection_timeout=300
command[check_users]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_xvda]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/xvda1
command[check_zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w 150 -c 200


Once you have made all the above changes, restart nrpe service.
[root@nagios-client ~]# /etc/init.d/nrpe restart

cPanel - Install 'memcache' in CentOS


Download and Extract Memcache package

root@server [~]# cd /usr/local/src
root@server [/usr/local/src]# wget http://pecl.php.net/get/memcache-3.0.6.tgz
root@server [/usr/local/src]# tar -xzf memcache-3.0.6.tgz

Compilation and installation

root@server [/usr/local/src]# cd memcache-3.0.6
root@server [/usr/local/src/memcache-3.0.6]# phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626

root@server [/usr/local/src/memcache-3.0.6]# ./configure
root@server [/usr/local/src/memcache-3.0.6]# make
root@server [/usr/local/src/memcache-3.0.6]# make install

Enable memcache in php.ini
root@server [~]# echo "extension=memcache.so" >> /usr/local/lib/php.ini
root@server [~]# /etc/init.d/httpd restart

If 'memcache' is successfully loaded, you will get a result as like follows.

root@server [~]# php -i | grep memcache
memcache
memcache support => enabled
memcache.allow_failover => 1 => 1
memcache.chunk_size => 32768 => 32768
memcache.compress_threshold => 20000 => 20000
memcache.default_port => 11211 => 11211
memcache.hash_function => crc32 => crc32
memcache.hash_strategy => consistent => consistent
memcache.lock_timeout => 15 => 15
memcache.max_failover_attempts => 20 => 20
memcache.protocol => ascii => ascii
memcache.redundancy => 1 => 1
memcache.session_redundancy => 2 => 2

That's it..

Install and Configure Postfix SMTP server with Cyrus-SASL authentication




If you are planning to use mysql for cyrus-sasl authentication, it is better to install PostfixAdmin. It will help us to add new smtp users easily.


Install and Configure PostfixAdmin



It is needed to install httpd,mysql and php for PostfixAdmin.

# yum install mysql-server php php-mysql php-imap php-mbstring -y

Once all the above packages were installed, make sure httpd and mysqld services are running.

It is needed to create db, db user for PostfixAdmin. Here i am using the following db details. Change the following details as you prefered.

DB: postfix
DB User: postfix
Password: postfix

The following command will create the DB for postfix. You can also execute these queries directly in the mysql console.

# mysql -e "CREATE DATABASE postfix;"
# mysql -e "CREATE USER postfix@localhost IDENTIFIED BY 'postfix';"
# mysql -e "GRANT ALL PRIVILEGES ON postfix.* TO postfix;"



To download and fix permissions of PostfixAdmin.

# yum install -y subversion
# cd /usr/local/

The following command will download latest PostfixAdmin package. The 'svn' command is available in the package 'subversion' which we have already installed.

# svn co http://svn.code.sf.net/p/postfixadmin/code/trunk postfixadmin
# chmod 777 /usr/local/postfixadmin/templates_c

Edit the postfixadmin configuration file, /usr/local/postfixadmin/config.inc.php and update the following lines as shown below.

 $CONF['configured'] = true;
 $CONF['postfix_admin_url'] = '/postfixadmin';
 $CONF['database_type'] = 'mysqli';
 $CONF['database_host'] = 'localhost';
 $CONF['database_user'] = 'postfix';
 $CONF['database_password'] = 'postfix';
 $CONF['database_name'] = 'postfix';
 $CONF['domain_path'] = 'YES';
 $CONF['domain_in_mailbox'] = 'NO';
 $CONF['encrypt'] = 'cleartext';
 $CONF['emailcheck_resolve_domain] = 'NO';


Once you have done the above changes, you have to create the following entry in httpd.conf to access postfixadmin via browser.

Alias /postfixadmin /usr/local/postfixadmin


Restart httpd service

# /etc/init.d/httpd restart


Now you can access postfixadmin using the following url. Setup the postfixadmin as per the given instructon in there.

http://<IP>/postfixadmin/setup.php

Once the setup is completed successsfully, it is time to install and configure postfix service.


Install and Configure Postfix



There will be a postfix package initiallly in the default installation. Here i am removing it and i am using Postfix-2.9.7. Depending upon the version and architecture, select the postfix version from http://packages.oostergo.net/

To download and install postfix
# rpm -Uvh http://packages.oostergo.net/postfix-2.9/el6/postfix-2.9.7-1.el6.x86_64.rpm

The following commands will made the changes in /etc/postfix/main.cf. We have to setup it initially.

To set postfix's hostname.
# postconf -e "myhostname = mail.sudosu.in"
# postconf -e "mydomain = sudosu.in"

# postconf -e "myorigin = "'$'"mydomain"

inet_interfaces initially set for listening from localhost only. We need to change it to listen on all interfaces.
# postconf -e "inet_interfaces = all"

# postconf -e "inet_protocols = ipv4"

# postconf -e "smtpd_banner = "'$'"myhostname ESMTP"

To limit an email size 10M
# postconf -e "message_size_limit = 10485760"

# postconf -e "mydestination = "'$'"myhostname, localhost."'$'"mydomain, localhost"



Install and Configure Cyrus-SASL 


Install necessary packages.

# yum install cyrus-sasl*



Check if postfix support cyrus authentication. Check if cyrus is listed in the result.

# postconf -a
cyrus
dovecot


Here i am using mysql backend for smtp authentication. Here is cyrus-sasl configuration for smtpd service.

[root@server ~]# cat /etc/sasl2/smtpd.conf
log_level: 7
pwcheck_method: auxprop
auxprop_plugin: sql
sql_engine: mysql
mech_list: PLAIN LOGIN
sql_hostnames: localhost
sql_user: postfix
sql_passwd: postfix
sql_database: postfix
sql_select: SELECT password FROM mailbox WHERE username = '%u@%r'


Postfix configuration for cyrus SMTP-Auth settings

# postconf -e "smtpd_sasl_local_domain = $myhostname"
# postconf -e "broken_sasl_auth_clients = yes"
# postconf -e "smtpd_sasl_type = cyrus"
# postconf -e "smtpd_sasl_auth_enable = yes"
# postconf -e "smtpd_sasl_security_options = noanonymous"
# postconf -e "broken_sasl_auth_clients = yes"
# postconf -e "smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated,  reject_unauth_destination, permit"
# postconf -e "smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination"


**If you have added any more configuration other than discussed in this article, remove those first. Once you verified the configuration discussed here, you can add new configurations.

Once the above onfiguration is completed, restart saslauthd and postfix services.


# /etc/init.d/saslauthd restart
# /etc/init.d/postfix restart

Verify the confiration by using telnet.