Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 232894

Re: ghettoVCB.sh - email

$
0
0

Maybe the email traffic is blocked by the firewall.

You must have enable the traffic.

 

For example:

 

New file /etc/vmware/firewall/My_SMTP_Outbound.xml

 

<ConfigRoot>
  <service id='1001'>
    <id>SMTP_Outbound</id>
    <rule>
      <direction>outbound</direction>
      <protocol>tcp</protocol>
      <porttype>dst</porttype>
      <port>25</port>
    </rule>
    <enabled>true</enabled>
    <required>false</required>
  </service>
</ConfigRoot>

 

By the way!

A restart of the firewall is necessary after the file was created.

 

But after the restart of the esxi 5 the file is deleted.

You can solve the problem when the file is create during esxi 5 start up.

 

For example:

 

Change file /etc/rc.local.d/local.sh (addthe followingcode)

 

SmtpFile=/etc/vmware/firewall/My_SMTP_Outbound.xml                          
if [ ! -f $SmtpFile ]; then                                                 
   /bin/echo "<!-- Firewall configuration by /etc/rc.local.d/local.sh -->"  > $SmtpFile
   /bin/echo "<ConfigRoot>"                                                >> $SmtpFile
   /bin/echo "  <service id='1001'>"                                       >> $SmtpFile
   /bin/echo "    <id>SMTP_Outbound</id>"                                  >> $SmtpFile
   /bin/echo "    <rule>"                                                  >> $SmtpFile
   /bin/echo "      <direction>outbound</direction>"                       >> $SmtpFile
   /bin/echo "      <protocol>tcp</protocol>"                              >> $SmtpFile
   /bin/echo "      <porttype>dst</porttype>"                              >> $SmtpFile
   /bin/echo "      <port>25</port>"                                       >> $SmtpFile
   /bin/echo "    </rule>"                                                 >> $SmtpFile
   /bin/echo "    <enabled>true</enabled>"                                 >> $SmtpFile
   /bin/echo "    <required>false</required>"                              >> $SmtpFile
   /bin/echo "  </service>"                                                >> $SmtpFile
   /bin/echo "</ConfigRoot>"                                               >> $SmtpFile
   if [ -f $SmtpFile ]; then                                                          
      /bin/chmod u-w $SmtpFile                                                        
      ( sleep 600 && /sbin/esxcli network firewall refresh )&                         
   fi                                                                                 
fi

 

 

Best regards

Jörg


Viewing all articles
Browse latest Browse all 232894

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>