depicus

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

    mailq

    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.

    http://apple.stackexchange.com/questions/32228/whats-the-correctly-way-to-make-postfix-run-permanently-on-lion-not-server


  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/master.cf

    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 0.0.0.0:9966 0.0.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 Outlook.com account or an Office365 account but being a home IP I often get blocked

    “(host mx2.hotmail.com[65.55.33.119] said: 550 OU-002 (COL004-MC5F2) Unfortunately, messages from xxx.xxx.xxx.xxx 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.
    (more…)


  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/main.cf and add or amend

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

    (more…)