ubuntu 10.04 + php + postfix

Posted by mononym on Server Fault See other posts from Server Fault or by mononym
Published on 2012-03-28T09:21:49Z Indexed on 2012/03/28 11:32 UTC
Read the original article Hit count: 248

Filed under:
|
|
|

I have a server I am running: Ubuntu 10.04 php 5.3.5 (fpm) Nginx

I have installed postfix, and set it to loopback-only (only need to send)

The problem is it is not sending.

if i issue (at command line):

 echo "testing local delivery" | mail -s "test email to localhost" [email protected]

I get the email no problem, but through PHP it does not arrive. When I send it via PHP, mail.log shows:

Mar 28 10:15:04 host postfix/pickup[32102]: 435EF580D7: uid=0 from=<root>
Mar 28 10:15:04 host postfix/cleanup[32229]: 435EF580D7: message-id=<20120328091504.435EF580D7@FQDN>
Mar 28 10:15:04 host postfix/qmgr[32103]: 435EF580D7: from=<root@FQDN>, size=1127, nrcpt=1 (queue active)
Mar 28 10:15:04 host postfix/local[32230]: 435EF580D7: to=<root@FQDN>, orig_to=<root>, relay=local, delay=3.1, delays=3/0.01/0/0.09, dsn=2.0.0, status=sent (delivered to maildir)
Mar 28 10:15:04 host postfix/qmgr[32103]: 435EF580D7: removed

any help appreciated, my main.cf file:

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = FQDN
alias_maps = hash:/etc/aliasesalias_database = hash:/etc/aliases
myorigin = /etc/mailname
#myorigin = $mydomain
mydestination = FQDN, localhost.FQDN, , localhost
relayhost = $mydomain
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = loopback-only
virtual_alias_maps = hash:/etc/postfix/virtual
home_mailbox = mail/

© Server Fault or respective owner

Related posts about ubuntu

Related posts about php