Posts

Showing posts from October, 2012

Configuring SASL Auth in Postfix

A)  SASL  Configuration    First ensure that Cyrus- SASL  and salsauthd are installed.  Then configure /etc/sysconfig/saslauthd so that  SASL  uses IMAP  authentication  => MECH=rimap FLAGS="-O localhost"  (Assuming that localhost is the IMAP Server) restart saslauthd service  test  sasl  by using the command - testsaslauthd.  The testsaslauthd command for a user should return success. If it does,  SASL  configuration is fine. Now to configure Postfix. B) Configure Postfix to use this underlying  SASL  => 1.  Edit  main.cf  => # vim /etc/postfix/main.cf smtpd_sasl_auth_enable = yes broken_sasl_auth_clients = yes smtpd_sasl_security_options = noanonymous 2. Edit /usr/lib/sasl2/smtpd.conf => pwcheck_method: saslauthd mech_list: PLAIN LOGIN To ensure that username and the "from" address in an email client match => Create the File vim /etc/postfix/controlled_ envelope_senders # envelope sender owners ( S

POSTFIX VIRTUAL VACATION WITH MYSQL

VIRTUAL VACATION  DOC. # useradd -s /sbin/nologin vacation # mkdir /var/spool/vacation # cp /var/www/html/mailadmin/VIRTUAL_VACATION/vacation.pl /var/spool/vacation/ # chown -R vacation.vacation /var/spool/vacation/ # chmod 700 /var/spool/vacation/vacation.pl # cd /var/spool/vacation/ ### Install Cpan Command ### # perl -MCPAN -e shell ### Modules Install Example ### # cpan cpan> install DBD::mysql ### Requirements - The Following Perl Modules Are Required: ### DBD::mysql , Mail::Sender , Email::Valid , MIME::Charset , Log::Log4perl , Log::Dispatch , MIME::EncWords and Class::Load # wget http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Log-Dispatch-2.32.tar.gz # tar -xvf Log-Dispatch-2.32.tar.gz # cd Log-Dispatch-2.32 # perl Makefile.PL # make # make install # wget http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Params-Validate-1.06.tar.gz # tar -xvf Params-Validat

Amavis & Clamd Installation

                                                                                                                          Install amavis 1. install perl* [root@mail ~]#  yum install perl 2. install cpan [root@mail ~]# perl -MCPAN -e shell 3. login cpan [root@mail ~]# cpan ==> enter example [root@test ~]# cpan Terminal does not support AddHistory. cpan shell --CPAN exploration and modules installation (v1.7602) ReadLine support available (try 'install Bundle::CPAN') cpan> install Compress::Raw::Zlib ######## Modeuls ############## Compress::Raw::Zlib IO::Compress::Base IO::Compress::Zlib Compress::Zlib IO::Zlib Algorithm::Diff Text::Diff Archive::Tar File::Which Archive::Zip BerkeleyDB IO::stringy MailTools MIME::Base MIME::tools Convert::TNEF Convert::BinHex Convert::UUlib Data::UUID Digest::MD5 Net::Server Time::HiRes zlib Unix::Syslog Sys::Hostname::Long Socket IP::Country Net::CIDR::Lite Net_SSLeay.pm IO::Socket::SSL

Restricting users cannot send mail to off-site Domains

Problem     Restricting users cannot send mail to off-site Domains Solution   # cd /etc/postfix/   Create The File   1.   local_domains  => edit the file your Domain Name new.com   OK 2.   senders_user =>  edit the file restricted Users Name this users cannot send mail to off-site Domains fl@new.com          local_only amit@new.com          local_only ############################## #################### # vim /etc/postfix/ main.cf smtpd_restriction_classes =   local_only local_only   =    check_recipient_access hash:/etc/postfix/local_ domains, reject smtpd_recipient_restrictions =         check_sender_access hash:/etc/postfix/senders_ user,         permit_mynetworks,         reject_unauth_destination,         permit # postmap hash:/etc/postfix/local_domains # postmap hash:/etc/postfix/sender_user # /etc/init.d/postfix restart Testing  [raju@a]# telnet localhost 25  ====>  fl@new.com Not send Other Domains Trying 127.0.0.1... Connected to localhost.localdoma