Results 1 to 8 of 8

Thread: Mail server setup woes

  1. #1
    Join Date
    May 2014
    Beans
    5

    Mail server setup woes

    I'm following this guide:
    https://wiki.archlinux.org/index.php...er_Mail_System

    and I am able to send email from the roundcube client but not receive. I get an email back to the sender (my gmail) stating:
    Code:
    This is the mail system at host MYDOMAIN.
    
    I'm sorry to have to inform you that your message could not
    be delivered to one or more recipients. It's attached below.
    
    For further assistance, please send mail to postmaster.
    
    If you do so, please include this problem report. You can
    delete your own text from the attached returned message.
    
                       The mail system
    
    <sysadmin@MYDOMAIN>: mail for MYDOMAIN loops back to myself

    I'm able to post any relevant config files/logs as needed. Any help is greatly appreciated.

  2. #2
    Join Date
    Dec 2013
    Location
    Michigan, US
    Beans
    50
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Mail server setup woes

    What do you get when you run ?
    telnet localhost 25
    Last edited by devine.steve; May 24th, 2014 at 01:14 AM.

  3. #3
    Join Date
    May 2014
    Beans
    5

    Re: Mail server setup woes

    Quote Originally Posted by devine.steve View Post
    What do you get when you run ?
    Code:
    ┌──[sysadmin@ubuntu-server|~]└─ $ telnet localhost 25Trying ::1...Connected to localhost.Escape character is '^]'.220 MYDOMAIN ESMTP Postfix (Ubuntu)
    Also works when I do telnet MYDOMAIN 25.

  4. #4
    Join Date
    Jun 2007
    Location
    Paraparaumu, New Zealand
    Beans
    Hidden!

    Re: Mail server setup woes

    Is "MYDOMAIN" a domain that your copy of postfix is meant to handle?

    The error "loops back to myself" can happen when you have an A record or MX record for your domain, but Postfix isn't configured to accept mail for your domain. You might want to check that the mydestination parameter in Postfix's main.cf file includes your domain. (....or virtual_mailbox_domain as appropriate)
    Last edited by lisati; May 24th, 2014 at 10:16 AM.
    Forum DOs and DON'Ts
    Please use CODE tags
    Including your email address in a post is not recommended
    My Blog

  5. #5
    Join Date
    May 2014
    Beans
    5

    Re: Mail server setup woes

    Quote Originally Posted by lisati View Post
    Is "MYDOMAIN" a domain that your copy of postfix is meant to handle?The error "loops back to myself" can happen when you have an A record or MX record for your domain, but Postfix isn't configured to accept mail for your domain. You might want to check that the mydestination parameter in Postfix's main.cf file includes your domain. (....or virtual_mailbox_domain as appropriate)
    I had mail working both ways earlier in the install, before all the virtual user stuff.I did some experimenting, and if I make mydestination contain only localhost I get this email response:: User unknown in virtual alias tableHere's my main.cf:http://pastebin.com/PHDMuZSS

  6. #6
    Join Date
    May 2014
    Beans
    5

    Re: Mail server setup woes

    Also I know that the user exists as I can see it in postfixadmin and can login as it with telnet localhost imap.

  7. #7
    Join Date
    Jun 2007
    Location
    Paraparaumu, New Zealand
    Beans
    Hidden!

    Re: Mail server setup woes

    If Postfix is telling you that it can't deliver a message to some-user@MYDOMAIN because it "loops back to myself" it usually means that Postfix needs to be told to accept mail for MYDOMAIN.

    If you're using UNIX system accounts to identify user, try adding MYDOMAIN to the mydestination line in main.cf and restarting postfix.

    If you're using virtual domains, take a look here: http://www.postfix.org/postconf.5.ht..._alias_domains
    Forum DOs and DON'Ts
    Please use CODE tags
    Including your email address in a post is not recommended
    My Blog

  8. #8
    Join Date
    May 2014
    Beans
    5

    Re: Mail server setup woes

    Quote Originally Posted by lisati View Post
    If Postfix is telling you that it can't deliver a message to some-user@MYDOMAIN because it "loops back to myself" it usually means that Postfix needs to be told to accept mail for MYDOMAIN. If you're using UNIX system accounts to identify user, try adding MYDOMAIN to the mydestination line in main.cf and restarting postfix.If you're using virtual domains, take a look here: http://www.postfix.org/postconf.5.ht..._alias_domains
    As mentioned before I'm using virtual domains. It was working fine before with regular system accounts but isn't now that I've switched to virtual.I posted my main.cf a few posts back, if you don't mind taking a look.Depending on what I comment and uncomment out I get either the 'loops back to myself' error or the 'user unkown etc etc' error.Thank you.

Bookmarks

Posting Permissions

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