When working with Postfix mail servers, encountering the error postdrop: warning: unable to look up public/pickup: No such file or directory
typically indicates a fundamental misconfiguration in your Postfix installation. This error occurs when the Postfix mail system cannot locate its central mail queue directory, preventing both incoming and outgoing mail processing.
First, let's verify your Postfix installation status. The contradictory messages you're seeing during start/stop attempts suggest either:
# Check if Postfix is actually running
ps aux | grep postfix
# Verify the master process
systemctl status postfix
The "not running" message during stop attempts might indicate a partially started service or permission issues.
The most common root causes for this specific error include:
- Incorrect queue_directory setting in main.cf
- Missing or inaccessible Postfix spool directory
- Permission issues on critical directories
Check your configuration with:
# View current Postfix configuration
postconf queue_directory
# Expected output should show something like:
# queue_directory = /var/spool/postfix
Here's how to fix this systematically:
1. Verify Directory Structure
# Check if the spool directory exists
ls -ld /var/spool/postfix
# If missing, create it with proper permissions
mkdir -p /var/spool/postfix
chown root:postfix /var/spool/postfix
chmod 755 /var/spool/postfix
2. Create Required Subdirectories
mkdir -p /var/spool/postfix/public
chown postfix:postfix /var/spool/postfix/public
chmod 710 /var/spool/postfix/public
3. Validate Configuration
# Rebuild Postfix directory structure
postfix check
postfix set-permissions
4. Restart Services
# Full service restart
systemctl stop postfix
systemctl start postfix
If issues persist, consider these additional checks:
# Check SELinux context if applicable
ls -Z /var/spool/postfix
# Review mail logs in real-time
tail -f /var/log/maillog
For Bugzilla specifically, after fixing Postfix, verify the email functionality with:
# Test email from Bugzilla environment
/usr/bin/env perl -MBugzilla -e 'Bugzilla->install_string("testing_email")'
Ensure your Bugzilla/Config.pm
contains proper mail settings matching your Postfix configuration.
When attempting to send emails using the mail
command with Postfix, you might encounter the following error:
postdrop: warning: unable to look up public/pickup: No such file or directory
Additionally, you may notice confusing behavior when trying to start or stop Postfix:
[root@ars etc]# postfix start
postfix/postfix-script: starting the Postfix mail system
[root@ars etc]# postfix stop
postfix/postfix-script: fatal: the Postfix mail system is not running
This typically occurs when Postfix's mail queue directory structure isn't properly initialized or when there are permission issues. The public/pickup
service is crucial for local mail submission.
First, check if Postfix is actually running:
systemctl status postfix
# Or for older systems:
service postfix status
The error suggests missing queue directories. Verify the queue structure:
ls -l /var/spool/postfix/public
ls -l /var/spool/postfix/private
If these directories are missing, you'll need to recreate them.
Here's how to properly initialize the queue structure:
postfix stop
rm -rf /var/spool/postfix/*
postfix set-permissions
postfix start
Verify your main Postfix configuration file:
postconf -n
Look for these critical settings:
queue_directory = /var/spool/postfix
mail_owner = postfix
setgid_group = postdrop
Permission problems are common causes. Run these commands:
chown -R postfix:postfix /var/spool/postfix
chmod -R 750 /var/spool/postfix
chown root:postdrop /var/spool/postfix/maildrop
chmod 730 /var/spool/postfix/maildrop
After making changes, test your setup:
echo "Test email" | mail -s "Test" your@email.com
tail -f /var/log/maillog
If issues persist, enable verbose logging:
postconf -e debug_peer_level=2
postconf -e debug_peer_list=127.0.0.1
systemctl restart postfix
Then check logs for detailed information:
tail -f /var/log/maillog
If the problem continues, consider reinstalling Postfix:
yum remove postfix
yum install postfix
postfix set-permissions
systemctl start postfix