PHP Script for adding email aliases and Postfix Blacklisting and Content Filter

Discussion in 'Tips/Tricks/Mods' started by sjau, Sep 25, 2015.

  1. sjau

    sjau Local Meanie Moderator

    Hi there
    I have on my notebook a small email server just for testing stuff. I do create a new email alias whenever I have to signup for a site and I also like to easily add blacklist entries to postfix or do content filtering. So I created this small script (used to be cURL based) that does the essential stuff for me, so that I don't always have to login at IPSC. Maybe it's useful for others also:

    Code could be better, but my local server can't be reached from outside anyway.
    The script supports multiple servers. Usually I want to add blacklisting and content filtering to multiple servers. If you need more, just copy the according config section and increase the counter.

    Also, I don't need things pretty, I need them to function :)

    2016-03-02 Due to increased "invoice" zip files containing malware, I also added Mime- and Nester-Header filtering options
    2016-02-24 Changed TLD format to /<.+?@.+?\.TLD>/

    Attached Files:

    Last edited: Mar 2, 2016 and till like this.
  2. sjau

    sjau Local Meanie Moderator

    Just added an option to blacklist TLDs.
  3. Active Member

    +1 for 26c3 reminder :D
  4. sjau

    sjau Local Meanie Moderator

    not sure how 26c3 is related to this thread here....
  5. Active Member

    Here be dragons .... it's in your attachment as a comment =)
  6. sjau

    sjau Local Meanie Moderator

    I still don't get the reference to 26c3 though :)
  7. sjau

    sjau Local Meanie Moderator

  8. Active Member

  9. sjau

    sjau Local Meanie Moderator

    Small update with the script.

    Now I see the reference.
  10. sjau

    sjau Local Meanie Moderator

    Just tested it with the gTLD "" -> again only fill in "" and it works fine.

    Or maybe I should generally change the script to use ".TLD" instead of just "TLD"?
  11. sjau

    sjau Local Meanie Moderator

    Just added Mime and Nested-Header filters as well.
  12. nikolaosp

    nikolaosp New Member

    Sorry to be the noob around here, but how do we use this?

  13. sjau

    sjau Local Meanie Moderator

    well, I run apache and php on my notebook for local testing. So I just download it, change the extension to php and call it in the browser http://localhost/ISPCAdmin.php
    Also, the script has to be configured and according credentials for remote user has to be given.

Share This Page