OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: sender restrictions

From: Cengiz Vural (vuralcvural.net)
Date: Wed Dec 03 2008 - 09:22:51 CST


On Tue, Dec 2, 2008 at 2:18 PM, Victor Duchovni <
Victor.Duchovnimorganstanley.com> wrote:

> On Tue, Dec 02, 2008 at 02:05:20PM -0600, Cengiz Vural wrote:
>
> > hello all,
> >
> > I am trying to place some restrictions on a local user account. I would
> like
> > to redirect any emails sent from a specific user to another local user
> > regardless of what email address the user enters in the recipient list.Is
> it
> > possible to do this with postfix?
> >
> > In summary, whenever userlocalhost sends an email, I want that email to
> be
> > delivered to user2localhost only.
>
> Is the mail submitted via SMTP or via sendmail(1)? If the former, you
> can use "REDIRECT" (see access(5)) via "check_sender_access type:table"
> in smtpd_sender_restrictions. If the latter, your best bet is to
> content_filter local mail to a local SMTP re-injection port, but this
> significantly raises the disk I/O cost of local mail submission.
>
> --
> Viktor.
>
> Disclaimer: off-list followups get on-list replies or get ignored.
> Please do not ignore the "Reply-To" header.
>
> To unsubscribe from the postfix-users list, visit
> http://www.postfix.org/lists.html or click the link below:
> <mailto:majordomopostfix.org?body=unsubscribe%20postfix-users>
>
> If my response solves your problem, the best way to thank me is to not
> send an "it worked, thanks" follow-up. If you must respond, please put
> "It worked, thanks" in the "Subject" so I can delete these quickly.
>

Thanks for the quick answer, Viktor. I added the lines below to my main.cffile.

smtpd_sender_restrictions =
    check_sender_access regexp:/etc/postfix/tables/access

and

created /etc/postfix/tables/access

userlocalhost REDIRECT user2localhost

Ran postmap /etc/postfix/tables/access and reloaded postfix but it ignores
all these. What am I doing wrong?

-Cengiz

--
Cengiz Vural <vuralcvural.net>
Fax. (641) 795-4388
Phone. (512) 524-7215