Amavis Scanning on Incoming Emails not working.

Discussion in 'Installation/Configuration' started by pvanthony, Aug 21, 2013.

  1. pvanthony

    pvanthony Member

    Hi,

    Scanning of outgoing emails are working fine.

    The issue is with scanning of incoming emails by Amavis.

    The email domain setting for spamfilter is set to Normal. The user email under that domain, the spamfilter is also set to Normal. Looking at the logs there is no scanning done by Amavis. And in the source of the incoming email, there is no amavis header.

    I need advice on where and what to check, if some setting was set wrongly.

    Currently using ispconfig 3.0.4.6 on CentOS 6 64bit.

    Please help.

    P.V.Anthony
     
  2. pvanthony

    pvanthony Member

    Need some hints.

    Please share what to look for?

    P.V.Anthony
     
  3. almere

    almere Member HowtoForge Supporter

    Do you have any errors log from Amavis / dovecot ?
     
  4. pvanthony

    pvanthony Member

    Thank you for replying.

    Did the following command to check for errors in the /var/log/maillog.

    #cat maillog | grep -i error | grep -i amavis

    Unfortunately there is no error.

    It looks like the incoming emails are just not going to amavis. I wonder if I have missed out some setting.

    In ispconfig, the email domain has the spamfilter set to enabled "normal". In the email mailbox spamfilter set to "normal".

    Is there any other setting to set? Or a config file to check?

    Could it be at the postfix's main.cf?

    Did I miss something here?

    smtpd_recipient_restrictions = check_policy_service inet:127.0.0.1:10031,
    check_sender_access hash:/etc/postfix/block_user,
    permit_mynetworks,
    permit_sasl_authenticated,
    check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf,
    reject_unauth_destination,
    check_recipient_access hash:/etc/postfix/anti_spam_bypassed,
    reject_non_fqdn_recipient,
    reject_non_fqdn_sender,
    reject_unknown_sender_domain,
    reject_unknown_recipient_domain,
    check_client_access hash:/etc/postfix/rbl_check_bypassed,
    reject_rbl_client zen.spamhaus.org,
    reject_rbl_client bl.spamcop.net,
    check_client_access pcre:/etc/postfix/dspam_incoming

    The content filter is setup.
    content_filter = amavis:[127.0.0.1]:10024

    Please continue to help.

    P.V.Anthony
     
  5. pvanthony

    pvanthony Member

    Really need advice on how to get Amavis to scan incoming emails.

    Please advice.

    Tested amavis by telnet on port 10024 and it is working. Just cannot figure out why postfix is just not sending email to amavis.

    I am assuming that postfix is not sending email to amavis. I am not sure about this.

    The funny thing is outgoing emails are scanned.

    What did I miss out in the configuration?

    Please advice.

    P.V.Anthony
     
  6. pvanthony

    pvanthony Member

    I still have no clue. Any hint or advice?

    Really need the advice so that I can check it out.

    Any advice on what to check?

    P.V.Anthony
     
  7. pvanthony

    pvanthony Member

    Please help.

    Could this be a amavis configuration issue?

    Did activate the spam filter for the domain and email box.

    But the incoming emails are not scanned. Outgoing emails are scanned

    How to make amavis scan incoming emails?

    Is there a amavis configuration I can try to test that postfix is actually sending incoming emails to amavis through the content_filter and scan for virus?

    In that way, we could narrow down the issue to amavis or postfix

    Please help.

    P.V.Anthony
     
  8. pvanthony

    pvanthony Member

    Please help. Anyone, please advise.

    P.V.Anthony
     
  9. pvanthony

    pvanthony Member

    Did the test below on amavis and I can receive the emails. So I assume amavis is working. Just cannot figure out how to get incoming emails to be scanned by amavis. I have set the email domain and the email mailbox to use spamfilter.

    Some how the content_filter setting does not seem to be sending all the incoming emails to amavis. I am guessing here.

    [user]# telnet localhost 10024
    Trying ::1...
    telnet: connect to address ::1: Connection refused
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    220 [127.0.0.1] ESMTP amavisd-new service ready
    mail from: <[email protected]>
    250 2.1.0 Sender <[email protected]> OK
    rcpt to: <[email protected]>
    250 2.1.5 Recipient <[email protected]> OK
    data
    354 End data with <CR><LF>.<CR><LF>
    to: [email protected]
    subject: testing amavis
    testing amavis
    .
    250 2.0.0 Ok, id=18588-07, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 1BCAA37259BE
    quit
    221 2.0.0 [127.0.0.1] amavisd-new closing transmission channel
    Connection closed by foreign host.
     
  10. pvanthony

    pvanthony Member

    [SOLVED] Amavis Scanning on Incoming Emails not working.

    The problem was solved by Urban Loesch from the policyd mailling list.

    Urban Loesch took the time and effort to help me solve the problem.

    I am very happy.

    Thank you, Urban Loesch, very much for helping me with this problem with postfix and amavis.

    Here is the solution to the problem from Urban Loesch.

    Just in case someone else has the similar problem.

    -------------- start ------------------------
    Hi,

    I think this logline indicates the problem:

    ...
    Sep 7 21:44:15 hostname postfix/smtpd[28781]: NOQUEUE: filter: RCPT from mail-pa0-f41.google.com[209.85.220.41]: <mail-pa0-f41.google.com[209.85.220.41]>: Client host triggers FILTER lmtp:unix:/var/run/dspam/dspam.sock; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-pa0-f41.google.com>
    ...

    Something in your configuration is triggering a FILTER action, which has higher precedence than the content_filter action itself.

    Look at:
    http://www.postfix.org/postconf.5.html#content_filter

    Note #1:
    "This setting has lower precedence than a FILTER action that is specified in an access(5), header_checks(5) or body_checks(5) table."

    best,
    Urban
    --------------- end -------------------------

    P.V.Anthony
     
  11. bdsonline0123456789

    bdsonline0123456789 New Member

    Khuy?n m?i chua t?ng có t?i Hyundai Hillstate.Ch? v?i 30%(kho?ng 800tr)khách hÃ*ng có th? ký h?p d?ng mua can h? vÃ* dc nh?n nhÃ* ngay.VÃ* du?c n? l?i 70% không lãi su?t trong 1 nam.
    Di?n tÃ*ch can h? t? 102m d?n 168m v?i phong cách HÃ*n Qu?c vÃ* Bán C? Di?n l?ch s? cao c?p thÃ*ch h?p c? v?i nh?ng d?i gia dình 3 th? h?.
    Giá các can tu? theo v? trÃ* ch? t? 22,8tr/m2 bao g?m VAT,2% phÃ* b?o trì,vÃ* d?c bi?t có c? N?i Th?t Cao C?p.
    SÃ*n bds Delta VN du?c u? quy?n chÃ*nh th?c c?a ch? d?u tu Hyundai Hillstate.LH: Tùng Lâm, 24 t2 HoÃ*ng D?o Thuý, Tel. 0918677755 - 0903801866.
    http://hyundaihillstatehadong.wordpress.com/
     

Share This Page