Click to See Complete Forum and Search --> : disable outbound sendmail for specific To recipients
walidaly
December 17th, 2007, 02:58 AM
on my devel machine I have backups for forums and other scripts that has the same database on my live server, if a cron job is executed and it involves sending mail then users get confusing mail from a domain they don't know! I use sendmail only to send outgoing mail, and I can't disable it on the devel machine as I need to test send mail functionality.
What I need to do is disable messages sent with "To:" recipients that is not on list ex: (not) *@example.com, root@email...
KrisSimonis
December 17th, 2007, 05:21 AM
Why not just set your Exchange Relay to block and log all messages coming from your Develop machine? Then you can test it by reading the logfiles and nobody gets bothered.
walidaly
December 17th, 2007, 05:49 AM
can you explain how can I do that with sendmail?
do you mean /var/log/maillog ?
KrisSimonis
December 17th, 2007, 07:07 AM
The mail your application sends is sent to an Exchange server, or a similar aplication. Simply configure your mailserver to block all mail being sent from your develop server ( by DNS name or IP ) and log all sent messages.
This way, when your application sends mail from your develop server, it will not be actually sent to all people across the net.
walidaly
December 17th, 2007, 07:15 AM
The mail your application sends is sent to an Exchange server
I'm afraid this is not true...
sendmail contacts the recipient's email server (yahoo, google,hotmail...) directly, I don't need exchange server, even DNS is resolved by named on same machine.
PeejAvery
December 17th, 2007, 07:40 AM
You have written this in the server-side scripting forum...is this a script you wrote? So that we can help you better, can you tell us how does it tie in to server-side scripting?
Through sendmail itself, no blocking can be done on the outgoing side.
I'm afraid this is not true...
We know that is probably not the case, it is what KrisSimonis was suggesting you do.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.