Hi. I had a ISPConfig account with a domain called "domain.com" and I need to change the domain for "newdomain.com" in the ISPConfig panel. The domain has more than 500 accounts. After I have just removed the old domain entries in co-domain and added the new one entries for "newdomain.com" I can login into webmail with my "[email protected]" and I can send messages correctly. But when I try send a email from a external account (gmail) to this user the Postfix returns the following error: ----------------------------------------------------------------- This is the Postfix program at host linuxserver.mydomain.com I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below. For further assistance, please send mail to <postmaster> If you do so, please include this problem report. You can delete your own text from the attached returned message. The Postfix program <[email protected]> (expanded from <[email protected]>): can't create user output file. Command output: procmail: Couldn't create "/var/mail/user123" /bin/sh: let: HD_QUOTA=*1024: syntax error: operand expected (error token is "*1024") /bin/sh: line 1: [: !=: unary operator expected find: /var/mail: Permission denied ---------------------------------------------------------------------- Why fails? Can I change a domain name in a site that have users ? Must I create a new site with the new domain and delete the old one? thanks !
The .procmailrc file for user (joseangel_coaat) ## MAILDIR=$HOME/Maildir/ ## DEFAULT=$MAILDIR ## ORGMAIL=$MAILDIR QUOTA=31457280 INCLUDERC=/home/www/web2/user/joseangel_coaat/.mailsize.rc INCLUDERC=/home/www/web2/user/joseangel_coaat/.quota.rc INCLUDERC=/home/www/web2/user/joseangel_coaat/.antivirus.rc INCLUDERC=/home/www/web2/user/joseangel_coaat/.local-rules.rc INCLUDERC=/home/www/web2/user/joseangel_coaat/.html-trap.rc INCLUDERC=/home/www/web2/user/joseangel_coaat/.spamassassin.rc ## INCLUDERC=/home/www/web2/user/joseangel_coaat/.autoresponder.rc
What's in /home/www/web2/user/joseangel_coaat/.quota.rc? What's the output of Code: ls -la /home/www/web2/user/joseangel_coaat/ ?
Logs ls -la /home/www/web2/user/joseangel_coaat/ ------------------------------------------------------------------ total 156 drwxrwxr-x 5 joseangel_coaat web2 4096 may 29 16:47 . drwxrwxr-x 604 apache web2 24576 may 29 11:52 .. -rw-r--r-- 1 root root 103 may 29 14:17 .antivirus.rc -rw-r--r-- 1 root root 762 may 29 14:17 .autoresponder.rc -rw-r--r-- 1 root root 22 may 29 14:17 .bounce-exceed-quota.txt -rw------- 1 joseangel_coaat web2 24 may 29 14:17 .forward -rw-r--r-- 1 root root 67866 may 29 14:17 .html-trap.rc -rw-r--r-- 1 root root 3889 may 29 14:17 .local-rules.rc drwxrwxr-x 3 joseangel_coaat web2 4096 may 29 12:15 mail -rw-r--r-- 1 root root 180 may 29 14:17 .mailsize.rc -rw-r--r-- 1 root root 507 may 29 14:17 .procmailrc -rw------- 1 root root 809 may 29 15:45 #.procmailrc# -rw-r--r-- 1 root root 2670 may 29 14:17 .quota.rc drwxrwxr-x 2 joseangel_coaat web2 4096 may 29 14:17 .spamassassin -rw-r--r-- 1 root root 1152 may 29 14:17 .spamassassin.rc -rw-r--r-- 1 root root 1642 may 29 14:17 .user_prefs -rw-r--r-- 1 root root 0 may 29 14:17 .vacation.msg drwxrwxr-x 2 joseangel_coaat web2 4096 may 22 12:46 web --------------------------------------------------------------- The quota file --------------------------------------------------------------- # quota.rc by Stuart Clark/Falko Timme # # If mailbox size exceeds QUOTA, send reply email # using $PMDIR/bounce-exceed-quota.txt # #LOGFILE="/tmp/procmail.quota.log" #VERBOSE=NO PATH="/usr/bin:$PATH:/usr/local/bin" SHELL=/bin/sh EMAIL=`formail -zxTo:` :0 # if QUOTA is not set to something, then.. * ! QUOTA ?? . { QUOTA=10000000000 } :0 # if QUOTA is set to something, then.. * QUOTA ?? . { QUOTA=`let HD_QUOTA=\`quota ${LOGNAME} | sed -n 3p | awk '{print $3}'\`*1024 if [ $HD_QUOTA != 0 ]; then let HD_QUOTA_USED=\`quota ${LOGNAME} | sed -n 3p | awk '{print $2}'\`*1024 let HD_QUOTA_FREE=${HD_QUOTA}-${HD_QUOTA_USED} if [ "$HD_QUOTA_FREE" -eq "$QUOTA" ]; then QUOTA=${QUOTA} else if [ "$HD_QUOTA_FREE" -gt "$QUOTA" ]; then QUOTA=${QUOTA} else QUOTA=${HD_QUOTA_FREE} fi fi else QUOTA=${QUOTA} fi echo ${QUOTA}` #MAILBOX_SIZE_REPORT_=`wc -c ${DEFAULT}` MAILBOX_SIZE_REPORT_=`cat \`find ${DEFAULT} -type f -follow\`| wc -c` :0 # if * MAILBOX_SIZE_REPORT_ ?? ^^ *\/[0-9]+ { MAILBOX_SIZE_=${MATCH} } :0 *$ ${QUOTA}^0 *$ -${MAILBOX_SIZE_}^0 { } MAILBOX_SIZE_ = $= :0 * > ${MAILBOX_SIZE_} { # keep a backup for a while :0c /tmp/quota.${LOGNAME} :0 # lose items we don't want to bounce * 9876543210^0 ^FROM_DAEMON * 1^0 ^X-Loop: X-BOUNCE-FILE-SIZE /dev/null :0fi # double the head, lose the body * ^Subject: \/.* | sed -eH -e /./b -eg -eq SUBJECT="${MATCH}" :0f # invert and let second copy of head (the new body) be cited: | formail -rtk \ -I"Subject: Returned Mail: ${SUBJECT}" \ -I"From: ${EMAIL}" \ -A"X-Bounced-Reason: Mailbox quota exceeded ${QUOTA} bytes" \ -A"X-Loop: X-BOUNCE-FILE-SIZE" # insert explanation between head and new body; :0wf # explanation file should end with an empty line | sed -e '1,/^$/!b' -e/./b -e 'r /home/www/web2/user/joseangel_coaat/.bounce-exceed-quota.txt' :0 # send this bounced message from ${EMAIL} using sendmail ! -f${EMAIL} -t } } -----------------------------------------------------------------------
It's mbox because there's no Maildir in the user's homedir. What's the output of Code: which quota which sed which awk ?
[root@linuxserver ~]# which quota /usr/bin/quota [root@linuxserver ~]# [root@linuxserver ~]# which sed /bin/sed [root@linuxserver ~]# which awk /bin/awk
I have create another domain (webrevista.com) and when I try to send a email to user [email protected] server returns with the message: Mail Delivery System <[email protected]> to me More options 1:30 pm(4 minutes ago) This is the Postfix program at host linuxserver.coaatalicante.org. I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below. For further assistance, please send mail to <postmaster> If you do so, please include this problem report. You can delete your own text from the attached returned message. The Postfix program <[email protected]> (expanded from <[email protected]>): can't create user output file. Command output: procmail: Couldn't create "/var/mail/webrevista" Final-Recipient: rfc822; [email protected] Original-Recipient: rfc822; [email protected] Action: failed Status: 5.0.0 Diagnostic-Code: X-Postfix; can't create user output file. Command output: procmail: Couldn't create "/var/mail/webrevista"
HEre is: ls -la /var/mail/ [root@linuxserver mail]# ll total 80 -rw-rw---- 1 admin mail 0 may 15 20:19 admin -rw------- 1 admispconfig mail 0 may 16 00:54 admispconfig -rw------- 1 coco mail 0 may 25 14:48 coco -rw------- 1 coco1 mail 0 may 25 14:50 coco1 -rw------- 1 coco15 mail 0 may 25 14:55 coco15 -rw------- 1 prueba10 mail 0 may 25 14:44 prueba10 -rw------- 1 prueba2 mail 0 may 25 14:42 prueba2 -rw------- 1 prueba3 mail 0 may 25 14:43 prueba3 -rw------- 1 root root 70808 may 30 13:30 root -rw-r--r-- 1 root root 0 may 29 00:02 $usuario -rw-r--r-- 1 root root 0 may 29 00:07 $usuario2 -rw------- 1 webrevista mail 0 may 30 13:09 webrevista -rw------- 1 webrevista2 mail 0 may 30 14:04 webrevista2 [root@linuxserver mail]# Thanks...
I am getting the same error. Command output: procmail: Couldn't create "/var/mail/web18_mark" procmail: Suspicious rcfile "/var/www/web18/user/web18_mark/.procmailrc" procmail: Couldn't read "/var/www/web18/user/web18_mark/.procmailrc" )
ok I fixed this by doing a chmod o+w /var/mail. I dont like this shotgun solution but it works for now. I also had to copy a .procmail file for the user from another user and edit it. For some reason ispconfig refused to create the.procmail file for this user even when they where deleted, removed from recyle bin and recreated.
It seems you changed some permissions. procmail doesn't like that at all. What's the output of Code: ls -la /var/www/web18/user/web18_mark/ ?