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 :)

    Changes:
    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
    ztk.me and till like this.
  2. sjau

    sjau Local Meanie Moderator

    Just added an option to blacklist TLDs.
     
  3. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    +1 for 26c3 reminder :D
     
  4. sjau

    sjau Local Meanie Moderator

    not sure how 26c3 is related to this thread here....
     
  5. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

    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. ztk.me

    ztk.me Well-Known Member HowtoForge Supporter

  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 ".co.kr" -> again only fill in "co.kr" 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 Member

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

    Thanks
     
  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