Posts Tagged ‘mail’

cleanup old mails in maildir mailbox

Friday, January 2nd, 2009

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’

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

Tuesday, December 23rd, 2008

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 . [...]

List exims version and binary details

Wednesday, December 10th, 2008

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
==============

Clamd Startup error

Tuesday, November 18th, 2008

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

Passing mails to a script using Postfix

Thursday, November 13th, 2008

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 [...]

Setting up mail service behind a firewall using fetchmail

Thursday, November 13th, 2008

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 [...]