I have followed along with the tutorial to setup postfix, but I have run into one problem. When trying to send mail from PHP, it will fail. To be more specific, the mail function returns true (success), but the postfix log shows the error "postfix/postdrop[21229]: warning: unable to look up public/pickup: No such file or directory.
If anyone could help me find the root of this, or find some way to verify where it is looking for public/pickup would be greatly appreciated.
I'm using the standard mail() function. It will give the same error in the logs when setting the from address in the headers string, as well as when there are no headers set.
When running postfix check, I get the following message "postfix/postfix-script: warning: not owned by root: /etc/postfix/maildroprc" I believe this would have something to do with the changes I made based on your "Setting up maildrop" documentation.
Also, this problem has been occurring before I followed the instructions in the latest documentation.
I've been googling a bit and what I found on the error is that it's not related to PHP but to Postfix not being properly configured. Where you able to send and receive email with your setup using a normal mail client ?
By the way, you're quick on the maildrop stuff, the maildroprc should be in /etc and not in /etc/postfix. Sorry about that. I changed the doc.
Yes, it has been working sending/receiving from my mail client. I did Google this a while back when I had some time, but didn't really find any solutions. About all I was able to do was create public/pickup folders with permissions of 777 (none of which seemed to have work from what I recall). I was hoping maybe it wasn't seeing the file because it didn't have permissions to get to that directory, but no luck.
Thanks for the update on the maildrop stuff, it worked out perfect!
Several remarks:
- I guess you are sure postfix is running!
- can you do a 'sudo postfix set-permissions' and check again
- can you post the output of the 'postconf -n' command
I ran 'sudo postfix set-permissions' and didn't receive any errors after the command, but I still receive the public/pickup error. When running 'postconf -n' I receive the following:
Ok, I think I have figured out the problem. It looks as though postdrop was using the wrong configuration files. I had originally tried to build postfix prior to reading your articles, and apparently postdrop was using the original directory that was built. I have tried to rebuild based on your instructions, but it doesn't seem to affect where postdrop is looking.
I think for the time being it will work. I simply symlinked that directory to the one it should be using. I think at some point I will need to do some cleanup and start the process over again instead of trying to patch it up as I've done. Thanks for all the help though, and great job on the article!
So, every few days I get a chunk of about 20 of these at a time from different source IPs to different non-existant end-users. My guess is that this is from Postfix, telling me that it got a bounce when it got errors from the bounce message it sent.
My concern here is security, of course. I have tested to make sure I'm not configured as an open relay, but I want to make sure this is not telling me something I should be acting upon.
Return-Path: <double-bounce@mail.whiterose.org>
X-Original-To: postmaster
Delivered-To: postmaster@whiterose.org
Received: by mail.whiterose.org (Postfix)
id F2DA2696D6; Fri, 1 Dec 2006 08:26:53 -0500 (EST)
Date: Fri, 1 Dec 2006 08:26:53 -0500 (EST)
From: MAILER-DAEMON@mail.whiterose.org (Mail Delivery System)
To: postmaster@whiterose.org (Postmaster)
Subject: Postfix SMTP server: errors from unknown[210.177.84.15]
Message-Id: <20061201132653.F2DA2696D6@mail.whiterose.org>
Do you mean you receive emails from your local postfix server with these error messages?
I guess someone else is sending spam to these fake addresses.
By the way I've looked at your server and tested it with abuse.net tools (might explain the strange lines in your logfile) and you are absolutely not an open relay !!! X-D
#
If anyone could help me find the root of this, or find some way to verify where it is looking for public/pickup would be greatly appreciated.
#
And could you run the command 'postfix check' to see if anything is wrong. The file /directory should be there if postfix is installed correctly.
I'm assuming that you've installed postfix using our setup.
#
When running postfix check, I get the following message "postfix/postfix-script: warning: not owned by root: /etc/postfix/maildroprc" I believe this would have something to do with the changes I made based on your "Setting up maildrop" documentation.
Also, this problem has been occurring before I followed the instructions in the latest documentation.
#
By the way, you're quick on the maildrop stuff, the maildroprc should be in /etc and not in /etc/postfix. Sorry about that. I changed the doc.
#
Thanks for the update on the maildrop stuff, it worked out perfect!
#
- I guess you are sure postfix is running!
- can you do a 'sudo postfix set-permissions' and check again
- can you post the output of the 'postconf -n' command
#
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
mail_owner = postfix
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mydomain = nitrogenweb.com
myhostname = mac.nitrogenweb.com
newaliases_path = /usr/bin/newaliases
queue_directory = /private/var/spool/postfix
readme_directory = /usr/share/doc/postfix
sample_directory = /usr/share/doc/postfix/examples
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_helo_required = yes
smtpd_recipient_restrictions = reject_unauth_pipelining, reject_non_fqdn_recipient, reject_unknown_recipient_domain, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, warn_if_reject, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_invalid_hostname, reject_rbl_client list.dsbl.org, reject_rbl_client sbl-xbl.spamhaus.org, check_client_access regexp:/etc/postfix/dspam_filter_access
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
unknown_local_recipient_reject_code = 550
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:27
virtual_mailbox_base = /usr/local/virtual/
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 102
virtual_transport = maildrop
virtual_uid_maps = static:102
Also, in regards to one of your earlier posts, my sendmail_path setting is 'sendmail -t -i'
#
#
#
#
My concern here is security, of course. I have tested to make sure I'm not configured as an open relay, but I want to make sure this is not telling me something I should be acting upon.
#
I guess someone else is sending spam to these fake addresses.
By the way I've looked at your server and tested it with abuse.net tools (might explain the strange lines in your logfile) and you are absolutely not an open relay !!! X-D