Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 22nd March 2007, 23:23
alexillsley alexillsley is offline
Senior Member
 
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 3 Times in 3 Posts
Default Disabling Mail

Hi,
I wanted to disable sending email for some users in php, I tried what you suggested adding:
Code:
php_admin_value disable_functions = 'mail()'
However this appears not to work, i had a look on php.net and found out that

Code:
disable_functions string 
This directive allows you to disable certain functions for security reasons. It takes on a comma-delimited list of function names. disable_functions is not affected by Safe Mode. 

This directive must be set in php.ini For example, you cannot set this in httpd.conf.
Is there way to set this in php.ini that all sites cant use this function accept about 5?

Thanks,
Alex
Reply With Quote
Sponsored Links
  #2  
Old 23rd March 2007, 18:23
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

Quote:
Originally Posted by alexillsley
Is there way to set this in php.ini that all sites cant use this function accept about 5?
Not that I know...
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 23rd March 2007, 18:27
alexillsley alexillsley is offline
Senior Member
 
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 3 Times in 3 Posts
Default

Ok thanks, Just wondering, is there anyway to stop mail being sent through my server for an email that doesnt exist on it.

e.g say i have account test@site.com on my server, can i make it so that only emails with a "from address" from test@site.com can be sent
Reply With Quote
  #4  
Old 24th March 2007, 14:56
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

Take a look at the smtpd_sender_restrictions parameter on http://www.postfix.org/postconf.5.html
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 24th March 2007, 20:04
alexillsley alexillsley is offline
Senior Member
 
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 3 Times in 3 Posts
Default

Would this work?
Code:
smtpd_reject_unlisted_sender yes
http://www.postfix.org/postconf.5.ht...nlisted_sender
Reply With Quote
  #6  
Old 25th March 2007, 15:36
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

It must be
Code:
smtpd_reject_unlisted_sender = yes
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 25th March 2007, 16:53
alexillsley alexillsley is offline
Senior Member
 
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 3 Times in 3 Posts
Default

and all i would do is add this to main.cf and it would make would make senders required to have a email account on my server?
Reply With Quote
  #8  
Old 26th March 2007, 16:58
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

Should work, although I haven't tried it in an ISPConfig setup.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 26th March 2007, 18:15
alexillsley alexillsley is offline
Senior Member
 
Join Date: Dec 2006
Posts: 396
Thanks: 27
Thanked 3 Times in 3 Posts
Default

Hi,
I added the line to main.cf and restarted postfix, however it doesnt seem to work, i made a script to send an email in php where the from mail was from an account that did not exists on my server however the mail was still deleiverd Any ideas whats wrong
Reply With Quote
  #10  
Old 27th March 2007, 16:33
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
 
Default

Have you tried to use a fake sender address in your email client rather than using a local script?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix & mail forwarding loop varnik Server Operation 21 9th December 2008 15:13
Postfix reject connections gabrix Server Operation 27 25th January 2007 08:37
postfix-tls sasl2 mysql courier-authmysql gabrix Server Operation 4 12th January 2007 22:09
Core 4: Error Messages on Fresh Install re CTX/SSL jjw Installation/Configuration 30 6th September 2006 12:16
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs ebbay Installation/Configuration 9 4th March 2006 11:47


All times are GMT +2. The time now is 20:39.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.