1st Feb, 2010

Mail on ubuntu server 9.10

I’ve recently moved some services to the wonderful Linode, and decided that it was time to retire my crusty old office email setup which consisted of postfix, courier, procmail, spamassassin, and fetchmail grabbing my email via POP3 from a ‘proper’ internet server. As you would expect it was slow and a bit complicated but it did work and spam was very low.

So I’ll be adding bits to this post as I refine the setup of my new server in the face of full-on internet abuse. First off I used the nice new ubuntu package ‘dovecot-postfix’ that comes with newer releases of ubuntu server.

$ sudo apt-get install dovecot-postfix

Aliases for users are added to /etc/aliases, and accepted domains are added in /etc/postfix/main.cf under mydestination

This was ok for a week or so but I get quite a bit of spam so next on the list was spamassassin.

$ sudo apt-get install spamassassin spamc

edit /etc/default/spamassassin set:

ENABLED=1

edit /etc/postfix/master.cf and change:

smtp      inet  n       -       -       -       -       smtpd

to:

smtp      inet  n       -       -       -       -       smtpd -o content_filter=spamassassin

Then add the following to the bottom of the same file:

spamassassin unix  -    n       n       -       -       pipe
    user=nobody argv=/usr/bin/spamc -f -e
    /usr/sbin/sendmail -oi -f ${sender} ${recipient}

p.s. Make sure the second 2 lines are indented.

Seems to work - I’m going to give this a few days and see what happens.

Related: mail, ubuntu

Comments are now closed.

Comments have been closed for this post.

Comments

Projects