Email troubles

Discussion in 'Installation/Configuration' started by wshakes, Mar 5, 2017.

  1. wshakes

    wshakes Member

    server is openvz, debian 8.7, "the perfect server" ISPConfig 3.1.2 setup, 2 cpu core, 1gb ram, 1gb vswap--

    I can log in to remote ISPCONFIG3 server via thunderbird on local machine and download the default email "Welcome to your new email account." with no problem. It also connects and sends out emails without error. The same is true with logging in via remove server website on squirrelmail.

    Now why is it when I send out test mail to real email addresses I do not receive them on the other end? And when I send from the other end test email to my ISPCONFIG email, I also never receive the email. Where is the disconnect happening?
    /etc/hosts

    My domain is yoadam.com via godaddy.
    host yoadam.com
    Static server IP is 192.161.179.208
    (^RDNS is set to "server1.yoadam.com)

    Godaddy records:
    ISPCONFIG settings:
    Mail Domain settings-
    email mailbox settings-
     
    Last edited: Mar 5, 2017
  2. wshakes

    wshakes Member

    cat htf_report.txt | more

    I see at the top "[WARN] could not determine server's ip address by ifconfig"
    Should i be concerned?
     

    Attached Files:

    Last edited: Mar 5, 2017
  3. wshakes

    wshakes Member

    Strangely, I did this in terminal,
    Code:
    root@server1:/var/log# mail mail -s "Around the world and back" [email protected]
    Around
    The
    World
    And I received an email immediately on my local machine's thunderbird client,
    Code:
    Return-Path: <[email protected]>
    Delivered-To: [email protected]
    Received: by server1.yoadam.com (Postfix, from userid 0)
       id D512B24048A6; Sat,  4 Mar 2017 23:26:41 -0500 (EST)
    To: [email protected], [email protected]
    Subject: Around the world and back
    Message-Id: <[email protected]>
    Date: Sat,  4 Mar 2017 23:26:41 -0500 (EST)
    From: [email protected] (root)
    Around
    The
    World
    
    Similarly, when I run the same commands in termal on the remote server, to have it send email out to my private web mail address in Germany, it is received with no problem.
    Code:
    From
    [email protected]
    Sa 4. Mar 20:52
    To
    Me <[email protected]>
    Around the world and back
    This is only a test.
     
    Last edited: Mar 5, 2017
  4. wshakes

    wshakes Member

    Here is the tail of mail.log after a fresh reboot of the entire server.
    I sent the email via local machine on thunderbird, from [email protected] to [email protected] -- I saw the mail.log file process immediately right before my eyes, and here is the output:

    Code:
    Mar  4 23:41:30 server1 dovecot: master: Dovecot v2.2.13 starting up for imap, pop3 (core dumps disabled)
    Mar  4 23:41:38 server1 postfix/master[943]: daemon started -- version 2.11.3, configuration /etc/postfix
    Mar  4 23:42:47 server1 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=50.38.127.51, lip=192.161.179.208, mpid=1155, TLS, session=<kfEaafRJIgAyJn8z>
    Mar  4 23:44:08 server1 postfix/submission/smtpd[1229]: connect from unknown[50.38.127.51]
    Mar  4 23:44:09 server1 postfix/submission/smtpd[1229]: NOQUEUE: filter: RCPT from unknown[50.38.127.51]: <[email protected]>: Sender address triggers FILTER amavis:[127.0.0.1]:10026; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<[192.168.254.5]>
    Mar  4 23:44:09 server1 postfix/submission/smtpd[1229]: 67AD824048BB: client=unknown[50.38.127.51], sasl_method=PLAIN, [email protected]
    Mar  4 23:44:09 server1 postfix/cleanup[1241]: 67AD824048BB: message-id=<[email protected]>
    Mar  4 23:44:09 server1 postfix/qmgr[945]: 67AD824048BB: from=<[email protected]>, size=612, nrcpt=1 (queue active)
    Mar  4 23:44:09 server1 postfix/smtp[1243]: connect to 127.0.0.1[127.0.0.1]:10026: Connection refused
    Mar  4 23:44:09 server1 postfix/smtp[1243]: 67AD824048BB: to=<[email protected]>, relay=none, delay=0.18, delays=0.17/0.01/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10026: Connection refused)
    Mar  4 23:44:09 server1 postfix/submission/smtpd[1229]: disconnect from unknown[50.38.127.51]
    Mar  4 23:44:10 server1 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=50.38.127.51, lip=192.161.179.208, mpid=1248, TLS, session=<eQoBbvRJJgAyJn8z>
    Mar  4 23:44:26 server1 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=50.38.127.51, lip=192.161.179.208, mpid=1256, TLS, session=<Kob+bvRJKgAyJn8z>
    
    
    I did not receive the email back in my inbox. It is missing in cyber space???
    And the following seems to be what happens in the next 4 minutes after (is this just from thunderbird being open the the background on my local computer?):
    Code:
    Mar  4 23:45:12 server1 dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, session=<V4y7cf$
    Mar  4 23:45:12 server1 dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, session=<dpa7cf$
    Mar  4 23:45:12 server1 postfix/smtpd[1352]: connect from localhost[::1]
    Mar  4 23:45:12 server1 postfix/smtpd[1352]: lost connection after CONNECT from localhost[::1]
    Mar  4 23:45:12 server1 postfix/smtpd[1352]: disconnect from localhost[::1]
    Mar  4 23:45:53 server1 postfix/smtpd[1352]: connect from unknown[200.41.170.131]
    Mar  4 23:45:56 server1 postfix/smtpd[1352]: warning: unknown[200.41.170.131]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
    Mar  4 23:45:56 server1 postfix/smtpd[1352]: disconnect from unknown[200.41.170.131]
    Mar  4 23:46:38 server1 postfix/qmgr[945]: 06D9C24048AA: from=<[email protected]>, size=717, nrcpt=1 (queue active)
    Mar  4 23:46:38 server1 postfix/qmgr[945]: 32A08240489F: from=<[email protected]>, size=636, nrcpt=1 (queue active)
    Mar  4 23:46:38 server1 postfix/qmgr[945]: E89BD24048A4: from=<[email protected]>, size=632, nrcpt=1 (queue active)
    Mar  4 23:46:38 server1 postfix/smtp[1420]: connect to 127.0.0.1[127.0.0.1]:10026: Connection refused
    Mar  4 23:46:38 server1 postfix/smtp[1421]: connect to 127.0.0.1[127.0.0.1]:10026: Connection refused
    Mar  4 23:46:38 server1 postfix/smtp[1420]: 06D9C24048AA: to=<[email protected]>, relay=none, delay=462, delays=462/0.02/0/0, dsn=4.4.1, s$
    Mar  4 23:46:38 server1 postfix/smtp[1421]: 32A08240489F: to=<[email protected]>, relay=none, delay=1370, delays=1370/0.02/0/0, dsn=4.4.1,$
    Mar  4 23:46:38 server1 postfix/smtp[1420]: connect to 127.0.0.1[127.0.0.1]:10026: Connection refused
    Mar  4 23:46:38 server1 postfix/smtp[1420]: E89BD24048A4: to=<[email protected]>, relay=none, delay=587, delays=587/0.02/0.02/0, dsn=4.4.1$
    Mar  4 23:48:04 server1 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=::1, lip=::1, mpid=1518, secured, session=$
    Mar  4 23:48:05 server1 dovecot: imap([email protected]): Disconnected: Logged out in=79 out=736
    
     
  5. wshakes

    wshakes Member

    I have ran:
    netstat -tulpn | grep master
    output was:
    Code:
    tcp        0      0 0.0.0.0:465             0.0.0.0:*               LISTEN      3427/master
    tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      3427/master
    tcp        0      0 127.0.0.1:10025         0.0.0.0:*               LISTEN      3427/master
    tcp        0      0 127.0.0.1:10027         0.0.0.0:*               LISTEN      3427/master
    tcp        0      0 0.0.0.0:587             0.0.0.0:*               LISTEN      3427/master
    tcp6       0      0 :::465                  :::*                    LISTEN      3427/master
    tcp6       0      0 :::25                   :::*                    LISTEN      3427/master
    tcp6       0      0 :::587                  :::*                    LISTEN 
    So I edit:
    nano /etc/postfix/master.cf
    found this part:
    Code:
    127.0.0.1:10026 inet n - 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_$
            -o smtp_send_xforward_command=yes
            -o disable_dns_lookups=yes
    
    Changed line:
    127.0.0.1:10025 inet n - n - - smtpd
    to:
    127.0.0.1:10026 inet n - n - - smtpd
    Restart postfix:
    /etc/init.d/postfix restart
    I am taking shots in the dark here-- now send mail works, as I am sending mail via and receiving it all over the internet via my local thunderbird and through remote server to anywhere. It is showing up as from [email protected]. This is good, right? My question is-- I have no idea what I did exactly, did I break anything else unawares by making this change?

    Now I am sending to everywhere, but only receiving mail from [email protected] to [email protected]. Ie. If I send from [email protected] to [email protected], then the emaill will not be received. What is going on??! :(
     
  6. Cris Kolkman

    Cris Kolkman Member

    Is your mail.log telling you that there is an incoming connection from your @hotmail.com to your @yoadam.com?

    do:
    tail -f /var/log/mail.log

    And then send an email from @hotmail.com to @yoadam.com and check for any errors.

    Edit:
    It's also very possible that 1GB ram is just not enough.
    I'm running Debian with ISPConfig with mail etc on a 2 CPU 4GB ram and still running a cronjob to clear the RAM cache every now and then.
    If your ram is used up (which is very fast with 1GB) it will give you error messages with receive and send mail.
     
  7. wshakes

    wshakes Member

    Yes, actually it is tutanota.de
    See here the part where it tries to get the email in mail.log
    Code:
    Mar  5 02:18:36 server1 postfix/smtpd[5682]: connect from w1.tutanota.de[81.3.6.162]
    Mar  5 02:18:37 server1 postfix/smtpd[5682]: NOQUEUE: filter: RCPT from w1.tutanota.de[81.3.6.162]: <[email protected]>: Sender address triggers FILTER amavis:[127.0.0.1]:10026; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<w1.tutanota.de>
    Mar  5 02:18:37 server1 postfix/smtpd[5682]: NOQUEUE: filter: RCPT from w1.tutanota.de[81.3.6.162]: <[email protected]>: Sender address triggers FILTER amavis:[127.0.0.1]:10024; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<w1.tutanota.de>
    Mar  5 02:18:37 server1 postfix/smtpd[5682]: A962B2404892: client=w1.tutanota.de[81.3.6.162]
    Mar  5 02:18:37 server1 postfix/cleanup[5647]: A962B2404892: message-id=<[email protected]>
    Mar  5 02:18:38 server1 postfix/qmgr[5637]: A962B2404892: from=<[email protected]>, size=2788, nrcpt=1 (queue active)
    Mar  5 02:18:38 server1 postfix/smtp[5638]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
    Mar  5 02:18:38 server1 postfix/smtpd[5682]: disconnect from w1.tutanota.de[81.3.6.162]
    Mar  5 02:18:38 server1 postfix/smtp[5638]: A962B2404892: to=<[email protected]>, relay=none, delay=1, delays=1/0/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
    
    By the way, was my fix proper? The thing I did about 10025 to 10026? Why did I need to do that, or, did I do it wrong? Should I have changed 10027 to 20026 instead? Or does it matter?
     
  8. Cris Kolkman

    Cris Kolkman Member

    Well it does matter which port is configured yes.
    Is seems that your mailserver is trying to connect to port 10024 but it's not allowed to connect to that port.
     
  9. wshakes

    wshakes Member

    How would i trouble shoot this?
     
  10. Cris Kolkman

    Cris Kolkman Member

    One of the changes I had to make is:
    $inet_socket_port = [10024,10026];

    In my /etc/amavis/conf.d/50-user

    After you changed that restart postfix/amavisd and see what ports it's listening to:

    netstat -ntap
     
  11. wshakes

    wshakes Member

    I already have that line in 50-user, exactly as you have it quoted to me
     
  12. Cris Kolkman

    Cris Kolkman Member

    And what is the output of your:
    netstat -ntap
     
  13. wshakes

    wshakes Member

    my bad
    looks like 10026 and 10027?
    Code:
    tcp  0  0 0.0.0.0:110  0.0.0.0:*  LISTEN  340/dovecot   
    tcp  0  0 0.0.0.0:143  0.0.0.0:*  LISTEN  1/init   
    tcp  0  0 0.0.0.0:8080  0.0.0.0:*  LISTEN  589/apache2   
    tcp  0  0 0.0.0.0:80  0.0.0.0:*  LISTEN  589/apache2   
    tcp  0  0 0.0.0.0:465  0.0.0.0:*  LISTEN  7079/master   
    tcp  0  0 0.0.0.0:8081  0.0.0.0:*  LISTEN  589/apache2   
    tcp  0  0 0.0.0.0:21  0.0.0.0:*  LISTEN  960/pure-ftpd (SERV
    tcp  0  0 192.161.179.208:53  0.0.0.0:*  LISTEN  323/named   
    tcp  0  0 127.0.0.2:53  0.0.0.0:*  LISTEN  323/named   
    tcp  0  0 127.0.0.1:53  0.0.0.0:*  LISTEN  323/named   
    tcp  0  0 0.0.0.0:22  0.0.0.0:*  LISTEN  333/sshd   
    tcp  0  0 0.0.0.0:25  0.0.0.0:*  LISTEN  7079/master   
    tcp  0  0 127.0.0.1:953  0.0.0.0:*  LISTEN  323/named   
    tcp  0  0 0.0.0.0:443  0.0.0.0:*  LISTEN  589/apache2   
    tcp  0  0 0.0.0.0:993  0.0.0.0:*  LISTEN  1/init   
    tcp  0  0 0.0.0.0:995  0.0.0.0:*  LISTEN  340/dovecot   
    tcp  0  0 127.0.0.1:10026  0.0.0.0:*  LISTEN  7079/master   
    tcp  0  0 127.0.0.1:10027  0.0.0.0:*  LISTEN  7079/master   
    tcp  0  0 0.0.0.0:587  0.0.0.0:*  LISTEN  7079/master   
    tcp  0  0 127.0.0.1:11211  0.0.0.0:*  LISTEN  327/memcached   
    tcp  0  0 192.161.179.208:143  50.38.127.51:60378  ESTABLISHED 4636/imap-login
    tcp  0  0 192.161.179.208:143  50.38.127.51:60154  ESTABLISHED 1880/imap-login
    tcp  0  0 192.161.179.208:143  50.38.127.51:60134  ESTABLISHED 1700/imap-login
    tcp  0  0 192.161.179.208:143  50.38.127.51:60150  ESTABLISHED 1785/imap-login
    tcp  0  0 192.161.179.208:22  50.38.127.51:35312  ESTABLISHED
     
  14. Cris Kolkman

    Cris Kolkman Member

    Yes it's not listening to 10024 that's why you get the connection refused error.
     
  15. wshakes

    wshakes Member

    How may I make it listen?
     
  16. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    revert your changes from #5, start amavis and reload postfix
     
  17. Cris Kolkman

    Cris Kolkman Member

    Did you install amavisd-new ?

    A few of the ports my server is listening to:

    tcp 0 0 127.0.0.1:10023 0.0.0.0:* LISTEN 720/postgrey.pid --
    tcp 0 0 127.0.0.1:10024 0.0.0.0:* LISTEN 1165/amavisd-new (m
    tcp 0 0 127.0.0.1:10025 0.0.0.0:* LISTEN 1194/master
    tcp 0 0 127.0.0.1:10026 0.0.0.0:* LISTEN 1165/amavisd-new (m
    tcp 0 0 127.0.0.1:10027 0.0.0.0:* LISTEN 1194/master
     
  18. wshakes

    wshakes Member

    Okay. It's done according to your command @florian030
     
  19. wshakes

    wshakes Member

  20. Cris Kolkman

    Cris Kolkman Member

    It's using quite a lot of memory yes, but what you changed is just stop amavis to use the content-filter.
    It's better to have more ram and enable the spamfilter functions and make a cron that clears the ram every once in a while.
     

Share This Page