Application Return Codes

Application Return Codes

Postby strobelight » Tue Feb 26, 2008 7:33 pm

Hello,

I have two questions:

1) I was wanting more information on the application return code checking. This question was asked perfectly in a previous post, but was never fully answered as the user seemed to have figured it out: viewtopic.php?f=6&t=83

Anyway, when calling an external application and it returns a value, the manual says it's compared against a range. Can you explain how the range works? I think I have an idea, but it seems to not be working.

2) When checking e-mail against a RBL for spam. . . Which address, specificially, does it check? My carrier blocks port 25, so I am using a mail-reflector to send my e-mail in on port 940. Therefore, all my mail is received from the same IP, while the server that sent the e-mail to the reflector (the potential SPAM source) is down in the header. Does the RBL content filter check the first "Received From" address in the header? Is there a way to have it check addresses further down in the header.

FYI - I've written an application to pull the address out of the e-mail header, check it against the RBL, and return a value. This is the reason for my question #1, but I'd rather not have to do this as it's sure to be a maintenance headache.

Thanks
Scott S.
strobelight
 
Posts: 2
Joined: Tue Feb 26, 2008 7:16 pm

Re: Application Return Codes

Postby rob » Fri Feb 29, 2008 12:40 pm

The return value range works by comparing the value returned by teh application (which is always an integer) to the numbers in the range. these numbers can be a single number such as 1, or a range. I believe the format is "3:8" - would evualate true if the number is either 3, 4, 5, 6, 7 or 8.

The RBL filter works by examining the actual clients IP (the IP that delivered the mail into SMTP). This means of course our RBL system won't work with a reflector system as there is currently no option to set it to use an IP within the mail its self. Of course an external application can parse and process the mail in anyway you want so this could be achievable that way but I cannot advise on any third party products that could do this.
rob
 
Posts: 415
Joined: Mon Sep 10, 2007 2:34 pm

Re: Application Return Codes

Postby strobelight » Fri Feb 29, 2008 3:39 pm

Thanks, Rob. . .

I initially had forgotten to stop filtering on a successful return code, so mail wasn't ending up where I expected. 16:* seems to work for anything 16 or greater.

To that affect, is anyone else using a mail reflector? I've written a pretty effective application for parsing out the sent-from SMTP IP addresses and checking them against black lists. It's custom written to pull out the 2nd address in the header, which works fine for my reflector, dnsexit.com. It won't work correctly for others, such as no-ip.com which puts the original recieved IP address as the 3rd IP in the header. Also, right now it's hard coded to check zen.spamhaus.org and dnsbl.sorbs.net. If there's interest, however, I could spend a little time to make it more customizable so others can successfully run a server behind a port 25 block.

Scott S
strobelight
 
Posts: 2
Joined: Tue Feb 26, 2008 7:16 pm


Return to General

Who is online

Users browsing this forum: No registered users and 27 guests

cron