Find the answer to your Linux question:
Results 1 to 9 of 9
Hi, I have registered a domain and pointed the A and MX to my mail server running on postfix,mysql. In longer it would be virtual domain hosting setup (multiple domains ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2008
    Posts
    15

    Postfix mail loops back to myself


    Hi,
    I have registered a domain and pointed the A and MX to my mail server running on postfix,mysql.

    In longer it would be virtual domain hosting setup (multiple domains pointing to same mail server).

    On DNS panel (registered with provider) they also gave me 2 email address for free and ofcourse the MX record.
    I removed the mx of provider and created A record and pointed the mx to my postfix mail server i.e mail.abc.com.Am i making any mistake here?Made necessary changes in main.cf,master.cf,amvised,postfixadmin etc.

    I can send the mail across the domain,but not able to send it within domain i.e abc.com to abc.com.It gives me the error of
    mail loops back tomyself.Also not able to receive mail on this domain from anywhere.I am posting main.cf setting of mine.I tested this setup with some abc.local domain was able to send and receive mail within domains.



    readme_directory = /usr/share/doc/postfix-2.2.10/README_FILES
    myhostname = mail.abc.com
    mydomain = abc.com
    relay_domains = $mydestination
    mydestionaion =
    proxy_interface = 192.168.1.224

    virtual_transport = dovecot
    virtual_mailbox_base = /home/virtual
    virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
    virtual_alias_domains = $virtual_alias_maps
    virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
    virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
    virtual_minimum_uid = 10000
    virtual_uid_maps = static:10000
    virtual_gid_maps = static:10000
    mailbox_size_limit = 51200000

    smtpd_sasl_auth_enable = yes
    smtpd_sasl_type = dovecot

    broken_sasl_auth_clients = yes
    smtpd_sasl_local_domain =
    smtpd_sasl_path = private/auth
    smtpd_sasl_security_options = noanonymous
    #smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination
    broken_sasl_auth_clients = yes
    smtpd_sasl_local_domain =
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtpd_use_tls = yes
    smtp_tls_note_starttls_offer = yes

    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.pem
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.pem
    smtpd_tls_CAfile = /etc/postfix/ssl/smtpd.pem


    content_filter = smtp-amavis:[127.0.0.1]:10026
    .................................................. .................................................. ......
    Mysql_virtual_alias_ maps.cf

    user = postfix
    password = fixp0st
    hosts = localhost
    dbname = postfix
    table = alias
    select_field = goto
    where_field = address
    .................................................. .................................................. ............
    Mysql_virtual_domains_maps.cf
    user = postfix
    password = fixp0st
    hosts = localhost
    dbname = postfix
    table = domain
    select_field = description
    where_field = domain
    Last edited by skumar704; 06-25-2012 at 11:11 AM. Reason: Session timeout

  2. #2
    Just Joined!
    Join Date
    Sep 2008
    Posts
    15
    Looking for expert opinion on this.Can someone help please?

    I am running short of thoughts on this.

  3. #3
    Just Joined!
    Join Date
    Dec 2008
    Posts
    11
    is this a backup mx server? if it is this config is correct, i think. but if it is not backup and this is a primary server remove these two:

    relay_domains =

    proxy_interfaces =

    for your mx dns config do this in your command line:

    host yourdomain.com

  4. #4
    Just Joined!
    Join Date
    Dec 2008
    Posts
    11
    is this a backup mx server? if it is this config is correct, i think. but if it is not backup and this is a primary server remove these two:

    relay_domains =

    proxy_interfaces =

    for your mx dns config do this in your command line:

    host yourdomain.com

  5. #5
    Just Joined!
    Join Date
    Sep 2008
    Posts
    15
    Do you suggest me to configure DNS on the mail server as well?

    But,I am looking to configure it as backup mx server.

    Can you please let me know how can I achieve this?Right from achieving buying domain name and making necessary changes there.

    I am going to add various domain to this server. like abc.com and xyz.com etc. to have mulitple domains.

  6. #6
    Just Joined!
    Join Date
    Dec 2008
    Posts
    11
    Quote Originally Posted by skumar704 View Post
    Do you suggest me to configure DNS on the mail server as well?
    if you could set dns somewhere else then why you should do that?

    But,I am looking to configure it as backup mx server.
    google : Configuring Postfix to act as a backup MX serve

    Can you please let me know how can I achieve this?Right from achieving buying domain name and making necessary changes there.
    you could buy domain names set their mx record, some sites give free dns panel when you buy dns from them ( as in your first post ) , or you could run your own dns server and set your dns records there, thats also good practice.

  7. #7
    Just Joined!
    Join Date
    Sep 2008
    Posts
    15
    I did have dns panel from rpovider where domain is registered.

    I created a A record as mail.abc.com and mx also created too.

    What do you mean by
    for your mx dns config do this in your command line:

    host yourdomain.com


    I already added that in my provider dns admin panel as mail.abc.com with priority 10.

    Am i missing something else.Some alias do I need to create?

  8. #8
    Just Joined!
    Join Date
    Dec 2008
    Posts
    11
    i mean for check your dns setting use host command, in command prompt type host example.com and see the result, then if you see your mail record in the result, your config is ok...

  9. #9
    Just Joined!
    Join Date
    Sep 2008
    Posts
    15
    That seems correct to me.

    It say abc.com has adddress (DNS IP of domain is being hosted)
    abc.com mail is handled by 1 mail.abc.com.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •