Saturday, October 19, 2013

Mailman Mailing List with Postfix

Mailman is free mailing list manager for managing electronic mail discussions and  newsletter lists. It is widely used mailing list manager which supports supports built-in archiving, automatic bounce processing, content filtering, digest delivery, spam filters.

Here I will explain how to install and configure mailman on a linux system.

First download the latest pack from the link below,

wget http://ftp.gnu.org/gnu/mailman/mailman-2.1.15.tgz

useradd -m /usr/local/mailman mailman
chmod 02775 /usr/local/mailman

apt-get install python-dev

tar -zxvf mailman-2.1.15.tgz
cd mailman-2.1.15

I am running my web server as apache user, having gid = 48.

./configure --with-cgi-gid=48 --with-mail-gid=mailman
make
make install

Saturday, October 12, 2013

Autoresponder for roundcube postfixadmin

Here I will explain configuring autoreply in roundcube.

Create a mysql database table in the mail server database. Here I am using postfixadmin database, so create as metioned below,

mysql -u root
use postfix;

CREATE TABLE `autoresponder` (
`email` varchar(255) NOT NULL default '',
`descname` varchar(255) default NULL,
`from` date NOT NULL default '0000-00-00',
`to` date NOT NULL default '0000-00-00',
`message` text NOT NULL,
`enabled` tinyint(4) NOT NULL default '0',
`force_enabled` tinyint(4) NOT NULL default '0',
`subject` varchar(255) NOT NULL default '',
PRIMARY KEY (`email`),
FULLTEXT KEY `message` (`message`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

Grant privileges to the users,
mysql -u root
mysql> GRANT SELECT,INSERT,UPDATE ON postfix.autoresponder TO  autoresponder IDENTIFIED BY 'autoresponder.pass';
mysql> GRANT SELECT ON postfix.mailbox TO autoresponder;
mysql> exit;

Thursday, October 10, 2013

SPF + DKIM for postfix

SPF allows administrators to specify which hosts are allowed to send email from a given domain by creating a specific DNS SPF record in the public DNS.

Mailserver installation and amavis mail filerings can be followed from the links below ..

postfix-dovecot
amavisd-clamav-spamassassin

For giving SPF support without recompling postfix follow the below steps ..

cpan Mail::SPF Sys::Hostname::Long

Now download the spf perl version,

wget https://launchpad.net/postfix-policyd-spf-perl/trunk/release2.010/+download/postfix-policyd-spf-perl-2.010.tar.gz

tar -zxvf postfix-policyd-spf-perl-2.010.tar.gz

cd postfix-policyd-spf-perl-2.010

mkdir /usr/lib/postfix

Wednesday, October 2, 2013

Amavisd Clamav Spamassassin with Postfix

Amavis is an interface between MTAs like Postfix, Sendmail or Exim  and mail filters like ClamAV, SpamAssassin. It is efficient to run with amavis than running separate daemons like spamd.

Mailserver installation can be followed from this link postfix-dovecot

First we will start with amavisd installation,

wget http://www.ijs.si/software/amavisd/amavisd-new-2.8.0.tar.gz
tar -zxvf amavisd-new-2.8.0.tar.gz
useradd amavis -m /var/amavis
mkdir /var/amavis/tmp /var/amavis/var /var/amavis/db /var/amavis/home
chown -R amavis:amavis /var/amavis
chmod -R 750 /var/amavis
mkdir /usr/local/src/
cd /usr/local/src/
mv amavisd-new-2.8.0 /usr/local/src/amavisd
cd /usr/local/src/amavisd
cp amavisd /usr/local/sbin/
chown root /usr/local/sbin/amavisd
chmod 755  /usr/local/sbin/amavisd
cp amavisd.conf /etc/
chown root:amavis /etc/amavisd.conf
chmod 640 /etc/amavisd.conf

mkdir /var/virusmails
chown amavis:amavis /var/virusmails
chmod 750 /var/virusmails