postfix on dynamic iP ?

Discussion in 'Server Operation' started by soroccoheaven, Oct 6, 2007.

  1. soroccoheaven

    soroccoheaven New Member

    hello,

    I have configured postfix last month ...for my local lan ..now i want to configure it for my website hosted on dynamic Ip and using dyndns.how to do this ?..can i configure it for local as well as internet simultaneously ?..
    i made some changes as mydomain=mysite.org and myhostname=mysite.org ..in main.cf but no go.

    i am using google mail as realaying server ..but i can see all the mail going to google with my local domain name ..as
    [email protected] (configured for lacal lan).
    so reported as:

    Oct 6 16:17:55 serv postfix/smtp[16195]: A3C088C11C: to=<user@localdomain>, relay=smtp2.google.com[64.233.167.25], delay=6, status=bounced (host smtp2.google.com[64.233.167.25] said: 553 5.5.3 <user@localdomain>... Invalid (in reply to RCPT TO command))

    pls. advice.

    Thanks
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Create MX records for your email domains that point to your DynDNS address.

    What's in your /etc/postfix/main.cf?
     
  3. Ben

    Ben Active Member Moderator

    Even it does not helpd for your problem, I would never run a mailserver on a dynamic IP.
    A server shall have a static IP especially in times of SPAM, so many ppl drop mails from dialup hosts (having dynamic IPs), so do I.
     
  4. chuckl

    chuckl New Member

  5. soroccoheaven

    soroccoheaven New Member


    myorigin = $mydomain
    mydomain = lin.ald
    myhostname = serv.$mydomain
    inet_interfaces = all
    mynetworks_style = class
    mynetworks = 192.168.2.0/24, 0.0.0.0 127.0.0.0/8
    delay_warning_time = 4h
    relayhost = smtp.google.com
    smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) (Mandrake Linux)
    unknown_local_recipient_reject_code = 450
    smtp-filter_destination_concurrency_limit = 2
    lmtp-filter_destination_concurrency_limit = 2
    smtpd_sasl_path = /etc/postfix/sasl:/usr/lib/sasl2
    recipient_delimiter = +
    owner_request_special = no
    alias_maps = hash:/etc/postfix/aliases, hash:/var/lib/mailman/data/aliases
    smtpd_sasl_local_domain =
    smtpd_sasl_auth_enable = yes
    #smtpd_sasl_security_options = noanonymous
    smtpd_sasl_security_options =
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,rejec
    t_unauth_destination

    what will be the mydoain and myhostname ?.... i have tried with my domain name from dyndns but not worked.
     
  6. soroccoheaven

    soroccoheaven New Member


    ok.. let me explain about the problem more briefly.

    i am running a web server apache ..with dyndns as vareesh.homelinux.org
    with postfix, squirrel mail ..
    1. My host name is serv.lin.ald
    when someone type vareesh.homelinux.org can see it. and my web forms and comments are forwarded to smtp server.i use squirrel mail to see them.
    i can send/receive mail to all the local accoounts .
    now can i use something like say [email protected]
    instead of [email protected] because i can not use serv.lin.ald for internet mail.
    for this i made changes in main.cf and squirrel mail (./configure) but imap error at login.php....when this whole setup was done it wasnt for internet ..but now because i am running web server my mail need to be forwarded to respective mail server.

    @Falko ..you are right about the MX record ..but i am not able understand it how and where to include these records (which zone file).I have manged to configure a dns (bind) for local lan ..

    so do i need to change
    1. my hostname from serv.lin.ald to vareesh.homelinux.org ?
    2. change for mydomain as vareesh.homelinux.org , myhostname as vareesh.homelinux.org in main.cf.?
    3. Changes in sqquirrelmail ?
    4. MX entry in dns zone. ?

    pls advice.

    thanks
     
  7. falko

    falko Super Moderator Howtoforge Staff

    I'd use vareesh.homelinux.org for myorigin, mydomain, and myhostname.

    Make sure that you set the correct sender address in your email client so that Google accepts the mail.
     
  8. soroccoheaven

    soroccoheaven New Member

    Thanks falko..but no its not working ..with vareesh.homelinuix.org as my origin,mydomain and myhostname..do i have to include my destinations option in main.cf ?

    one more thing ..whenever i change the imap and smtp setting (through ./configure) in squirrel as domain vareesh.homelinux.org i get permission denied error during login process (login.php) ....
    see the error messages ....mail going with @serv.lin.ald.. thats the problem ..
    how to make them as @vareesh.homelinux.org..and say if it goes with @vareesh.homelinux.org will it be acceptable d by gmail ?
    Oct 10 00:02:59 serv postfix/smtp[23603]: 7885C8C132: to=<[email protected]>, relay=smtp2.google.com[64.233.167.25], delay=4, status=bounced (host smtp2.google.com[64.233.167.25] said: 553 5.5.3 <[email protected]>... Invalid (in reply to RCPT TO command))
    Oct 10 00:02:59 serv postfix/qmgr[23557]: 7885C8C132: removed
    now whats next ..???...
     
  9. falko

    falko Super Moderator Howtoforge Staff

    lin.ald is not a real domain...
     
  10. soroccoheaven

    soroccoheaven New Member

    ya..its known to me ..thats why i want it as [email protected] ..but what configuration changes are required to get the vareesh.homelinux.org....i am not able to change serv.lin.ald ..
    1. I have changed in min.cf mydomain,my origin,myhostname as vareesh.homelinux.org .
    2. changes in squirrel mail domain name ,smtp and Imap server update setting as vareesh.homelinux.org..
    anything else needed to be changed ?

    Thanks
     
  11. falko

    falko Super Moderator Howtoforge Staff

    Make sure that you set the sender address as [email protected] in your email client.
     
  12. soroccoheaven

    soroccoheaven New Member

    email client ? and what do mean by email client..of course i am using squirrel mail ...how to change this serv.lin.ald to vareesh.homelinux.org in squirrel mail..of course after modification in main.cf ..pls advice.

    Thanks
     
    Last edited: Oct 10, 2007
  13. falko

    falko Super Moderator Howtoforge Staff

    Outlook, Thunderbird, Squirrelmail, etc. are all email clients.

    When you're logged in in Squirrelmail, you can change the sender address in the preferences.
     

Share This Page