I am looking at Net:SMTP and keyed in the following code as a test:
use Net::SMTP;
my $smtp=Net::SMTP->new
("www.example.com",Hello=>'www.example.com',TimeOut=>60,Debug=>1);
$smtp->mail("john\@example.com");
$smtp->recipient("one.two\@googlemail.com");
$smtp->auth('joe','soap');
$smtp->data;
$smtp->datasend("From: john\@example.com\n");
$smtp->datasend("To: one.two\@googlemail.com\n");
$smtp->datasend("Subject: This is a test\n");
$smtp->datasend("\n\n");
$smtp->datasend("and so to bed");
$smtp->dataend;
$smtp->quit;
print $smtp->domain; print "<br/>";
print $smtp->banner; print "<br/>";
replies:
www.example.com
www.example.com ESMTP Postfix
When I look at my goooglemail account it was entered into the spam box.
Any idea why this is happening?
Regards
John
Assuming the code you posted is what you actually ran:
One possible explanation for the issue you're having is that you are
forging the domain name "example.com". Spammers usually forge the return
address to make it harder to catch them. Practically everyone these days
treats email with bogus return addresses as spam or scores it
accordingly. Try putting your real domain in the return address. When
the SMTP server does a reverse lookup to validate that the email came
from the domain it's purported to be from, it won't be scored so highly.
--
-linux_lad
"-linux_lad" <jo...@linuxNOSPAMlad.org> wrote in message
news:W8adnc4FFsuNWfLV...@giganews.com...
Hi
I replaced the true adress with example.com
My guess the problem is in the header but I cannot see it.
Regards
John
I have had this issue before with AOL (and occasionally Yahoo) calling
perl generated (or more accurately, sendmail generated) mail spam. If
your site is on a shared server, and the domain name you are using is
not the domain name of the server, then your sending address and the
address it is from will not match and be considered spam. Or, if the
domain name for the server does not have a proper reverse lookup then
perl gerenated mail can be considered spam.
Using your example.com domain name, if the shared server's domain name
is admin.example.com and the website that is running the perl code is
www.somename.com then your website will not match up with the server
domain name.
If you running this on your own machine and sending out through your
ISP I think this could apply also, since the IP it is coming from does
not match the domain name IP in the email.
Bill H
PS - I could be totally wrong here - this has just been my experience.
>
> Hi
> I replaced the true adress with example.com
> My guess the problem is in the header but I cannot see it.
> Regards
> John
>
>
I'd suggest posting the full headers here, so we can see what is going
on. Remember that your domain must have a reverse DNS record for
whatever CNAME you are using. You can test by doing a reverse lookup on
the domain you are using. It should resolve to the IP address of your
server.
--
-linux_lad
Bill H
Hi
Now this is interesting. We have our own server (co-located in a data
centre).
I have done a reverse DNS look up on our IP address. I thought I would get
123.456.789.012 giving www.example.com but I get
123-456-789-012.datacentre.com as the hostname.
So the hostname I keyed into the box when I put on Debian is not the true
hostname?
To confuse matters, we have four virtual sites on the box.
Any ideas?
Regards
John
It is often very difficult to determine what rules mail providers use to
classify spam.
> Now this is interesting. We have our own server (co-located in a data
> centre).
> I have done a reverse DNS look up on our IP address. I thought I would get
> 123.456.789.012 giving www.example.com but I get
> 123-456-789-012.datacentre.com as the hostname.
> So the hostname I keyed into the box when I put on Debian is not the true
> hostname?
What is the "true hostname"?
* The name you get when you invoke the "hostname" command on the box?
* Any of the domainnames with A (or AAAA) records which point to an IP
address of an interface of the box?
* Any of the Domain names pointed to by PTR records derived from the IP
addresses of the interfaces?
These are independent of each other. Good practice for any host on the
internet is to have a "canonical" name, which the host itself
recognizes, which resolves to one of its IP addresses and a PTR record
for that IP address which resolves to the same name. But since there
may be up to three different agencies responsible for configuring
these, getting them all to agree is often a bit of work.
hp
A message like that is fine for sending through your friendly neighborhood
SMTP relay host, but not good enough to pass through a spam filter.
Date header missing or incorrectly formatted.
Message-ID header missing.
Received header(s) missing or inconsistent.
Origination IP known to be an end user (cable modem, DSL, dial-up, etc).
Instead of going straight to the recipient's MX server, it is usually
better to go to your ISP's mail relay host. The relay will often
add missing headers and will provide a legitimate hostname+IP_address
for the TCP connection to the MX server.
-Joe