Hi,
I'm trying to use mail() in a PHP script residing on my FreeBSD server; only it appears I have problems with Sendmail. It's not an error in my script; I know this for sure from close inspection and testing, i.e. my variable is set to true. I've had Sendmail working previously and was accessing my messages from the terminal. And currently:
I don't see any reason why it should suddenly stop, maybe you could show me how to access mailbox /etc/mail/fred say and read messages for this user? I really lack experience.
Are the above the mailboxes on my system?
My PHP/Server configuration goes like:
/usr/local/etc/php.ini
As far as I know my user tables, hosts, and aliases are set up correctly. Here's a brief snapshot of my configuration:
/etc/mail/virtusertable
/etc/mail/local-host-names
/etc/mail/aliases
And it isn't a firewall issue as I've opened the ports Sendmail is currently configured to listen on.
Further investigation:
It would appear Sendmail is not running? I can't even start it:
And finally but not exhaustive:
So the daemon is set to run by default.
I've got root access to my VM but little experience and even littler support.
Other stuff I've tried:
The terminal returns:
I checked /var/log/maillog and I'm receiving lots of messages of this nature:
Then:
Help
I'm trying to use mail() in a PHP script residing on my FreeBSD server; only it appears I have problems with Sendmail. It's not an error in my script; I know this for sure from close inspection and testing, i.e. my variable is set to true. I've had Sendmail working previously and was accessing my messages from the terminal. And currently:
$ mail
Code:
Mail version 8.1 6/6/93. Type ? for help.
"/var/mail/1cookie": 2 messages 1 new
1 root@my.domain.or Sun Nov 4 05:07 30/1138 "Nvi saved the file vi.5668mU6CyE"
>N 2 root@my.domain.or Thu Dec 27 11:00 29/1115 "Nvi saved the file vi.5668mU6CyE"
I don't see any reason why it should suddenly stop, maybe you could show me how to access mailbox /etc/mail/fred say and read messages for this user? I really lack experience.
Code:
$ cd /var/mail
$ ls
1cookie ftp mysql root tqadmin www
Are the above the mailboxes on my system?
My PHP/Server configuration goes like:
$ which sendmail
Code:
/usr/sbin/sendmail
/usr/local/etc/php.ini
Code:
sendmail_path = /usr/sbin/sendmail
As far as I know my user tables, hosts, and aliases are set up correctly. Here's a brief snapshot of my configuration:
/etc/mail/virtusertable
Code:
admin@mydomain.org andy
/etc/mail/local-host-names
Code:
mydomain.org
localhost
admin.mydomain.org
/etc/mail/aliases
Code:
root: me
# NETWORK OPERATIONS MAILBOX NAMES
abuse: root
# noc: root
security: root
admin: root
And it isn't a firewall issue as I've opened the ports Sendmail is currently configured to listen on.
Further investigation:
$ service sendmail status
Code:
sendmail is not running.
sendmail_clientmqueue is running as pid 45547.
It would appear Sendmail is not running? I can't even start it:
Code:
# cd /etc/mail make start
# make start
Code:
Starting: sendmail554 5.3.5 /etc/mail/sendmail.cf: line 278: Unknown address family inet6 in Family=option
sendmail-clientmqueue.
And finally but not exhaustive:
# service sendmail rcvar
Code:
# sendmail
#
sendmail_enable="YES"
# (default: "")
# sendmail_clientmqueue
#
sendmail_enable="YES"
# (default: "")
sendmail_msp_queue_enable="YES"
# (default: "")
So the daemon is set to run by default.
I've got root access to my VM but little experience and even littler support.
Other stuff I've tried:
Code:
$ mail -v -s "Test email" [email]myemail@yahoo.com[/email]
[enter]
This is a test email [enter]
. [enter]
The terminal returns:
Code:
EOT
myemail@yahoo.com... Connecting to [127.0.0.1] via relay...
myemail@yahoo.com... Deferred: Connection refused by [127.0.0.1]
I checked /var/log/maillog and I'm receiving lots of messages of this nature:
Code:
Apr 21 05:57:56 web sm-msp-queue[49019]: r3GF9iZe033456: to=root, ctladdr=root (0/0), delay=4+18:48:12,
xdelay=00:00:00, mailer=relay, pri=28267819, relay=[127.0.0.1], dsn=4.0.0,
stat=Deferred: Connection refused by [127.0.0.1]
Then:
Code:
# cd /etc/mail
# make start
Starting: sendmail554 5.3.5 /etc/mail/sendmail.cf: line 278: Unknown address family inet6 in Family=option
sendmail-clientmqueue.
Help