1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Odd Exim Problem

Discussion in 'Linux & Open Source' started by growse, 4 May 2006.

  1. growse

    Soldato

    Joined: 18 Oct 2002

    Posts: 7,139

    Location: Ironing

    I've got a problem with exim that I can't fathom. Exim is running as my mailserver and in conjunction with spamassassin, separates my spam. At the moment, spamassassin is working great, adding an X-Spam-Flag: YES header to every spam mail that comes through. However, I'm trying to use a .forward file to redirect anything with that to my spam folder in my maildir. The problem is that exim is claiming it's doing everything it's being told to do, but my .spam directory remains empty! The mail must be going somewhere, but I think it's chucking it down a black hole. It's only spam, but I've had false positives before now and would rather it didn't just delete everything.

    My .forward file:

    Code:
    #Exim filter  <<== do not edit or remove this line!
    if
            $h_X-Spam-Flag: contains "YES"
    then
            save $home/maildir/.spam/
            finish
    endif
    
    Here's what the log says when it gets some spam:

    Code:
    2006-05-04 16:27:58 1Fbfk9-0003oj-Dx <= stereo@japet.or.jp H=amontpellier-152-1-98-234.w86-211.abo.wanadoo.fr (japet.or.jp) [86.211.96.234] P=smtp S=5300 id=
    000001c66f8f$37af2730$c624a8c0@ifm33
    2006-05-04 16:27:58 1Fbfk9-0003oj-Dx => /home/growse/maildir/.spam/ (growse@growse.com) <andrew@growse.com> R=userforward T=address_directory
    
    Finally, the router and transport in exim:

    Code:
    #routers
    userforward:
      driver = redirect
      check_local_user
    # local_part_suffix = +* : -*
    # local_part_suffix_optional
      file = /home/growse/.forward
     allow_filter
      no_verify
      no_expn
      check_ancestor
      file_transport = address_file
      pipe_transport = address_pipe
      reply_transport = address_reply
      directory_transport = address_directory
    
    #transports
    address_file:
      driver = appendfile
      delivery_date_add
      envelope_to_add
      return_path_add
    
    
    address_directory:
            driver = appendfile
            maildir_format
            delivery_date_add
            envelope_to_add
            return_path_add