amavis delete every mail

Discussion in 'HOWTO-Related Questions' started by malikperera, May 9, 2009.

  1. malikperera

    malikperera New Member

    Hello,
    I installed Ubuntu 9.04 using the procedure perfect-server-ubuntu-9.04-ispconfig-2 , But did not install Ispconfig.
    Then I used procedure Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Debian Lenny) to configure Postfix and all email related software.

    At the moment I have issue with sending or receive email. All the time amavis delete email due to spam. Even email from local host. Only I could send (local) email my command line using mailx.
    I can see following in the mail.info log

    May 9 21:54:29 web amavis[3281]: (03281-01) Blocked SPAM, LOCAL [IPv6:::1] [IPv6:::1] <[email protected]> <[email protected]>, quarantine: f/spam-fihbDZGcHhfe.gz, Message-ID: <[email protected]>, mail_id: fihbDZGcHhfe, Hits: 8.643, size: 832, 14701 ms
    May 9 21:54:29 web postfix/smtp[6220]: DC951C0BB: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=15, delays=0.14/0.06/0.03/15, dsn=2.7.0, status=sent (250 2.7.0 Ok, discarded, id=03281-01 – SPAM)

    At moment listing ports look like this.
    oot@web:/etc/amavis/conf.d# netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 localhost:10024 *:* LISTEN 2332/amavisd (maste
    tcp 0 0 localhost:10025 *:* LISTEN 3095/master
    tcp 0 0 localhost:mysql *:* LISTEN 2407/mysqld
    tcp 0 0 *:www *:* LISTEN 3260/apache2
    tcp 0 0 web.xxx:domain *:* LISTEN 2282/named
    tcp 0 0 localhost:domain *:* LISTEN 2282/named
    tcp 0 0 *:ssh *:* LISTEN 2304/sshd
    tcp 0 0 *:smtp *:* LISTEN 3095/master
    tcp 0 0 localhost:953 *:* LISTEN 2282/named
    tcp 0 0 *:https *:* LISTEN 3260/apache2
    tcp 0 0 web.xxx.:ssh 10.10.1.20:40579 ESTABLISHED 6157/sshd: malik [p
    tcp 0 0 web.xxx.:ssh 10.10.1.20:40580 ESTABLISHED 6182/sshd: malik [p
    tcp 0 0 web.xxx.:ssh 10.10.1.20:47747 ESTABLISHED 6229/sshd: malik [p
    tcp6 0 0 [::]:imaps [::]:* LISTEN 2985/couriertcpd
    tcp6 0 0 [::]:pop3s [::]:* LISTEN 3023/couriertcpd
    tcp6 0 0 [::]:pop3 [::]:* LISTEN 3001/couriertcpd
    tcp6 0 0 [::]:imap2 [::]:* LISTEN 2963/couriertcpd
    tcp6 0 0 [::]:ftp [::]:* LISTEN 3166/proftpd: (acce
    tcp6 0 0 [::]:domain [::]:* LISTEN 2282/named
    tcp6 0 0 [::]:ssh [::]:* LISTEN 2304/sshd
    tcp6 0 0 [::]:smtp [::]:* LISTEN 3095/master
    tcp6 0 0 localhost:953 [::]:* LISTEN 2282/named
    root@web:/etc/amavis/conf.d#

    This problem occurred when I trying to send email to local domain or to out side (such as gmail)
    I did not test receiving email from Internet.
    I already spend few hours, but could not figure out what went wrong.
    Hope somebody could help me.

    I also notice following in the log, IMAP working on IPV6 but amavis only IPV4.
    Is this related? How could I change to everything to IPV4
    May 10 00:15:41 web imapd: LOGOUT, [email protected], ip=[::1], headers=0, body=0, rcvd=678, sent=204, time=0
    May 10 00:15:41 web imapd: LOGIN, [email protected], ip=[::1], port=[36340], protocol=IMAP
    May 10 00:15:41 web imapd: LOGOUT, [email protected], ip=[::1], headers=405, body=0, rcvd=296, sent=2032, time=0
    May 10 00:15:47 web amavis[10579]: (10579-01) Blocked SPAM, LOCAL [IPv6:::1] [IPv6:::1] <[email protected]> -> <[email protected]>, quarantine: 0/spam-0EX7HZwV7szT.gz, Message-ID: <[email protected]>, mail_id: 0EX7HZwV7szT, Hits: 7.355, size: 784, 6409 ms
    May 10 00:15:47 web postfix/smtp[10586]: 1217E7FC4: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=6.5, delays=0.08/0.03/0.03/6.4, dsn=2.7.0, status=sent (250 2.7.0 Ok, discarded, id=10579-01 - SPAM)
    May 10 00:15:47 web postfix/qmgr[10560]: 1217E7FC4: removed
     
    Last edited: May 9, 2009
  2. malikperera

    malikperera New Member

    Well I manage to fix the issue. Problem was local host not in the white list

    I needed to bypass SPAM checks that amavisd does based on IP-address. For email address i do this with whitelists, but for IP-address i needed to create a policy_bank in amavisd.conf:

    $policy_bank{'MYNETS'} = { # clients in @mynetworks
    bypass_spam_checks_maps => [1], # don't spam-check internal mail
    bypass_banned_checks_maps => [1], # don't banned-check internal mail
    bypass_header_checks_maps => [1], # don't header-check internal mail
    };

    This uses the built-in MYNETS policy that uses the addresses from @mynetworks. So I edited @mynetworks to allow the IP i wanted.

    from http://conf.se/?p=22
     

Share This Page