Postfix not accepting mail

Discussion in 'Server Operation' started by heff, Nov 17, 2005.

  1. heff

    heff New Member

    Hi all, I am attempting to configure a test mail server (postfix) on an OpenBSD machine, but have run into a problem that I can't seem to find on Google or elsewhere. When I run postfix, I am able to telnet into my mail server from outside of my local network, and send an email to webmaster@mydomain.com. I have configured the aliases file to link the webmaster account to root, and after the telnet session I run mail as root, and I can see that I have properly recieved the message. However, when attempting to send an email from another mail server (ex: gmail or yahoo mail), the mail does not show up in /var/mail/root and /var/log/maillog has no additional entries. Also, there is no mail failure message returned to my yahoo/gmail accounts. I have checked my MX records and ensured that they resolve to the correct IP address. I believe this may not be a postfix-specific problem, as I created a quick sendmail configuration and had the exact same problem with that as well. If anyone could point me in the right direction, I would appreciate it.
     
  2. falko

    falko Super Moderator

    This looks like a DNS problem, even if you checked the MX records. Did you change them recently? Changes may take up to three days until they propagate...
     
  3. heff

    heff New Member

    MX records

    Well, I suspected that the mail was never reaching my server since nothing is getting logged in maillog, so I tried resolving MX records from outside my LAN, and then telneting to mail.mydomain.org, both worked fine. Plus I havn't touched my DNS settings in the past few days, so as far as I can tell, it isn't a DNS problem.
     
  4. heff

    heff New Member

    Update

    OK, here is some other info that I found that may help resolve this issue: I attempted to send an email to my server from my gmail account using the IP address instead of the domain name (i.e., webmaster@xxx.xxx.xxx.xxx), and it went through fine. I then attempted to send an email using the same format (IP address instead of domain name) using a telnet session, and recieved a 550 error. So, the domain name works with a telnet session, but an IP address does not, and an IP address seems to work for everything else, but the domain name does not. I would attribute this entirely to DNS if it weren't for the 550 error. Any ideas?
     
  5. falko

    falko Super Moderator

    What's the value of inet_interfaces in /etc/postfix/main.cf? Should be all.
     
  6. heff

    heff New Member

    I set inet_interfaces=all in main.cf, but still no luck. When I restarted postfix however, I saw an entry in maillog which I had previously overlooked:

    Code:
    warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
    I found some stuff via google linking this to a problem with db4/openldap, but I'm not using ldap in my configuration. I also ran postfix check and got no complaints.
     
    Last edited: Nov 18, 2005
  7. falko

    falko Super Moderator

    Anything in your mail error log?
     
  8. themachine

    themachine HowtoForge Supporter

    perhaps you could privately provide your actual FQDN (i.e. mail.mydomain.org) so that we may troubleshoot DNS, etc.

    If you'd like to send it to me in a private message, I won't post it on the forum.

    I've had issues with DNS if you do not have a reverse DNS record that resolves to your mail server hostname. Say, if you telnet to 25... it generally says "mail.mydomain.org" or "mydomain.org" etc... you need to have a reverse DNS record to resolves the IP to that hostname. Most big mail servers (yahoo, etc) filter out certain mail servers without a proper rDNS lookup due to the influx of the bastards that spam us all.

    Also, are you certain that your domain points to the IP you are using? If you can telnet to 25 with the domain, but no with the IP that just sounds .... no-so-right.
     
  9. geek.de.nz

    geek.de.nz New Member

    same problem but seems to work for other accounts

    Hi, I have the exact same problem, but my DNS MX records should be fine as well. The other funny thing is that all email seems to work, except the webmaster@mydomain.com does not, as well as the root@mydomain.com. Well, I can see why root@mydomain.com would not work, but webmaster? Is it turned off by default or do I need to add a user for that? However, when I send email to someuser@mydomain.com I can read the email, even if sent from a gmail account.

    It's probably due to a misunderstanding of the /etc/aliases file, because the other funny thing is, when I make an alias for root as in:

    root: myemail@gmail.com

    I get root email sent from the system. But when I forward any other email to my gmail account, as in:

    myuser: myemail@gmail.com
    or
    webmaster: myemail@gmail.com

    I do not receive the email at all!! Is Postfix different to sendmail in this respect? How come it is so inconsistent? Why do I get email from the root user (system logs etc)? I am completely lost and haven't found a clue anywhere on the net, as how to resolve this issue. Help appreciated! Thanks.
     
  10. falko

    falko Super Moderator

  11. geek.de.nz

    geek.de.nz New Member

    Actually, mail delivery is working when I use another email account. So, when I send from myemail@hotmail.com to webmaster@mydomain.com it works fine, i.e. gets forwarded to my gmail account. Only when I sent the email from my gmail account to webmaster@mydomain.com I would not get it back in my gmail. So, this must be a filter gmail has set up ;-).

    Next issue:
    I got another domain (myotherdomain.com) and want to be able to receive/forward email from that account as well. How do I configure that?
     
  12. falko

    falko Super Moderator

    So you're in fact talking about sending emails from webmaster@mydomain.com instead of receiving?
    You should check that you're not listed on a blacklist and that you have proper PTR and SPF records for your domain.
    Maybe you should contact the Gmail support and ask about their spam policies and why your emails get blocked.

    Have a look here: http://www.howtoforge.com/forums/showthread.php?t=2
     
  13. geek.de.nz

    geek.de.nz New Member

    Thanks, but there is no issue with mail being blocked. The only thing that doesn't work is when I send email from my gmail account to my server (me@gmail.com -> webmaster@mydomain.com) and it should get forwarded to my gmail account (webmaster@mydomain.com -> me@gmail.com), but it doesn't, so I'm guessing gmail is filtering mail that is from yourself out of the inbox. Maybe to prevent you from sending large files to yourself or something. Everything else works fine.

    Now I only want to set up another domain, and probably a lot more domains to receive/send email and I need to read up on how to do that efficiently. :)
     
  14. falko

    falko Super Moderator

    Have a look here: http://www.howtoforge.com/forums/showthread.php?t=2
     

Share This Page