Wednesday, June 30, 2010

EXIM

* dnsbl.info --> lists blacklisted mail servers.
* spamcop.net --> listed mail servers for spam.

* Commands
1) Count total mails in queue
$ exim -bpc
2) Give mail header
$ exim -Mvh
3) List messages
$ exim -bp
4) Message from a particular user.
5) Lists mail received by a particular user
$ exiqgrep -f
6) List receipients
$ exiqgrep -r

* Frozen Mail --> due to spam
1) Froze a mail
$ exim -f
2) Display message body
$ exim -Mvb
3) Remove a message
$ exim -Mrm
4) Forceful delivery --> If its frzen then exim would try to deliver but fails.
$ exim -M
5) Freeze a message
$ exim -Mf

* All queues are in /var/spool/exim/input/
* Stop exim before removing /var/spool/exim/input/*

Mail log & Services
* Bounced message is indicated by **
* Bounced message --> if sending fails then the message gets bounced back.
* Retry period can be changed inside /etc/exim.conf

Exim log
* mainlog --> /var/log/exim
* paniclog --> error related to exim log
* rejectlog --> shows bounced message

Retry
* Inside /etc/exim.conf search for retry (comment it if working fails)



Q) Create an email-account then send & receive email?
Note: dovecot -->> POP
1) yum install exim
2)rpm -qa|grep exim
3) netstat -panel|grep 25
4) telnet 192.168.2.48 25 ------>>>>>>tests for connection
5) Stop sendmail (if its already installed)
6) vim /etc/exim/exim.conf
.........
ListenInterface 0.0.0.0
............
7) Add s/m user
$ useradd user1
$ passwd user1
8) cd /home/user1
9) vim /etc/exim/exim.conf ------->>>>>create mailbox
..........
local_delivery
........
file = ..... $INBOX:/home/$local_part/Inbox ------->>>>>>>Inbox is a file
................
localdomains=@:localhost:user1.com ----->>>>> defines a local domain
..............
10) start exim
11) exim -bt user1@user1.com ----->>>>> tracing the domain

SENDING MAIL
$ telnet 25
HELO hello
.........
MAIL FROM: user1@gmail.com
RCPT TO: user1@yahoo.com
.....
SUBJECT: my subject
DATA
sdfsdfsdfsdlf
.


$ grep /var/log/exim/main_log ----->>>>> check status

INSTALL DOVECOT (Zimbra --> advanced version of Dovecot)
-->>> dovecot listens on all ports supported by POP2,POP3,POPS2,POPS2,IMAP,IMAPS
$ yum install dovecot
$ telnet localhost 110
$ vim /etc/dovecot.conf
............
mail_location= ........$INBOX=/home/%u/Inbox -->>>>> Inbox is a file
.........
$ restart dovecot
$ telnet localhost 110
user user1
pass passuser1
list
.....
retr 1


INSTALL SQUIRRELMAIL

1) Download squirrelmail
2) Extract it to home directory of user1 /home/user1/
3) cd /home/user1/squirrelmail
4) mkdir attach
5) chmod 755 attach data
6) ./configure
select 1,2&4
7) Browse http:///squirrelmail/index.php

Note:* set the VirtualHost entry @ start
* set "retry" option in /etc/exim/exim.conf
* Enable php and mbstring for running squirrelmail

No comments:

Post a Comment