Steps to fix zmdailyreport where mutliple MTAs are present: Difference between revisions

(Created page with "=== <h1>Steps_to_fix_zmdailyreport_where_mutliple_MTAs_are_present</h1> === <hr> <br> <h2>Problem:-</h2> "zmdailyreport" does not support SMTP fail-over. OR "zmdailyrepo...")
 
No edit summary
Line 1: Line 1:
=== <h1>Steps_to_fix_zmdailyreport_where_mutliple_MTAs_are_present</h1> ===
=== <h1>Fix "zmdailyreport" where mutliple MTAs are present</h1> ===
<hr>
<hr>
<br>
<br>
<h2>Problem:-</h2>   
<h2>Problem:-</h2>   
"zmdailyreport" does not support SMTP fail-over.
"zmdailyreport" does not support SMTP fail-over.  
OR   
OR   
"zmdailyreport" sometimes not working if more than one MTAs are present in ZCS environment.   
"zmdailyreport" sometimes not working if more than one MTAs are present in ZCS environment.   
Line 9: Line 9:


<h2>Solution:- </h2>  
<h2>Solution:- </h2>  
If multiple MTAs configured with ZCS setup then some time smtp hosts are not loading with the dailyreport script.     
If multiple MTAs configured with ZCS setup then some time smtp hosts are not loading with the dailyreport script.     
We found a workaround for this issue, where we need to define a single smtphost name in script instead of variable.  
We found a workaround for this issue, where we need to define a single smtphost name in script instead of variable.
 


'''Workaround 1:- '''  
'''Workaround 1:- '''  
To do this edit "/opt/zimbra/libexec/zmdailyreport" from ROOT user, and make following changes.  
To do this edit "/opt/zimbra/libexec/zmdailyreport" from ROOT user, and make following changes.  


<br>'''Before Changes:- '''
 
===============================================================================================================
'''Before Changes:- '''
   $ENV{MAILADDRESS} = $from_address;
   $ENV{MAILADDRESS} = $from_address;
         my $mailer = Mail::Mailer->new( "smtp", Server => $smtphost, Port => $smtpport );
         my $mailer = Mail::Mailer->new( "smtp", Server => $smtphost, Port => $smtpport );
         $mailer->open(
         $mailer->open(
===============================================================================================================


<br>'''After Changes:- '''
 
===============================================================================================================
'''After Changes:- '''
   $ENV{MAILADDRESS} = $from_address;
   $ENV{MAILADDRESS} = $from_address;
         my $mailer = Mail::Mailer->new( "smtp", Server => "zimbra-smtp1.example.com", Port => $smtpport );
         my $mailer = Mail::Mailer->new( "smtp", Server => "zimbra-smtp1.example.com", Port => $smtpport );
         $mailer->open(
         $mailer->open(
===============================================================================================================


<br>
 




'''Workaround 2:-'''   
'''Workaround 2:-'''   
Edit "/opt/zimbra/libexec/zmdailyreport" and comment "smtphost" entry and define direct SMTP server like below example.   
Edit "/opt/zimbra/libexec/zmdailyreport" and comment "smtphost" entry and define direct SMTP server like below example.   
===============================================================================================================
  #my $smtphost    = getLdapConfigValue("zimbraSmtpHostname") || "localhost";
  #my $smtphost    = getLdapConfigValue("zimbraSmtpHostname") || "localhost";
  my $smtphost    = " zimbra-smtp1.example.com ";   
  my $smtphost    = " zimbra-smtp1.example.com ";   
===============================================================================================================
 




Here are two bugs reported for this issue:-   
Here are two bugs reported for this issue:-   
<pre>https://bugzilla.zimbra.com/show_bug.cgi?id=85161
https://bugzilla.zimbra.com/show_bug.cgi?id=85161
https://bugzilla.zimbra.com/show_bug.cgi?id=97024</pre>
https://bugzilla.zimbra.com/show_bug.cgi?id=97024
 
 
Submitted by:  Heera Singh Koranga

Revision as of 02:16, 19 August 2017

Fix "zmdailyreport" where mutliple MTAs are present



Problem:-

"zmdailyreport" does not support SMTP fail-over. OR "zmdailyreport" sometimes not working if more than one MTAs are present in ZCS environment.


Solution:-

If multiple MTAs configured with ZCS setup then some time smtp hosts are not loading with the dailyreport script. We found a workaround for this issue, where we need to define a single smtphost name in script instead of variable.


Workaround 1:- To do this edit "/opt/zimbra/libexec/zmdailyreport" from ROOT user, and make following changes.


Before Changes:-

  $ENV{MAILADDRESS} = $from_address;
       my $mailer = Mail::Mailer->new( "smtp", Server => $smtphost, Port => $smtpport );
       $mailer->open(


After Changes:-

  $ENV{MAILADDRESS} = $from_address;
       my $mailer = Mail::Mailer->new( "smtp", Server => "zimbra-smtp1.example.com", Port => $smtpport );
       $mailer->open(



Workaround 2:- Edit "/opt/zimbra/libexec/zmdailyreport" and comment "smtphost" entry and define direct SMTP server like below example.

#my $smtphost     = getLdapConfigValue("zimbraSmtpHostname") || "localhost";
my $smtphost     = " zimbra-smtp1.example.com ";  


Here are two bugs reported for this issue:-

https://bugzilla.zimbra.com/show_bug.cgi?id=85161
https://bugzilla.zimbra.com/show_bug.cgi?id=97024


Submitted by: Heera Singh Koranga

Jump to: navigation, search