Postfix mail content filter

Discussion in 'Installation/Configuration' started by Entrio, Aug 6, 2014.

  1. Entrio

    Entrio New Member

    Hi people,

    Here is my setup:

    ISPCOnfig 3.0.5.4p1
    Debian 7.1 x64
    Postfix and dovecot

    My Problem:
    I have corporate mail serer running for over 80 users. We just implemented a new IT strategy to transfer all our users to corporate email addresses and use only corporate emails when it comes to work-related mail. Some users, however, are too stupid/stubborn to adhere to this policy and continue sending mail to OLD gmail/mail.ru/etc addresses. Now, I dont want to block people sending mail to gmail or say mail.ru, i just have a list of about 20 addresses i dont want people be able to send to.

    An example:
    old address was <user1>@mail.ru
    new address <user1>@corpemail.tld


    I want to prevent (or at least warn) [email protected] from sending to <user1>@mail.ru with a message in their inbox saying sorry, use corporate address (or something similar)

    But other than few specific addresses, I want user to be able to send to gmail or other 3rd party email accounts.

    Thanks heaps
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    This might work with postfix blacklists in ispconfig, at least to block the mails. Did you try to add a blacklist entry for <user1>@mail.ru with type recipient?

    another option might be to add a email route in ispconfig. If you use the type "error", then you can enter the error message that shall be shown in the target field.
     
  3. Entrio

    Entrio New Member

    Thank you for your prompt reply, I shall try it and edit this post in accordance.

    EDIT:
    Blacklist works but it would be awesome if it would be possible to send the sender some sort of an email with a warning stating that they are sending to wrong address
     
    Last edited: Aug 6, 2014
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    If you want to send a notification, then try out the other option that I posted above.
     
  5. Entrio

    Entrio New Member

    Thanks mate, it worked.
    Note quite as I wanted but does the job. I would've preferred an email but a warning message works just as well.

    Once again thanks for fast and helpful reply.
     

Share This Page