PDA

View Full Version : Postfix not accepting mail


heff
17th November 2005, 19:14
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.

falko
17th November 2005, 19:58
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.
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...

heff
17th November 2005, 20:46
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.

heff
17th November 2005, 21:27
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?

falko
17th November 2005, 23:39
What's the value of inet_interfaces in /etc/postfix/main.cf? Should be all.

heff
18th November 2005, 03:39
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:

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.

falko
18th November 2005, 12:44
Anything in your mail error log?

themachine
22nd November 2005, 17:36
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.

geek.de.nz
19th March 2006, 09:29
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.

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.

falko
19th March 2006, 13:53
What's in your mail log when you send an email to root@mydomain.com or webmaster@mydomain.com?

geek.de.nz
19th March 2006, 14:11
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?

falko
19th March 2006, 14:57
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 ;-).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.

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?Have a look here: http://www.howtoforge.com/forums/showthread.php?t=2

geek.de.nz
19th March 2006, 15:32
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. :-)

falko
20th March 2006, 13:42
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. :-)
Have a look here: http://www.howtoforge.com/forums/showthread.php?t=2