I am using gmail as my email provider for a domain name that I control. I want to send email from my dedicated server that is being hosted by a real hosting company and I don't like the 500 message per day cap. To address this issue I would like to run postfix to only send email, i would prefer if incoming port 25 blocked by my firewall. I can send email, however google marks all messages sent with postfix as SPAM. How do I make sure that people know email sent with postfix is valid?
Ok, so I'm working under the assumption that you have an address, let's call it
[email protected]
that you're sending from, and you're receiving email at google using that address.Ok, you want to switch to a server you control because there is a limit to the number of messages in a day. Got it.
Right here is the first problem. Blocking all inbound traffic without regard to the reason for the traffic arriving at that port will create problems all the way around. SMTP is a bidirection communication protocol and you'll just confuse the bejeebers out of whatever SMTP server you're sending to upstream.
The short of that is, unblock port 25.
Ok, at this point, you'll need to provide some headers for examination, or some logs. Your mail could be blocked for a variety of reasons and without knowing how you have it set up, any guesses I would make would be shots in the dark.
I will say that Google would have to be insane to allow any SMTP server to send an email into itself that didn't originate from their domain but claims to be coming from it; it could be as simple as the fact that your SMTP server is not "authorized" on their servers to handle mail for Google's domain. This is a common anti-relay setting for most SMTP servers and would certainly explain alot about your problem, but it's still just guesswork on my part.
Postfix isn't the issue, it's how you've configured postfix to "talk" with Google. I can send email from my postfix mailer to gmail all the time, and have done so for years.
Post the additional information needed to resolve this (log file info and/or headers from a sample email) so that we can get to the heart of the issue. Otherwise, it's all speculation, and will be nothing but guesswork.
Follow-up to comments
Either postfix connects directly to Google (which is how most SMTP deliveries are done), or you are using a relay to talk with Google (which is rare anymore). In the former, you need to have a correct MX and SPF setup, and a postfix main.cf that isn't borked. In the later, well, Google probably isn't going to take kindly to any email you send to a relay that doesn't have a SPF record that covers your originating server.
The third option is: you have found some magic internet vortex that relays email from server to server without the two servers ever talking to each other. I am doubtful of this.
Because you'll break email in general.
I'm not one to repeat myself, but...
Post the additional information needed to resolve this (log file info and/or headers from a sample email) so that we can get to the heart of the issue. Otherwise, it's all speculation, and will be nothing but guesswork.
Take this Email server test. It will tell you probable reasons for your emails being considered as SPAM and how to fix the same.
If the fixes cannot be implemented for some reason, use a SMTP Relay Service.
Before you put any time at all into Postfix go here and check the public IP address that you're using.
http://www.dnsblcheck.co.uk
If you're on a residential DSL block you may be screwed regardless of anything you do.
Simple- you do not send them from your machine.
Here are some issues that may mark it as spam:
Postfix has nothing to do with it. Depending on your domain you can / have to put in proper entries and move away from your end user dynamic IP (get a small VPX acting as relay), or - in case of an external domain - understand there is nothing you can do, as you abuse the provider domain.
TECHNICALLY are a spammer - like every other bot infected computer trying to send email from home connected computers for domains not properly matching up with the IP address.
@TomTom I disagree. Postfix does have a play in the equation, although not postfix specifically, any SMTP server that can send mail has the potential to send it "wrong". For example, I would check the headers to make sure the from is correct (not [email protected]), and the from/reply to are the same. I know MSN for a fact is VERY PICKY when it comes to email not sent from a big business entity. Also, people have good reasons for using their own server to send mail, as in mailing lists.
And actually if he was sending from a dynamic IP, the mail wouldn't go through at all, which I completely disagree with, and would be bounced back to him. At least in my experiences.
I would defiantly check the links that Srikrishnan Chitoor posted, because the block of IPs that you are on could have been blacklisted. And again, which I don't believe in because if a "spammer" wants to be removed from said list all they have to do is pay but that is a whole different issue.
I would open up port 25 with SMTP auth. This way you can at least get the bouncebacks. But, that is up to you.
Are SenderID, DomainKeys and DKIM properly set? Have a look at this blog post http://www.digitalsanctuary.com/tech-blog/debian/setting-up-spf-senderid-domain-keys-and-dkim.html