ispCP - Board - Support
mail from www-data? - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: System Setup & Installation (/forum-32.html)
+--- Thread: mail from www-data? (/thread-1720.html)

Pages: 1 2 3 4


mail from www-data? - achioo - 11-05-2007 02:22 PM

Ok I've tried adding php_admin_value sendmail_from user@domain.com but all email from php is still being sent as www-data@nonexistent.local any thoughts?


RE: mail from www-data? - achioo - 11-05-2007 02:34 PM

I've also tried editing the sendmail_path -f parameter to no avail. phpinfo() lists the path as /usr/sbin/sendmail -t -i... any thoughts?


RE: mail from www-data? - joximu - 11-05-2007 06:07 PM

Are you running php-fastcgi/suexec or mod_php?


RE: mail from www-data? - achioo - 11-05-2007 09:37 PM

I think I've tried both...


RE: mail from www-data? - joximu - 11-05-2007 10:46 PM

If fastcgi-php-suexec then the settings are in /var/www/fcgi/<domain>/php5(or 4?)/php.ini

if mod_php then you can add a php_admin_value in the apache config...

BUT: sendmail_from is only used in php/windows... (see php docu).

I think we have to change something in postfix so that outgoing mails are valid.

/J


RE: mail from www-data? - rbtux - 11-05-2007 10:57 PM

output of postconf -n would be nice, and additionally the according part from the maillog


RE: mail from www-data? - achioo - 11-06-2007 01:05 AM

joximu,

I've actually tried editing that php.ini and set it so that the path is /usr/sbin/sendmail -t -i -f email@address.com (which should work with unix) but it still doesn't Sad it's kinda disappointing...


rbtux,

I'll get it as soon as I can...


RE: mail from www-data? - achioo - 11-06-2007 01:08 AM

Correction... it's not running as fcgid... it's using the standard /etc/php5/apache2/php.ini so my guess is that it's mod_php but it still won't pull from php_admin_value (to include the previously mentioned path edit)


RE: mail from www-data? - achioo - 11-06-2007 03:55 AM

rbtux

Code:
postconf -n

alias_database = hash:/etc/aliases
append_at_myorigin = yes
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
inet_interfaces = all
local_destination_recipient_limit = 1
local_recipient_maps = unix:passwd.byname $alias_database
local_transport = local
mail_spool_directory = /var/mail
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = $myhostname, $mydomain
mydomain = some.domain.local
myhostname = some.domain
mynetworks_style = host
myorigin = $mydomain
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks,                               permit_sasl_authenticated,                               reject_unauth_destination                               check_policy_service inet:127.0.0.1:60000
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = permit_mynetworks,                               permit_sasl_authenticated,                               reject_unauth_destination
transport_maps = hash:/etc/postfix/ispcp/transport
virtual_alias_maps = hash:/etc/postfix/ispcp/aliases
virtual_gid_maps = static:8
virtual_mailbox_base = /var/mail/virtual
virtual_mailbox_domains = hash:/etc/postfix/ispcp/domains
virtual_mailbox_limit = 0
virtual_mailbox_maps = hash:/etc/postfix/ispcp/mailboxes
virtual_minimum_uid = 1001
virtual_transport = virtual
virtual_uid_maps = static:1001

Code:
mail.log

Nov  5 06:36:05 ftp postfix/qmgr[9624]: 20D5D8383AE: from=<www-data@some.domain.local>, size=2044, nrcpt=1 (queue active)
Nov  5 06:36:05 ftp postfix/qmgr[9624]: 2B74683836F: from=<www-data@some.domain.local>, size=2046, nrcpt=1 (queue active)
Nov  5 06:36:05 ftp postfix/qmgr[9624]: 2408083837F: from=<www-data@some.domain.local>, size=2023, nrcpt=1 (queue active)
Nov  5 06:36:05 ftp postfix/qmgr[9624]: 288558383FA: from=<www-data@some.domain.local>, size=2107, nrcpt=1 (queue active)
Nov  5 06:36:05 ftp postfix/qmgr[9624]: 5616B8383C6: from=<www-data@some.domain.local>, size=2057, nrcpt=1 (queue active)
Nov  5 06:36:05 ftp postfix/qmgr[9624]: 6DF1983845C: from=<www-data@some.domain.local>, size=1623, nrcpt=1 (queue active)
Nov  5 06:36:05 ftp postfix/qmgr[9624]: D5576838427: from=<www-data@some.domain.local>, size=1621, nrcpt=1 (queue active)
Nov  5 06:36:05 ftp postfix/qmgr[9624]: D19E28383A5: from=<www-data@some.domain.local>, size=2040, nrcpt=1 (queue active)
Nov  5 06:36:05 ftp postfix/qmgr[9624]: DB0138383F8: from=<www-data@some.domain.local>, size=2074, nrcpt=1 (queue active)
Nov  5 06:36:05 ftp postfix/qmgr[9624]: 4B86683847C: from=<www-data@some.domain.local>, size=1603, nrcpt=1 (queue active)
Nov  5 06:36:05 ftp postfix/qmgr[9624]: 458A68383EC: from=<www-data@some.domain.local>, size=2087, nrcpt=1 (queue active)
Nov  5 06:36:05 ftp postfix/qmgr[9624]: 3FCDA83832E: from=<www-data@some.domain.local>, size=2101, nrcpt=1 (queue active)
Nov  5 06:36:05 ftp postfix/qmgr[9624]: 9CA6F838335: from=<www-data@some.domain.local>, size=2041, nrcpt=1 (queue active)
Nov  5 06:36:06 ftp postfix/qmgr[9624]: 80E83838495: from=<www-data@some.domain.local>, size=1619, nrcpt=1 (queue active)



RE: mail from www-data? - Schlummi - 11-06-2007 06:27 AM

On my system, I had to change the following after installation:
/etc/postfix/main.cf

Line mydomain = <my domain>.local
to
Line mydomain = <my domain>

After that mailing seems to work.