can't receive email with squirrelmail

Discussion in 'Installation/Configuration' started by jan-paul, Aug 30, 2012.

  1. jan-paul

    jan-paul New Member

    First off: I am rather a newbie at linux and the server related stuff.

    I have set up my server with the help of your 'perfect server' article (ISPconfig3 with ubuntu 10.04) which worked fine,
    everything was set up nicely for 3 domain names and their email.
    After I installed postgrey and some modifications (my bad) followed by a reboot, emailing did not work properly.
    Then I purged and installed postfix and now, every email I send from my home PC to a set up email address in ISPConfig
    bounces (it takes a few minutes for the email to bounce).

    Mail log:
    Code:
    root@server1:/etc# tail /var/log/mail.log
    Aug 31 14:55:17 server1 imapd: LOGOUT, [email protected], ip=[::1], headers=0, body=0, rcvd=87, sent=391, time=0
    Aug 31 14:55:19 server1 imapd: Connection, ip=[::1]
    Aug 31 14:55:19 server1 imapd: LOGIN, [email protected], ip=[::1], port=[41827], protocol=IMAP
    Aug 31 14:55:19 server1 imapd: LOGOUT, [email protected], ip=[::1], headers=0, body=0, rcvd=87, sent=391, time=0
    Aug 31 14:55:22 server1 imapd: Connection, ip=[::1]
    Aug 31 14:55:22 server1 imapd: LOGIN, [email protected], ip=[::1], port=[41828], protocol=IMAP
    Aug 31 14:55:22 server1 imapd: LOGOUT, [email protected], ip=[::1], headers=0, body=0, rcvd=87, sent=391, time=0
    Aug 31 14:55:23 server1 imapd: Connection, ip=[::1]
    Aug 31 14:55:23 server1 imapd: LOGIN, [email protected], ip=[::1], port=[41829], protocol=IMAP
    Aug 31 14:55:23 server1 imapd: LOGOUT, [email protected], ip=[::1], headers=0, body=0, rcvd=87, sent=391, time=0
    
    postconf -n
    Code:
    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    append_dot_mydomain = no
    biff = no
    config_directory = /etc/postfix
    home_mailbox = Maildir/
    html_directory = /usr/share/doc/postfix/html
    inet_interfaces = all
    mailbox_command =
    mailbox_size_limit = 0
    mydestination = localhost
    myhostname = localhost
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
    myorigin = /etc/mailname
    readme_directory = /usr/share/doc/postfix
    recipient_delimiter = +
    relayhost =
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
    smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtpd_use_tls = yes
    virtual_maps = hash:/etc/postfix/virtusertable
    
    local-host-names
    Code:
    localhost
    server1.biggee.nl
    localhost.server1.biggee.nl
    kleijnproduktion.nl
    biggee.nl
    krabat.nl
    
    Can anyone please help me with this, I'm at my whits end at the moment
     
    Last edited: Aug 31, 2012
  2. falko

    falko Super Moderator Howtoforge Staff

    Is this ISPConfig 2 or 3?
     
  3. jan-paul

    jan-paul New Member

    This is ISPConfig 3.0.4.6
     
  4. jan-paul

    jan-paul New Member

    FYI
    I did a uninstall and reinstall of ISPConfig
    Still there is a problem with emailing, different but still problematic.
    if I login to squirrelmail it gives an error:
    Code:
    ERROR: Connection dropped by IMAP server.
    
    My mail.log:
    Code:
    Aug 31 19:41:39 server1 amavis[1411]: (01411-07) (!)rw_loop: leaving rw loop, no progress, last event (select) 35.030 s ago
    Aug 31 19:41:39 server1 amavis[1411]: (01411-07) (!)FWD via SMTP: <[email protected]> -> <[email protected]>, 451 4.5.0 From MTA([127.0.0.1]:10025) during fwd-connect (Negative greeting:  at (eval 98) line 596.): id=01411-07
    Aug 31 19:41:39 server1 amavis[1411]: (01411-07) Blocked MTA-BLOCKED, <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: 6+8IJ1WWOHMH, Hits: -1.901, size: 1329, 35157 ms
    Aug 31 19:41:39 server1 postfix/smtp[2958]: B1C93647BB: to=<[email protected]>, orig_to=<root>, relay=127.0.0.1[127.0.0.1]:10024, delay=3697, delays=3645/16/0.02/35, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 id=01411-07 - Temporary MTA failure on relaying, From MTA([127.0.0.1]:10025) during fwd-connect (Negative greeting:  at (eval 98) line 596.): id=01411-07 (in reply to end of DATA command))
    Aug 31 19:41:46 server1 amavis[1411]: (01411-07) (!)rw_loop: leaving rw loop, no progress, last event (select) 5.005 s ago
    Aug 31 19:42:04 server1 postfix/smtpd[2993]: connect from localhost.localdomain[127.0.0.1]
    Aug 31 19:42:04 server1 postfix/smtpd[2993]: warning: SASL: Connect to private/auth failed: No such file or directory
    Aug 31 19:42:04 server1 postfix/smtpd[2993]: fatal: no SASL authentication mechanisms
    Aug 31 19:42:05 server1 postfix/master[2129]: warning: process /usr/lib/postfix/smtpd pid 2993 exit status 1
    Aug 31 19:42:05 server1 postfix/master[2129]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
    
    My postcfg -n:
    Code:
    alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    append_dot_mydomain = no
    biff = no
    body_checks = regexp:/etc/postfix/body_checks
    broken_sasl_auth_clients = yes
    config_directory = /etc/postfix
    content_filter = amavis:[127.0.0.1]:10024
    dovecot_destination_recipient_limit = 1
    header_checks = regexp:/etc/postfix/header_checks
    home_mailbox = Maildir/
    html_directory = /usr/share/doc/postfix/html
    inet_interfaces = all
    mailbox_command =
    mailbox_size_limit = 0
    maildrop_destination_concurrency_limit = 1
    maildrop_destination_recipient_limit = 1
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    mydestination = server1.biggee.nl, localhost, localhost.localdomain
    myhostname = server1.biggee.nl
    mynetworks = 127.0.0.0/8 [::1]/128
    myorigin = /etc/mailname
    nested_header_checks = regexp:/etc/postfix/nested_header_checks
    owner_request_special = no
    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 $virtual_mailbox_limit_maps
    readme_directory = /usr/share/doc/postfix
    receive_override_options = no_address_mappings
    recipient_delimiter = +
    relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
    relayhost =
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    smtpd_client_message_rate_limit = 100
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_sasl_path = private/auth
    smtpd_sasl_type = dovecot
    smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_tls_security_level = may
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtpd_use_tls = yes
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf, hash:/var/lib/mailman/data/virtual-mailman
    virtual_gid_maps = static:5000
    virtual_mailbox_base = /var/vmail
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_transport = dovecot
    virtual_uid_maps = static:5000
    postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maps=hash:/etc/postfix/virtusertable
    
    BTW
    This was after a reboot when I did the squirrelmail setup again from the command line and chose for courier
    I also changed my hosts file; I commented out the IPv6 thingy
    Code:
    127.0.0.1       localhost.localdomain   localhost
    213.207.109.122 server1.biggee.nl       server1
    
    # The following lines are desirable for IPv6 capable hosts
    #::1     localhost ip6-localhost ip6-loopback
    #fe00::0 ip6-localnet
    #ff00::0 ip6-mcastprefix
    #ff02::1 ip6-allnodes
    #ff02::2 ip6-allrouters
    
     
    Last edited: Aug 31, 2012
  5. falko

    falko Super Moderator Howtoforge Staff

  6. jan-paul

    jan-paul New Member

    In /etc/dovecot/dovecot.conf I added:
    Code:
    client {
           path = /var/spool/postfix/private/auth
           mode = 0660
           user = postfix
           group = postfix
    }
    
    Afterwards I restarted dovecot with "dovecot restart" I get a fatal errormessage saying:
    Code:
    doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 16: Unknown setting: client
    
    In etc/postfix/main.cf I added:
    Code:
    queue_directory = /var/spool/postfix
    
    Afterwards I restarted postfix which gave me 6 times the warning message:
    Code:
    postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maps=hash:/etc/postfix/virtusertable
    
    and 12 times the warning message:
    Code:
    /usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maps=hash:/etc/postfix/virtusertable
    
    Then I reconfigured squirrelmail for dovecot, rebooted the server and after the restart I tried logging into squirrelmail again: still the same issue
    Here's my mail.log
    Code:
    Sep  1 12:44:42 server1 postfix/smtp[2242]: DF9C9648CF: to=<[email protected]>, orig_to=<root>, relay=127.0.0.1[127.0.0.1]:10024, conn_use=8, delay=13480, delays=13448/31/0/0.12, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 id=01422-02-8 - Temporary MTA failure on relaying, From MTA([127.0.0.1]:10025) during fwd-connect (Error writing to socket: Broken pipe at (eval 98) line 200.): id=01422-02-8 (in reply to end of DATA command))
    Sep  1 12:44:42 server1 amavis[1422]: (01422-02-9) (!)FWD via SMTP: <[email protected]> -> <[email protected]>, 451 4.5.0 From MTA([127.0.0.1]:10025) during fwd-connect (Error writing to socket: Broken pipe at (eval 98) line 200.): id=01422-02-9
    Sep  1 12:44:42 server1 amavis[1422]: (01422-02-9) Blocked MTA-BLOCKED, <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: 9W5hO78f5RWx, Hits: -1.901, size: 1821, 115 ms
    Sep  1 12:44:42 server1 postfix/smtp[2242]: D31EA64835: to=<[email protected]>, orig_to=<root>, relay=127.0.0.1[127.0.0.1]:10024, conn_use=9, delay=42280, delays=42248/31/0/0.12, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 id=01422-02-9 - Temporary MTA failure on relaying, From MTA([127.0.0.1]:10025) during fwd-connect (Error writing to socket: Broken pipe at (eval 98) line 200.): id=01422-02-9 (in reply to end of DATA command))
    Sep  1 12:44:42 server1 amavis[1422]: (01422-02-10) (!)FWD via SMTP: <[email protected]> -> <[email protected]>, 451 4.5.0 From MTA([127.0.0.1]:10025) during fwd-connect (Error writing to socket: Broken pipe at (eval 98) line 200.): id=01422-02-10
    Sep  1 12:44:42 server1 amavis[1422]: (01422-02-10) Blocked MTA-BLOCKED, <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: 6X8zGCWa4m6B, Hits: -1.901, size: 1821, 116 ms
    Sep  1 12:44:42 server1 postfix/smtp[2242]: 1078A648A1: to=<[email protected]>, orig_to=<root>, relay=127.0.0.1[127.0.0.1]:10024, conn_use=10, delay=29680, delays=29649/31/0/0.12, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 id=01422-02-10 - Temporary MTA failure on relaying, From MTA([127.0.0.1]:10025) during fwd-connect (Error writing to socket: Broken pipe at (eval 98) line 200.): id=01422-02-10 (in reply to end of DATA command))
    Sep  1 12:44:42 server1 amavis[1421]: (01421-02) (!)FWD via SMTP: <[email protected]> -> <[email protected]>, 451 4.5.0 From MTA([127.0.0.1]:10025) during fwd-connect (Error writing to socket: Broken pipe at (eval 98) line 200.): id=01421-02
    Sep  1 12:44:42 server1 amavis[1421]: (01421-02) Blocked MTA-BLOCKED, <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: o6i3vSiPy3+o, Hits: -1.901, size: 1329, 14781 ms
    Sep  1 12:44:42 server1 postfix/smtp[2237]: 7F6D764804: to=<[email protected]>, orig_to=<root>, relay=127.0.0.1[127.0.0.1]:10024, delay=50680, delays=50648/17/0.01/15, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 id=01421-02 - Temporary MTA failure on relaying, From MTA([127.0.0.1]:10025) during fwd-connect (Error writing to socket: Broken pipe at (eval 98) line 200.): id=01421-02 (in reply to end of DATA command))
    
    FYI: My dovecot version is 2.0.19
    dovecot.conf
    Code:
    protocols = imap pop3
    auth_mechanisms = plain login
    disable_plaintext_auth = no
    log_timestamp = "%Y-%m-%d %H:%M:%S "
    mail_privileged_group = vmail
    ssl_cert = </etc/postfix/smtpd.cert
    ssl_key = </etc/postfix/smtpd.key
    passdb {
      args = /etc/dovecot/dovecot-sql.conf
      driver = sql
    }
    userdb {
      args = /etc/dovecot/dovecot-sql.conf
      driver = sql
    }
    client {
      path = /var/spool/postfix/private/auth
      mode = 0660
      user = postfix
      group = postfix
    }
    plugin {
      quota = dict:user::file:/var/vmail/%d/%n/.quotausage
      sieve=/var/vmail/%d/%n/.sieve
    }
    service auth {
      unix_listener /var/spool/postfix/private/auth {
        group = postfix
        mode = 0660
        user = postfix
      }
      unix_listener auth-userdb {
        group = vmail
        mode = 0600
        user = vmail
      }
      user = root
    }
    protocol imap {
      mail_plugins = quota imap_quota
    }
    protocol pop3 {
      pop3_uidl_format = %08Xu%08Xv
      mail_plugins = quota
    }
    protocol lda {
      mail_plugins = sieve quota
    }
    
    Then I did
    Code:
    sudo apt-get install dovecot-imapd dovecot-pop3d
    
    the dovecot.conf file is unchanged
    mail.log:
    Code:
    Sep  1 14:22:04 server1 postfix/smtpd[5629]: fatal: no SASL authentication mechanisms
    Sep  1 14:22:04 server1 postfix/smtpd[5630]: connect from localhost.localdomain[127.0.0.1]
    Sep  1 14:22:04 server1 postfix/smtpd[5630]: warning: SASL: Connect to private/auth failed: No such file or directory
    Sep  1 14:22:04 server1 postfix/smtpd[5630]: fatal: no SASL authentication mechanisms
    Sep  1 14:22:05 server1 postfix/master[2139]: warning: process /usr/lib/postfix/smtpd pid 5629 exit status 1
    Sep  1 14:22:05 server1 postfix/master[2139]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
    Sep  1 14:22:05 server1 postfix/master[2139]: warning: process /usr/lib/postfix/smtpd pid 5630 exit status 1
    Sep  1 14:23:37 server1 postfix/anvil[5621]: statistics: max connection rate 1/60s for (smtp:217.148.80.236) at Sep  1 14:21:56
    Sep  1 14:23:37 server1 postfix/anvil[5621]: statistics: max connection count 1 for (smtp:217.148.80.236) at Sep  1 14:21:56
    Sep  1 14:23:37 server1 postfix/anvil[5621]: statistics: max cache size 1 at Sep  1 14:21:56
    
    I don't have worries, I just want to learn how to resolve these things. I can't go reinstalling Ubuntu everytime things do not go as planned.
    I have learned a lot in a week. With some help of the howtoforge moderators ofcourse...
     
    Last edited: Sep 1, 2012
  7. TiTex

    TiTex Member

    so did you check if /var/spool/postfix/private/auth exists ?

    if it exists , try removing the client stanza from dovecot.conf

    and put this instead

    Code:
    auth default {	
      socket listen {
        client {
    	  path = /var/spool/postfix/private/auth
    	  mode = 0660
    	  user = postfix
    	  group = postfix
        }
      }	
      mechanisms = plain login
    }
     
  8. jan-paul

    jan-paul New Member

    It did not exist at that time so I created it but it had no effect.
    On reading information on dovecot.org I found out that my version of dovecot (2.0.19) needs a completely different configuration file. So I followed instructions on dovecot.org to create this config file. Results when I run doveconf -n:
    Code:
    # 2.0.19: /etc/dovecot/dovecot.conf
    # OS: Linux 3.2.0-29-generic x86_64 Ubuntu 12.04.1 LTS
    base_dir = /var/lib/dovecot/
    listen = *
    managesieve_notify_capability = mailto
    managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave
    passdb {
      driver = pam
    }
    plugin {
      sieve = ~/.dovecot.sieve
      sieve_dir = ~/sieve
    }
    protocols = " imap sieve pop3"
    ssl_cert = </etc/ssl/certs/dovecot.pem
    ssl_key = </etc/ssl/private/dovecot.pem
    userdb {
      driver = passwd
    }
    
    Look now I have Linux Ubuntu 12.04 instead of Linux Ubuntu 10.04 :confused:
     

Share This Page