cleanup old mails in maildir mailbox

January 2nd, 2009 by Anoop Alias

If we want to selectively delete messages from a maildir format mail account the following python script comes handy
============
http://svn.houseofnate.net/unix-tools/trunk/cleanup-maildir
============
An example usage i had for deleting messages older than 7 days in the Spam folder is
dir=”/the/path/to/my/maildir”
cleanup-maildir –maildir-root=$dir –age=7 delete ‘Spam’

Continue reading »

Custom mail filtering in plesk9 postfix

January 2nd, 2009 by Anoop Alias

This arcticle desribes how we can implement custom mail filtering in a plesk9 server having postfix as the MTA. This can be used for mailfiltering tasks like moving over spam messages to a spam or .Spam folder at delivery time etc.This is only a single use that i have described here..but you can devise do [...]

Continue reading »

utf8_mime2text error in compiling php

December 29th, 2008 by Anoop Alias

The error:
==============
checking for utf8_mime2text signature… new
checking for U8T_CANONICAL… no
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
==============
The fix:
==============
yum install libc-client-devel
==============

Continue reading »

Plesk9 integration with Postfix and ClamAV

December 27th, 2008 by Anoop Alias

Officially Plesk 9 does not supportĀ  ClamAV (Parallels as of the time of writing officially supports two antivirus solutions that needs you to pay for the license )
The integration uses Plesk9- Postfix - ClamSMTP - clamAV to get things working.This was accomplished in a CentOS -5.2 system .But it should work just fine on other [...]

Continue reading »

Squirrel Mail error :- 110 Can’t open SMTP stream

December 23rd, 2008 by manu suresh

Scenario :- Error while sending email using Squirrel Mail :-
Message not sent. Server replied:
Connection timed out
110 Can’t open SMTP stream
This problem usually occurs when CSF ( Config Server Firewall ) is installed on your server and it is interacting with the working of squirrel mail. So while configuring CSF enable both SMTP_BLOCK & SMTP_ALLOWLOCAL . [...]

Continue reading »

List exims version and binary details

December 10th, 2008 by Anoop Alias

The following command lists exim MTA’s version number .It also prints out the DBM library being used,the optional modules being used and drivers included in the binary
It also displays the name of the run time configuration file being used
===============
exim -bV
==============

Continue reading »

curl_exec error 60 SSL certificate problem

November 19th, 2008 by Anoop Alias

The problem :
=================
curl_exec error 60 SSL certificate problem
=================
This is mainly caused because the curl root certificates file does not contain the particular root certificate chain.The best method would be add the correct root certificate to the file obtained by running the command

curl-config –ca
or a quick dirty trick would be add the following line
===================

curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, [...]

Continue reading »

Clamd Startup error

November 18th, 2008 by Anoop Alias

Error:
===============
[root@localhost ~]# /etc/rc.d/init.d/clamd start
Starting Clam AntiVirus Daemon: LibClamAV Error: cli_loaddbdir(): Can’t open directory /var/clamav
ERROR: Unable to open file or directory
[FAILED]
===============

This is caused by an enforcing SELinux policy

Disable selinux using setenforce=0

Continue reading »

Passing mails to a script using Postfix

November 13th, 2008 by Anoop Alias

Imagine a scenario in which you would have to pipe mails to a local user to a php/perl script and you are using Postfix as the MTA . In Postfix this can be setup using procmail as the command for local delivery
==========================
postconf -e ‘mailbox_command = /usr/bin/procmail’
postfix reload
===========================
You should also verify that mail for the root [...]

Continue reading »

Setting up mail service behind a firewall using fetchmail

November 13th, 2008 by Anoop Alias

Imagine that you are asked to setup a local mail server for n number of users who are behind a firewall and the only way they can access their mail over the internet is using proxy servers like squid . Just like squid retrieves a copy of the webpage and passes on the http data [...]

Continue reading »