Hi all,
Well, my issue is not exacly what you descrived,
I have an account, that i want to forward all incoming emails, so far so
good.
Before the emails are forward, i want to delete some, based on the sender
domain.
Thing is, i think managesieve roundcube plugin is producing the script
wrong, here's what i have, i have 1 rule for the delete some senders, ok,
and the 2nd for the redirect
# rule:[blocks]
if anyof (header :contains "from" "clubefashion.com", header :contains
"from" "nutribody.pt", header :contains "from" "mcdonalds.pt")
{
discard;
redirect "[email protected]";
}
# rule:[redir]
if true
{
redirect "[email protected]";
}
On 2026-09-06 10:15, Toth Attila via dovecot wrote:
I'm using a filter that moves the mail to another directory. The
original message disappeared only from the initial location if
imapsieve_expunge_discarded = yes was set. A duplicate remained
otherwise. I suggest to take a look at on this configuration option
depending on the purpose of the filter.
On 2026.09.06 02:30, Stephan Bosch via dovecot wrote:
Op 2-9-2026 om 16:00 schreef Antonio Oliveira via dovecot:
Hello,
You can try to add "stop;" after "discard;", so that rule processing
stops after the discard and doesn't trickle down to the other rule.
Yes, this will help. Why? The discard action command only cancels the
implicit keep; nothing else. It means that if and only if no other
explicit action delivers or preserves (keeps!) the message somehow, it
is discarded. So, if subsequently redirect is triggered, the message
is redirected, thereby making the discard action ineffective. Stopping
the script right after discard will make sure no other actions can be
triggered, thereby making sure the message is discarded (provided no
earlier actions already triggered some sort of delivery either).
Without discard or any other action command that cancels the implicit
keep (such as redirect, fileinto, and ... keep), the default action is
to "keep" the message, e.g. file it to INBOX.
Regards,
Stephan.
On 9/2/2026 1:05 PM, Jorge Bastos via dovecot wrote:
Hi guys,
Small help with a sieve script, I have the script below in a
useraccount,
in this exact order.
The redirect works, but the discard doesn't.
A message that comes from the domain "clubefashing.com" or
"nutribody.pt",
is always redirected.
Any idea what is wrong here?
# rule:[blocks]
if anyof (header :contains "from" "clubefashion.com", header
:contains
"from" "nutribody.pt")
{
discard;
}
# rule:[redir]
if true
{
redirect "[1][email protected]";
}
_______________________________________________
dovecot mailing list -- [2][email protected]
To unsubscribe send an email to [3][email protected]
_______________________________________________
dovecot mailing list -- [4][email protected]
To unsubscribe send an email to [5][email protected]
References
Visible links
1. mailto:[email protected]
2. mailto:[email protected]
3. mailto:[email protected]
4. mailto:[email protected]
5. mailto:[email protected]
_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]