Mail broke after server swap/upgrade!

Discussion in 'Server Operation' started by KZeeSoft, May 19, 2010.

  1. KZeeSoft

    KZeeSoft New Member

    Long story short - I am attempting to upgrade to a new server.

    - Migrated the data to the new HDDs.
    ...and it didn't work at all - so I tried the fresh route.

    Reinstalled Debian Lenny with the Perfect Server tutorial to ensure I did everything right. Got it up and running, can access ISP Config from in and out out of the network.

    I am now trying to get the mailboxes straight, and starting with my own site as a test bed, it is not working. I have been trying to rebuild all the mailboxes by hand, and none are working after that. I think i fixed the chown problem with the /var/vmail directories (vmail:vmail now, they were root for some reason). Here is the error log I get when trying to send mail, and receive mail.

    Output of Mail Queue from the ISP Config Control Panel:
    Code:
    -Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
    BFDF610879E 1186 Tue May 18 12:13:18 [email protected]
    (temporary failure. Command output: /usr/bin/maildrop: Home directory owned by wrong user.)
    [email protected]
    
    DA1A81087B7 1236 Wed May 19 00:31:41 [email protected]
    (connect to alt4.gmail-smtp-in.l.google.com[72.14.213.27]:25: Connection timed out)
    [email protected]
    
    02497108799 1180 Tue May 18 12:12:51 [email protected]
    (temporary failure. Command output: /usr/bin/maildrop: Home directory owned by wrong user.)
    [email protected]
    
    0D4181087AA 1234 Tue May 18 23:50:59 [email protected]
    (connect to alt4.gmail-smtp-in.l.google.com[72.14.213.27]:25: Connection timed out)
    [email protected]
    
    0EC4C1087B6 1234 Wed May 19 00:26:39 [email protected]
    (connect to alt4.gmail-smtp-in.l.google.com[72.14.213.27]:25: Connection timed out)
    [email protected]
    
    CF4B81087A2 1183 Tue May 18 12:13:40 [email protected]
    (temporary failure. Command output: /usr/bin/maildrop: Home directory owned by wrong user.)
    [email protected]
    
    Here is a sample of the output of Mail Log:
    Code:
    May 19 00:42:05 alphaserver1 imapd: Connection, ip=[::ffff:127.0.0.1]
    May 19 00:42:05 alphaserver1 imapd: LOGIN, [email protected], ip=[::ffff:127.0.0.1], port=[55483], protocol=IMAP
    May 19 00:42:05 alphaserver1 imapd: LOGOUT, [email protected], ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=87, sent=391, time=0
    May 19 00:42:06 alphaserver1 imapd: Connection, ip=[::ffff:127.0.0.1]
    May 19 00:42:06 alphaserver1 imapd: LOGIN, [email protected], ip=[::ffff:127.0.0.1], port=[55485], protocol=IMAP
    May 19 00:42:06 alphaserver1 imapd: LOGOUT, [email protected], ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=87, sent=391, time=0
    May 19 00:42:26 alphaserver1 postfix/qmgr[5688]: DA1A81087B7: from=, size=1236, nrcpt=1 (queue active)
    May 19 00:42:56 alphaserver1 postfix/smtp[31325]: connect to gmail-smtp-in.l.google.com[209.85.221.71]:25: Connection timed out
    May 19 00:43:26 alphaserver1 postfix/smtp[31325]: connect to alt1.gmail-smtp-in.l.google.com[209.85.229.27]:25: Connection timed out
    May 19 00:43:56 alphaserver1 postfix/smtp[31325]: connect to alt2.gmail-smtp-in.l.google.com[209.85.219.40]:25: Connection timed out
    May 19 00:44:26 alphaserver1 postfix/smtp[31325]: connect to alt3.gmail-smtp-in.l.google.com[209.85.135.114]:25: Connection timed out
    May 19 00:44:56 alphaserver1 postfix/smtp[31325]: connect to alt4.gmail-smtp-in.l.google.com[209.85.222.30]:25: Connection timed out
    May 19 00:44:56 alphaserver1 postfix/smtp[31325]: DA1A81087B7: to=, relay=none, delay=794, delays=644/0.13/150/0, dsn=4.4.1, status=deferred (connect to alt4.gmail-smtp-in.l.google.com[209.85.222.30]:25: Connection timed out)
    May 19 00:45:01 alphaserver1 imapd: Connection, ip=[::ffff:127.0.0.1]
    May 19 00:45:01 alphaserver1 imapd: Disconnected, ip=[::ffff:127.0.0.1], time=0
    May 19 00:45:01 alphaserver1 pop3d: Connection, ip=[::ffff:127.0.0.1]
    May 19 00:45:01 alphaserver1 pop3d: Disconnected, ip=[::ffff:127.0.0.1]
    

    Anyone got any ideas?
     
  2. KZeeSoft

    KZeeSoft New Member

    update

    After a while, the email seemed to stop timing out - but why is it doing this? Any why is everything, and i mean EVERYTHING being marked as spam?
     
  3. damir

    damir New Member

    Is the IP same as the old server?
     
  4. falko

    falko Super Moderator Howtoforge Staff

  5. KZeeSoft

    KZeeSoft New Member

    @ Damir:

    While I am testing my new server setup, I made it the same IP address, yes.
    But the old server was not online when this happened, so there was no IP conflict.

    @ Falko:

    I checked, and it is on two lists for something about only sending smtp authenticated mail. My server can send mail from my server to my server easily, and no problem via php scripts on the webpages. It's only when I am attempting to send the email to outside servers do I get the timeouts. When I receive emails, they are ALL marked as ***SPAM***, even the autogenerated ones from the ISP Config program saying "Welcome to your new email account!"

    Wierd that my server doesnt like itself, what went wrong here?
     
  6. falko

    falko Super Moderator Howtoforge Staff

    What's in your mail log when a mail gets marked as spam?
     
  7. KZeeSoft

    KZeeSoft New Member

    The mail is no longer being marked as spam, but I still cannot send mail to the outside. Is SMTP authentication somehow messed up?

    Here is an excerpt from /var/mail/mail.log
    Code:
    May 21 14:15:01 alphaserver1 pop3d: Connection, ip=[::ffff:127.0.0.1]
    May 21 14:15:01 alphaserver1 pop3d: Disconnected, ip=[::ffff:127.0.0.1]
    May 21 14:15:01 alphaserver1 imapd: Connection, ip=[::ffff:127.0.0.1]
    May 21 14:15:01 alphaserver1 imapd: Disconnected, ip=[::ffff:127.0.0.1], time=0
    May 21 14:15:01 alphaserver1 postfix/smtpd[1547]: connect from localhost.localdomain[127.0.0.1]
    May 21 14:15:01 alphaserver1 postfix/smtpd[1547]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
    May 21 14:15:01 alphaserver1 postfix/smtpd[1547]: disconnect from localhost.localdomain[127.0.0.1]
    May 21 14:17:26 alphaserver1 postfix/qmgr[5688]: 0EC4C1087B6: from=, size=1234, nrcpt=1 (queue active)
    May 21 14:17:26 alphaserver1 postfix/qmgr[5688]: 100461087BB: from=, size=1414, nrcpt=1 (queue active)
    May 21 14:17:56 alphaserver1 postfix/smtp[1583]: connect to gmail-smtp-in.l.google.com[209.85.221.88]:25: Connection timed out
    May 21 14:17:56 alphaserver1 postfix/smtp[1584]: connect to gmail-smtp-in.l.google.com[209.85.221.88]:25: Connection timed out
    May 21 14:18:26 alphaserver1 postfix/smtp[1584]: connect to alt1.gmail-smtp-in.l.google.com[209.85.229.27]:25: Connection timed out
    May 21 14:18:26 alphaserver1 postfix/smtp[1583]: connect to alt1.gmail-smtp-in.l.google.com[209.85.227.27]:25: Connection timed out
    May 21 14:18:56 alphaserver1 postfix/smtp[1584]: connect to alt2.gmail-smtp-in.l.google.com[74.125.39.27]:25: Connection timed out
    May 21 14:18:56 alphaserver1 postfix/smtp[1583]: connect to alt2.gmail-smtp-in.l.google.com[74.125.39.27]:25: Connection timed out
    May 21 14:19:26 alphaserver1 postfix/smtp[1583]: connect to alt3.gmail-smtp-in.l.google.com[74.125.53.27]:25: Connection timed out
    May 21 14:19:26 alphaserver1 postfix/smtp[1584]: connect to alt3.gmail-smtp-in.l.google.com[74.125.53.27]:25: Connection timed out
    May 21 14:19:56 alphaserver1 postfix/smtp[1583]: connect to alt4.gmail-smtp-in.l.google.com[74.125.67.27]:25: Connection timed out
    May 21 14:19:56 alphaserver1 postfix/smtp[1584]: connect to alt4.gmail-smtp-in.l.google.com[74.125.157.27]:25: Connection timed out
    May 21 14:19:56 alphaserver1 postfix/smtp[1584]: 100461087BB: to=, relay=none, delay=137215, delays=137065/0.01/150/0, dsn=4.4.1, status=deferred (connect to alt4.gmail-smtp-in.l.google.com[74.125.157.27]:25: Connection timed out)
    May 21 14:19:56 alphaserver1 postfix/smtp[1583]: 0EC4C1087B6: to=, relay=none, delay=222797, delays=222647/0.01/150/0, dsn=4.4.1, status=deferred (connect to alt4.gmail-smtp-in.l.google.com[74.125.67.27]:25: Connection timed out)
    May 21 14:20:01 alphaserver1 imapd: Connection, ip=[::ffff:127.0.0.1]
    May 21 14:20:01 alphaserver1 imapd: Disconnected, ip=[::ffff:127.0.0.1], time=0
    May 21 14:20:01 alphaserver1 pop3d: Connection, ip=[::ffff:127.0.0.1]
    May 21 14:20:01 alphaserver1 pop3d: Disconnected, ip=[::ffff:127.0.0.1]
    
     
  8. falko

    falko Super Moderator Howtoforge Staff

  9. KZeeSoft

    KZeeSoft New Member

    I checked the site you posted, and I got the following error:


    on port 25... Error - could not connect to server


    Now, my router has port 25 (SMTP) forwarded to the correct IP address of my server, so that should be working fine (the same rules are built into the firewall of the router as port 80, etc so if the websites work, so would the mail)

    Is it possible somehow the SMTP got shut off or is not working properly? How would we check for that?

    I can receive mail (even though it marks it as ***SPAM*** everytime, even when it comes from my server!) but sending is still not working at all.

    Just to clarify the OS again, Debian Lenny 5.0.4 with ISP Config 3 is being used.


    As always Falko, I appreciate your dedication to this site, and the help of this community =)
     
  10. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    netstat -tap
    ? Does your ISP maybe block port 25?
     
  11. KZeeSoft

    KZeeSoft New Member

    Output of netstat -tap:

    Code:
    
    
    # netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 *:36803                 *:*                     LISTEN      4783/rpc.statd
    tcp        0      0 localhost.localdo:10024 *:*                     LISTEN      5014/amavisd (maste
    tcp        0      0 localhost.localdo:10025 *:*                     LISTEN      5675/master
    tcp        0      0 localhost.localdo:mysql *:*                     LISTEN      5074/mysqld
    tcp        0      0 *:1006                  *:*                     LISTEN      4986/sshd
    tcp        0      0 localhost.localdo:spamd *:*                     LISTEN      5189/spamd.pid
    tcp        0      0 *:sunrpc                *:*                     LISTEN      4772/portmap
    tcp        0      0 *:ftp                   *:*                     LISTEN      20900/pure-ftpd (SE
    tcp        0      0 alphaserver1.suf:domain *:*                     LISTEN      5603/mydns
    tcp        0      0 localhost.locald:domain *:*                     LISTEN      5603/mydns
    tcp        0      0 *:smtp                  *:*                     LISTEN      5675/master
    tcp        0      0 localhost.localdom:6010 *:*                     LISTEN      19801/0
    tcp        0      0 localhost.localdoma:829 *:*                     LISTEN      5741/famd
    tcp        0    248 alphaserver1.sufuk:1006 blhpgdfwa.bellatl:30503 ESTABLISHED 19799/sshd: adminis
    tcp        1      0 localhost.localdo:52339 localhost.localdo:mysql CLOSE_WAIT  5086/amavisd (ch13-
    tcp6       0      0 [::]:imaps              [::]:*                  LISTEN      5580/couriertcpd
    tcp6       0      0 [::]:pop3s              [::]:*                  LISTEN      5598/couriertcpd
    tcp6       0      0 [::]:pop3               [::]:*                  LISTEN      5586/couriertcpd
    tcp6       0      0 [::]:1006               [::]:*                  LISTEN      4986/sshd
    tcp6       0      0 [::]:imap2              [::]:*                  LISTEN      5568/couriertcpd
    tcp6       0      0 [::]:http-alt           [::]:*                  LISTEN      809/apache2
    tcp6       0      0 [::]:www                [::]:*                  LISTEN      809/apache2
    tcp6       0      0 [::]:tproxy             [::]:*                  LISTEN      809/apache2
    tcp6       0      0 [::]:ftp                [::]:*                  LISTEN      20900/pure-ftpd (SE
    tcp6       0      0 localhost:domain        [::]:*                  LISTEN      5603/mydns
    tcp6       0      0 localhost:6010          [::]:*                  LISTEN      19801/0
    tcp6       0      0 [::]:https              [::]:*                  LISTEN      809/apache2
    alphaserver1:/home/administrator#
    
    
    
    Now, I had the email working prior to the attempted switch, so my ISP can't be blocking port 25. (unless they just did recently but I doubt it)
     
    Last edited: May 25, 2010
  12. falko

    falko Super Moderator Howtoforge Staff

    Looks ok. I guess a firewall on your server and/or your router is causing the problems then...
     
  13. KZeeSoft

    KZeeSoft New Member

    After a week of research and "chats" with my ISP, I found out they started blocking Port 25 due to "international spam fighting". I also found that I can change the port being used to send mail from 25 -> 587. Is this feasible and possible in a Debian Lenny "Perfect Server" with ISP Config 3 using Squirrelmail and POSTFIX?

    I have found some ways of doing it, but none really applied to my current setup, and I don't want to break anything else!

    Anyone have a link or spare some time to tell me how?

    I appreciate the help as always Falko, Till and the Howtoforge community =)
     

Share This Page