Free DynDns and you...

Discussion in 'HOWTO-Related Questions' started by Lotek, May 29, 2008.

  1. Lotek

    Lotek New Member

    Ok. So I'm dying here. I've tried everything and I can't seem to get it right. I've followed about 15 different tutorials including the Perfect Setup for 8.04 and I'm straight lost. Here are my issues:

    Right, ok so since I'm using dyndns and I'm using the free version of it I get a subdomain as my main domain (ie. pen15.scrapping.cc), so what do I put as my hostname so that I can access it using ispconfig and still run a site on that same domain with emails and everything. Or is it not possible, to which I still need to know what to set my hostname to? I've tried adding something like server1.pen15.scrapping.cc, but then I received odd errors and everything. So right. Any help would be sweet.

    Secondly, because of my isp I need to run outgoing mail through gmail. Is this setup possible with ispconfig? Or should I be looking at doing something different?

    I've been trying to get all of this working for about 2 weeks now and I've gotten as far as receiving email but not being able to send it and then being able to send it but not receive it. When I was doing all this I was using webmin/virtualmin/usermin. I don't want to use those because they are way overkill for what I need. If this isn't possible to do with a (and I stress this) FREE dyndns hostname then just tell me so I know. I just wanted to be able to setup my dyndns hostname with email and what not so, yeah. Thanks.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Instead of server1.example.com, you'd simply use pen15.scrapping.cc.

    Yes, you can do it as follows: http://www.howtoforge.com/postfix_relaying_through_another_mailserver
     
  3. Lotek

    Lotek New Member

    Thanks for the reply Falko. One last question though. Should I be using a domain I do not want to use for anything other than ispconfig for the ispconfig setup? Or can i add emails to that domain? And how would I do that? Ok so that was 3 questions. Sorry! =) But thanks for the help and the great tutorials. You rock.


    Oh! and do I need BIND installed since it's not using it?
     
    Last edited: May 29, 2008
  4. falko

    falko Super Moderator Howtoforge Staff

    The best would be to have a "technical" domain that you only use for naming the server (hostname, ISPConfig, etc.), but that you don't use for email, web sites, etc., because otherwise you might get this problem: http://www.howtoforge.com/faq/9_33_en.html


    It must be installed (otherwise ISPConfig won't install), but you don't need to run it.
     
  5. Lotek

    Lotek New Member

    Sweet! I think I finally may be able to stop banging my head against a wall. I really appreciate your response. I've been to countless other forums attempting to figure out what to do and this has been the first that I've gotten a good response from, so thank you.
     
  6. Lotek

    Lotek New Member

    Ok... So I've got it all installed and what not. I've got it routing through gmail so here's my postconf -n:
    Code:
    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    append_dot_mydomain = no
    biff = no
    broken_sasl_auth_clients = yes
    config_directory = /etc/postfix
    inet_interfaces = all
    inet_protocols = all
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    mydestination = /etc/postfix/local-host-names
    myhostname = ***********.scrapping.cc
    mynetworks = 127.0.0.0/8
    myorigin = /etc/mailname
    readme_directory = no
    recipient_delimiter = +
    relayhost =
    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtp_sasl_security_options = noanonymous
    smtp_tls_note_starttls_offer = yes
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    smtp_use_tls = yes
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_sasl_local_domain =
    smtpd_sasl_security_options = noanonymous
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_auth_only = no
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtpd_tls_session_cache_timeout = 3600s
    smtpd_use_tls = yes
    tls_random_source = dev:/dev/urandom
    
    Now I tried it with this:
    Code:
    # add the transport for gmail
    transport_maps = hash:/etc/postfix/transport
    
    And my transport map looked like this:
    Code:
    # Contents of /etc/postfix/transport
    #
    # This delivers email locally
    localhost :
    localhost.localdomain :
    # This sends mail to Gmail
    *               smtp:[smtp.gmail.com]:587
    
    Now with transport maps off I can receive email, but not send. With transport maps on, I can send email, but not receive them. What am I doing wrong? Should I add an entry for my domains into the transport map file?

    Also, here's my tail of my mail.info for when my transport map is off:

    Code:
    May 30 15:44:28 imalways postfix/smtp[5978]: connect to alt2.gmail-smtp-in.l.google.com[209.85.129.27]:25: No route to host
    May 30 15:44:28 imalways postfix/smtp[5978]: connect to alt1.gmail-smtp-in.l.google.com[209.85.163.27]:25: No route to host
    May 30 15:44:28 imalways postfix/smtp[5978]: connect to gsmtp183.google.com[64.233.183.27]:25: No route to host
    May 30 15:44:28 imalways postfix/smtp[5978]: B6A417E83EF: to=<l*******@gmail.com>, relay=none, delay=559, delays=558/0.02/0.38/0, dsn=4.4.1, status=deferred (connect to gsmtp183.google.com[64.233.183.27]:25: No route to host)
    
     
    Last edited: May 30, 2008
  7. falko

    falko Super Moderator Howtoforge Staff

  8. Lotek

    Lotek New Member

    That's what I did follow originally. Unfortunately, google requires that you send out on a different port. What I'm guessing is going wrong is this.

    Since I can send mail when transport maps are on, it means I'm sending out through gmails servers, which is what I need. It also means that I'm receiving through those same servers for whatever reason, because when I send an email from ANY email address to those ones it tells me that gmail has detected a Loop and won't send at all. So how do I only send OUT through gmail and receive through the server.

    I used the following tutorial to supplement what you provided with your tutorial:
    http://prantran.blogspot.com/2007/01/getting-postfix-to-work-on-ubuntu-with.html
     
  9. Lotek

    Lotek New Member

    I realized that my relayhost was empty for some reason.... I disabled transport maps and it appears that everything is working now. I even have it working with IMAP, which is super sweet. Thanks so much for the help. I appreciate it and will be trying my best to help everyone else out.

    I do notice that when I click reply it reply's to the email address that it's being relayed through. How would I get this to not do this? Also, it says the email is from the name I've specified, but in the email it tells me the email I'm routing through. How can I get this to not do this either?

    [edit]
    Ok... So I've fixed the reply-to email when they click reply. It was a setting in thunderbird and in roundcube mail that needed to be setup. However the issue of who it says the email is from, is still frustrating. Is this because it's sending the mail through that email account? Is there a setting in postfix to remedy this? Thanks again for all the help!
    [/edit]
     
    Last edited: Jun 1, 2008
  10. Lotek

    Lotek New Member

    Alright... So I figured out how to get it so that it says it's my email when sending, but it's not convenient at all... It actually sucks.

    In the Gmail account you're using for the relay you have to login and go to settings-> accounts. Then under "send mail as" click "send mail as another user". Add the user and make sure to specify the reply to address as the same.

    This means that for every user I add I need to add another account and send verification. This is not convenient, BUT it's working and I have to be happy about that. If anyone has any other info on how to get this to work let me know! Thanks!
     

Share This Page