Problems migrating CentOS 6

2011-07-25 Thread Jonathan Gazeley
I've been running a postfix server on CentOS 5 for a while with no 
problem. I set up a new CentOS 6 box with postfix, and basically 
transplanted my configs across to the new one. The service starts, but 
doesn't work properly: it doesn't accept email on 25 or 587 (TLS), but 
instead this appears in the maillog:


Jul 25 17:12:43 helios postfix/smtpd[14436]: fatal: open database 
/etc/postfix/virtual.db: No such file or directory
Jul 25 17:12:44 helios postfix/master[14239]: warning: process 
/usr/libexec/postfix/smtpd pid 14436 exit status 1
Jul 25 17:12:44 helios postfix/master[14239]: warning: 
/usr/libexec/postfix/smtpd: bad command startup -- throttling



I do have a virtual.db, though. I deleted all my *.db and recreated them 
with postmap to ensure they were OK. The ownership and perms seem OK:


[root@helios postfix]# ls -la virtual.db
-rw-r--r--. 1 root mail 12288 Jul 25 17:05 virtual.db

SELinux is disabled on this system, so it's not an obscure issue with 
security contexts and mislabelling.


Am I missing something?

Thanks,
Jonathan


Re: Problems migrating CentOS 6

2011-07-25 Thread Jonathan Gazeley

On 07/25/2011 05:42 PM, Wietse Venema wrote:

Jonathan Gazeley:

I've been running a postfix server on CentOS 5 for a while with no
problem. I set up a new CentOS 6 box with postfix, and basically
transplanted my configs across to the new one. The service starts, but
doesn't work properly: it doesn't accept email on 25 or 587 (TLS), but
instead this appears in the maillog:

Jul 25 17:12:43 helios postfix/smtpd[14436]: fatal: open database
/etc/postfix/virtual.db: No such file or directory
Jul 25 17:12:44 helios postfix/master[14239]: warning: process
/usr/libexec/postfix/smtpd pid 14436 exit status 1
Jul 25 17:12:44 helios postfix/master[14239]: warning:
/usr/libexec/postfix/smtpd: bad command startup -- throttling


I do have a virtual.db, though. I deleted all my *.db and recreated them
with postmap to ensure they were OK. The ownership and perms seem OK:

[root@helios postfix]# ls -la virtual.db
-rw-r--r--. 1 root mail 12288 Jul 25 17:05 virtual.db

SELinux is disabled on this system, so it's not an obscure issue with
security contexts and mislabelling.

Am I missing something?


Try turning off chroot. It is a magic cure for mysterious errors.

http://www.postfix.org/DEBUG_README.html#no_chroot


Thanks for the tip. Chroot is already turned off for all components in 
master.cf, though.





Wietse




Re: Problems migrating CentOS 6

2011-07-25 Thread Jonathan Gazeley

On 07/25/2011 06:12 PM, Wietse Venema wrote:

Jonathan Gazeley:

Jul 25 17:12:43 helios postfix/smtpd[14436]: fatal: open database
/etc/postfix/virtual.db: No such file or directory

I do have a virtual.db, though. I deleted all my *.db and recreated them
with postmap to ensure they were OK. The ownership and perms seem OK:

[root@helios postfix]# ls -la virtual.db
-rw-r--r--. 1 root mail 12288 Jul 25 17:05 virtual.db


Another possibility is that Berkeley DB returns an ENOENT error for
reasons other than that the file does not exist.

For example, I recall that an early version of ReiserFS returning
ENOENT errors on an open file handle because they could not find
something. In that case, the OS kernel returned an ENOENT even
though the file could be opened.

However, if postmap -s /etc/postfix/virtual can read the file
as root, but smtpd cannot open the file as root before it drops
privileges, then I suspect a security configuration error, like,
perhaps SeLinux is not turned off after all.

Look in your system/security logs.


Odd. Until now I had been doing postmap /etc/postfix/virtual (without 
-s). Since I saw your email, I tried it with -s, it returned the same 
error message on the first occasion, but worked thereafter. The mail 
system seems to work now - thanks.


Cheers,
Jonathan



Catch-all alias with luser_relay

2011-05-24 Thread Jonathan Gazeley

I run a small mail server which receives mail for a few domains.

So far I've been unable to get a catch-all address working. I tried 
these settings:


local_recipient_maps =
luser_relay = m...@jonathangazeley.com

Emails to t...@jonathangazeley.com (which does not exist) are rejected 
with 550. I read in the documentation that mailbox_transport with LMTP 
takes precedence over luser_relay, so what then is the best way of 
achieving this?


Thanks,
Jonathan


Jonathan Gazeley
Network Specialist
Residential  Mobile IT
IT Services
University of Bristol