[Ilugc] sendmail - Restrict emails to all domains except xyz.com

  • From: aravindaraj@xxxxxxxxx (aravindaraj d)
  • Date: Wed, 9 Nov 2011 12:04:25 +0530

On Tue, Nov 8, 2011 at 1:08 PM, aravindaraj d <aravindaraj at gmail.com> wrote:



On Mon, Nov 7, 2011 at 7:54 PM, Mohan Sundaram <mohan.tux at gmail.com>wrote:

On Mon, Nov 7, 2011 at 7:27 PM, aravindaraj d <aravindaraj at gmail.com>
wrote:
Hi All,

Im using centos with sendmail in it. It is a LAMP development server.
I need to restrict all outgoing emails and need to allow only to my
domain
xyz.com

Please let me know how to do this.

I have tried following entries in /etc/mail/access, but it doesn't work
as
I expect
To:xyz.com REJECT
server rejects email to my domain xyz.com whereas if I give
To:* REJECT
it doesn't work.


Just give "to: xyz.com RELAY". All other domains will get rejected and
xyz.com alone will get relayed.
-- Mohan Sundaram
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc



I tried the above and it doesn't work. This is my content of
/etc/mail/access

Connect:localhost.localdomain           RELAY
Connect:localhost                       RELAY
Connect:127.0.0.1                       RELAY
To:xyz.com                       RELAY

Also, please note that both the LAMP application and sendmail is running
on the same box.

Anyone please guide me..


Thanks in advance.

Regards,
Aravind


Im still unable to find solution for this. Can someone help?

Regards,

Other related posts: