Mail server configuration with "The Perfect Server" for Ubuntu 10.10

Discussion in 'Installation/Configuration' started by SacreBleu, Jan 29, 2011.

  1. SacreBleu

    SacreBleu New Member

    Hello all,

    I've just freshly registered to this community, couldn't find a proper introduction forum so I'll just post something nice here.

    I am a Dutch student at the Rotterdam University studying to become a teacher, I love photography and always shared a passion with anything IT-related.
    This passion brought me the idea to host a website myself, something which I've been doing successfully for some time now.
    I felt it was time to get a bigger project started so I bought a domain-name and wanted to see what kind of 'cool stuff' I could do with it.

    The basic concept what I have now, is just to host "a bunch of websites" be it Wordpress, Joomla! or Drupal anything and everything just as a huge experimentation.

    To cut a long story short, I followed this excellent tutorial: to the letter, copied and pasted as much as I could and trying to Google what the heck I was exactly doing.

    Now, one of my greatest desires is to have my own mail-server, so being able to send and receive mail to other domains.
    As I said, I followed the tutorial to the letter, and made some quick configurations in ISPconfig.

    However, I don't have the ability to receive or send mail to domains outside my own, I've taken it upon myself to start a new leaf, format and start over.
    For this to be successful I have a few enquiries which I hope people will be able to help me with.

    I have the ability to change my DNS settings by a third-party provider, I've deleted all the records, save for two:

    A →    
    A →  
    CNAME →           
    Starting a new leaf, first things first, how should I name my server?
    The first time I went through the guide I choose is this suitable or should it be (e.g

    I know I have to make an MX-record to whatever my mailserver is, so this will likely be:

    MX-xx  -->   xx.16x.2xx.xx  
    To send mail to certain hosts, gmail in particular, I probably should create a PTR record too, my DNS provider allows me to create a PTR record. so this should probably be:

    PTR        brothersonline      -->   xx.16x.2xx.xx  
    When we're done with that, I will resume my guide.
    After I am done, how do I configure my mail-server to receive and send mail to other domains?

    I received this error everytime I tried to send a mail to [email protected]

    Delivery to the following recipient failed permanently:
        [email protected]
    Technical details of permanent failure:
    Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 550 550 5.7.1 <[email protected]>... Relaying denied (state 14).
    ----- Original message -----
    Received: by with SMTP id x62mr3805903wek.106.1296284765224;
     Fri, 28 Jan 2011 23:06:05 -0800 (PST)
    MIME-Version: 1.0
    Sender: xxxxxxxxxxxxxxxxxxx
    Received: by with HTTP; Fri, 28 Jan 2011 23:05:45 -0800 (PST)
    From: xxxxxxxxxxxxxxxn <xxxxxxxxxxxxxxx>
    Date: Sat, 29 Jan 2011 08:05:45 +0100
    X-Google-Sender-Auth: CiqsmDbD3LQsVFZYaNHeIu2E1R4
    Message-ID: <[email protected]>
    Subject: test
    To: [email protected]
    Content-Type: multipart/alternative; boundary=001636458010f58022049af6d0b2
    I've also tried sending e-mails to: [email protected] and [email protected].

    I'm pretty new to this level of hosting, and I know I might be lacking some basic understanding, but I am dead in the water about now, so if anybody could give some pointers, be it explanations or just even hints, I will gladly try to follow up on them and see if it fixes my particular problem.

    Thank you kindly for any help you might be able to provide me with.
    Last edited: Jan 30, 2011
  2. pititis

    pititis Member

    Hello SacreBleu,

    dig mx
    ; <<>> DiG 9.7.1-P2 <<>> mx
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 826
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
    ;		IN	MX
    ;; ANSWER SECTION:	11302	IN	MX	20	11302	IN	MX	30
    ;; Query time: 33 msec
    ;; SERVER:
    ;; WHEN: Sat Jan 29 21:59:07 2011
    ;; MSG SIZE  rcvd: 83
    I think your MX record is not set properly or dns is not updated yet
  3. SacreBleu

    SacreBleu New Member


    Let me update those MX-records, since right now I haven't got any since I wanted to start over, although I haven't formatted the server and followed the guide to the letter, is there anything (hostname?) that I might've done wrong?

    Or could it just be the MX records not being properly updated?

    Updated my MX record it says:

    MX-10 →
    My complete DNS table:

    A →  
    A →  
    A → 
    MX-10 →    
    CNAME → 
    Last edited: Jan 29, 2011
  4. pititis

    pititis Member

    Well done.

    Are your using dynamic ip???
  5. SacreBleu

    SacreBleu New Member

    Internally the server has a static IP, yes.

    My internet/external IP is not static but we have an unlimited lease until you reset the modem, which we do about every two years (or longer when our connection stays stable, we have a pretty reliable ISP, so that's not much of a problem.

    I created a client (myself) in ISPconfig, created a domain for e-mail ( and created an e-mail box.
    Should everything work correctly now? -- Or is there something I still need to do to send mail to outside domains?

    Checked my status with dig:

    ; <<>> DiG 9.7.1-P2 <<>> mx
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37816
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
    ;             IN      MX
    ;; ANSWER SECTION:      86328   IN      MX      10
    ;; ADDITIONAL SECTION: 86328   IN      A
    Last edited: Jan 30, 2011
  6. pititis

    pititis Member

    Yes. But dynamic ip addresses are normally blacklisted...

    Check it
  7. SacreBleu

    SacreBleu New Member

    How can I check, whether it is blacklisted?

    Shouldn't a PTR record, get rid of that problem?

    To check for blacklist, out of many only 4 reported me as blacklisted and I could automatically remove myself from one of them.

    When I launched a SMTP scan I received the following report:

    Code:		    smtp    
    220 ESMTP Postfix (Ubuntu)
     OK - resolves to
     Warning - Reverse DNS does not match SMTP Banner
     0 seconds - Good on Connection time
     Not an open relay.
     1.217 seconds - Good on Transaction time
    Session Transcript:
    250 [140 ms]
    MAIL FROM: <[email protected]>
    250 2.1.0 Ok [172 ms]
    RCPT TO: <[email protected]>
    554 5.7.1 <[email protected]>: Relay access denied [140 ms]
    221 2.0.0 Bye [156 ms]
    Last edited: Jan 30, 2011
  8. pititis

    pititis Member

    Last edited: Jan 30, 2011
  9. SacreBleu

    SacreBleu New Member

    Thank you,

    I am unable to set a SPF and rDNS record in the panel I use that is provided by the DNS provider.

    I reckon I could remove this issue by hosting my own DNS server, but I am not sure whether or not I run into the same problems regarding my blacklisted IP.

    However, despite of the blacklist, shouldn't I at least be able to receive e-mail?
  10. pititis

    pititis Member

    If you can set cname and A records you should can set TXT records.
    Try to run new test when your will done. rdns had nothing to do with your dns control panel, it's a isp issue.
  11. SacreBleu

    SacreBleu New Member

    Yup, I am able to create a TXT record, but what should it say?

    PTR records seem to be the equivalent of an rDNS, so I just created one, but it could take several hours before it's updated.

    I used an online wizard, and came up with this for a SPF record:

    v=spf1 ip4: a mx ~all
    Should be correct, no?
    Last edited: Jan 30, 2011
  12. pititis

    pititis Member

  13. SacreBleu

    SacreBleu New Member

    Intentional Double-post.

    Currently I've setup my DNS table like this:

    A * → 
    A →  
    A →  
    A → 
    MX-10 → 
    CNAME →  
    TXT → v=spf1 ip4: a mx ~all   
    PTR → 
  14. pititis

    pititis Member

    Be careful with " " It must be present
    Last edited: Jan 30, 2011
  15. SacreBleu

    SacreBleu New Member

    Edited it, it has the quotes now.

    Reading that article, it says that PTR records are used for reverse DNS Lookup, which is what we're aiming for right?

    The A record translates my domain into an IP
    The PTR record translates my IP into my domain.

    Why wouldn't a PTR record be able to do the job?


    I was succesful in sending an e-mail from gmail to my domain!
    Now I need to wait for the PTR record to update so I should be able to send mail from my domain to other domains.

    Issue by trying to send mail from my domain to gmail:

    This is the mail system at host
    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 loops back to myself
    Fixed the issue by updating my postfix virtual_alias_domains
    Last edited: Jan 30, 2011
  16. pititis

    pititis Member

    Great! See you tomorrow. Don't waste your time dude, ask your isp for rdns ok?

  17. SacreBleu

    SacreBleu New Member

    Yeah, I'll contact them.

    Haven't been able to send any mail, though.
    Not even from one user on the domain to another:

    [email protected]
    [email protected]

    Tried vice-versa mail does not arrive.

    Thank you so far for helping me, you've been a great aid!

Share This Page