problem with mail server setup

Discussion in 'HOWTO-Related Questions' started by kentor, Jul 4, 2009.

  1. kentor

    kentor New Member

    ok I haven't really changed anything but some more time has passed since my last post and now it seems like *google* doesn't appear in the logs anymore.

    on the other hand I keep seeing connection timed out like this:

    Jul 13 07:25:09 domU-12-31-39-00-5D-07 postfix/smtp[25866]: connect to mail.mydomain.com[75.101.163.xx]: Connection timed out (port 25)

    and im still seeing example.com

    Jul 13 07:27:06 domU-12-31-39-00-5D-07 postfix/smtp[25878]: ABB62F432E: to=<[email protected]>, relay=none, delay=330408, delays=330378/0.03/30/0, dsn=4.4.1, status=deferred (connect to example.com[208.77.188.166]: Connection timed out)
    Jul 13 07:27:06 domU-12-31-39-00-5D-07 postfix/smtp[25878]: connect to example.com[208.77.188.166]: Connection timed out (port 25)

    and im still seeing

    Jul 13 07:22:46 domU-12-31-39-00-5D-07 imapd: chdir mydomain.com/sales/: No such file or directory

    and it looks like something is queued somewhere

    Jul 13 07:26:36 domU-12-31-39-00-5D-07 postfix/qmgr[23628]: ABB62F432E: from=<[email protected]>, size=1050, nrcpt=1 (queue active)

    also, if i go to http://mail.mydomain.com, on one computer i get a 404 "server not found error" and from another computer i see the "Apache 2 Test Page".

    somebody asked me this "is your amavis giving back the mail not on localhost and the port is just bound to localhost?" and said to check /etc/postfix/master.cf and amavisd.conf but I didn't really understand what I'm supposed to change =/
    and somebody else said "Sounds like a firewall/port 25 block to me"...
    I did follow this guide http://www.crypt.gen.nz/selinux/disable_selinux.html and disabled selinux like you said in the beginning of the guide.

    [[email protected] selinux]# cat /selinux/enforce
    0[[email protected] selinux]#

    here is the output of "iptables -L":
    also when i "telnet localhost 25" it works fine, but if i do it remotely, i get connection refused =/

    finally, i've sent a new email from gmail and another provider to [email protected] and this time it took 50 minutes to bounce back.
     
    Last edited: Jul 21, 2009
  2. kentor

    kentor New Member

    here is the new log:

    wow the email bounced back from my setup and not from gmail this time... this the email i got:

    from Mail Delivery System <[email protected]>
    to [email protected]
    date Mon, Jul 13, 2009 at 1:10 PM
    subject Undelivered Mail Returned to Sender

    hide details 1:10 PM (5 minutes ago)


    Reply

    Follow up message
    This is the mail system at host mydomain.com.

    I'm sorry to have to inform you that your message could not
    be delivered to one or more recipients. It's attached below.

    For further assistance, please send mail to <postmaster>

    If you do so, please include this problem report. You can
    delete your own text from the attached returned message.

    The mail system

    <[email protected]>: mail for mail.mydomain.com loops back to myself

    Final-Recipient: rfc822; [email protected]
    Original-Recipient: rfc822;[email protected]
    Action: failed
    Status: 5.4.6
    Diagnostic-Code: X-Postfix; mail for mail.mydomain.com loops back to
    myself


    ---------- Forwarded message ----------
    From: - Simon - <[email protected]>
    To: [email protected]
    Date: Mon, 13 Jul 2009 11:46:17 -0400
    Subject: dsjkfnksdfndsjknf
    from gmail
     
    Last edited: Jul 21, 2009
  3. falko

    falko Super Moderator ISPConfig Developer

    Please add mail.mydomain.com to mydestination in /etc/postfix/main.cf and restart Postfix.
     
  4. kentor

    kentor New Member

    its already there.. maybe im missing something. the server is setup on amazon ec2... if i dns mail.mydomain.com i get 75.101.163.xx, if i reverse dns that ip i get something like ec2-75-101-163-xx.compute-1.amazonaws.com and the internal hostname is domU-12-31-39-00-xx.compute-1.internal ...

    i've tried adding everything to mydestination:
    mydestination = mail.mydomain.com, localhost, localhost.localdomain, 75.101.163.xx, ec2-75-101-163-xx.compute-1.amazonaws.com, compute-1.amazonaws.com, amazonaws.com, 127.0.0.1, 127.0.0.0, domU-12-31-39-00-xx.compute-1.internal, compute-1.internal

    If i add mydomain.com in there, I get:
    warning: do not list domain mydomain.com in BOTH mydestination and virtual_mailbox_domains

    is it normal that my /etc/hosts only has
    127.0.0.1 localhost localhost.localdomain

    i think my internal hostname may also be domU-12-31-39-00-xx-xx.compute-1.internal, should i add that to /etc/hosts ?


    here is my current error log:

    and here is the current postconf -n

    I can see the messages getting queued up in the mail log, if i do "postqueue -p" i can see them, so it means its somewhere on the server but it keeps looping around :(
     
    Last edited: Jul 14, 2009
  5. falko

    falko Super Moderator ISPConfig Developer

    What happens if you add mail.mydomain.com to /etc/hosts?
     
  6. kentor

    kentor New Member

    i added "75.101.163.xx ec2-75-101-163-xx.compute-1.amazonaws.com" to /etc/hosts and now this warning is gone:

    domU-12-31-39-00-5D-07 postfix/smtpd[2641]: warning: 75.101.163.xx: address not listed for hostname ec2-75-101-163-24.compute-1.amazonaws.com

    but this is still happening:

    Jul 15 10:28:40 domU-12-31-39-00-5D-07 postfix/smtp[6233]: warning: host mail.mydomain.com[75.101.163.xx]:25 greeted me with my own hostname mydomain.com
    Jul 15 10:28:40 domU-12-31-39-00-5D-07 postfix/smtp[6233]: warning: host mail.mydomain.com[75.101.163.xx]:25 replied to HELO/EHLO with my own hostname mydomain.com
    Jul 15 10:28:40 domU-12-31-39-00-5D-07 postfix/smtp[6233]: B52E4F4283: to=<[email protected]>, relay=mail.mydomain.com[75.101.163.xx]:25, delay=0.13, delays=0.05/0.02/0.07/0, dsn=5.4.6, status=bounced (mail for mail.mydomain.com loops back to myself)


    here is /etc/hosts
    here are the MySQL tables... maybe I made a mistake there..

    mysql> select * from domains;
    +-------------------+
    | domain |
    +-------------------+
    | mydomain.com |
    +-------------------+


    mysql> select * from forwardings;
    +------------------------+-------------------------+
    | source | destination |
    +------------------------+-------------------------+
    | [email protected] | [email protected] |
    +------------------------+-------------------------+


    mysql> select * from transport;
    +-------------------+-----------------------------+
    | domain | transport |
    +-------------------+-----------------------------+
    | mydomain.com | smtp:mail.mydomain.com |
    +-------------------+-----------------------------+

    mysql> select * from users;
    +-------------------------+---------------+----------+
    | email | password | quot a |
    +-------------------------+---------------+----------+
    | [email protected] | 4e3wiBPp/SJGk | 10485760|
    +-------------------------+---------------+----------+
     
    Last edited: Jul 15, 2009
  7. falko

    falko Super Moderator ISPConfig Developer

    Try this:
    Code:
    postconf -e 'myhostname = mail.mydomain.com'
    /etc/init.d/postfix restart
     
  8. kentor

    kentor New Member

    hmmm.. same exact error..

    I thought maybe MX records are wrong but they also seem ok:

    mail.mydomain.com A 75.101.xxx.xx 3600
    mydomain.com MX mail.mydomain.com 10 3600

    Also, I saw someone mentioned to look at /var/log/messages in one of the forums.. I see this:
    Jul 16 10:37:08 collectd[22625]: uc_update: Value too old: name = i-a38ea4ca/df/df-mnt; value time = 1247755028; last cache update = 1247755028;

    It's happening everything 10 seconds but I don't think it has anything to do with the mailing problem...

    I really don't understand what is wrong :(


    I even started a new installation from scratch on my ns2 server using this guide: http://wiki.centos.org/HowTos/postfix (no virtual domains) just to check if there is some strange problem with the server. I am able to receive email to user "john" and I can read it. Everything works.
    I turned off ns2, made it into ns1. My postconf -n for that server is

    btw I am trying to do the following setup: lets say i own mydomain.com and want to be able to send mail to @subdomain1.mydomain.com and @subdomain2.mydomain.com with virtual accounts... so far I was only testing @mydomain.com and that hasn't worked yet




    ok i think im gonna give up on this setup. I was able to set it up without mysql in there so quickly using postfix.org's virtual readme page...
     
    Last edited: Jul 17, 2009

Share This Page