Send email copy from mailbox owner

Discussion in 'ISPConfig 3 Priority Support' started by stefanm, Feb 22, 2021.

  1. stefanm

    stefanm Member HowtoForge Supporter

    Hi,
    Sorry, if this has been answered already and I didn‘t find it. I have a single mailbox, which should receive mails and send a copy using the mailbox owner‘s mail address as sender to an external mail address.
    So, it should not keep the original sender, but do a forward like it would happen on a client. Can I configure a filter for this or is there an option in ispconfig? The „send copy as“ and forward keep the original sender. Thanks a lot for your help!
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  3. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    I believe you can set this behavior server-wide in dovecot config, or write a custom sieve script for a single user/case.
     
    Th0m likes this.
  4. stefanm

    stefanm Member HowtoForge Supporter

    Hi,

    thanks a lot for your help. That definitely pointed me in the right direction! Yes, I had to enable editheader-plugin in dovecot and then I can use something like this in custom rules:
    Code:
    require ["editheader"];
    fileinto "INBOX";
    deleteHeader "From";
    addHeader "From" "<MAILBOXNAME>";
    redirect "<REDIRTARGET>";
    This stores the unmodified original messge to the inbox and sends a message with the modified header to the redirect target.
    (BTW, you need to disable the "move spam to junk folder option" for the mailbox. If you need this working, you must add it to the above custom rules from the ispconfig/.sieve file)
    Thanks again for your help!
     
    Last edited: Feb 23, 2021
    Jesse Norell likes this.

Share This Page