Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: dev

[Bug 838] Could perl be used for routers and ACLs.

 

 

exim dev RSS feed   Index | Next | Previous | View Threaded


reply-2009 at mgn

May 30, 2009, 10:35 AM

Post #1 of 3 (575 views)
Permalink
[Bug 838] Could perl be used for routers and ACLs.

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=838




--- Comment #2 from Martin Nicholas <reply-2009[at]mgn.org.uk> 2009-05-30 18:35:41 ---
I'm thinking of replacing the ACLs and router string with perl scripts and
hooks to the Exim library:

deny message = Restricted characters in address
domains = +local_domains
local_parts = ^[.] : ^.*[@%!/|]

In Perl:

my %local_domains = ('exim.org' => 1, 'bugs.exim.org' => 1);

sub acl_check_rcpt {
if ($Exim::local_part =~ m/^(\.|\.*[@%!/|])/o and
exists $local_domains{$Exim::domain}) {
Exim::acl_deny('Restricted characters in address'); return}
}

This example looks bulkier in Perl than exim ACL code, but add in some
conditional string expansions and ACLs can become horribly difficult to
understand and write, or is that just me? ;-)


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##


exim-users at lists

Jun 1, 2009, 1:52 AM

Post #2 of 3 (513 views)
Permalink
[Bug 838] Could perl be used for routers and ACLs. [In reply to]

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=838

Mike Cardwell <exim-users[at]lists.grepular.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |exim-
| |users[at]lists.grepular.com




--- Comment #3 from Mike Cardwell <exim-users[at]lists.grepular.com> 2009-06-01 09:52:03 ---
It's been a while since I touched the embedded perl stuff in Exim, but couldn't
you do something along the lines of:

acl_smtp_rcpt = ${perl{acl_smtp_rcpt}}

And then the perl subroutine acl_smtp_rcpt would return something like "accept"
or "deny" etc?

--
Mike Cardwell
IT Consultant .. http://cardwellit.com/


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##


reply-2009 at mgn

Jun 1, 2009, 3:51 AM

Post #3 of 3 (515 views)
Permalink
[Bug 838] Could perl be used for routers and ACLs. [In reply to]

------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=838




--- Comment #4 from Martin Nicholas <reply-2009[at]mgn.org.uk> 2009-06-01 11:51:20 ---
Not explaining myself too well here (not unusual that).

I'm on about (optionally) removing the ACL and router 'languages' alltogether,
replacing each ACL with a perl sub and the router list with a perl sub too.

If this could be complied on startup, in an Apache mod_perl type way, then it
would be pretty quick too!

Probably something for Exim 5/6/7..?


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##

exim dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.