block attachment per user
Alex Neuman van der Hans
alex at nkpanama.com
Mon Sep 3 22:02:29 IST 2007
infolistas listas wrote:
> Ok last one how can I allow all types of attachments to be send only
> on my domain?
>
Depends. If by "my domain" you mean "anybody who *says* they come from
whatever at mydomain.com" then anybody can send anything anywhere as long
as they fake the "from:" address. This is easily done with a ruleset
that says:
From: *@mydomain.com whateveractionyouwanthere
It's safer if you can filter on something people can fake less easily,
like an IP address. Even more so if you can match more than one. For
example, I have some clients set up as:
From: *@mydomain.com and From: 192.168. whateveractiontheyneed
From: *@mydomain.com and From: 127. samethinghere
So that it only matches "@mydomain.com" if it comes from "within" the
network (this applies to VPN connections from the outside as well). That
way anything that comes in through an unrestricted network (unless sent
using the secured webmail service) has different (ie: tighter) restrictions.
One thing that would be nice to have (but difficult IMHO since it's more
of an MTA thing) would be to be able to apply rulesets on messages
depending on whether or not they are authenticated users.
The only way I could see that happening would be to do something like this:
1. Messages from non-authenticated users (for example, messages from the
outside coming towards our domain) come in through one sendmail process
on port 25 and wind up on a queue in /var/spool/mqueue.in for processing
as usual
2. Messages from authenticated users enter through the same process on a
different queue (don't know how I would be able to do that) or a
different process listening on another port or IP address, and get
processed by a different copy of MailScanner or some sort of ruleset.
While I'm sure I could probably create some sort of Rube Goldberg
solution, it would be interesting to know what the enlightened minds
that frequent this list might think. I'm sure they could throw in a few
ideas...
> 2007/8/28, Julian Field <MailScanner at ecs.soton.ac.uk
> <mailto:MailScanner at ecs.soton.ac.uk> >:
>
>
>
> infolistas listas wrote:
> > Thanks julian worked perfectly, just following this rules
> managements
> > is there a way to block these attachments for these specific users
> > from sending mail to another domain that isnt mine, and allow
> them to
> > attach when sending mail to own domain?
> > EX:
> >
> > john may send mail to mydomain but he may not send to yahoo
> From: john at mydomain.com <mailto:john at mydomain.com> And To:
> mydomain.com <http://mydomain.com> -1
> From: john at mydomain.com <mailto:john at mydomain.com> 0
>
> >
> > maria may send mail to mydomain and to yahoo
> >
> > Is it possible?
> >
> >
> > 2007/8/27, Julian Field < MailScanner at ecs.soton.ac.uk
> <mailto:MailScanner at ecs.soton.ac.uk>
> > <mailto:MailScanner at ecs.soton.ac.uk
> <mailto:MailScanner at ecs.soton.ac.uk>>>:
> >
> > Just use a ruleset with the Maximum Attachment Size setting in
> > MailScanner.conf .
> >
> > Put this in MailScanner.conf:
> > Maximum Attachment Size = %rules-dir%/max.attach.size.rules
> >
> > and in /etc/MailScanner/rules/max.attach.size.rules put this:
> > from: john at yourdomain.com <mailto:john at yourdomain.com>
> <mailto:john at yourdomain.com <mailto:john at yourdomain.com>> -1
> > from: bob at yourdomain.com <mailto:bob at yourdomain.com>
> <mailto: bob at yourdomain.com <mailto:bob at yourdomain.com>> -1
> > from: joseph at yourdomain.com <mailto:joseph at yourdomain.com>
> <mailto:joseph at yourdomain.com <mailto:joseph at yourdomain.com> > -1
> > from: paul at yourdomain.com <mailto:paul at yourdomain.com>
> <mailto:paul at yourdomain.com <mailto:paul at yourdomain.com>> 0
> > from: patrick at yourdomain.com <mailto:patrick at yourdomain.com>
> <mailto:patrick at yourdomain.com <mailto:patrick at yourdomain.com>> 0
> > from: maria at yourdomain.com <mailto:maria at yourdomain.com>
> <mailto: maria at yourdomain.com <mailto:maria at yourdomain.com>> 0
> > fromorto: default -1
> >
> > Note the last line sets the default to -1 which is "no
> limit" for this
> > setting.
> >
> > Then "service MailScanner reload" or (if that command
> doesn't work)
> > "/etc/init.d/MailScanner reload".
> >
> > MailScanner rulesets are documented at length in the wiki and in
> > the Book.
> >
> >
> > infolistas listas wrote:
> > > Hi all is it possible to block some users from attaching
> files in
> > > mailscanner?
> > > EX: john, bob and joseph are allow to send attachments but
> paul,
> > > patrick and maria are not allowed.
> > > Thanks
> >
> > Jules
> >
> > --
> > Julian Field MEng CITP
> > www.MailScanner.info <http://www.MailScanner.info>
> <http://www.MailScanner.info>
> > Buy the MailScanner book at www.MailScanner.info/store
> <http://www.MailScanner.info/store>
> > <http://www.MailScanner.info/store>
> >
> > MailScanner customisation, or any advanced system
> administration help?
> > Contact me at Jules at Jules.FM <mailto:Jules at Jules.FM>
> <mailto:Jules at Jules.FM <mailto:Jules at Jules.FM>>
> >
> > PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415
> B654
> > For all your IT requirements visit www.transtec.co.uk
> <http://www.transtec.co.uk>
> > <http://www.transtec.co.uk>
> >
> >
> > --
> > This message has been scanned for viruses and
> > dangerous content by MailScanner, and is
> > believed to be clean.
> > For all your IT requirements visit www.transtec.co.uk
> <http://www.transtec.co.uk>
> > <http://www.transtec.co.uk>
> >
> > --
> > MailScanner mailing list
> > mailscanner at lists.mailscanner.info
> <mailto:mailscanner at lists.mailscanner.info>
> > <mailto:mailscanner at lists.mailscanner.info
> <mailto:mailscanner at lists.mailscanner.info>>
> > http://lists.mailscanner.info/mailman/listinfo/mailscanner
> >
> > Before posting, read http://wiki.mailscanner.info/posting
> > < http://wiki.mailscanner.info/posting>
> >
> > Support MailScanner development - buy the book off the website!
> >
> >
>
> Jules
>
> --
> Julian Field MEng CITP
> www.MailScanner.info <http://www.MailScanner.info>
> Buy the MailScanner book at www.MailScanner.info/store
> <http://www.MailScanner.info/store>
>
> MailScanner customisation, or any advanced system administration help?
> Contact me at Jules at Jules.FM <mailto:Jules at Jules.FM>
>
> PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
> For all your IT requirements visit www.transtec.co.uk
> <http://www.transtec.co.uk>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> For all your IT requirements visit www.transtec.co.uk
> <http://www.transtec.co.uk>
>
> --
> MailScanner mailing list
> mailscanner at lists.mailscanner.info
> <mailto:mailscanner at lists.mailscanner.info>
> http://lists.mailscanner.info/mailman/listinfo/mailscanner
> <http://lists.mailscanner.info/mailman/listinfo/mailscanner>
>
> Before posting, read http://wiki.mailscanner.info/posting
>
> Support MailScanner development - buy the book off the website!
>
>
More information about the MailScanner
mailing list