Net::SMTP and Postfix mai considered spam by googlemail

Discussion in 'Perl Misc' started by John, Jul 5, 2008.

  1. John

    John Guest

    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
    John, Jul 5, 2008
    #1
    1. Advertising

  2. John

    John Guest

    "-linux_lad" <> wrote in message
    news:...
    > John wrote:
    >> 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");

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


    Hi
    I replaced the true adress with example.com
    My guess the problem is in the header but I cannot see it.
    Regards
    John
    John, Jul 5, 2008
    #2
    1. Advertising

  3. John

    Bill H Guest

    On Jul 5, 3:44 pm, "John" <> wrote:
    > "-linux_lad" <> wrote in message
    >
    > news:...
    >
    >
    >
    >
    >
    > > John wrote:
    > >> 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");

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

    >
    > 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.
    Bill H, Jul 5, 2008
    #3
  4. John

    John Guest

    "Bill H" <> wrote in message
    news:...
    On Jul 5, 3:44 pm, "John" <> wrote:
    > "-linux_lad" <> wrote in message
    >
    > news:...
    >
    >
    >
    >
    >
    > > John wrote:
    > >> 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");

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

    >
    > 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
    John, Jul 6, 2008
    #4
  5. On 2008-07-06 15:17, John <> wrote:
    > 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
    Peter J. Holzer, Jul 6, 2008
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rene Pijlman
    Replies:
    22
    Views:
    700
    Fredrik Lundh
    Dec 10, 2003
  2. Sergio Correia
    Replies:
    7
    Views:
    277
    Ben Finney
    Sep 18, 2007
  3. Replies:
    3
    Views:
    443
  4. ssssssss

    , Apr 17, 2009, in forum: Java
    Replies:
    0
    Views:
    306
  5. clamz
    Replies:
    8
    Views:
    794
    clamz
    Jul 16, 2011
Loading...

Share This Page