postfix + amavis + spamassassin

Discussion in 'HOWTO-Related Questions' started by Chux, Apr 13, 2008.

  1. Chux

    Chux New Member

    Hi !
    First, sorry for my english folks

    I have read and follow this howto http://www.howtoforge.com/virtual-users-and-domains-with-postfix-ubuntu-7.10

    My server is up, and im sending and receiving emails, everything is ok.
    Now, i have looking some configurations files, and im trying to get my spams messages marked as **SPAM**
    I have edited the /etc/spamassassin/local.cf file, and i have uncomented the rewrite_header Subject *****SPAM***** line. I have restart the amavis daemon and postfix, but i recieve the spam emails without any Subject modification (i use thunderbird via imap to see my email).

    Previoustly, i have updated my amavis 20-debian-default file with $final_spam_destiny = D_PASS;

    another think, i have edited /etc/default/spamassassin/20-debian-defaults and put enabled to 1. I send a spam message to my mailox, and its no marked.

    if i see the email with nano i see X-Quarantine-ID: <4HESW+2Dc6kn>, so, the message is marked as spam.....

    what i have to do to get in my spam messages marked?

    Lot of thanks!
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Any errors in your mail log? Does
    Code:
    spamassassin --lint
    report any errors?
     
  3. Chux

    Chux New Member

    when i see he mail.log everithing is ok (or thats what i think). Spam messages are marked as spam, but the subject is the same, not includes ***SPAM***

    spamassassin --lint doesnt shiw nothing, so i think its ok...

    Thanks for your help
     
  4. falko

    falko Super Moderator Howtoforge Staff

    What's the value of $sa_spam_subject_tag in /etc/amavis/conf.d/20-debian_defaults?

    What's in /etc/spamassassin/local.cf?
     
  5. Chux

    Chux New Member

    Hi Falko
    Code:
    $sa_spam_subject_tag = '***SPAM*** ';
    al my uncomented lines in the local.cs file

    PHP:
    rewrite_header Subject *****SPAM*****
    required_score 5.0
    use_dcc 1
    dcc_path 
    /usr/bin/dccproc
    use_pyzor 1
    pyzor_path 
    /usr/bin/pyzor
    use_bayes 1
    use_bayes_rules 1
    bayes_auto_learn 1
    required_score 7
    Thanks again
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Please make /etc/spamassassin/local.cf looks as follows:
    Code:
    # dcc
    use_dcc 1
    dcc_path /usr/bin/dccproc
    dcc_add_header 1
    dcc_dccifd_path /usr/sbin/dccifd
    
    #pyzor
    use_pyzor 1
    pyzor_path /usr/bin/pyzor
    pyzor_add_header 1
    
    #razor
    use_razor2 1
    razor_config /etc/razor/razor-agent.conf
    
    #bayes
    use_bayes 1
    use_bayes_rules 1
    bayes_auto_learn 1
     
  7. Chux

    Chux New Member

    Hi again Falko,

    I have just made the changes you told me, but i dont get my spam marked.
    Now, with spamassassin --lint i get these warnings:
    Code:
    [25148] warn: config: failed to parse line, skipping, in "/etc/spamassassin/local.cf": dcc_add_header 1
    [25148] warn: config: SpamAssassin failed to parse line, "/usr/sbin/dccifd" is not valid for "dcc_dccifd_path", skipping: dcc_dccifd_path /usr/sbin/dccifd
    [25148] warn: config: failed to parse line, skipping, in "/etc/spamassassin/local.cf": pyzor_add_header 1
    [25148] warn: lint: 3 issues detected, please rerun with debug enabled for more information
    Thank you so much for your help
     
  8. falko

    falko Super Moderator Howtoforge Staff

  9. Chux

    Chux New Member

    hi falko,

    i have the v310.pre file as its described in the tutorial
     
  10. falko

    falko Super Moderator Howtoforge Staff

    What does
    Code:
    spamassassin --lint
    show now?
     
  11. Chux

    Chux New Member

    sorry, i havent explain correctly in my last post, i mean, i have my /etc/spamassassin/v310.pre like the tutorial since the begining.
    Code:
    spamassassin --lint
    shows the same
    Code:
    [25148] warn: config: failed to parse line, skipping, in "/etc/spamassassin/local.cf": dcc_add_header 1
    [25148] warn: config: SpamAssassin failed to parse line, "/usr/sbin/dccifd" is not valid for "dcc_dccifd_path", skipping: dcc_dccifd_path /usr/sbin/dccifd
    [25148] warn: config: failed to parse line, skipping, in "/etc/spamassassin/local.cf": pyzor_add_header 1
    [25148] warn: lint: 3 issues detected, please rerun with debug enabled for more information
    Thank you so much again
     
  12. falko

    falko Super Moderator Howtoforge Staff

    Please change
    Code:
    # dcc
    use_dcc 1
    dcc_path /usr/bin/dccproc
    dcc_add_header 1
    dcc_dccifd_path /usr/sbin/dccifd
    to

    Code:
    # dcc
    use_dcc 1
    dcc_path /usr/bin/dccproc
    in /etc/mail/spamassassin/local.cf.
     

Share This Page