# postfix not accepting mail

## cybercorty

Hi everyone,

I have a strange problem with postfix. It is setup for use on a single host, but should recieve mail for all local users.  I set everything up according to the comments in main.cf. I have not yet setup a chroot environment in master.cf.

Email for local users gets bounced all the time.  I tested by sending emails from an external account to a local user. Error messages in mail.log are the same (xxx is replacing the real values):

Feb 20 18:56:34 rc postfix/smtpd[16295]: connect from  unknown[217.72.192.151]

Feb 20 18:56:34 rc postfix/smtpd[16295]: A633837208: client=unknown[217.72.192.151]

Feb 20 18:56:34 rc postfix/smtpd[16295]: warning: cannot access UNIX password database: Permission denied

Feb 20 18:56:34 rc postfix/smtpd[16295]: A633837208: reject: RCPT from unknown[217.72.192.151]: 451 <xx@xxx.xxx.xxx>: Temporary loo

kup failure; from=<xxxx.xxxxx@web.de> proto=ESMTP helo=<smtp.web.de>

Feb 20 18:56:36 rc postfix/cleanup[16298]: C19AE3720B: message-id=<20030220185636.C19AE3720B@xxx.xxx.xxx>

Feb 20 18:56:36 rc postfix/qmgr[16283]: C19AE3720B: from=<double-bounce@xxx.xxx.xxx>, size=794, nrcpt=1 (queue active)

Feb 20 18:56:36 rc postfix/smtpd[16295]: disconnect from unknown[217.72.192.151]

Feb 20 18:56:36 rc postfix/local[16299]: C19AE3720B: to=<root@rc.mine.nu>, orig_to=<postmaster>, relay=local, delay=0, status=deferred (SOFT BOUNCE - unknown user: "root")

I am sure that the user exists, and I do not understand why postfix complains, that it cannot access the unix password database (which I suppose is the reason why both the local user and root are unknown). It is a standard gentoo installation. As far as I understand, no special USE settings. I have not changed any permissions.  I have set mail_owner = mail

Any ideas?

Thanks,

Corty

----------

## vicay

Hello, 

did you setup postfix chrooted?

who owns the /var/spool/postfix directory and subdirectories?

best regards

vicay

----------

## cybercorty

This is my postfix master.cf (unchanged from the default install):

```
==========================================================================

# service type  private unpriv  chroot  wakeup  maxproc command + args

#               (yes)   (yes)   (yes)   (never) (100)

# ==========================================================================

smtp      inet  n       -       n       -       -       smtpd

#smtps    inet  n       -       n       -       -       smtpd

#  -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes

#submission     inet    n       -       n       -       -       smtpd

#  -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes

#628      inet  n       -       n       -       -       qmqpd

pickup    fifo  n       -       n       60      1       pickup

cleanup   unix  n       -       n       -       0       cleanup

qmgr      fifo  n       -       n       300     1       qmgr

#qmgr     fifo  n       -       n       300     1       nqmgr

#tlsmgr   fifo  -       -       n       300     1       tlsmgr

rewrite   unix  -       -       n       -       -       trivial-rewrite

bounce    unix  -       -       n       -       0       bounce

defer     unix  -       -       n       -       0       bounce

flush     unix  n       -       n       1000?   0       flush

proxymap  unix  -       -       n       -       -       proxymap

smtp      unix  -       -       n       -       -       smtp

relay     unix  -       -       n       -       -       smtp

#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5

showq     unix  n       -       n       -       -       showq

error     unix  -       -       n       -       -       error

local     unix  -       n       n       -       -       local

virtual   unix  -       n       n       -       -       virtual

lmtp      unix  -       -       n       -       -       lmtp
```

As far as I understand it (I am new to postfix), I am not running it in a chrooted environment. I also checked ownership of passwd and /etc, both are world readable.

/var/spool/postfix is owned by root.root (0755). Directories within:

