Skip navigation

Postfix: mail loops back to myself

1530 Views 10 Replies Latest reply: Mar 1, 2013 1:36 AM by pepmachine RSS
pepmachine Calculating status...
Currently Being Moderated
Feb 25, 2013 4:41 AM

I have the feeling that my issue is not very complicated (if you know Postfix that is) or maybe my reasoning is wrong but I can’t seem to make it work. I hope somebody can point me in the right direction!


I am trying to set up a local mailserver on my macmini loaded with OS X Server (all latest versions) The sole purpose would be sending calendar invitations via the local email server.


I am using the same domain name.


My (hosted) email address looks like this: and runs on the host server.

My local server address is:

I created an extra A record for mail:

My server has a machine record for and a mail exchanger (MX) record also for

My local server Mail setting is: Provide mail for: (not I am not sure if this is correct, both ways allow mail to be send, both ways result in the loop error.


My issue: from my OSX Server account ( I can send email to any address except to Whatever I do (tried several suggestions altering the file) it keeps returning my email with the ‘mail for loops back to myself’ error.

Sending an email from my account to works fine. Sending a mail from to (to the same address) also works fine.

I experimented with these lines in

mydestination = $myhostname, localhost.$mydomain, localhost

mydomain =

myhostname =

I tried many variables but the loop error doesn’t go away…


I hope somebody knows how to configure the file to fix this looping error!

Many thanks in advance.


  • Linc Davis Level 10 Level 10 (108,135 points)
    Currently Being Moderated
    Feb 25, 2013 7:45 AM (in response to pepmachine)

    best_mx_transport (default: empty)

    Where the Postfix SMTP client should deliver mail when it detects a "mail loops back to myself" error condition. This happens when the local MTA is the best SMTP mail exchanger for a destination not listed in $mydestination, $inet_interfaces, $proxy_interfaces, $virtual_alias_domains, or $virtual_mailbox_domains. By default, the Postfix SMTP client returns such mail as undeliverable.


    Specify, for example, "best_mx_transport = local" to pass the mail from the Postfix SMTP client to the local(8) delivery agent. You can specify any message delivery "transport" or "transport:nexthop" that is defined in the file. See the transport(5) manual page for the syntax and meaning of "transport" or "transport:nexthop".


    However, this feature is expensive because it ties up a Postfix SMTP client process while the local(8) delivery agent is doing its work. It is more efficient (for Postfix) to list all hosted domains in a table or database.


    Postfix Configuration Parameters


    See also:


    smtp - mail loops back to myself | postfix - Server Fault

  • Linc Davis Level 10 Level 10 (108,135 points)
    Currently Being Moderated
    Feb 25, 2013 9:36 AM (in response to pepmachine)

    What does local MTA mean?


    Mail Transfer Agent. The SMTP server.


    Where do find best_mx_transport for example (in what file)?


    It's not in any file by default. You would add it to the file, which on OS X Server is




    How and where (in what file) do I list all hosted domains in a table or database?


    In the virtual_alias_domains parameter in


    Can I show you the content of certain files so you can tell me what to change?


    That goes beyond what I have time for. You're trying to do very advanced server configuration. I've given you pointers to the information you need. You can either follow those pointers, or hire a consultant to solve the problem for you. I don't have a specific recommendation.

  • UptimeJeff Level 4 Level 4 (3,390 points)
    Currently Being Moderated
    Feb 26, 2013 1:52 PM (in response to pepmachine)

    My guess, needs an MX of its own which points to
  MX   0


    Your server should be set to receive mail ONLY for


    Make sure has the proper MX pointing to your mail host


    if you post your real domain, it would be much easier to tell you what the config should look like.

  • UptimeJeff Level 4 Level 4 (3,390 points)
    Currently Being Moderated
    Feb 27, 2013 10:42 AM (in response to pepmachine)

    too short on time to digest this. its much easier to look at your real DNS as it exists.

    if you want to send your real domain, use my contact info is in my profile.


More Like This

  • Retrieving data ...

Bookmarked By (0)


  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.