On 8/15/07, m. allan noah <[EMAIL PROTECTED]> wrote:
> simple enough to write a plugin that returns OK in hook_mail and
> hook_rcpt whenever the sender is valid. how do you know that? do you
> have a list?
>
> allan

and in fact- attached is just such a plugin. this is a slightly
modified version of regex_mailfrom, part of my qplocal suite. i have
added code to let you 'OKALL' an incoming mailfrom address via a
regex. this allows you to only accept mail from remote users who's
machines have not been updated yet.

the config/regex_mailfrom lines consist of:

STATUS REGEX COMMENT

a sample could look like:

OKALL [EMAIL PROTECTED] Trusting remote user
DENY [EMAIL PROTECTED] Get in the office!
OK \.(com|net|org|edu|info|us|gov)$ Accepting mail
DENY . We dont accept foreign email

this will allow 'remote.user' to relay mail (since the plugin returns
OK in hook_rcpt for 'OKALL' status), while blocking a local user from
relaying (so you better have an ip-based plugin before this one)

and, just to demonstrate, we allow mail from 'USA' type domains, but
not others. not exactly recommended.

see www.thebility.com/qplocal/ for more such code.

HTH-

allan

>
> On 8/15/07, JT Moree <[EMAIL PROTECTED]> wrote:
> > > You mean SMTP RCPT, do you, not a plugin?
> >
> > the config/plugins file has a rcpt_to listed and that is the one that is
> > denying the relaying.
> >
> > >> rcpt_to would return DENY if the mail was going to an outside domain.
> > >> It looks as though rcpt_to was doing it's job because normally we don't
> > >> want to relay for just anybody but we are trying to use the
> > >> whitelist_soft plugin to allow relaying for those offsite users.
> > >
> > > Using IP address? You want to use the 'relayclients' config for that.
> > > (You've got the right idea, just picked the wrong tool - relayclients
> > > is basically a special-purpose whitelisting facility for relaying.)
> >
> > No, NOT by IP address.  By sender.  Until I can get authenticated
> > relaying setup for everyone (there are people in the field which won't
> > be back here for months) I need to continue the same methods that are
> > currently being used to allow them to send.
> >
> > That is: offsite users are whitelisted by sender.  Yes I know it's not a
> > good way to do it, but I inherited it and am working as fast as I can to
> > improve the systems.
> >
> > --
> > JT Moree
> >
>
>
> --
> "The truth is an offense, but not a sin"
>


-- 
"The truth is an offense, but not a sin"

Attachment: regex_mailfrom
Description: Binary data

Reply via email to