web analytics

Category Mail

Enabling detailed debug log in imap

Sometimes your might need to check for detailed logging in email. One of my friends was  developing an email application and he wanted to check what was happening behind the screen when he received an email, moves it to another folder, deletes it etc.

Hence, we decided to enable detailed logging in imap. It was a cpanel server and we used the option imapdebug. Always keep a backup of the file you edit.

root@abc# cp -pv /usr/lib/courier-imap/etc/imapd /usr/lib/courier-imap/etc/imapd.bak.$(date +%F)

root@abc# vi /usr/lib/courier-imap/etc/imapd

Now uncomment the following line.

IMAPDEBUGFILE=”imaplog.txt”

Now touch a file named  imaplog.txt at the root of the account where you want to enable logging. Restart the courier service. Suppose I need to enable logging for greproot@abc.com.

root...

Read More

Changing root email recipient in postifx

You can change the recipient to whom the root mails from server are delivered as follows.

1) Go to /etc/aliases

2) Scroll down to the bottom where you will find a line as follows.

# Person who should get root’s mail
root: mark

If you want to send this to some other email address, say mark@gmail.com, make the line looks as follows.

# Person who should get root’s mail
root:  mark@gmail.com

Once the change is done, save and close the file. In order for the changes to be picked up by postfix, you need to issue the following command.

# newaliases

 

Once that is done, try sending a mail to the root ID and see how it goes !!

 

Read More

Find spamming in qmail

Spamming ???

Qmail is said to be secure and as such there are very less chances for spamming. In case of spamming, you can find out the culprit as said in the following example.

Try running /var/qmail/bin/qmail-qread. The utility on a server gave the following output.

20 Sep 2007 05:29:32 GMT #96945 24355 <spam@domain.com> bouncing
done remote giaygoiqua@test.com
done remote giayvietplaza@test1.com
done remote gig@domain123.com
done remote gilbert.marc@abc.com
done remote gillvector@fptnet.com.net
done remote gimmy.vo@azf.com
remote gin@dom.com

This ...

Read More

Frozen mails in exim

Normally an MTA retries the delivery of mails if it is not delivered in first attempt. There are a few mails which fails and exim writes them as frozen. Exim will not bounce emails if the original message looks like a bounce. Instead the message is frozen, awaiting the SysAdmin’s attention. If the message is frozen (attempts to deliver it are suspended) then the text “*** frozen ***” is displayed at the end of the line. You can safely delete those messages.

exim -bP will list all control values

To check the no: ...

Read More

Qmail – An introduction

Qmail
=====

Qmail is a mail transfer agent (MTA) for Unix like operating systems. When I say MTA, naturally the question comes – what is an MTA? For that, first we need to know how internt email works.

Suppose Robert wants to send a mail to Ann. He opens his email client, enters the from field, types in the subject and matter. Once he clicks the send button, the mail is sent. Similarly Ann receives it at her mailbox. As far as they both are concerned, the system works fine, very well as desired. But behind the scenes, many small programs work together making it possible for the email to be moved from Robert’s machine to Ann’s.

MTA(Mail Transfer Agent) is the program which moves the mail from the sender’s system to the recipient’s system...

Read More