HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   Domain Change in website (http://www.howtoforge.com/forums/showthread.php?t=4563)

Jose Gosalbez 29th May 2006 14:45

Domain Change in website
 
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 "user123@newdomain.com" 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

<user123@linuxserver.mydomain.com> (expanded from
<user100@webcolegial.com>): 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 !

falko 29th May 2006 15:31

Can you post the .procmailrc file from that user's homedir?

Jose Gosalbez 29th May 2006 15:47

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

falko 29th May 2006 16:22

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/
?

Jose Gosalbez 29th May 2006 16:51

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
}
}

-----------------------------------------------------------------------

till 29th May 2006 18:04

Which ISPConfig version do you use?
Do you use Maildir or Mbox for mailstorage?

Jose Gosalbez 29th May 2006 18:31

ISPConfig version
 
The last version of ISPCONFIG.
2.2.3

Maildir? Mbox?
How I can know it?

falko 30th May 2006 00:37

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

?

Jose Gosalbez 30th May 2006 00:55

[root@linuxserver ~]# which quota
/usr/bin/quota
[root@linuxserver ~]#
[root@linuxserver ~]# which sed
/bin/sed
[root@linuxserver ~]# which awk
/bin/awk

Jose Gosalbez 30th May 2006 13:41

I have create another domain (webrevista.com) and when I try to send a email to user webrevista@webrevista.com server returns with the message:

Mail Delivery System <MAILER-DAEMON@linuxserver.coaatalicante.org> 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

<webrevista@linuxserver.coaatalicante.org> (expanded from
<webrevista@webrevista.com>): can't create user output file. Command
output: procmail: Couldn't create "/var/mail/webrevista"



Final-Recipient: rfc822; webrevista@linuxserver.coaatalicante.org
Original-Recipient: rfc822; webrevista@webrevista.com
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"


All times are GMT +2. The time now is 04:29.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.