COURIER_MTA INSTALLATION
1.Download the courier authentication library
URL://http://www.courier-mta.org/authlib/
# rpm -qa | grep libtool
# rpm -qa | grep binutil
# rpm -qa | grep expect
# su – vasanth
# tar xvjf courier-authlib-0.63.0.tar.bz2
# cd courier-authlib-0.63.0
# ./configure
# make
# make install
# cd /usr/local/etc/authlib
# /usr/local/sbin/authdaemond start
# ps -ax | grep auth
# cd /etc/init.d
# ln -s /usr/local/sbin/authdaemond
# ln -s /etc/init.d/authdaemond /etc/rc5.d/S20authdaemond
INSATALLING Courier-IMAP
At first check the mailbox format by checking
# cat /var/qmail/control/defaultdelivery
Note: Compile courier as non root user
# tar xvjf courier-imap-4.7.0.tar.bz2
# cd courier-imap-4.7.0
# su root
#make install (must be root)
# make install-configure(must be root )
# cd /usr/lib/courier-imap/ ( Every thing related to courier will be installed inside this directory)
1.bin >>> Contain the binary file related to the courier
2. etc >>> Contain the configuaration files
3. libexec >>> Contain the startup scripts
4. libexec >>> courier tcpd is the tcp super server like xinetd and inetd
5. man >>> Mnaul pages
CONFIGURING POP3 SERVICE
# cd /usr/lib/courier-imap/etc
# vi pop3d
#/usr/lib/courier-imap/libexec/pop3d.rc start
# netstat -nlp | grep 110
# vi /usr/local/etc/authlib/authdaemonrc
uncomment the following
authmodulelist="authuserdb authpam authldap authmysql authcustom authpipe"
IF any problem regarding pop read
http://www.courier-mta.org/authlib/README.authdebug.html
COURIER -POP3-SSL
# vi /usr/lib/courier-imap/etc/pop3d.cnf
Add the entrries to your choice
# cd /usr/lib/courier-imap/share
# ./mkpop3dcert
Certificate is stored in the /usr/lib/courier-imap/share/pop3d.pem
# cd /usr/lib/courier-imap/libexec
# ./pop3d-ssl.rc start
NOTE
Link all the startup script to /etc/init.d/
and /etc/rc3.d or rc5.d
Showing posts with label MAIL SERVER. Show all posts
Showing posts with label MAIL SERVER. Show all posts
Sunday, August 1, 2010
QMAIL-SMARTHOST
QMAIL AS SAMRTHOST
Smart host means the email gateway between our localnetwork and remote network.
There are two files in /var/qmail/control.
1./var/qmail/control/locals
2./var/qmail/control/smtproutes
locals -> Define the local domains which are allowded to route messages. It normally define localdomain and fqdn of our server. If the message is destined remote domain it will consult the smtproutes and forward all messages to that server.
Mail open relay
mv /var/qmail/control/rcpthosts /var/qmail/control/rcpthosts.bak
Smart host means the email gateway between our localnetwork and remote network.
There are two files in /var/qmail/control.
1./var/qmail/control/locals
2./var/qmail/control/smtproutes
locals -> Define the local domains which are allowded to route messages. It normally define localdomain and fqdn of our server. If the message is destined remote domain it will consult the smtproutes and forward all messages to that server.
Mail open relay
mv /var/qmail/control/rcpthosts /var/qmail/control/rcpthosts.bak
Saturday, July 31, 2010
SquirrelMail Installation from Source
SquirrelMail
# wget http://sourceforge.net/projects/squirrelmail/files/stable/1.4.20/squirrelmail-1.4.20.tar.bz2/download
# tar xvjf /squirrelmail-1.4.20.tar.bz2/
# mv /squirrelmail-1.4.20 /varwww/html
#chown -R apache:apache /var/www/html/ squirrelmail-1.4.20
# cd /var/www/html/ squirrelmail-1.4.20
# cd /var/www/html
# mv squirrelmail-1.4.20 webmail
# cd webmail
# mkdir -p /var/local/squirrelmail
# mv -i data/ /var/local/squirrelmail/
# chown -R apache.apache /var/local/squirrelmail/attach/ /var/local/squirrelmail/data/
# chown -R apache /var/local/squirrelmail/attach/ /var/local/squirrelmail/data/
# chgrp -R apache /var/local/squirrelmail/attach/ /var/local/squirrelmail/data/
Data directory inside the above location is to moved to some whare else, Because squirrel mail maintains uplodaed data in this directory.
# cd /var/www/html/ webmail/config
# ./conf.pl
Select the option 2
and enter like given below
1. Domain : ip address of the server
2. Invert Time : false
3. Sendmail or SMTP : Sendmail
A. Update IMAP Settings : localhost:143 (courier )
B. Change Sendmail Config : /usr/sbin/sendmail
Save and return to previous menu
From the main menu select the option 4 general options and change the following settings.
1. Data Directory : /var/www/html/squirrelmail-1.4.20/data/ // This is optional
2.Attachment Directory : $data_dir/ // This is optional
Save and return to previous menu
Add The virtualhost in apache.
# ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/html/webmail
ServerName www.test.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
# service httpd restart
#/etc/init.d/imapd.rc restart
In the browser enter localhost/webmail
# wget http://sourceforge.net/projects/squirrelmail/files/stable/1.4.20/squirrelmail-1.4.20.tar.bz2/download
# tar xvjf /squirrelmail-1.4.20.tar.bz2/
# mv /squirrelmail-1.4.20 /varwww/html
#chown -R apache:apache /var/www/html/ squirrelmail-1.4.20
# cd /var/www/html/ squirrelmail-1.4.20
# cd /var/www/html
# mv squirrelmail-1.4.20 webmail
# cd webmail
# mkdir -p /var/local/squirrelmail
# mv -i data/ /var/local/squirrelmail/
# chown -R apache.apache /var/local/squirrelmail/attach/ /var/local/squirrelmail/data/
# chown -R apache /var/local/squirrelmail/attach/ /var/local/squirrelmail/data/
# chgrp -R apache /var/local/squirrelmail/attach/ /var/local/squirrelmail/data/
Data directory inside the above location is to moved to some whare else, Because squirrel mail maintains uplodaed data in this directory.
# cd /var/www/html/ webmail/config
# ./conf.pl
Select the option 2
and enter like given below
1. Domain : ip address of the server
2. Invert Time : false
3. Sendmail or SMTP : Sendmail
A. Update IMAP Settings : localhost:143 (courier )
B. Change Sendmail Config : /usr/sbin/sendmail
Save and return to previous menu
From the main menu select the option 4 general options and change the following settings.
1. Data Directory : /var/www/html/squirrelmail-1.4.20/data/ // This is optional
2.Attachment Directory : $data_dir/ // This is optional
Save and return to previous menu
Add The virtualhost in apache.
# ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/html/webmail
ServerName www.test.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
# service httpd restart
#/etc/init.d/imapd.rc restart
In the browser enter localhost/webmail
Thursday, July 29, 2010
SENDMAIL LOGGING
SENDMAIL [ SYSLOG]
How does syslog determine where to send the log files for sendmail ?
catting the out put of mail in syslog in sles is shown below.
# grep -i mail /etc/syslog.conf
mail.* - /var/log/mail
mail.info - /var/log/mail.info
mail.warning - /var/log/mail.warn
mail.err - /var/log/mail.err
*.*,mail.none,news.none - /var/log/messages
Explanation:-
In general syslog entry in linux and unix servers are in the following form.
Facility.level -
Facility is mail in syslog.conf
level may be one of the 0 to 8 ie (debug-emergency)
mail.* in syslog.conf indicate that all the levels.
NOTE: debug produces more messages and enmergency produces less messages.
Debug level creates lots of disk IO.
System log setup with sendmail is each line conatain atleast two lines.
First line acknowledges the receive of the message and second lne correcsponds to the delivery attempts.
Example are gievn below.
Recieving of message from the mail user agent
Jun 2 11:42:13 pc1 sendmail[6484]: o526C9vA006484: from=root, size=6, class=0, nrcpts=1, msgid=<201006020612.o526C9vA006484@pc1.test.com>, relay=root@localhost
Jun 2 11:42:22 pc1 sm-mta[6500]: o526CD0Q006500: from=, size=262, class=0, nrcpts=1, msgid=<201006020612.o526C9vA006484@pc1.test.com>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Delivery of the message
Jun 2 11:42:22 pc1 sm-mta[6500]: o526CD0Q006500: to=, ctladdr= (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30262, dsn=2.0.0, stat=Sent
Jun 2 11:42:22 pc1 sendmail[6484]: o526C9vA006484: to=root, ctladdr=root (0/0), delay=00:00:13, xdelay=00:00:09, mailer=relay, pri=30006, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (o526CD0Q006500 Message accepted for delivery).
How does syslog determine where to send the log files for sendmail ?
catting the out put of mail in syslog in sles is shown below.
# grep -i mail /etc/syslog.conf
mail.* - /var/log/mail
mail.info - /var/log/mail.info
mail.warning - /var/log/mail.warn
mail.err - /var/log/mail.err
*.*,mail.none,news.none - /var/log/messages
Explanation:-
In general syslog entry in linux and unix servers are in the following form.
Facility.level -
Facility is mail in syslog.conf
level may be one of the 0 to 8 ie (debug-emergency)
mail.* in syslog.conf indicate that all the levels.
NOTE: debug produces more messages and enmergency produces less messages.
Debug level creates lots of disk IO.
System log setup with sendmail is each line conatain atleast two lines.
First line acknowledges the receive of the message and second lne correcsponds to the delivery attempts.
Example are gievn below.
Recieving of message from the mail user agent
Jun 2 11:42:13 pc1 sendmail[6484]: o526C9vA006484: from=root, size=6, class=0, nrcpts=1, msgid=<201006020612.o526C9vA006484@pc1.test.com>, relay=root@localhost
Jun 2 11:42:22 pc1 sm-mta[6500]: o526CD0Q006500: from=
Delivery of the message
Jun 2 11:42:22 pc1 sm-mta[6500]: o526CD0Q006500: to=
Jun 2 11:42:22 pc1 sendmail[6484]: o526C9vA006484: to=root, ctladdr=root (0/0), delay=00:00:13, xdelay=00:00:09, mailer=relay, pri=30006, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (o526CD0Q006500 Message accepted for delivery).
RESTRICTING MESSAGE SIZE IN SENDMAIL
RESTRICTING MESSAGE SIZE
Go to /data/sendmail-8.14.0/cf/cf
# vi sendmial.mc
insert the following line
define(`confMAX_MESSAGE_SIZE', `4096') // mAXIMUM MESSAGE SIZE IN coming toTHE SERVER IS RESTRICTED TO 4k
# cp sendmail.cf /etc/mail
# grep ^o /etc/smail/sendmail.cf
The output should conatin the following line.
MaxMessageSize=4096
Go to /data/sendmail-8.14.0/cf/cf
# vi sendmial.mc
insert the following line
define(`confMAX_MESSAGE_SIZE', `4096') // mAXIMUM MESSAGE SIZE IN coming toTHE SERVER IS RESTRICTED TO 4k
# cp sendmail.cf /etc/mail
# grep ^o /etc/smail/sendmail.cf
The output should conatin the following line.
MaxMessageSize=4096
CLAMAV INSTALLATION ON OpenSuse 11
CLAMAV INSTALLATION
# cd /data
# cd clamav
# tar xvzf clamav-0.96.1.tar.gz
# cd clamav
# groupadd clamav
# useradd -g clamav clamav
# ./configure
#make
# make install
# cd /usr/local/etc/
# vi clamd.conf
comment out the line Example.
#Example
uncomment the line
LocalSocket /tmp/clamd.socket
:wq //save the file
# vi freshclam.conf
Comment out the line Example
# Example
:wq //Save the file.
# touch /var/log/freshclam.log
# chmod 600 /var/log/freshclam.log
#chown clamav /var/log/freshclam.log
# which freshclam // This is the utility responsible for updating clam.
The output should be:
/usr/local/bin/freshclam
Run the following
# ldconfig
# freshclam // This command is for updating clamd
# clamscan
# clamd start
# ps -ax | grep clam
The output should be:
# ps -ax | grep clam
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
3981 ? Ssl 0:00 clamd start
4010 pts/0 R+ 0:00 grep clam
# freshclam // This option is mainly used for the updating clamav.
# which freshclam
The log file for the fresh clam process is
# ls -l /var/log/freshclam.log
Run the freshclam process in dialy basis in cron.
# cd /data
# cd clamav
# tar xvzf clamav-0.96.1.tar.gz
# cd clamav
# groupadd clamav
# useradd -g clamav clamav
# ./configure
#make
# make install
# cd /usr/local/etc/
# vi clamd.conf
comment out the line Example.
#Example
uncomment the line
LocalSocket /tmp/clamd.socket
:wq //save the file
# vi freshclam.conf
Comment out the line Example
# Example
:wq //Save the file.
# touch /var/log/freshclam.log
# chmod 600 /var/log/freshclam.log
#chown clamav /var/log/freshclam.log
# which freshclam // This is the utility responsible for updating clam.
The output should be:
/usr/local/bin/freshclam
Run the following
# ldconfig
# freshclam // This command is for updating clamd
# clamscan
# clamd start
# ps -ax | grep clam
The output should be:
# ps -ax | grep clam
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
3981 ? Ssl 0:00 clamd start
4010 pts/0 R+ 0:00 grep clam
# freshclam // This option is mainly used for the updating clamav.
# which freshclam
The log file for the fresh clam process is
# ls -l /var/log/freshclam.log
Run the freshclam process in dialy basis in cron.
Wednesday, July 7, 2010
Sendmail cotrolling script
I am posting one useful script to start, stop, restrat sendmail( Source code installation )
#! /bin/sh
case "$1" in
start)
echo "Starting SMTP port. (sendmail)"
/usr/sbin/sendmail -bd -q1h
;;
stop)
echo "Stopping down SMTP port:"
killall /usr/sbin/sendmail
;;
restart|reload)
$0 stop && $0 start
;;
*)
echo "Usage: $0 {start|stop|restart|reload}"
exit 1
esac
exit 0
#! /bin/sh
case "$1" in
start)
echo "Starting SMTP port. (sendmail)"
/usr/sbin/sendmail -bd -q1h
;;
stop)
echo "Stopping down SMTP port:"
killall /usr/sbin/sendmail
;;
restart|reload)
$0 stop && $0 start
;;
*)
echo "Usage: $0 {start|stop|restart|reload}"
exit 1
esac
exit 0
Subscribe to:
Posts (Atom)