Current time: 05-17-2024, 11:33 PM Hello There, Guest! (LoginRegister)


Post Reply 
maildir delivery failed
Author Message
Cercetasu Offline
Junior Member
*

Posts: 10
Joined: May 2008
Reputation: 0
Post: #1
maildir delivery failed
Hello

I just installed ispcp Omega RC5 on a fedora 7 box.
I have some problems.
First major problem is about mail.
Iscp config files for postfix didn't work so i had to change them with some basic ones. That fixed outgoing mails but all incoming mail is still not delivered. i get the error:

maildir delivery failed: create file /var/mail/virtual/zaunimpex.ro/office/tmp/.... : Permission denied

i've even tried setting chmod 777 to folders.

this is my main.cf

command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
program_directory = /etc/postfix

# Some common configuration parameters
inet_interfaces = all
mynetworks_style = host

myhostname = ns1.dialsoft.ro
mydomain = ns1.dialsoft.ro.local
myorigin = $myhostname

smtpd_banner = $myhostname ESMTP ispCP 1.0.0 RC5 OMEGA Managed
setgid_group = postdrop

# Receiving messages parameters
mydestination = $myhostname, $mydomain
append_dot_mydomain = no
append_at_myorigin = yes
local_transport = local
virtual_transport = virtual
transport_maps = hash:/etc/postfix/ispcp/transport
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases

# Delivering local messages parameters
mail_spool_directory = /var/mail

# Mailboxquota
# => 0 for unlimited
# => 104857600 for 100 MB
mailbox_size_limit = 0
mailbox_command = procmail -a "$EXTENSION"

biff = no
recipient_delimiter = +

local_destination_recipient_limit = 1
local_recipient_maps = unix:passwd.byname $alias_database

# ispCP Autoresponder parameters
ispcp-arpl_destination_recipient_limit = 1

# Delivering virtual messages parameters
virtual_mailbox_base = /var/spool/mail/virtual
virtual_mailbox_limit = 0

virtual_mailbox_domains = hash:/etc/postfix/ispcp/domains
virtual_mailbox_maps = hash:/etc/postfix/ispcp/mailboxes

virtual_alias_maps = hash:/etc/postfix/ispcp/aliases

virtual_minimum_uid = 502
virtual_uid_maps = static:502
virtual_gid_maps = static:12

# SASL paramters
smtpd_sasl_auth_enable = yes
#smtpd_sasl2_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = dialsoft.ro
broken_sasl_auth_clients = yes

smtpd_recipient_restrictions = permit_sasl_authenticated,
permit_mynetworks,
reject_unauth_destination,
permit


this is master.cf


smtp inet n - n - - smtpd
#submission inet n - n - - smtpd
# -o smtpd_enforce_tls=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#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 oqmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - n - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
retry unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache


please help!
Thanks
07-09-2008 02:50 AM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #2
RE: maildir delivery failed
Try changing

virtual_mailbox_base = /var/spool/mail/virtual

to

virtual_mailbox_base = /var/mail/virtual
07-09-2008 07:37 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Cercetasu Offline
Junior Member
*

Posts: 10
Joined: May 2008
Reputation: 0
Post: #3
RE: maildir delivery failed
that doesn't work. /var/mail is just a link to /var/spool/mail.
07-09-2008 09:02 PM
Find all posts by this user Quote this message in a reply
_lunix_ Offline
Newbie
*

Posts: 8
Joined: Aug 2008
Reputation: 0
Post: #4
RE: maildir delivery failed
I am getting the same problem on CentOS 5.2
It is a procmail problem.
If I change postfix to use its own local delivery agent instead of procmail then the mail is delivered fine.
I will now try to work this out.
Any one already solved this issue ?
09-11-2008 02:43 PM
Find all posts by this user Quote this message in a reply
_lunix_ Offline
Newbie
*

Posts: 8
Joined: Aug 2008
Reputation: 0
Post: #5
RE: maildir delivery failed
_lunix_ Wrote:I am getting the same problem on CentOS 5.2
It is a procmail problem.
If I change postfix to use its own local delivery agent instead of procmail then the mail is delivered fine.
I will now try to work this out.
Any one already solved this issue ?

Just one thing first.
I am using local delivery for local mail. ie: mail for an actual system user and not a virtual domain.
When the first ever email arrives for a local (/etc/passwd) user it tries to deliver it to
Code:
/var/mail/$user
but gets a 'permission denied' error.
When I change postfix to use its own delivery agent instead of procmail it works fine as postfix is delivering to
Code:
/var/spool/mail/$user
Once the maildir is already there then procmail delivery works fine.
How can I get procmail to use
Code:
/var/spool/mail/$user ??
I have put the following into /etc/procmailrc
Code:
# .procmailrc
# routes incoming mail to appropriate mailboxes
PATH=/usr/bin:/usr/local/bin
MAILDIR=/var/spool/mail
LOGFILE=/var/log/procmail.log
LOGABSTRACT=yes
SHELL=/bin/bash

cat /var/log/procmail.log
Code:
From test@xxxxx.xxx  Thu Sep 11 15:04:28 2008
  Folder: /var/mail/lunix                                                   550

Is procmail actually a dependency of ispCP or can I just use postfix local delivery agent ?

Mick
09-11-2008 03:37 PM
Find all posts by this user Quote this message in a reply
gagi2 Offline
Junior Member
*

Posts: 30
Joined: Mar 2008
Reputation: 0
Post: #6
RE: maildir delivery failed
plz check if your users and groups for the mail service are set right

Code:
virtual_uid_maps = static:502
virtual_gid_maps = static:12
09-11-2008 11:06 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #7
RE: maildir delivery failed
Cercetasu Wrote:maildir delivery failed: create file /var/mail/virtual/zaunimpex.ro/office/tmp/.... : Permission denied

what is the ownership and permissions of all theese folders?

/var
/var/mail
/var/mail/virtual
/var/mail/virtual/zaunimpex.ro
/var/mail/virtual/zaunimpex.ro/office
/var/mail/virtual/zaunimpex.ro/office/tmp

?

I got:
Code:
# ls -lad /var
drwxr-xr-x 16 root root 4096 2008-03-10 02:32 /var

# ls -lad /var/mail
drwxrwsr-x 3 root mail 4096 2008-09-12 06:27 /var/mail

# ls -lad /var/mail/virtual/
drwxr-xr-x 8 root root 4096 2008-03-22 01:10 /var/mail/virtual/

# ls -lad /var/mail/virtual/domain1.tld
drwx------ 10 vmail mail 4096 2008-08-18 16:09 /var/mail/virtual/domain1.tld/

# ls -lad /var/mail/virtual/domain1.tld/test
drwxr-xr-x 9 vmail mail 4096 2008-03-11 00:12 /var/mail/virtual/domain1.tld/test

# ls -lad /var/mail/virtual/domain1.tld/test/tmp
drwx------ 2 vmail mail 4096 2008-03-11 00:12 /var/mail/virtual/domain1.tld/test/tmp/

and user vmail has the same uid as the
virtual_minimum_uid = 1001
and
virtual_uid_maps = static:1001

and group mail has the gid of
virtual_gid_maps = static:8

in main.cf...

/J
09-12-2008 04:36 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)