changing the digital world one bit at a time...

Blants (noun) the rants of a blogger

  1. Clear out the Postfix queue

    December 7, 2015 by The Man

    If you find that your Postfix mail server is full of spam messages waiting to go out you can check the mail queue with


    n.b. Postfix needs to be running for this to work but not if you need to purge the queue simple use

    postsuper -d ALL

  2. Start Postfix on Yosemite

    April 2, 2015 by The Man

    Simple really and more as a reference when I forget

    sudo launchctl start org.postfix.master

    However this will only last for 60 seconds unless you have “fixed” your version of Postfix.

  3. Change Postfix port number

    March 31, 2015 by The Man

    Sometimes you want to send out but not have every spammer try and send you rubbish on port 25 so changing to a non standard port helps with automated spammers.

    First edit the config file

    sudo nano etc/postfix/

    and find the line

    smtp inet n – n – – smtpd

    and change to

    9876 inet n – n – – smtpd

    and then save and restart Postfix

    sudo service postfix restart

    then if you need to check simply grep

    netstat -tanp | grep 9876

    which should give you at least a line like this

    tcp 0 0* LISTEN

  4. Using Google SMTP with Postfix on Ubuntu/Debian

    December 22, 2014 by The Man

    I run a few servers at home for various things including a little Raspberry Pi running Debian which emails me alerts when certain things happen. I send these to an account or an Office365 account but being a home IP I often get blocked

    “(host[] said: 550 OU-002 (COL004-MC5F2) Unfortunately, messages from weren’t sent. Please contact your Internet service provider since part of their network is on our block list.”

    So the simple solution is to add a relay host to Postfix.

  5. Fix warning: database /etc/aliases.db is older than source file /etc/aliases

    November 6, 2014 by The Man

    Simply run

    sudo postmap /etc/aliases

    Then restart Postfix with

    sudo service postfix restart

  6. Gleylist spammers on Ubuntu using Postfix and Postgrey

    November 3, 2014 by The Man

    1. Hopefully you have Postfix already installed so simply install Postgres

    sudo apt-get install postgrey

    2. Edit the Postfix config file /etc/postfix/ and add or amend

    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,
    reject_unauth_destination, reject_unknown_sender_domain,
    check_policy_service inet: