Results 1 to 6 of 6

Thread: Sieve auto reply does not work when mail forward on

  1. #1
    Join Date
    Feb 2019
    Posts
    5

    Question Sieve auto reply does not work when mail forward on

    Hi,

    DirectAdmin Centos 7.0 v1.56.0 & Custombuild 2.0.0 (rev 2008) with managesieve configured.
    I've an Out-of-Office script which runs fine except when a forwarder is configured in DA for that mailbox.

    I know that a forwarder can also be configured in Managesieve but the user is not allowed to change this forward. Only his Out-of-Office rules.
    That's why the forward is configured in DA.

    Any idea how I can get this working?

  2. #2
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    13,474
    Hello,

    The Sieve rules will work only for those emails which hit the Inbox. If an email is forwarded and no copy hits the Inbox, a Sieve filtering is not possible in such a case.
    Regards, Alex G.

    - Get the best commercial DirectAdmin support and hire me on poralix.com
    - Follow and like @Poralix on Facebook

  3. #3
    Join Date
    Feb 2019
    Posts
    5
    Mails are received in the Inbox.

  4. #4
    Join Date
    Feb 2019
    Posts
    5

    Question

    Quote Originally Posted by zEitEr View Post
    Hello,

    The Sieve rules will work only for those emails which hit the Inbox. If an email is forwarded and no copy hits the Inbox, a Sieve filtering is not possible in such a case.
    Hello Alex,

    Mails arrive in de Inbox but filtering doesn't happen. Is there any method to trace where & what happens?

    Regards
    Fonny

  5. #5
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    13,474
    Fonny,

    I've tested on my end and was successful to replicate the issue too.

    It seems Sieve replies to an address specified in a Return-path header instead of an email address in a From header, with an accordance to RFC 5230 https://tools.ietf.org/html/rfc5230

    Code:
       "Vacation" is used to respond to a message with another message.
       Vacation's messages are always addressed to the Return-Path address
       (that is, the envelope from address) of the message being responded
       to.
    So, it's not a bug in Sieve, it's how it's designed to work.

    So here are my details for the case:

    When a virtual email account exists with the same name as a forwarder, Exim installed with SRS on a DirectAdmin server modifies the Return-path, and Sieve replies to it. And every email to such an email-address goes directly into a black-hole.

    1. So I've sent an email from zeiter@domain.com to test@example.net
    2. Exim server sent a copy to an alias (forwarder)
    3. Original email with a modified Return-path set to SRS0=BepzFz=R7=domain.com=zeiter@example.net was delivered to test@example.net
    4. Sieve replied with a vacation message to an email address SRS0=BepzFz=R7=domain.com=zeiter@example.net
    5. Exim removed the reply (moved to a black-hole).


    As a possible work-around you might disable SRS in exim. Disabled SRS might cause new issues with forwarding emails to external servers, as SPF will fail.

    Run this to disable SRS:

    Code:
    echo "" > /etc/exim.srs.forward.conf

    Or you probably might try to customize /etc/system_filter.exim, add


    Code:
    if "$h_to:, $h_cc:" contains test@example.net
    then
        unseen deliver copy@example.net
    endif


    - test@example.net - recipient address.
    - copy@example.net - email address where to copy emails.


    then protect it against being overwritten:

    Code:
    mkdir -p /usr/local/directadmin/custombuild/custom/exim
    cd /usr/local/directadmin/custombuild/custom/exim
    cp -p -v /etc/system_filter.exim .


    That's it
    Last edited by zEitEr; 03-28-2019 at 12:11 PM.
    Regards, Alex G.

    - Get the best commercial DirectAdmin support and hire me on poralix.com
    - Follow and like @Poralix on Facebook

  6. #6
    Join Date
    Feb 2019
    Posts
    5

    Thumbs up

    Thanks Alex,

    I will give this a try.

    Fonny

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •