Alessandro Vesely wrote: > Mark Constable wrote: > >> On Tuesday 05 June 2007 16:37:09 Gordon Messmer wrote: >> >>>> a particular user is allowed to send email to only list of authorized >>>> mail address - say a list of 20 people , he should not be allowed to >>>> send mail to anybody besides the people on this list >>>> >>> No. In particular, it's pretty much impossible to reliably identify >>> persons sending mail. >>> >> # do DB lookup comparison here and set $errmsg to >> # anything other than "200 Ok" to deny sending, ie; >> # $errmsg = "500 Not allowed to send to this address". >> > > Keep in mind that the message may arrive from the user or > from an external relay who is delivering to your box. > You may want to match the authenticated name, if any. > (E.g. $authname = $_ if s/^i(.+)\s+$/$1/) >
Kamal wasn't very specific about what he wanted to limit, so it's unclear that this would work. If he's trying to prevent messages going out with "PR" in the From header (for instance), then filtering based on the authenticated sender may not be effective, because a sender could authenticate with a different user name. Likewise, a sender could write an email with "PR" in the From header, and use a different SMTP server, in which case nothing on Kamal's mail server can effectively stop what he wants to stop. The simple answer to questions like this is, "no, it's not possible", because it's not possible to deter someone who is determined to get around the limitation. Only in the most simple of circumstances can a filter be put in place. I didn't think it was worth describing one without a much better description of what the filter was required to do, and an acknowledgment that the filter will not be effective against anyone who is determined to get around it. It could only police a cooperative user. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ courier-users mailing list [email protected] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
