[Mimedefang] MIMEDefang Notification

Jon Rowlan jon.rowlan at sads.com
Tue Dec 9 14:06:54 EST 2014


Hi all,

In a post back in 2011 Larry Starr referred to using 

md_check_against_smtp_server

to verify email addresses ahead.

http://lists.roaringpenguin.com/pipermail/mimedefang/2005-March/026240.h
tml

in this he has this line:

if( $relaydomains{$domain} =~ /^smtp:\[(.+)\]/){

This reads a the value of a hash, it essentially takes the square
bracketed mailertable entry to interpret the server to contact to check
for a valid user.

This works fine for 1 destination server but in some environments there
may be a number of servers available to authenticate against, an MS
Exchange network for example may have multiple Hub Transport servers.

I wanted to extend this to include multiple MX which are defined thus:

Domain.com      esmtp:[9.9.9.9]:[8.8.8.8]

And I thought that I had correctly figured the regex required would be:

/^smtp:\[(.+)/)

By taking out the escaped close square bracket then the match should be
for a string that begins

Smtp:[

With an undetermined number of any characters on the end.

Then the plan was to split based upon the colon character.

I have been unable to get this to work and trying to use DB_File in the
way I would normally treat hash tables and disk files keeps telling me
that my code is not blessed .... which I wold have thought is something
that I would hear about in church!

Has anyone managed to extend this excellent logic, which works perfectly
for single MX, to allow for multiple MX ?

Many thanks all,

jON



More information about the MIMEDefang mailing list