Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-09-2009, 01:40 AM
Member
 
Posts: 13
Default [SOLVED] Add a disclaimer (fail)

Hi:
I'm trying to add a disclaimer so i've searched before and find:
Domain Disclaimer Extension Admin UI - Zimbra :: Wiki
Adding a disclaimer (altermime) or footer - Zimbra :: Wiki

I use Ubuntu 8.04 server and zcs 5.0.16 in 64 bits.

I tried whith those solutions but i only have problems:
I can't compile altermime with make, i've already instaled make.

So i intalled it using "sudo apt-get install altermime" and follow the steps but, when I modify "/opt/zimbra/postfix/conf/master.cf" and save it the changes do not stay, I use vim to change and save with :w! because the file is readonly.

And then LADP broke, i've recibed 2 mail: "You have new mail in /var/mail/zimbra":

Code:
From: root@**** (Cron Daemon)
To: zimbra@****
Subject: Cron <zimbra@malone> /opt/zimbra/libexec/zmqueuelog
Content-Type: text/plain; charset=ANSI_X3.4-1968
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/opt/zimbra>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=zimbra>
Message-Id: <E1MDvT7-0006VT-Hn@****>
Date: Tue, 09 Jun 2009 09:10:01 +0200

postqueue: fatal: Queue report unavailable - mail system is down
Code:
From: root@**** (Cron Daemon)
To: zimbra@****
Subject: Cron <zimbra@malone> /opt/zimbra/libexec/zmstatuslog
Content-Type: text/plain; charset=ANSI_X3.4-1968
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/opt/zimbra>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=zimbra>
Message-Id: <E1MDvTO-0006ag-AG@****>
Date: Tue, 09 Jun 2009 09:10:19 +0200

Unable to determine enabled services from ldap.
Enabled services read from cache. Service list may be inaccurate.
Thank for the time to read this and for any solution
Reply With Quote
  #2 (permalink)  
Old 06-09-2009, 01:43 AM
Moderator
 
Posts: 7,911
Default

Check /var/log/zimbra.log for any error messages from Postfix when it starts ... You should also have I think, a master.cf.in file, which you will need to make the changes to as master.cf gets overwritten on a ZCS restart. Alternatively you will have a master.cf.default file in the conf directory. I could be wrong though
__________________
Reply With Quote
  #3 (permalink)  
Old 06-09-2009, 04:28 AM
Member
 
Posts: 13
Default

I've done what you say but now I've a new mail:

Code:
From: root@**** (Cron Daemon)
To: zimbra@****
Subject: Cron <zimbra@malone> /opt/zimbra/libexec/zmqueuelog
Content-Type: text/plain; charset=ANSI_X3.4-1968
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/opt/zimbra>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=zimbra>
Message-Id: <E1MDyHJ-0004Eg-AZ@****>
Date: Tue, 09 Jun 2009 12:10:01 +0200

postqueue: fatal: Queue report unavailable - mail system is down
But when I do a zmcontrol status everything is running

