Virtual Users And Domains With Postfix, Courier And MySQL (Fedora 8) Questions

Discussion in 'HOWTO-Related Questions' started by gnetcon, May 28, 2008.

  1. gnetcon

    gnetcon New Member

    Thanks to Falko for the great tutorial. I have used it a few times, and it has helped me as a newbie to get an idea of what to do.

    That said, I'm not a Linux guru by any stretch of the imagination. I can do some basic things, but I don't know the ins and outs like you guys. :)

    After doing it recently on a brand new box, I've come across two issues:

    1) My mail server is open to relaying.

    When I login and "telnet localhost 25", I walk through the commands to set the from, to, and data, and it all goes through. It should tell me that relaying is disabled.

    I've Google'd it, but I can't find a definitive answer. Any ideas on where to look? I tried updating the relayhosts variable to several things, but to no avail.

    2) Mail won't send

    When I send a message, I get the following message in my maillog:

    Code:
    status=deferred (Host or domain name not found. Name service error for name=domain.com type=MX: Host not found, try again)
    I can nslookup the domain fine. It also appears the Internet is fine, as yum installs, and I can copy files across the network.

    Any help would be appreciated. :confused:
     
  2. falko

    falko Super Moderator ISPConfig Developer

    That's normal. As long as 127.0.0.1 is part of mynetworks in /etc7postfix/main.cf, you can always send from localhost without authentication.

    What does
    Code:
    dig mx domain.com
    show?
     
  3. gnetcon

    gnetcon New Member

    Hmmm. When I run the dig command I get:

    Code:
    dig mx domain.com
    
    ; <<>> DiG 9.5.0b3 <<>> mx domain.com
    ;; global options:  printcmd
    ;; connection timed out; no servers could be reached
    
    Leaving out the mx attribute gives me the correct IP.
     
  4. gnetcon

    gnetcon New Member

    I'm a goober. Never even thought to test outside the network. When I did, I see that relaying isn't allowed.

    Thanks!
     
  5. falko

    falko Super Moderator ISPConfig Developer

    Does
    Code:
    dig ns domain.com
    show the right name servers?
     
  6. gnetcon

    gnetcon New Member

    Falko, thanks for the help.

    When I ran the dig on the nameserver, I got no response. So I thought it was a DNS issue. I have 192.168.1.1 (my router)setup as the DNS. I updated resolv.conf to use Comcast's primary and secondary DNS, and the dig worked perfectly.

    I retried the mail sending, and I'm no longer getting MX errors (woot)! Now I'm getting timeouts connecting to port 25, as Comcast blocks outgoing mail on that port. They use port 587.

    How can I update my setup to send out on port 587? I tried doing a test locally telneting to localhost with port 587. Here's what I get:

    Code:
    May 30 09:02:21 sandbox postfix/qmgr[2173]: B6714968201: from=<[email protected]>, size=879, nrcpt=1 (queue active)
    May 30 13:02:21 sandbox postfix/smtpd[3084]: disconnect from unknown[127.0.0.1]
    May 30 09:02:21 sandbox amavis[2389]: (02389-03) Passed CLEAN, MYNETS LOCAL [127.0.0.1] [127.0.0.1] <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: 1QX5bMD9v1-4, Hits: -0.155, size: 410, queued_as: B6714968201, 12239 ms
    May 30 09:02:21 sandbox postfix/smtp[3078]: D30D7968200: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=31, delays=18/0.01/0.01/12, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as B6714968201)
    May 30 09:02:21 sandbox postfix/qmgr[2173]: D30D7968200: removed
    May 30 09:02:51 sandbox postfix/smtp[2998]: connect to domain.com[74.52.28.210]: Connection timed out (port 25)
    May 30 09:02:51 sandbox postfix/smtp[2998]: B6714968201: to=<[email protected]>, relay=none, delay=30, delays=0.02/0.01/30/0, dsn=4.4.1, status=deferred (connect to domain.com[74.52.28.210]: Connection timed out)
    
    I'm "assuming" it's the issue with Comcast blocking that port?

    THANKS again for the help.
     
  7. gnetcon

    gnetcon New Member

    After researching on the 'Net, it appears I can't send out from my machine directly. Correct me if I'm wrong, but I need to relay my mail locally out through another server accepting connections on port 587.

    So, I added a field in the "transport" like the following:

    domain = *
    transport = smtp:smtp.comcast.net:587

    Now I get:

    Code:
    status=bounced (host smtp.comcast.net[76.96.62.117] said: 550 5.1.0 Authentication required (in reply to MAIL FROM command))
    
    So, it appears to me I need to pass my credentials (username and password) to the comcast mail server (or whichever server I relay through). How can I set this up? Would this be in the transport table? Or in the config file?

    TIA!
     
  8. falko

    falko Super Moderator ISPConfig Developer

Share This Page