Amavis Problems

Discussion in 'HOWTO-Related Questions' started by wmrwl, Oct 9, 2006.

  1. wmrwl

    wmrwl Member

    Hi,

    Debian Sarge 3.1: Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAssassin, ClamAV)

    I'm getting the following error in Amavis:

    Code:
    Oct  9 14:29:45 mail postfix/qmgr[2188]: warning: connect to transport amavis: No such file or directory
    
    What could the problem be?

    Everytime I restart Amavis I get the following:

    Code:
    mail:~# /etc/init.d/amavis restart
    Stopping amavisd: (not running).
    Starting amavisd: amavisd-new.
    
    ________
    ROLL BLUNTS
     
    Last edited: Mar 30, 2011
  2. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    netstat -tap
    ? What's in /etc/postfix/master.cf?
     
  3. wmrwl

    wmrwl Member

    Netstat -tap:
    Code:
    mail:~# netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 *:imaps                 *:*                     LISTEN     1983/couriertcpd
    tcp        0      0 localhost:10025         *:*                     LISTEN     2181/master
    tcp        0      0 localhost:mysql         *:*                     LISTEN     2047/mysqld
    tcp        0      0 *:imap2                 *:*                     LISTEN     1968/couriertcpd
    tcp        0      0 *:www                   *:*                     LISTEN     2217/apache
    tcp        0      0 *:ssh                   *:*                     LISTEN     2202/sshd
    tcp        0      0 *:smtp                  *:*                     LISTEN     2181/master
    tcp        0      0 10.0.0.4:imap2          h-68-166-225-202.:62953 ESTABLISHED7175/imapd
    tcp        0      0 10.0.0.4:imap2          h-68-166-225-202.:62954 ESTABLISHED7176/imapd
    tcp        0    296 10.1.0.4:ssh            10.1.0.253:3612         ESTABLISHED7183/sshd: root@tty
    tcp        0      0 10.0.0.4:59378          badfish.securitymin:www CLOSE_WAIT 1950/freshclam
    
    master.cf:

    Code:
    
    #
    # ==========================================================================
    # service type  private unpriv  chroot  wakeup  maxproc command + args
    #               (yes)   (yes)   (yes)   (never) (100)
    # ==========================================================================
    smtp      inet  n       -       -       -       -       smtpd
    #submission inet n      -       -       -       -       smtpd
    #       -o smtpd_etrn_restrictions=reject
    #628      inet  n       -       -       -       -       qmqpd
    pickup    fifo  n       -       -       60      1       pickup
    cleanup   unix  n       -       -       -       0       cleanup
    qmgr      fifo  n       -       -       300     1       qmgr
    #qmgr     fifo  n       -       -       300     1       oqmgr
    rewrite   unix  -       -       -       -       -       trivial-rewrite
    bounce    unix  -       -       -       -       0       bounce
    defer     unix  -       -       -       -       0       bounce
    trace     unix  -       -       -       -       0       bounce
    verify    unix  -       -       -       -       1       verify
    flush     unix  n       -       -       1000?   0       flush
    proxymap  unix  -       -       n       -       -       proxymap
    smtp      unix  -       -       -       -       -       smtp
    relay     unix  -       -       -       -       -       smtp
    #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq     unix  n       -       -       -       -       showq
    error     unix  -       -       -       -       -       error
    local     unix  -       n       n       -       -       local
    virtual   unix  -       n       n       -       -       virtual
    lmtp      unix  -       -       n       -       -       lmtp
    anvil     unix  -       -       n       -       1       anvil
    #
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    #
    # maildrop. See the Postfix MAILDROP_README file for details.
    #
    maildrop  unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
    uucp      unix  -       n       n       -       -       pipe
      flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    ifmail    unix  -       n       n       -       -       pipe
      flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
    bsmtp     unix  -       n       n       -       -       pipe
      flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -d -t$nexthop -f$sender $recipient
    scalemail-backend unix  -       n       n       -       2       pipe
      flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
    
    # only used by postfix-tls
    #tlsmgr   fifo  -       -       n       300     1       tlsmgr
    #smtps    inet  n       -       n       -       -       smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
    #587      inet  n       -       n       -       -       smtpd -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
    ### Added by Rob on 10/9/2006 ###
    127.0.0.1:10025 inet n - - - - smtpd
            -o content_filter=
            -o local_recipient_maps=
            -o relay_recipient_maps=
            -o smtpd_restriction_classes=
            -o smtpd_client_restrictions=
            -o smtpd_helo_restrictions=
            -o smtpd_sender_restrictions=
            -o smtpd_recipient_restrictions=permit_mynetworks,reject
            -o mynetworks=127.0.0.0/8
            -o strict_rfc821_envelopes=yes
            -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
            -o smtpd_bind_address=127.0.0.1
    
    
     
  4. wmrwl

    wmrwl Member

    OK I see now that I was missing

    Code:
    amavis unix - - - - 2 smtp
            -o smtp_data_done_timeout=1200
            -o smtp_send_xforward_command=yes
    
    from master.cf so I added that. I also rebooted the machine and noticed that it said spamassassin was not able to start and to check /etc/default/spamassassin. I opened the file and saw
    Code:
    # Change to one to enable spamd
    ENABLED=0
    
    So I changed it to:

    Code:
    # Change to one to enable spamd
    ENABLED=1
    
    And I rebooted the machine again.

    Now my mail.log says:

    Code:
    Oct 11 02:53:46 mail postfix/smtp[2477]: EC1ED19C42D: to=<admin@[I]domain[/I].com>, relay=none, delay=1, status=deferred (connect to 127.0.0.1[127.0.0.1]: Connection refused)
    
    I should also mention that I am technically running Debian testing etch, but my sources.list is:

    Code:
    deb http://ftp.debian.org/debian sarge main
    
    I dont know if that makes a difference.
     
  5. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    netstat -tap
    ?
     
  6. wmrwl

    wmrwl Member

    netstat -tap:

    Code:
    mail:~# netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 *:imaps                 *:*                     LISTEN     1985/couriertcpd
    tcp        0      0 localhost:10025         *:*                     LISTEN     2183/master
    tcp        0      0 localhost:mysql         *:*                     LISTEN     2049/mysqld
    tcp        0      0 localhost:spamd         *:*                     LISTEN     3472/spamd child
    tcp        0      0 *:imap2                 *:*                     LISTEN     1970/couriertcpd
    tcp        0      0 *:www                   *:*                     LISTEN     2227/apache
    tcp        0      0 *:ssh                   *:*                     LISTEN     2212/sshd
    tcp        0      0 *:smtp                  *:*                     LISTEN     2183/master
    tcp        0     52 10.1.0.4:ssh            10.1.0.253:1114         ESTABLISHED3
    
     
    Last edited: Oct 11, 2006
  7. falko

    falko Super Moderator ISPConfig Developer

    What's in /etc/postfix/main.cf (please strip out the comments)?
     
  8. wmrwl

    wmrwl Member

    Main.cf

    Code:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    biff = no
    
    # appending .domain is the MUA's job.
    append_dot_mydomain = no
    
    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h
    
    myhostname = mail.[I]domain[/I].com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = mail.[I]domain[/I].com, localhost, localhost.localdomain
    relayhost =
    mynetworks = 127.0.0.1/8
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    virtual_alias_domains =
    virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_mailbox_base = /home/vmail
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    smtpd_use_tls = yes
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    transport_maps = mysql:/etc/postfix/mysql-virtual_transports.cf
    virtual_mailbox_extended = yes
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks
    content_filter = amavis:[127.0.0.1]:10024
    receive_override_options = no_address_mappings
    
     
  9. falko

    falko Super Moderator ISPConfig Developer

    Do you use a firewall on the Debian system? If so, disable it for now.
    Also, did you try to reboot the server?
     
  10. wmrwl

    wmrwl Member

    There is no firewall on the machine. I was going to set that up after the mail server is working.

    I rebooted and still get this in mail.log:

    Code:
    Oct 13 11:27:21 mail postfix/smtpd[2263]: connect from bay0-omc1-s31.bay0.hotmail.com[65.54.246.103]
    Oct 13 11:27:21 mail postfix/smtpd[2263]: ADF3819C425: client=bay0-omc1-s31.bay0.hotmail.com[65.54.246.103]
    Oct 13 11:27:21 mail postfix/cleanup[2270]: ADF3819C425: message-id=<[email protected]>
    Oct 13 11:27:21 mail postfix/qmgr[2192]: ADF3819C425: from=<[I]myemail[/I]@hotmail.com>, size=1996, nrcpt=1 (queue active)
    Oct 13 11:27:22 mail postfix/smtpd[2263]: disconnect from bay0-omc1-s31.bay0.hotmail.com[65.54.246.103]
    Oct 13 11:27:22 mail postfix/smtp[2271]: connect to 127.0.0.1[127.0.0.1]: Connection refused (port 10024)
    Oct 13 11:27:22 mail postfix/smtp[2271]: ADF3819C425: to=<admin@[I]domain[/I].com>, relay=none, delay=1, status=deferred (connect to 127.0.0.1[127.0.0.1]: Connection refused)
    
    Everytime I restart Amavis I get:

    Code:
    mail:~# /etc/init.d/amavis restart
    Stopping amavisd: (not running).
    Starting amavisd: amavisd-new.
    
    I have tried to purge and reinstall a few times, but still keep getting this same error.
     
    Last edited: Oct 13, 2006
  11. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    netstat -tap
    ?
    Does your /etc/amavis/amavisd.conf look like the one from the tutorial?
     
  12. wmrwl

    wmrwl Member

    OK the problem is definately with amavis.conf. I cant figure out what I'm doing wrong. If I leave the original conf file emails work perfectly. The instant that I change the line that says

    Code:
     @lookup_sql_dsn =
    
    It give me this error after reboot and sending a test email:

    Code:
    Oct 16 15:52:21 mail postfix/smtp[2262]: CB11819C3E8: to=<[I][email protected][/I]>, relay=127.0.0.1[127.0.0.1], delay=1, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=01909-01, creating_partsdir FAILED: DBD::mysql::st execute failed: Table 'mail.policy' doesn't exist at (eval 38) line 238, <GEN9> line 15. (in reply to end of DATA command))
    
    I have tried to copy and paste the amavis.conf from the tutorial and then resorted to manually changing the info by hand using vi on the machine.

    What am I doing wrong?
     
  13. falko

    falko Super Moderator ISPConfig Developer

    Which browser do you use? Someone else had a similar problem when he copied amavisd.conf with IE. Then he used Firefox, and all was good.
     
  14. wmrwl

    wmrwl Member

    I saw that post and tried it with both IE and firefox.

    I also tried to hand edit the file with vi.
    ________
    THREESOME LESBIAN
    ________
    CLEANING VAPOR BUDDY
     
    Last edited: Apr 22, 2011
  15. falko

    falko Super Moderator ISPConfig Developer

    And now it's a perfect copy of the one in the tutorial?
     

Share This Page