```
drwx------   15 mail     root          256 Feb 20 21:53 active

drwx------    2 mail     root           35 Feb 20 19:54 bounce

drwx------    2 mail     root           35 Feb 20 19:54 corrupt

drwx------   15 mail     root          256 Feb 20 21:53 defer

drwx------   15 mail     root          256 Feb 20 21:53 deferred

drwx------    2 mail     root           35 Feb 20 19:54 flush

drwx------    2 mail     root           35 Feb 20 19:54 hold

drwx------   16 mail     root          273 Feb 21 09:03 incoming

drwx-wx---    2 mail     postdrop       35 Feb 21 09:03 maildrop

drwxr-xr-x    2 root     root          166 Feb 20 19:56 pid

drwx------    2 mail     root          384 Feb 20 19:54 private

drwx--x---    2 mail     postdrop      142 Feb 20 19:54 public

drwxr-xr-x    2 root     root           35 Feb 20 19:53 tmp
```

I have to be honest: I absolutely have no clue...

Thanks for your help.

Corty

----------

## vicay

hello again,

what is the value of the

local_recipient_maps parameter in /etc/postfix/main.cf ?

what is the output of 

postconf -m

?

best regards

vicay

----------

## cybercorty

```
local_recipient_maps = unix:passwd.byname $alias_maps
```

and

```
alias_maps = hash:/etc/mail/aliases
```

output of postconf -m:

```
static

sdbm

pcre

nis

regexp

environ

proxy

mysql

btree

unix

hash

```

I tried to change as little as possible.

thanks!

----------

## psp

Hello,

As of version 2, postfix now uses the proxymap service to read the receipient maps (this simplified chrooting amongst other things). You need to change your local_receipient_maps to:

```
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
```

This should fix your issues. For more info please read the release notes: /usr/share/doc/postfix-2.0.3/RELEASE_NOTES.gz

Thanks,

----------

## vicay

 *psp wrote:*   

> Hello,
> 
> As of version 2, postfix now uses the proxymap service to read the receipient maps (this simplified chrooting amongst other things). You need to change your local_receipient_maps to:
> 
> ```
> ...

 

Yeah,

you seem to be right, i just checked this at one of my servers.

hmm, i guess i set up too much relays ... 

 :Smile: 

best regards 

vicay

----------

## cybercorty

Hello again,

I now have

```
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
```

But unfortunately this does not solve the problem. Log entry:

```
Feb 21 16:32:07 rc postfix/smtpd[19838]: connect from unknown[217.72.192.151]

Feb 21 16:32:07 rc postfix/smtpd[19838]: B384A3D66A: client=unknown[217.72.192.151]

Feb 21 16:32:07 rc postfix/proxymap[19839]: warning: cannot access UNIX password database: Permission denied

Feb 21 16:32:07 rc postfix/smtpd[19838]: B384A3D66A: reject: RCPT from unknown[217.72.192.151]: 451 <XXX@XXX.XXX.XXX>: Temporary loo

kup failure; from=<XXXX.XXXX@web.de> proto=ESMTP helo=<smtp.web.de>

Feb 21 16:32:09 rc postfix/cleanup[19841]: CB2453D66B: message-id=<20030221163209.CB2453D66B@XXX.XXX.XXX>

Feb 21 16:32:09 rc postfix/qmgr[19798]: CB2453D66B: from=<double-bounce@XXX.XXX.XXX>, size=794, nrcpt=1 (queue active)

Feb 21 16:32:09 rc postfix/smtpd[19838]: disconnect from unknown[217.72.192.151]

Feb 21 16:32:09 rc postfix/local[19842]: CB2453D66B: to=<root@XXX.XXX.XXX>, orig_to=<postmaster>, relay=local, delay=0, status=defe

rred (SOFT BOUNCE - unknown user: "root")
```

As far as I understand the proxymap service is optional, not mandatory. Any other ideas?

Thanks for the help so far!!!

Corty

----------

## cybercorty

The problem has been solved through a complete new install. As I had trouble with various programs (samba, postfix), all related to authentification and file access I decided to give it another clean try. Astonishingly all work now, with exactly the same config files. I suppose something must have gone wrong with the bootstrap process, maybe glibc ... We will never know!  :Wink: )

Thanks for any help!!

Corty

----------

