Page 1 of 1

How not to send a spam

Posted: Mon Nov 19, 2007 6:36 am
by dillion
Was just reading up on this excellent guide but I have a few quick questions.... :)

In "Identify Yourself":
Check your mail server configuration has the primary hostname set correctly and also check that /etc/hosts has the FQDN of your server listed before “localhost” for the 127.0.0.1 address.
I have left Swiftmailer to create an IP literal representation of my server, as default. Should I be worried about the following content in etc/hosts?

Code: Select all

127.0.0.1               localhost.XXXX.com localhost localhost.localdomain localhost
Also, when I send a HTML email (multipart format of course) from the server to my address (same domain), does the header below look OK? I am wondering if I should be concerned about the localhost.XXXX.com?

Code: Select all

Received: by localhost.XXXX.com (Postfix, from userid 99)
	id BD33B852EF; Fri, 16 Nov 2007 17:07:04 +0000 (GMT)
X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on 
	localhost.XXXX.com
X-Spam-Level: 
X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,
	HTML_TAG_EXIST_TBODY,NO_REAL_NAME autolearn=failed version=3.1.7
And finally, the SPF:
The main domain of the server is http://www.XXXX.com (it is a dedicated server) but I have several domains for clients. Should I do run SPF wizard for each domain or just the top level one (http://www.XXXX.com)?

Many thanks in advance! :D

Posted: Mon Nov 19, 2007 9:01 am
by choubix
hi!

you may be interested in having a look at this post:

http://www.devnetwork.net/forums/viewto ... 224#429224

where I am lso asking questions on spam and spf :)

Posted: Tue Nov 20, 2007 3:29 am
by dillion
cheers mate - already saw your thread briefly. :) I agree it might be a good idea to have a sticky about spam and SPF in simply terms (the content on openspf website is very confusing!). :D

Off-topic: Out of interest, why did you use:

Code: Select all

$message->setTo("undisclosed-recipients:;");
If you are sending the email individually in a loop? My understanding is that personalised email address is better than "undisclosed-recipients".

Posted: Tue Nov 20, 2007 4:30 am
by choubix
hi dillion,

it has been changed since :)
I removed the undiscolsed recipients. I am using the batchSend() function.

Chris was kind enough to correct my code... :)

Posted: Tue Nov 20, 2007 5:21 am
by dillion
batchSend is better than doing a loop (complete with logging etc.)?

Posted: Tue Nov 20, 2007 9:53 am
by choubix
cant really say in terms of performance as I have been using Swift for only a couple of days.

still need to understand how to better handle the code...

if you take a look at my code in the other post: batchSend is sending separate emails to the mailing list.
I am only looping the parameters I use in decorator

That way I avoid looping the smtp connection + create new message the sending...