I have a registration activation email that needs to be sent out. It sends out fine to gmail, yahoo and the other well known email handlers. However, it won't send to .edu and some other less well known extensions. Is it something that is caused on my side or something on the other side blocking emails with certain characteristics. I am emailing a link after all.
This can have several reasons:
Your sending Mailserver is blacklisted.
Your PTR-Record is different from the A-Record of your Server.
The receiving Mailserver denies the Mail, because of the incoming Firewall rules or the Mailserver settings.
For number one you can take a look if your Server is blacklisted: http://mxtoolbox.com/blacklists.aspx
For number two you can check your PTR-Record: http://mxtoolbox.com/ReverseLookup.aspx
If the reverse lookup is different from your A-Record you can bypass this in your Mailserver settings, while you change the banner to the output of the reverse lookup.
I hope this helps :-)
Related
I know there is a great function of Postfix which allows us to forward emails, so, for example, I have a Postfix service running at mydomain.com and I can send important notifications via email to my clients directly from info#mydomain.com. Also, thanks to forwarding functionality, I can RECEIVE letters back to info#mydomain.com and automatically get them forwarded to my full-featured "real" mailbox, for example, my#gmail.com.
It looks great, but there are two things that still need to be solved.
If I limit SMTP listener to 127.0.0.1:smtp, I still can send letters from the code, BUT I can not receive answers anymore. Not sure why. So I have to remove the limitation (but this will allow bad guys to use my Postfix as a spamming route point). Is there any possibility to allow email receive and still leaving SMTP limited to the localhost?
Postfix's forwarding does not work in the real life. Actually, the forwarded letters look like sent from the stranger's email (stranger#strangehost.com for example) and any "real" mail provider recognizes them as spam, because the SPF record in my domain says "allow to send only from mydomain.com" and stranger's emails does not pass this check.
So my big question is: Is it a way to implement a "redirection" of emails (not forwarding) so sender email will become "info#mydomain.com" and gmail.com (or other "real" mailbox) will not kick them?
I have a small problem that i cannot for the life of me seem to solve. I have a php script which takes some user data and processes it and sends an email to admin and an email to the user with an activation key. This is all fine and dandy, but the problem is GMAIL accounts. The user gets the email no problem but if it is a GMAIL account there is no mail in the inbox or spam box. Just wondering anyone might have any solutions.
moved from my comment:
so across the board, NO gmail accounts get your email? Maybe your host is blacklisted, and your mail is just flat out banned? Is your server blacklisted? Have you checked? Also what is your /var/log/ mail queue result? Does gmail accept the mail?
Some tools, check if you were blacklisted here:
http://www.mxtoolbox.com/blacklists.aspx
http://whatismyipaddress.com/blacklist-check
Some more info on getting un-blacklisted: http://www.isipp.com/resources/am-i-blacklisted/
Be aware that sometimes it may take awhile to get de-listed, I had one
server act up, and was blocked by hotmail, for a few months even after
all places removed my ip.
Consider using some SMTP php implementation, which can reveal possible problem.It will contact gmail servers directly without passing them to MTA.
Also note that gmail uses SSL enalbed SMTP servers on port 465 or 587.
On other way, take a look at this : http://www.richardlord.net/blog/php-mail-and-gmail
i am writing a newsletter module in php/mysql.
how can i send email to site subscriptors that doesn't cause my mail server get blocked ? i mean it doesn't treat as a spam sender?
The full answer to this question is really outside of the scope of this site, as much of it will involve administrative tasks with the domain and server(s) involved.
But the short answer is: Don't do this! You will just end up getting your server's IP blacklisted, making even low-volume e-mail sending worthless from that server.
You should look at other options; an RSS feed, a third-party, well-run mailing service (like Constant Contact), or something else.
Use Cron job to do this and send mails in small chunks with a time difference.
There are several rules that you need to follow if you want to send out emails from your site and have then not being flagged as spam:
Start with the most obvious: check to make sure IP address of your server is not on any spam black lists. Try this site: link text
By default all emails sent from a website hosted on Apache server are send from the user Apache server runs under, usually 'nobody'. This is a red flag for spam filters, so you have to modify the value of 'return-path' header which is not always allowed by email server. If you can't modify return-path, then you need to start apache as another user, create a new account for your apache server, name it anything you like as long as it's not 'nobody' and then configure apache server to run as this new user
Very important to have reverse DNS entry for the IP address you use for sending out emails. That reverse DNS entry must point to same domain name that points to this IP address. This is actually the most important thing to do. Since only a webhost can add reverse DNS entry, you should ask your host to do this for you.
Other smaller steps that can help is to configure an appropriate spf entry in your DNS server and another one is to use digital signature to sign all your outgoing messages. I used to use a program called dksign for this, it's probably not the most up-to date program now, so do your research and find the best way to sign your messages.
Use common sense when creating subject lines. If you say "free discount offer" in the subject line or something similar or "get viagra", your message will probably be flagged as spam no matter what.
I'm wondering what mail servers I should use for sending mail through my website, avoiding them sent as spam.
Hostgator SMTP
google hosted SMTP
I found that to avoid a mail sent as spam it should have the same host in "From:" and "Received". How to overcome this?
Thanks
you should really check (or create) your dns SPF record: it specifies which server is allowed to send email for your domain name. Hotmail and gmail users, among others, may find your emails in their junk folder if you set these incorrectly or not at all.
Also make sure you have a reverse dns record set to your domain name. your recipients Mail servers will check if your mail server's ip address is fixed or dynamic (if dynamic, it's most probably spam). See wikipedia
checking the domain names in the rDNS
to see if they are likely from dialup
users, dynamically assigned addresses,
or other inexpensive internet
services. Owners of such IP addresses
typically assign them generic rDNS
names such as
"1-2-3-4-dynamic-ip.example.com."
Since the vast majority, but by no
means all, of e-mail that originates
from these computers is spam, many
spam filters refuse e-mail with such
rDNS names
I have set up an AJAX contact form on a client's website.
The problem is that the email is not getting through to the client's inbox.
I set up the client with Google Apps (in the same way I did for myself).
I used the same contact form with my email address and it works. But with any email addresses on their domain it doesn't!
All members of the domain are receiving 'ordinary' emails.
What could be the difference that's stopping mail() emails getting through?
UPDATE
Ok so I managed to solve it. Turns out that using a CNAME to point the domain to the correct server wasn't enough for sendmail so I had to change it to an A record pointing directly to the server. Strange but true. Thanks for the help folks, you pointed me in the right direction :)
It depends on the both settings on your server and the server on the receiving end.
hotmail for example requires the use of correctly configured SPF records.
many mail-receiving servers (including hotmail) require the email to originate from a Fully Qualified Domain Name. It is very possible that your e-mails send from PHP do not comply with this rule. (there is a good chance they originate from 'apache')
see hotmail self help and hotmail postmaster info
PHP's mail() function does not include a lot of headers with your mail, so you will need to supply them yourself.
The more hops your mail makes on it's way to it destination, the more likely it is to be tagged as spam.
So it might be a better option not to use PHP's mail function and instead use a mail library that connects to an SMTP server just like your desktop mail application does.
All in all, I would place my bets on an external library: Pear::Mail (documentation)
You could also read: how do you make sure email you send programmatically is not automatically marked as spam
UPDATE
Failing the SenderId or SPF check can get your message dropped before it even hits the users inbox. The message will not end up in the users junk folder, it will go directly to /dev/null.
I know this is at least true for hotmail and live mail. I see no reason for other hosts not to have implemented the same policy.
I recommend using PHPMailer (including their SMTP) library instead. It is reliable compared to mail and allows you to create fully customized emails.
http://phpmailer.worxware.com/