Net::SMTP and Postfix mai considered spam by googlemail


J

John

Hi

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
 
Ad

Advertisements

J

John

-linux_lad said:
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.

Hi
I replaced the true adress with example.com
My guess the problem is in the header but I cannot see it.
Regards
John
 
B

Bill H

Hi
I replaced the true adress with example.com
My guess the problem is in the header but I cannot see it.
Regards
John- Hide quoted text -

- Show quoted text -

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.
 
J

John

Hi
I replaced the true adress with example.com
My guess the problem is in the header but I cannot see it.
Regards
John- Hide quoted text -

- Show quoted text -

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

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
 
Ad

Advertisements

P

Peter J. Holzer

PS - I could be totally wrong here - this has just been my experience.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Net::SMTP 0
Perl and SMTP mail problems 1
Net::SMTP 0
Problem with SMPT mail 4
Net::SMTP 0
Net::SMTP error: Can't locate Mail/Sender.pm in @INC 6
net::smtp 2
Net::SMTP and orcpt 1

Top