MXAV and MX1 howto avoid direct mails to MX1
Hello, I am using Sendmail version 8.12.10, config V10/Berkeley on a fedora
linux.
I have a machine A (DNS MXAV.mydomain.com) host an anti virus program
and a machine B (DNS MX1.mydomain.com) hosting my users
Several mails arrive directly on the IP of the machine B, and are therefore
relayed to local users... with Viruses.
Some domains on machine B have the MXAV activated, some not, so I cannot
have a general rule saying "reject any mail not from MXAV.
Is there a possibility with sendmail to make a rule :
if a mail arrives for "mydomain.com" and is not relayed by machine A, then
reroute trough machine A.
Thanks for any help or clues.
Sincerely
Olivier
Re: MXAV and MX1 howto avoid direct mails to MX1
In article <418a6cf4$0$32273$626a14ce [at] news.free.fr> "Olivier Maas"
<maas [at] varuna.com> writes:
>Hello, I am using Sendmail version 8.12.10, config V10/Berkeley on a fedora
>linux.
>I have a machine A (DNS MXAV.mydomain.com) host an anti virus program
>and a machine B (DNS MX1.mydomain.com) hosting my users
>
>Several mails arrive directly on the IP of the machine B, and are therefore
>relayed to local users... with Viruses.
>Some domains on machine B have the MXAV activated, some not, so I cannot
>have a general rule saying "reject any mail not from MXAV.
>
>Is there a possibility with sendmail to make a rule :
>if a mail arrives for "mydomain.com" and is not relayed by machine A, then
>reroute trough machine A.
Absolutely. Doing it is another thing.:-) Just off the top of my head,
not tested at all, but maybe enough as a clue - in the .mc:
LOCAL_CONFIG
C{Domains} mydomain.com
D{HostAddr}11.22.33.44
LOCAL_RULE_0
R$+ < [at] $+ > $: $&{client_addr} $| $1 < [at] $2 >
R$ [at] $| $+ < [at] $+ > $: $1 < [at] $2 > originated locally
R0 $| $+ < [at] $+ > $: $1 < [at] $2 > originated locally
R${HostAddr} $| $+ < [at] $+ > $: $1 < [at] $2 > received from A
R$+ $| $+ < [at] $={Domains} . > $#esmtp $ [at] [${HostAddr}] $: $2< [at] $3> reroute
R$+ $| $+ < [at] $+ > $: $1 < [at] $2 > allow other domains
--Per Hedeland
per [at] hedeland.org