I don''t want that some php scripts send mail with www-data at
domain.tld
sender.
I wrote this ACL, but it don''t work (nothing append, mails was send):
It''s the firts one in the acl_check_mail:
deny
message = www-data can not send mail
senders = www-data at domain.tld
What''s wrong ?
Francois
Francois Sauterey <fs at snes.edu> wrote:> I don''t want that some php scripts send mail with www-data at domain.tld > sender. > I wrote this ACL, but it don''t work (nothing append, mails was send): > It''s the firts one in the acl_check_mail:> deny > message = www-data can not send mail > senders = www-data at domain.tld> What''s wrong ?[...] The mail acl is only executed for e-mail submitted by SMTP. The php scripts are probably using usr/sbin/sendmail instead. cu andreas -- `What a good friend you are to him, Dr. Maturin. His other friends are so grateful to you.'' `I sew his ears on from time to time, sure''
Le 20.06.2009 10:51, Andreas Metzler a ?crit :> Francois Sauterey <fs at snes.edu> wrote: >> I don''t want that some php scripts send mail with www-data at domain.tld >> sender. >> I wrote this ACL, but it don''t work (nothing append, mails was send): >> It''s the firts one in the acl_check_mail: > >> deny >> message = www-data can not send mail >> senders = www-data at domain.tld > >> What''s wrong ? > [...] > > The mail acl is only executed for e-mail submitted by SMTP. The php > scripts are probably using usr/sbin/sendmail instead. > cu andreasSo, if I understand correctly, I need to write an ac in the acl_not_smtp section. But there is not many samples on use it :-( senders seems to not be testable, now all mails are refused ! thanks for any help Francois
On Sat, 20 Jun 2009, Francois Sauterey wrote:>> The mail acl is only executed for e-mail submitted by SMTP. The php >> scripts are probably using usr/sbin/sendmail instead. >> cu andreas > > So, if I understand correctly, I need to write an ac in the > acl_not_smtp section. > But there is not many samples on use it :-( > senders seems to not be testable, now all mails are refused !Do you want to disable php scripts from sending mail, or just not have them send mail with www-data as sender address? What you can also do, is adjust the sendmail path in the php.ini config or in the apache config (e.g. in a vhost definition) : php_admin_value sendmail_path ''/usr/sbin/sendmail -t -i -f realaddress at domain'' Or, of course, if you don''t want it to send mail, tell it to use another program for sending mail, or disable the mail functions using the appropriate php configuration directives. Furthermore, you could use exim rewrite rules to translate www-data at hostname to realaddress at realdomein on the fly. HTH, Maarten
Francois Sauterey <fs at snes.edu> wrote:> Le 20.06.2009 10:51, Andreas Metzler a ?crit : >> Francois Sauterey <fs at snes.edu> wrote: >>> I don''t want that some php scripts send mail with www-data at domain.tld >>> sender. >>> I wrote this ACL, but it don''t work (nothing append, mails was send): >>> It''s the firts one in the acl_check_mail:>>> deny >>> message = www-data can not send mail >>> senders = www-data at domain.tld>>> What''s wrong ? >> [...]>> The mail acl is only executed for e-mail submitted by SMTP. The php >> scripts are probably using usr/sbin/sendmail instead. >> cu andreas> So, if I understand correctly, I need to write an ac in the > acl_not_smtp section. > But there is not many samples on use it :-( > senders seems to not be testable, now all mails are refused !senders is testable in non-smtp acls. http://docs.exim.org/current/spec_html/ch40.html#SECID190 Perhaps you are missing the final "accept" at the end of the acl? http://docs.exim.org/current/spec_html/index.html#toc0320 "For any defined ACL, the default action when control reaches the end of the ACL statements is ?deny?." cu andreas -- `What a good friend you are to him, Dr. Maturin. His other friends are so grateful to you.'' `I sew his ears on from time to time, sure''