Custom header on mail forward

Discussion in 'ISPConfig 3 Priority Support' started by tr909192, Sep 9, 2025.

  1. tr909192

    tr909192 Member HowtoForge Supporter

    Dear,
    in order to fine tune some antispam configuration on an our smarthost relay (proxmox mail gateway) I'd like to add a custom header to the mail the are sent via forward from ispconfig.
    Anyone here can point me out on the right direction in order to add a custom header on the mail, if the mail pass through the mail_forwards table?
    I'm trying to write my own milter in order to do that, but i'm not sure that this is the best/easiest and most common way...
    ty
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I have not done such a setup. A milter should work. ChatGPT sugegsts this:

     
    tr909192 likes this.
  3. tr909192

    tr909192 Member HowtoForge Supporter

    tl;dr; This is necessary because a large portion of the spam we forward originates from incoming emails that are simply forwarded externally using our IPs. As a result, we want to apply more aggressive spam filtering specifically to forwarded emails, in order to protect our IP reputation.

    ty(2)
     
  4. tr909192

    tr909192 Member HowtoForge Supporter

    yeah i'have got something similar...i'll try so in that way. ty
     
  5. tr909192

    tr909192 Member HowtoForge Supporter

    probably the best way (hope so) is the rspamd milter functionality. checking if the Delivered-To and To field are different and if yes, add my custom header.
    In that way i must not rewrite a different milter and use only something (rspamd) that i'm already using.
    The only things is that i'm not super secure that checking if Delivered-To header against To header is solid enough
     
    ahrasis and till like this.

Share This Page