Unable to recieve e-mails

Discussion in 'Developers' Forum' started by quentusrex, Mar 20, 2009.

  1. quentusrex

    quentusrex New Member

    Either I'm unable to receive e-mails, or they are not being placed in the proper folder.

    What do you need to see to help figure this out?
     
  2. quentusrex

    quentusrex New Member

    Here is my master.cf. I only added the port 587 part, and a bit in the delivery part. about vmail


    cat /etc/postfix/master.cf
    #
    # Postfix master process configuration file. For details on the format
    # of the file, see the master(5) manual page (command: "man 5 master").
    #
    # Do not forget to execute "postfix reload" after editing this file.
    #
    # ==========================================================================
    # service type private unpriv chroot wakeup maxproc command + args
    # (yes) (yes) (yes) (never) (100)
    # ==========================================================================
    smtp inet n - - - - smtpd
    #submission inet n - - - - smtpd
    # -o smtpd_tls_security_level=encrypt
    # -o smtpd_sasl_auth_enable=yes
    # -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    # -o milter_macro_daemon_name=ORIGINATING
    587 inet n - - - - smtpd
    #smtps inet n - - - - smtpd
    # -o smtpd_tls_wrappermode=yes
    # -o smtpd_sasl_auth_enable=yes
    # -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    # -o milter_macro_daemon_name=ORIGINATING
    #628 inet n - - - - qmqpd
    pickup fifo n - - 60 1 pickup
    cleanup unix n - - - 0 cleanup
    qmgr fifo n - n 300 1 qmgr
    #qmgr fifo n - - 300 1 oqmgr
    tlsmgr unix - - - 1000? 1 tlsmgr
    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
    proxywrite unix - - n - 1 proxymap
    smtp unix - - - - - smtp
    # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
    relay unix - - - - - smtp
    -o smtp_fallback_relay=
    # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq unix n - - - - showq
    error unix - - - - - error
    retry unix - - - - - error
    discard unix - - - - - discard
    local unix - n n - - local
    virtual unix - n n - - virtual
    lmtp unix - - - - - lmtp
    anvil unix - - - - 1 anvil
    scache unix - - - - 1 scache
    #
    #
    # ====================================================================
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    #
    # Many of the following services use the Postfix pipe(8) delivery
    # agent. See the pipe(8) man page for information about ${recipient}
    # and other message envelope options.
    # ====================================================================
    #
    # maildrop. See the Postfix MAILDROP_README file for details.
    # Also specify in main.cf: maildrop_destination_recipient_limit=1
    #
    maildrop unix - n n - - pipe
    flags=R user=vmail argv=/usr/bin/maildrop -d vmail ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}
    #
    # See the Postfix UUCP_README file for configuration details.
    #
    uucp unix - n n - - pipe
    flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    #
    # Other external delivery methods.
    #
    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 -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}
    mailman unix - n n - - pipe
    flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
    ${nexthop} ${user}


    amavis unix - - - - 2 smtp
    -o smtp_data_done_timeout=1200
    -o smtp_send_xforward_command=yes

    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
     
  3. falko

    falko Super Moderator ISPConfig Developer

    What's in your mail log when you send an email to that server?

    Does the MX record point to the correct server?
     
  4. quentusrex

    quentusrex New Member

    Mar 21 13:03:13 virt3 postfix/smtpd[10900]: connect from wf-out-1314.google.com[209.85.200.171]
    Mar 21 13:03:14 virt3 postfix/smtpd[10900]: 061BE128992: client=wf-out-1314.google.com[209.85.200.171]
    Mar 21 13:03:14 virt3 postfix/cleanup[10904]: 061BE128992: message-id=<49C5481D.1030507@gmail.com>
    Mar 21 13:03:14 virt3 postfix/qmgr[5316]: 061BE128992: from=<****@gmail.com>, size=2425, nrcpt=1 (queue active)
    Mar 21 13:03:14 virt3 amavis[4494]: (04494-12) NOTICE: reconnecting in response to: err=2006, HY000, DBD::mysql::st execute failed: MySQL server has gone away at (eval 98) line 166, <GEN114> line 5.
    Mar 21 13:03:14 virt3 postfix/smtpd[10909]: connect from localhost[127.0.0.1]
    Mar 21 13:03:14 virt3 postfix/smtpd[10909]: EB4D91289A7: client=localhost[127.0.0.1]
    Mar 21 13:03:14 virt3 postfix/cleanup[10904]: EB4D91289A7: message-id=<49C5481D.1030507@gmail.com>
    Mar 21 13:03:14 virt3 postfix/smtpd[10909]: disconnect from localhost[127.0.0.1]
    Mar 21 13:03:14 virt3 postfix/qmgr[5316]: EB4D91289A7: from=<*****@gmail.com>, size=2916, nrcpt=1 (queue active)
    Mar 21 13:03:14 virt3 amavis[4494]: (04494-12) Passed CLEAN, [*.*.*.171] [*.*.*.21] <***@gmail.com> -> <webmaster@****.com>, Message-ID: <49C5481D.1030507@gmail.com>, mail_id: 9N+TcHNbv3qv, Hits: -0.001, size: 2425, queued_as: EB4D91289A7, dkim_id=@gmail.com,****@gmail.com, 896 ms
    Mar 21 13:03:14 virt3 postfix/smtp[10905]: 061BE128992: to=<webmaster@*****.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=1, delays=0.1/0.01/0.01/0.9, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=04494-12, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as EB4D91289A7)
    Mar 21 13:03:14 virt3 postfix/qmgr[5316]: 061BE128992: removed
    Mar 21 13:03:15 virt3 postfix/pipe[10911]: EB4D91289A7: to=<webmaster@*****.com>, relay=maildrop, delay=0.1, delays=0.02/0.01/0/0.07, dsn=2.0.0, status=sent (delivered via maildrop service)
    Mar 21 13:03:15 virt3 postfix/qmgr[5316]: EB4D91289A7: removed
     
  5. falko

    falko Super Moderator ISPConfig Developer

    There seems to be a problem with your MySQL server. Please make sure it is running.
     
  6. quentusrex

    quentusrex New Member

    It is running. I am able to access it with phpmyadmin.
     
  7. falko

    falko Super Moderator ISPConfig Developer

    Are there any MySQL errors in your syslog? What's the output of
    Code:
    netstat -tap
    ?
     
  8. quentusrex

    quentusrex New Member

    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 4406/amavisd (maste
    tcp 0 0 localhost:10025 *:* LISTEN 5307/master
    tcp 0 0 localhost:mysql *:* LISTEN 4481/mysqld
    tcp 0 0 *:submission *:* LISTEN 5307/master
    tcp 0 0 localhost:spamd *:* LISTEN 4546/spamd.pid
    tcp 0 0 *:http-alt *:* LISTEN 5435/apache2
    tcp 0 0 *:www *:* LISTEN 5435/apache2
    tcp 0 0 *:ftp *:* LISTEN 24618/pure-ftpd (SE
    tcp 0 0 *:munin *:* LISTEN 5505/munin-node
    tcp 0 0 ***.***:domain *:* LISTEN 5179/mydns
    tcp 0 0 localhost:domain *:* LISTEN 5179/mydns
    tcp 0 0 *:ssh *:* LISTEN 4380/sshd
    tcp 0 0 *:smtp *:* LISTEN 5307/master
    tcp 0 0 *:https *:* LISTEN 5435/apache2
    tcp 0 288 ***.***:ssh ***.***:64907 ESTABLISHED 10871/sshd: pcpharm
    tcp6 0 0 [::]:imaps [::]:* LISTEN 5115/couriertcpd
    tcp6 0 0 [::]:pop3s [::]:* LISTEN 5169/couriertcpd
    tcp6 0 0 [::]:pop3 [::]:* LISTEN 5138/couriertcpd
    tcp6 0 0 [::]:imap2 [::]:* LISTEN 5084/couriertcpd
    tcp6 0 0 [::]:ftp [::]:* LISTEN 24618/pure-ftpd (SE
    tcp6 0 0 ip6-localhost:domain [::]:* LISTEN 5179/mydns
    tcp6 0 0 [::]:ssh [::]:* LISTEN 4380/sshd
    tcp6 0 0 ***.***:imap2 ***.***:59825 ESTABLISHED 27683/imapd
    tcp6 0 0 ***.***r:imap2 ***.***:62314 ESTABLISHED 16745/couriertls
    tcp6 0 0 ***.***:imap2 ***.***:65295 ESTABLISHED 16282/couriertls




    I've changed my domain name to ***.***


    I also don't have anything mysql related in the syslog. And there are no mysql.log or mysql.err logs. the files are there, but nothing is inside them.
     
    Last edited: Mar 22, 2009
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Which Linux distribution do you use?
     
  10. quentusrex

    quentusrex New Member

    Ubuntu 8.10
     
  11. falko

    falko Super Moderator ISPConfig Developer

    Not sure if this is the problem, but can you make MySQL listen on all interfaces?
     
  12. quentusrex

    quentusrex New Member

    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 4406/amavisd (maste
    tcp 0 0 localhost:10025 *:* LISTEN 5307/master
    tcp 0 0 *:mysql *:* LISTEN 30789/mysqld
    tcp 0 0 *:submission *:* LISTEN 5307/master
    tcp 0 0 localhost:spamd *:* LISTEN 4546/spamd.pid
    tcp 0 0 *:http-alt *:* LISTEN 5435/apache2
    tcp 0 0 *:www *:* LISTEN 5435/apache2
    tcp 0 0 *:ftp *:* LISTEN 24618/pure-ftpd (SE
    tcp 0 0 *:munin *:* LISTEN 5505/munin-node
    tcp 0 0 *.*.*.*.:domain *:* LISTEN 5179/mydns
    tcp 0 0 localhost:domain *:* LISTEN 5179/mydns
    tcp 0 0 *:ssh *:* LISTEN 4380/sshd
    tcp 0 0 *:smtp *:* LISTEN 5307/master
    tcp 0 0 *:https *:* LISTEN 5435/apache2
    tcp 0 0 localhost:45607 localhost:mysql ESTABLISHED 4493/amavisd (ch14-
    tcp 0 0 localhost:mysql localhost:45627 ESTABLISHED 30789/mysqld
    tcp 0 0 localhost:45621 localhost:mysql TIME_WAIT -
    tcp 0 0 localhost:45623 localhost:mysql TIME_WAIT -
    tcp 0 0 localhost:mysql localhost:45607 ESTABLISHED 30789/mysqld
    tcp 0 0 localhost:45627 localhost:mysql ESTABLISHED 4494/amavisd (ch14-
    tcp 0 0 localhost:45622 localhost:mysql TIME_WAIT -
    tcp 0 288 *.**.**:ssh *.*.*.*:60442 ESTABLISHED 30510/sshd: pcpharm
    tcp 0 0 localhost:45629 localhost:mysql TIME_WAIT -
    tcp 0 0 localhost:45625 localhost:mysql TIME_WAIT -
    tcp6 0 0 [::]:imaps [::]:* LISTEN 5115/couriertcpd
    tcp6 0 0 [::]:pop3s [::]:* LISTEN 5169/couriertcpd
    tcp6 0 0 [::]:pop3 [::]:* LISTEN 5138/couriertcpd
    tcp6 0 0 [::]:imap2 [::]:* LISTEN 5084/couriertcpd
    tcp6 0 0 [::]:ftp [::]:* LISTEN 24618/pure-ftpd (SE
    tcp6 0 0 ip6-localhost:domain [::]:* LISTEN 5179/mydns
    tcp6 0 0 [::]:ssh [::]:* LISTEN 4380/sshd
    tcp6 0 0 *.**.*:imap2 *.*.*.*:62314 ESTABLISHED 16745/couriertls
    tcp6 0 0 *.*.*.*:imap2 *.*.*.*:65295 ESTABLISHED 16282/couriertls
     
  13. quentusrex

    quentusrex New Member

    I did edit this line:

    flags=R user=vmail argv=/usr/bin/maildrop -d vmail ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}


    To try to get the 587 part working. I added the second vmail.


    I tried this:

    root@virt3:/var/log# su vmail
    sh-3.2$ /usr/bin/maildrop -d vmail webmaster@mydomain.com
    ERR: authdaemon: s_connect() failed: Permission denied
    ^Cmaildrop: signal 0x02


    What is a sample maildrop comamnd?
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    You can find the maildrop script right in the /home/vmail or /var/vmail directory, it starts with a dot so you have to use ls -la to see it.
     
  15. quentusrex

    quentusrex New Member

    There is no maildrop script in either of those directories.

    root@server:/var/vmail# ls -al
    total 60
    drwxr-xr-x 10 vmail vmail 4096 2009-03-23 11:02 .
    drwxr-xr-x 17 root root 4096 2009-02-25 00:35 ..
    -rw------- 1 vmail vmail 58 2009-03-23 11:02 .bash_history
    -rw-r--r-- 1 vmail vmail 220 2008-05-12 11:49 .bash_logout
    -rw-r--r-- 1 vmail vmail 3115 2008-05-12 11:49 .bashrc
    drwx------ 3 vmail vmail 4096 2009-02-25 00:33 mydomain.com
    -rw------- 1 vmail vmail 1240 2009-02-24 22:20 .mailfilter
    drwxr-xr-x 4 root root 4096 2009-03-09 14:27 mailfilters
    -rw-r--r-- 1 vmail vmail 675 2008-05-12 11:49 .profile
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    The script is there in your listing:

    .mailfilter
     
  17. quentusrex

    quentusrex New Member

    that script isn't executable. I changed the permissions for the time being.
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    This is not a shell script, so it should not be executable. the correct permissions are:

    -rw------- 1 vmail vmail 1240 2009-03-22 23:11 .mailfilter
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    The correct line in master.cf is:

    Code:
    maildrop  unix  -       n       n       -       -       pipe
      flags=R user=vmail argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}
    If you want to run this manually you have to provide all options and not just one option as you did. The full command is:

    /usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}

    and you will have to replace every variable with the correct content that is used by postfix.

    If you want to know more about the delivery process, better use debugging instead of trying to execute things manually:

    http://www.courier-mta.org/maildrop.html

    http://www.courier-mta.org/maildropfilter.html#log

    You can not execute the maildrop script like this, it has to be exc
     
  20. savago

    savago New Member

    Same error

    amavis[2399]: (02399-02) NOTICE: reconnecting in response to: err=2006, HY000, DBD::mysql::st execute failed: MySQL server has gone away at (eval 86) line 166, <GEN48> line 3.

    OS Debian lenny ISPConfig3-stable

    netstat -tap | grep mysql
    tcp 0 0 *:mysql *:* LISTEN 2019/mysqld
    tcp 0 0 localhost:48672 localhost:mysql ESTABLISHED 2399/amavisd (ch2-a
    tcp 0 0 localhost:mysql localhost:48672 ESTABLISHED 2019/mysqld
     

Share This Page