0

I'm looking to delete all mail addressed from "root@", where the address could originate from any domain. Am I right in thinking the line below would achieve this? [using sendmail]

:0 * ^From.root*

/dev/null

Or if I wanted to move to a folder, will this work and automatically create the folder (imap syncable)

:0 * ^From.root*

ExampleFolder

Peter
  • 1,450
  • 2
  • 17
  • 27

1 Answers1

4

Will delete the mail :

:0
* ^From:.*root@.*
/dev/null

Will create the folder and move the mail to it (you still need to subscribe to the folder over IMAP)

:0
* ^From:.*root@.*
ExampleFolder
Sandor Marton
  • 1,564
  • 9
  • 12
  • 1
    The trailing `.*` is superfluous, albeit mostly harmless. Do you really intend to allow exactly one arbitrary character between `From:` and `root@`? – tripleee May 14 '13 at 19:10