php mail() function slow with new ispconfg3 setup

Discussion in 'General' started by pnoiboi77, May 18, 2011.

  1. pnoiboi77

    pnoiboi77 New Member

    On my old shared hosting, everytime I used the php mail() function to email customers that visisted my site, the email would arrive real quick. Now I have setup my own server (ispconfig3 fedora 12 perfect server tutorial) and when I run the function, the email takes forever.

    Is there a setting I need to tweak in ispconfig3 or manually(in the server itself) that can help me accomplish mailling in real time?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Normally it should take about 30 seconds until a mail gets delivered, as the mail gets scanned for spam and malware.

    Are you sure that the hostname of your server and the sender domain is setup correctly in DNS?

    How many mails are in your mailqueue and did you get any errors in the mail log file?
     
  3. pnoiboi77

    pnoiboi77 New Member

    I bought the domain from go daddy and just changed the A record in go daddys zone file to point to my static ip address. I didnt set up the dns zone on my server.

    Am i supposed to? Please help me because dns is another learning curve I havent accomplished.
     
  4. pnoiboi77

    pnoiboi77 New Member

    can u help me locate where my mail queue is and where the mail error log would be. Im running a fedora 12 server.
     
  5. falko

    falko Super Moderator Howtoforge Staff

    You can take a look at your mail queue by running
    Code:
    postqueue -p
    Does the MX record of your domain point to the correct server? You can check that by running
    Code:
    dig mx yourdomain.com
     
  6. pnoiboi77

    pnoiboi77 New Member

    my hostname is server1.mycomputerhostname.com

    postqueue -p

    theres only 1 in the queue(which i sent this morning) and it says [email protected]
    (host d.mx.mail.yahoo.com[209.191.88.254] refused to talk to me: 553 5.7.1[BL21]Connections will not be accepted from (my static ip addres), because the ip is in Spamhaus's list; see http://postmaster.yahoo.com/550-bl23.html) myemailaddress.com

    -- 2 kbytes in 1 Request

    dig mx mydomain.com
    in the answer section there are 2 records with my domain name and the matching mx records in godaddys zone file
     
  7. falko

    falko Super Moderator Howtoforge Staff

    Your server is blacklisted, which means other servers might refure to accept mails from your server.

    Do these two records point to your mail server?
     
  8. pnoiboi77

    pnoiboi77 New Member

    Thanks for all the replies, but i finally fixed the problem.

    The problem is, the IP's my ISP provided me happened to be on Spamhaus.com PBL ban list.

    Just follow the directions to remove your ip address. Ill provide the link!
    http://www.spamhaus.org/lookup.lasso

    the directions are pretty straight forward on the site.

    It says it takes about 30 minutes to take effect, but it took about 12 hours (overnight) for me. Now emails are received in about 2 seconds!!!!!
     

Share This Page