Results 1 to 1 of 1

Thread: How i can use $user Variable on exim filter and move mail to junk

  1. #1
    Join Date
    Feb 2007
    Posts
    39

    How i can use $user Variable on exim filter and move mail to junk

    Hello

    i would like to write exim filter on /etc/system_filter.exim

    Dectect the subject contain string "hacked" and move mail to junk

    Example
    HTML Code:
    if
     ( $header_subject: contains "hacked"  )
    then
    
      if
          $local_part is "${user}"
      then
          save /home/${user}/Maildir/.INBOX.spam/new/ 660
      else
          if "${if exists{/home/${user}/imap/${domain}/${local_part}}{yes}{no}}" is "yes"
          then
              save /home/${user}/imap/$domain/$local_part/Maildir/.INBOX.spam/new/ 660
          else
              save /home/${user}/Maildir/.INBOX.spam/new/ 660
          endif
      endif
    
      logwrite "$tod_log $message_id from $sender_address contained hack string to  $header_to -- $domain"
      finish
    endif
    This example doesn't work because
    command: unknown variable name "user"

    Can anyone guide me with how to get this working?
    Thank you, Regards
    Mean
    Last edited by mean; 06-20-2019 at 01:40 AM.
    Thailand Linux Web hosting and Domain name registration.
    IREALLYHOST.com

Posting Permissions

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