[Dovecot] Sieve script problem (don't know if is it possible to do this)

Robert Schetterer rs at sys4.de
Thu Nov 14 21:43:57 EET 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Am 14.11.2013 19:17, schrieb Yanko Hernández Álvarez:
> Hello:
> 
> I'm loosing my mind trying to classify my outgoing messages with 
> sieve-test (2.0.9, centos 6.4). It came to the point I think it's
> not even possible with a sieve script.
> 
> I need to classify my outgoing messages in three folders:

stop here , filter outgoing mail is not possible yet with sieve, at my
current info level, but it may come in future ( but thats  a different
story )

but your mail client may do copy in different imap folders at send
time, or your mailserver may do some kind of sort/copy with i.e bcc
feature etc

equal stuff was asked before on the list i think , search archive

however if i dont unterstand you in the right way, and you want to
sort incomming mail feel free to ask again

> 
> 1- To my department (@dept.example.com) 2- To my company
> (@example.com, @anyotherdept.example.com) (anyotherdept.example.com
> as in a way to say "any other domain that ends with 'example.com',
> but not 'dept.example.com'") 3- To the rest of the word
> (@any.other.domain)
> 
> The problematic requirement is I need to make a copy in EVERY IMAP 
> folder that applies. For instance: for an email such as ---- From:
> myuser at dept.example.com To: user at dept.example.com,
> user at example.com, user at other.domain ... ---- I need to make a copy
> to all folders: Dept (because of user at dept.example.com), Company
> (because of user at example.com) and Rest (because of
> user at other.domain).
> 
> Rule for #1 is simple: ----- if address :matches :domain "To"
> "dept.example.com" { fileinto: "Dept"; } -----
> 
> Rule for #2, I don't know how to declare it: I don't know how to
> make a rule that matches "example.com" (or
> anyotherdept.example.com) and not "dept.example.com".
> 
> if allof(address :matches :domain "To" "example.com", not address 
> :matches :domain "To" "dept.example.com") { fileinto: "Company"; } 
> ... doesn't work, because user at dept.example.com matches (address 
> :matches :domain "To" "example.com"), but it doesn't matches (not 
> address :matches :domain "To" "dept.example.com").
> 
> "user at example.com" matches both conditions, but sieve-test stops
> on the first email address with a "not matches"
> 
> As for Rule #3: I don't know how to do it either, it should be the 
> same as Rule #2, (with different parameters of course).
> 
> A sieve script should be capable to do this, but it seems that I'm 
> loosing something. Does any one knows how to do this?
> 
> Kind regards Yanko
> 
> PS: English is not my native language. Please forgive me any 
> mistakes/misspellings/etc I made.
> 


Best Regards
MfG Robert Schetterer

- -- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJShSf0AAoJEP8jBObu0LlEJtAH/127BkvFTC/00eK6j7xOnGtP
NoIGbtYih/ySDMD0COklazVe+36+QWawmIkKLtUmDAYPo5TaSJw5GN40vTl3NYHl
mEQpzjAlHW8kPyIvlPiZIKju6PGSzHtJXnOQovFmN2327HwvM2B+nEhccWIhDy0a
NtnR3URu5iiFN1yZis2wpCBrriCmT4aFCo7DnTLnED5I4dvychbNehGYUhCi0z69
+IKSl4tplV//lVo4BsHzi/Hk+ewVSZsMgimXVOm6namS8m1l1vAGnsrWbOK4S5KN
KTHpE9yrt/cBw+0Cr/ZDry3NEcQw1KxYNyq61oLFYWYPYSvCuBloll2AbSAp8ys=
=AhDy
-----END PGP SIGNATURE-----


More information about the dovecot mailing list