Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Perl SMTP question

  • 03-08-2005 8:19pm
    #1
    Registered Users, Registered Users 2 Posts: 95 ✭✭


    Hey everyone..

    I've a quick question I wanted to run by ya coz its wreckin my head and from what I can see it defies logic..

    I've got a perl script that connects to a server and sends mail via SMTP..
    The SMTP server is part of MS IIS server

    When I run the script on the same machine as the SMTP server it connects and sends the mail fine, just like it should.
    When I run the script from another host on the same subnet it dies and says words to the effect of "Could not connect to server".

    Fine I say and decide that its a port thats blocked or an IP address thats not allowed on the server side rules somewhere.

    Just to be sure I telnet to the SMTP server from the same host as where the script didnt work..
    <snip>
    telnet xxx.xxx.xxx.xxx 25
    it connects and says hello back to me
    EHLO mydomain.com
    OK
    MAIL From: username@mydomain.com
    OK
    RCPT To: username@mydomain.com
    OK
    DATA
    this is a test
    .
    OK
    </snip>
    Everything works and the mail sends Fine..

    Is there somethin I might be missing? The fact that it works from localhost suggests the perl code side of things is fine, the fact that SMTP works via telnet from a remote machine suggests that there arent any rules disallowing it.. Im baffled..

    I've googled for bugs with MIME::Lite and NET::SMTP (the modules Im using) and nothing really helps. I've also upgraded perl from 5.6.something to 5.8.3... (ActiveState btw)

    Any help would be souper! And if you're baffled too let me know and maybe I wont feel like such an eejit!

    Thanks in advance for any help!


Comments

  • Registered Users, Registered Users 2 Posts: 6,571 ✭✭✭daymobrew


    Have you turned on debugging on the Net::SMTP module?
    When I was using it, debug mode displayed a good bit of info.
    my $smtp = Net::SMTP->new('server_name', Debug   => 1 );
    


  • Registered Users, Registered Users 2 Posts: 83 ✭✭fatlog


    just a guess. but could it be to do with mail relaying. some servers do not allow mail to be sent from other machines(domains). it prevents spammers using mail servers.
    if it is a relaying catch, i think it canbe turned on/off on most servers.


  • Registered Users, Registered Users 2 Posts: 95 ✭✭fractal


    ok im officially an idiot..

    McAfee was running on the client machine and was configured to stop "bulk mail senders" which apprently doesnt block telnet outgoing on port 25 but does block pretty much everything else (which is what had me confused)

    Thanks for you help as always!


Advertisement