Page 1 of 1
Some recipients do not receive any mail
Posted: Sun Dec 21, 2008 5:48 am
by klaasjes
Hi,
I installed Swiftmailer, it's great! However, a problem occured. While some receivers (Gmail) receive the messages, others don't. Does this mean that those messages are blocked by the mailserver? And can I do something about it?
Thanks!
Re: Some recipients do not receive any mail
Posted: Sun Dec 21, 2008 6:28 am
by Chris Corbyn
They're probably being blocked as spam due to IP address blacklisting. If you're on one of the common shared hosts (Amazon EC2 included) this happens regularly.
Try your mail server's IP address here:
http://www.robtex.com/rbl/
Re: Some recipients do not receive any mail
Posted: Sun Dec 21, 2008 6:56 am
by klaasjes
Hmm, I get the following:
http://www.robtex.com/dns/mail.klaasjes.nl.html
Can you say anything about that?
Re: Some recipients do not receive any mail
Posted: Sun Dec 21, 2008 8:18 am
by Chris Corbyn
All looks fine (you need to click the "Blocklists" tab after a search).
Do you have a SPF record configured? Hotmail requires this for one.
Re: Some recipients do not receive any mail
Posted: Sun Dec 21, 2008 9:21 am
by klaasjes
This is the code I use:
Code: Select all
//Load in the files we'll need
require_once "Swift/lib/Swift.php";
require_once "Swift/lib/Swift/Connection/SMTP.php";
$swift =& new Swift(new Swift_Connection_SMTP("localhost", 25));
$message =& new Swift_Message("My subject", "My body");
$recipients =& new Swift_RecipientList();
$recipients->addTo("klaas@heder.nl", "Zip Button");
$recipients->addTo("k.kox@uvt.nl", "Zip Button");
$recipients->addTo("klaaskox@gmail.com", "Foo Bar");
$recipients->addTo("support@samenbetalen.nl", "Zip Button");
$swift->batchsend($message, $recipients, new Swift_Address("info@skish.nl", "Me"));
The second and third recipients receive the message, and the first and last do not receive anything.
Re: Some recipients do not receive any mail
Posted: Sun Dec 21, 2008 9:05 pm
by Chris Corbyn
It appears that your domain name does not have a SPF record configured for it. You'll need to add this.
This website will help you do this:
http://www.openspf.org/
Re: Some recipients do not receive any mail
Posted: Tue Dec 23, 2008 3:01 am
by klaasjes
Thanks for your help!
I used their validator:
Code: Select all
Input accepted, querying now...
SPF records are primarily published in DNS as TXT records. The TXT records found for your domain are:
v=spf1 a mx ip4:193.138.205.249 ?all
SPF records should also be published in DNS as type SPF records. This is new and most implementations do not support it yet.
No type SPF records found.
Checking to see if there is a valid SPF record.
Found v=spf1 record for klaasjes.nl
v=spf1 a mx ip4:193.138.205.249 ?all
evaluating...
SPF record passed validation test with pySPF (Python SPF library)!
Does this mean that there already is an spf record and that it is valid?
Re: Some recipients do not receive any mail
Posted: Tue Dec 23, 2008 3:44 am
by Chris Corbyn
Hah, I must have checked the wrong domain. I checked skish.nl and got nothing.
I assume you've just placed "My body" in this code snippet and you are sending an real message?
Re: Some recipients do not receive any mail
Posted: Tue Dec 23, 2008 3:45 am
by Chris Corbyn
By the way, I still get nothing for that sender address:
Code: Select all
chrisbook:swiftmailer_v4 chris$ dig TXT skish.nl
; <<>> DiG 9.4.2-P2 <<>> TXT skish.nl
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53134
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;skish.nl. IN TXT
;; ANSWER SECTION:
skish.nl. 14400 IN TXT "Zone hosted by Medid Webapplications B.V."
;; Query time: 667 msec
;; SERVER: 61.9.133.193#53(61.9.133.193)
;; WHEN: Tue Dec 23 20:44:52 2008
;; MSG SIZE rcvd: 80
Which domain did you check?
Re: Some recipients do not receive any mail
Posted: Tue Dec 23, 2008 4:25 am
by klaasjes
I checked klaasjes.nl, that is also where my scripts are running
The same problem occurs when the sender is
info@klaasjes.nl: some recipients always receive the messages, others never receive anything.
Re: Some recipients do not receive any mail
Posted: Wed Dec 24, 2008 4:05 pm
by klaasjes
I'm trying to build a mailing system, and I still need to choose a webhost and register a domain. The system will be used once a month in order to send out a html newsletter to 2000-3000 subscribers. Are there things that I should pay attention to in order to make sure that it will work properly?
For example, should I use a cronjob to split up the recipients in batches? And are there some server requirements that can fix the problems that I described earlier?
Thanks!
Re: Some recipients do not receive any mail
Posted: Wed Dec 24, 2008 6:21 pm
by Chris Corbyn
It's hard for me to determine the cause of the junk filtering here... I can only suggest trying a different host - it's most likely to do with the origin of the email.
In terms of dealing with 2000-3000 recipients, it's wise to batch them into groups of 100 or so (using cron, yes) but in reality 3000 is not a massive amount. The main concern is that you'll overload the SMTP server. Companies that send out 100K+ emails tend to have multiple SMTP servers that they can spread the work across.