[Mimedefang] Easy way to tell message is sent from local machine?
Jason Englander
jason at englanders.cc
Fri Jun 7 12:36:23 EDT 2002
On Fri, 7 Jun 2002, Nate Carlson wrote:
> Is there an easy way to tell if a message is being sent from the local
> machine out to someone else?
man mimedefang-filter:
$RelayAddr
The IP address of the sending relay (as a string consisting
of four dot-separated decimal numbers.) One potential use
of $RelayAddr is to limit mailing to certain lists to peo-
ple within your organization.
So if you "inside" IPs are 192.168.0.*, then you might want to do
something like this:
if ($RelayAddr =~ /^192\.168\.1\./ || $RelayAddr eq '127.0.0.1') {
# Take action on mail from the inside
}
If they all come through a firewall before hitting the mail server, then
any mail from that IP should be from the inside.
Mickey: This question might be a good one for the HOWTO's FAQ
--
Jason Englander
jason at englanders.cc
More information about the MIMEDefang
mailing list