LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   adding access.db manually on sendmail.cf (https://www.linuxquestions.org/questions/solaris-opensolaris-20/adding-access-db-manually-on-sendmail-cf-673602/)

dody1313 10-01-2008 02:53 PM

adding access.db manually on sendmail.cf
 
hi guys
i am having so much trouble adding access.db on sendmail.cf using m4...Does anybody know how to add it manually on sendmail.cf (editing the file)?
thnx a million

gilead 10-01-2008 07:57 PM

I've just done a grep for access in my sendmail.cf. Here are some of the entries:
Code:

# access_db acceptance class
C{Accept}OK RELAY

# possible values for TLS_connection in access map
C{Tls}VERIFY ENCR

# Access list database (for spam stomping)
Kaccess hash -T<TMPF> /etc/mail/access

###  D: LookUpDomain -- search for domain in access database
###
###    Parameters:
###            <$1> -- key (domain name)
###            <$2> -- default (what to return if not found in db)
###            <$3> -- mark (must be <(!|+) single-token>)
###                    ! does lookup only with tag
###                    + does lookup with and without tag
###            <$4> -- passthru (additional data passed unchanged through)
######################################################################

SD
R<$*> <$+> <$- $-> <$*>        $: < $(access $4:$1 $: ? $) > <$1> <$2> <$3 $4> <$5>
R<?> <$+> <$+> <+ $-> <$*>      $: < $(access $1 $: ? $) > <$1> <$2> <+ $3> <$4>
R<?> <[$+.$-]> <$+> <$- $-> <$*>        $@ $>D <[$1]> <$3> <$4 $5> <$6>
R<?> <[$+::$-]> <$+> <$- $-> <$*>      $: $>D <[$1]> <$3> <$4 $5> <$6>
R<?> <[$+:$-]> <$+> <$- $-> <$*>        $: $>D <[$1]> <$3> <$4 $5> <$6>
R<?> <$+.$+> <$+> <$- $-> <$*>  $@ $>D <$2> <$3> <$4 $5> <$6>
R<?> <$+> <$+> <$- $-> <$*>    $@ <$2> <$5>
R<$* <TMPF>> <$+> <$+> <$- $-> <$*>    $@ <<TMPF>> <$6>
R<$*> <$+> <$+> <$- $-> <$*>    $@ <$1> <$6>

######################################################################
###  A: LookUpAddress -- search for host address in access database
###
###    Parameters:
###            <$1> -- key (dot quadded host address)
###            <$2> -- default (what to return if not found in db)
###            <$3> -- mark (must be <(!|+) single-token>)
###                    ! does lookup only with tag
###                    + does lookup with and without tag
###            <$4> -- passthru (additional data passed through)
######################################################################

SA
R<$+> <$+> <$- $-> <$*>        $: < $(access $4:$1 $: ? $) > <$1> <$2> <$3 $4> <$5>
R<?> <$+> <$+> <+ $-> <$*>      $: < $(access $1 $: ? $) > <$1> <$2> <+ $3> <$4>
R<?> <$+::$-> <$+> <$- $-> <$*>        $@ $>A <$1> <$3> <$4 $5> <$6>
R<?> <$+:$-> <$+> <$- $-> <$*>          $@ $>A <$1> <$3> <$4 $5> <$6>
R<?> <$+.$-> <$+> <$- $-> <$*>          $@ $>A <$1> <$3> <$4 $5> <$6>
R<?> <$+> <$+> <$- $-> <$*>    $@ <$2> <$5>
R<$* <TMPF>> <$+> <$+> <$- $-> <$*>    $@ <<TMPF>> <$6>
R<$*> <$+> <$+> <$- $-> <$*>    $@ <$1> <$6>

SParseRecipient
R$*                            $: <?> $>CanonAddr $1
R<?> $* < @ $* . >              <?> $1 < @ $2 >                strip trailing dots
R<?> $- < @ $* >                $: <?> $(dequote $1 $) < @ $2 > dequote local part

# if no $=O character, no host in the user portion, we are done
R<?> $* $=O $* < @ $* >        $: <NO> $1 $2 $3 < @ $4>
R<?> $*                        $@ $1


R<NO> $* < @ $=R >              $: <RELAY> $1 < @ $2 >
R<NO> $* < @ $+ >              $: <$(access To:$2 $: NO $)> $1 < @ $2 >
R<NO> $* < @ $+ >              $: <$(access $2 $: NO $)> $1 < @ $2 >



R<RELAY> $* < @ $* >            $@ $>ParseRecipient $1
R<$+> $*                        $@ $2

There are others as well. Can you tell us what problems you were having using m4? I have the following in my sendmail.mc for the access db:
Code:

FEATURE(`access_db')dnl
I copy my sendmail.mc to sendmail-8.14.3/cf/cf and run sh ./Build sendmail.cf - that's all there is to it.

dody1313 10-02-2008 11:24 AM

Hi
well that is exacly my problem...i do not have the cf/ directory no where, also i 've looked for cf.m4 and cfhead.m4, but no where to be found on my server, so i copied a cf/ folder from another comp i have containing sendmail and i tried to run the m4 command but the configuration that came out of sendmail.cf is not the same, even tough i have copied the exact same configuration i had on the previous sendmail.cf file to the .mc file but when i restart sendmail, it doesn't work.

gilead 10-02-2008 12:01 PM

It sounds like you don't have the sendmail sources installed. Can you either copy over the files from the old box (after configuring it with the same settings as this one) or install the sendmail sources on this box?

dody1313 10-02-2008 02:01 PM

well i had that idea but it didn't work
:(


All times are GMT -5. The time now is 03:35 AM.