help setting up an ubuntu mailserver

Discussion in 'HOWTO-Related Questions' started by demiurgen, Oct 7, 2007.

  1. demiurgen

    demiurgen New Member

    i have setup a mail server following this howto:
    http://www.howtoforge.com/perfect_setup_ubuntu704

    on the server i have setup the evolution mail client and smtp seems to work fine.
    i send mail to other successfully but courier doesn't seem to work cause i cannot receive mails.

    anyone know how i can check if everything is setup right??


    i am a total newbie on linux and network. i am doing this as a learning project.
    i have a domain with a registrar where i have set the dns to use freedns.afraid.org nameservers. it works fine for the webserver - www.morganwaage.no
    i am wondering if something with the mx record is setup wrong with freedns.afraid.org.

    anyone with any ideas???
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Can you check if the MX record for your email domain points to your server?
    Code:
    dig mx yourdomain.com
    Also, what's in /var/log/mail.log when you send an email to your server? Do you see any actions in the log file then, or no changes at all?
     
  3. demiurgen

    demiurgen New Member

    this is what i get when i run: dig mx morganwaage.no

    ; <<>> DiG 9.3.4 <<>> mx morganwaage.no
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38881
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 3

    ;; QUESTION SECTION:
    ;morganwaage.no. IN MX

    ;; ANSWER SECTION:
    morganwaage.no. 3600 IN MX 1 mail.morganwaage.no.

    ;; AUTHORITY SECTION:
    morganwaage.no. 86400 IN NS ns4.afraid.org.
    morganwaage.no. 86400 IN NS ns1.afraid.org.
    morganwaage.no. 86400 IN NS ns2.afraid.org.
    morganwaage.no. 86400 IN NS ns3.afraid.org.

    ;; ADDITIONAL SECTION:
    ns1.afraid.org. 748 IN A 67.19.72.206
    ns3.afraid.org. 748 IN A 72.20.25.134
    ns4.afraid.org. 748 IN A 67.18.179.15

    ;; Query time: 182 msec
    ;; SERVER: 10.0.0.138#53(10.0.0.138)
    ;; WHEN: Mon Oct 8 19:08:41 2007
    ;; MSG SIZE rcvd: 183


    and this is what changes in the log when i send an email:

    Oct 8 19:15:05 mail postfix/smtpd[10611]: connect from mail.morganwaage.no[10.0.0.1]
    Oct 8 19:15:05 mail postfix/smtpd[10611]: 30C945D0240: client=mail.morganwaage.no[10.0.0.1], sasl_method=PLAIN, sasl_username=morgan
    Oct 8 19:15:05 mail postfix/cleanup[10617]: 30C945D0240: message-id=<[email protected]>
    Oct 8 19:15:05 mail postfix/qmgr[29302]: 30C945D0240: from=<[email protected]>, size=509, nrcpt=1 (queue active)
    Oct 8 19:15:05 mail postfix/smtpd[10611]: disconnect from mail.morganwaage.no[10.0.0.1]
    Oct 8 19:15:09 mail postfix/smtp[10618]: 30C945D0240: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[66.249.93.27]:25, delay=4.4, delays=0.07/0.02/0.41/3.9, dsn=2.0.0, status=sent (250 2.0.0 OK 1191863709 u6si15401656uge)
    Oct 8 19:15:09 mail postfix/qmgr[29302]: 30C945D0240: removed


    and when i press get mail this is what is changed:

    Oct 8 19:16:48 mail courierpop3login: Connection, ip=[::ffff:10.0.0.1]
    Oct 8 19:16:48 mail courierpop3login: chdir Maildir: No such file or directory
    Oct 8 19:18:25 mail postfix/anvil[10614]: statistics: max connection rate 1/60s for (smtp:10.0.0.1) at Oct 8 19:15:05
    Oct 8 19:18:25 mail postfix/anvil[10614]: statistics: max connection count 1 for (smtp:10.0.0.1) at Oct 8 19:15:05
    Oct 8 19:18:25 mail postfix/anvil[10614]: statistics: max cache size 1 at Oct 8 19:15:05



    this doesn't tell me much but maybe someone out there can see where the problem is.

    i have no problem opening ssh if someone wants to get in and have a look.
    this is just a learning project on an old machine so no harm can be done...;)
     
  4. demiurgen

    demiurgen New Member

    i found a blacklistcheck website in another post about email server problems.
    i checked my current ip and of course... it is blacklisted... :(

    my current ip is:83.109.174.141
    http://www.mxtoolbox.com/blacklists.aspx

    anyone know how to fix that?? if at all possible...?


    but then again... why can i send mail out....?
     
    Last edited: Oct 9, 2007
  5. falko

    falko Super Moderator Howtoforge Staff

    You must contact the maintainers of each list where you're listed and ask them to remove you. Of course, this wirks only if you have a static IP address - they won't remove dynamic ones.
     

Share This Page