And i can`t send mails
Reply With Quote
  #4 (permalink)  
Old 06-09-2009, 04:32 AM
Moderator
 
Posts: 7,911
Default

Quote:
Originally Posted by uxbod View Post
Check /var/log/zimbra.log for any error messages from Postfix when it starts
Not quite everything
__________________
Reply With Quote
  #5 (permalink)  
Old 06-09-2009, 04:36 AM
Member
 
Posts: 13
Default

Ok:
grep postfix /var/log/zimbra.log
Code:
Jun  9 11:42:10 malone postfix/postfix-script[27036]: starting the Postfix mail system
Jun  9 11:42:10 malone postfix/master[27037]: daemon started -- version 2.4.7, configuration /opt/zimbra/postfix-2.4.7.5z/conf
Jun  9 12:09:26 malone postfix/postfix-script[15973]: stopping the Postfix mail system
Jun  9 12:09:26 malone postfix/master[27037]: terminating on signal 15
Jun  9 12:10:01 malone postfix/postqueue[16277]: fatal: Queue report unavailable - mail system is down
Jun  9 12:11:05 malone postfix/postfix-script[19614]: starting the Postfix mail system
Jun  9 12:11:05 malone postfix/master[19615]: daemon started -- version 2.4.7, configuration /opt/zimbra/postfix-2.4.7.5z/conf
Jun  9 12:24:54 malone postfix/smtpd[29203]: connect from ***[***.***.***.***]
Jun  9 12:24:54 malone postfix/smtpd[29203]: 6752C5201E5: client=***[***.***.***.***]
Jun  9 12:24:54 malone postfix/cleanup[29207]: 6752C5201E5: message-id=<1593622845.01244543093837.JavaMail.root@malone>
Jun  9 12:24:54 malone postfix/smtpd[29203]: disconnect from ***[***.***.***.***]
Jun  9 12:24:54 malone postfix/qmgr[19620]: 6752C5201E5: from=<admin@***>, size=649, nrcpt=1 (queue active)
Jun  9 12:24:54 malone postfix/pipe[29208]: 6752C5201E5: to=<***>, relay=dfilt, delay=0.28, delays=0.21/0.01/0/0.06, dsn=5.3.0, status=bounced (Command died with status 2: "/opt/zimbra/postfix/conf/disclaimer". Command output: /opt/zimbra/postfix/conf/disclaimer: 25: Syntax error: "||" unexpected )
Jun  9 12:24:54 malone postfix/cleanup[29207]: A94B75201E9: message-id=<20090609102454.A94B75201E9@malone.sedasolubles.com>
Jun  9 12:24:54 malone postfix/bounce[29218]: 6752C5201E5: sender non-delivery notification: A94B75201E9
Jun  9 12:24:54 malone postfix/qmgr[19620]: A94B75201E9: from=<>, size=2677, nrcpt=1 (queue active)
Jun  9 12:24:54 malone postfix/qmgr[19620]: 6752C5201E5: removed
Jun  9 12:24:55 malone postfix/lmtp[29219]: A94B75201E9: to=<admin@***>, relay=***[***.***.***.***]:7025, delay=0.46, delays=0.06/0.01/0.01/0.38, dsn=2.1.5, status=sent (250 2.1.5 OK)
Jun  9 12:24:55 malone postfix/qmgr[19620]: A94B75201E9: removed
Reply With Quote
  #6 (permalink)  
Old 06-09-2009, 04:41 AM
Moderator
 
Posts: 7,911
Default

There is a problem with the WiKi page so the script got munged ... try the following instead
Code:
#!/bin/sh
INSPECT_DIR=/var/spool/filter
SENDMAIL=/opt/zimbra/postfix/sbin/sendmail
FOLDER_DISCLAIMER=/opt/zimbra/postfix/conf
  
# Exit codes from <sy***its.h>
EX_TEMPFAIL=75
EX_UNAVAILABLE=69
  
# Clean up when done or when aborting.
trap "rm -f in.$$" 0 1 2 3 15
  
# Start processing.
cd $INSPECT_DIR || { echo $INSPECT_DIR does not exist; exit $EX_TEMPFAIL; }
  
TEXT_DISCLAIMER=`grep "[a|A-z|Z]" ${FOLDER_DISCLAIMER}/disclaimer.txt | grep -v "_" | tail -2 | head -1`
  
cat > in.$$ || { echo Cannot save mail to file; exit $EX_TEMPFAIL; }
  
nohup grep "${TEXT_DISCLAIMER}" in.$$ > /dev/null 2>&1
  
if [ ! "$?" = 0 ]; then
  /usr/bin/altermime --input=in.$$ --disclaimer=${FOLDER_DISCLAIMER}/disclaimer.txt --disclaimer-html=${FOLDER_DISCLAIMER}/disclaimer.html --xheader="X-Copyrighted-Material: Please visit http://www.company.com/privacy.htm" || { echo Message content rejected; exit $EX_UNAVAILABLE; }
fi
  
$SENDMAIL -i "$@" < in.$$
  
exit $?
__________________

Last edited by uxbod; 06-09-2009 at 05:04 AM.. Reason: remove line continuation tags
Reply With Quote
  #7 (permalink)  
Old 06-09-2009, 04:58 AM
Member
 
Posts: 13
Default

Now when I send a mail I recived a mail:

Undelivered Mail Returned to Sender

Code:
This is the mail system at host malone.sedasolubles.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 mail system

<**@**>: service unavailable. Command output:
    /opt/zimbra/postfix/conf/disclaimer: 25: --xheader=X-Copyrighted-Material:
    Please visit http://www.company.com/privacy.htm: not found Message content
    rejected
Reply With Quote
  #8 (permalink)  
Old 06-09-2009, 05:05 AM
Moderator
 
Posts: 7,911
Default

I have updated the script above to remove the \\. The line should not be to long so does not require a single \ to show line wrap.
__________________
Reply With Quote
  #9 (permalink)  
Old 06-09-2009, 05:17 AM
Member
 
Posts: 13
Default

Thanks thanks thanks


Whith this i can send mails again and with the disclaimer but still this error

Code:
postqueue: fatal: Queue report unavailable - mail system is down
Thanks again.
Reply With Quote
  #10 (permalink)  
Old 06-09-2009, 05:28 AM
Moderator
 
Posts: 7,911
Default

So please check zimbra.log again and see what error it is reporting.
__________________
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.