This arose out of my desire to have a unified flat file of domains that
postfix and assp could share for local domains (relays), valid domains
(address validation) and postfix local domains. Essentially what it does is
if LocalAddresses_Flat_Domains == 1 (set it via admin interface or config
file) it will treat all entries explicitly as domains so that rather than
needing @domain.com, it's domain.com. Normally, not prepending an '@'
will treat it as a user address. Since postfix works with domain per line,
as does assp's relay checking (localDomains), this will allow one file to
satisfy postfix and assp's relay/address check for each domain in the file.

-cl

--- assp.pl.orig        2008-06-03 05:16:50.701230566 +0000
+++ assp.pl     2008-06-03 05:17:29.168329243 +0000
@@ -411,6 +411,8 @@
 [LocalAddresses_Flat,'Lookup valid Local Addresses from 
here*',80,textinput,'','(.*)',ConfigMakeRe,
   'These email addresses are the list of your local addresses. You can list 
specific addresses ([EMAIL PROTECTED]), addresses at any local domain (user), 
or entire local domains (@mydomain.com). Separate entries with pipes (|).<br />
   For example: [EMAIL PROTECTED]|jhanna|@sillyguys.org or place them in a 
plain ASCII file one address per line:file:/etc/assp/localuser.txt.','Basic'],
+[LocalAddresses_Flat_Domains,'Local Addresses are explicit domain 
names',0,checkbox,0,'([01]?)',undef,
+  'Implies @mydomain.com for each domain specified (either separate by \'|\' 
or place them in a plain ASCII file one domain per 
line:file/etc/assp/domains.txt).','Basic'],
 [LocalAddressesValid,'Accept Remote Sender with  Valid Local Addresses 
',0,checkbox,0,'([01]?)',undef,
   'Consider Remote Sender with Valid Local Addresses as NOT spoofed. This will 
not allow relaying, but will skip delaying. Bayesian will not block but mark 
only.'],
 [CatchAll,'Send Invalid Recipients To This 
Address*',40,textinput,'','(.*)',configUpdateCA,
@@ -8073,7 +8075,7 @@
   foreach $a (split(/\|/,$_[0])) {
    if($a=~/[EMAIL PROTECTED]/) {
     push(@uad,$a);
-   } elsif( $a=~/^\@/ ) {
+   } elsif( $a=~/^\@/ || $LocalAddresses_Flat_Domains) {
     push(@d,$a);
    } else {
     push(@u,$a);



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Assp-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/assp-user

Reply via email to