<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to remove postfix warning? in General Topics</title>
    <link>https://community.checkpoint.com/t5/General-Topics/How-to-remove-postfix-warning/m-p/37002#M7790</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We had to change our hostname in SMPT header, so we used&amp;nbsp;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;sk101870. After installing policy when we are looking at postfix queue with command "&lt;/SPAN&gt;&lt;EM style="background-color: #ffffff; color: #000000; font-weight: 400; text-decoration: none; font-size: 11pt;"&gt;[Expert@HostName:0]# /opt/postfix/usr/sbin/postqueue -c /opt/postfix/etc/postfix/ -p",&amp;nbsp;&lt;/EM&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: #ffffff; font-weight: 400; text-decoration: none;"&gt;we have a warning: "Jul&amp;nbsp; 3 17:59:53 2018 TEST-HOST postfix/smtpd[6608]: warning: /opt/postfix/CTX/CTX00003/etc/postfix/main.cf, line 55: overriding earlier entry: myhostname=TEST-HOST". We can see multiple records "myhostname=..." in file&amp;nbsp;&lt;SPAN&gt;/opt/postfix/CTX/CTX00003/etc/postfix/main.cf. If we would remove and leave only one, the problem is gone. But these records are recreated every time we install policy. Is there any way to remove them permanently or make that warning not appear?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jul 2018 14:46:03 GMT</pubDate>
    <dc:creator>Serhii_Yaholnyt</dc:creator>
    <dc:date>2018-07-05T14:46:03Z</dc:date>
    <item>
      <title>How to remove postfix warning?</title>
      <link>https://community.checkpoint.com/t5/General-Topics/How-to-remove-postfix-warning/m-p/37002#M7790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We had to change our hostname in SMPT header, so we used&amp;nbsp;&lt;SPAN style="color: #000000; background-color: #ffffff; font-size: 14px;"&gt;sk101870. After installing policy when we are looking at postfix queue with command "&lt;/SPAN&gt;&lt;EM style="background-color: #ffffff; color: #000000; font-weight: 400; text-decoration: none; font-size: 11pt;"&gt;[Expert@HostName:0]# /opt/postfix/usr/sbin/postqueue -c /opt/postfix/etc/postfix/ -p",&amp;nbsp;&lt;/EM&gt;&lt;SPAN style="font-size: 11pt; color: #000000; background-color: #ffffff; font-weight: 400; text-decoration: none;"&gt;we have a warning: "Jul&amp;nbsp; 3 17:59:53 2018 TEST-HOST postfix/smtpd[6608]: warning: /opt/postfix/CTX/CTX00003/etc/postfix/main.cf, line 55: overriding earlier entry: myhostname=TEST-HOST". We can see multiple records "myhostname=..." in file&amp;nbsp;&lt;SPAN&gt;/opt/postfix/CTX/CTX00003/etc/postfix/main.cf. If we would remove and leave only one, the problem is gone. But these records are recreated every time we install policy. Is there any way to remove them permanently or make that warning not appear?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2018 14:46:03 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/How-to-remove-postfix-warning/m-p/37002#M7790</guid>
      <dc:creator>Serhii_Yaholnyt</dc:creator>
      <dc:date>2018-07-05T14:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove postfix warning?</title>
      <link>https://community.checkpoint.com/t5/General-Topics/How-to-remove-postfix-warning/m-p/37003#M7791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know that we can redirect STDERR to /dev/null but I am looking for possibility to remove it permanently.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2018 14:51:08 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/How-to-remove-postfix-warning/m-p/37003#M7791</guid>
      <dc:creator>Serhii_Yaholnyt</dc:creator>
      <dc:date>2018-07-05T14:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove postfix warning?</title>
      <link>https://community.checkpoint.com/t5/General-Topics/How-to-remove-postfix-warning/m-p/37004#M7792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it the same entry multiple times in the file?&lt;/P&gt;&lt;P&gt;That sounds like a bug and I would recommend consulting with the TAC:&amp;nbsp;&lt;A class="link-titled" href="https://www.checkpoint.com/support-services/contact-support/" title="https://www.checkpoint.com/support-services/contact-support/"&gt;Contact Support | Check Point Software&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2018 18:36:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/How-to-remove-postfix-warning/m-p/37004#M7792</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2018-07-05T18:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove postfix warning?</title>
      <link>https://community.checkpoint.com/t5/General-Topics/How-to-remove-postfix-warning/m-p/37005#M7793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="language-none"&gt;&lt;CODE&gt;/opt/postfix/usr/sbin/postqueue -c /opt/postfix/etc/postfix/ -p 2&amp;gt;/dev/null‍&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2018 12:57:56 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/How-to-remove-postfix-warning/m-p/37005#M7793</guid>
      <dc:creator>Danny</dc:creator>
      <dc:date>2018-12-03T12:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove postfix warning?</title>
      <link>https://community.checkpoint.com/t5/General-Topics/How-to-remove-postfix-warning/m-p/77894#M15871</link>
      <description>&lt;P&gt;Did you ever find a solution? I'm seeing a similar error below, however, the &lt;FONT face="courier new,courier"&gt;config_directory&lt;/FONT&gt; line only appears once in main.cf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;warning: /opt/postfix/etc/postfix//main.cf, line 679: overriding earlier entry: config_directory=/opt/postfix/etc/postfix/&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[Expert@FW:0]# cat -n /opt/postfix/etc/postfix/main.cf | grep config_directory&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;280 #mynetworks = $config_directory/mynetworks&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;623 # &amp;gt;$config_directory/$process_name.$process_id.log &amp;amp; sleep 5&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;679 config_directory = /opt/postfix/etc/postfix&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 16:37:27 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/How-to-remove-postfix-warning/m-p/77894#M15871</guid>
      <dc:creator>lbcadenco10</dc:creator>
      <dc:date>2020-03-10T16:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove postfix warning?</title>
      <link>https://community.checkpoint.com/t5/General-Topics/How-to-remove-postfix-warning/m-p/103803#M19943</link>
      <description>&lt;P&gt;Came across this post after I had a similar issue tonight. I found that CP documentation often leaves the trailing slash in the -c switch of the postqueue command, like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/opt/postfix/usr/sbin/postqueue -c /opt/postfix/etc/postfix/ -p&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, by default, the config_directory parameter in the postfix config file omits that trailing slash:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;config_directory = /opt/postfix/etc/postfix&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the warning is pointing out the mismatch between what's in the command (a slash) and the config file itself (no slash). I've found that if I run the postqueue command without the trailing slash, I don't get the warning in my output, which makes it much easier to parse out single values. This came in very handy when trying to tweak the suggested script in the &lt;A href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk114806&amp;amp;partition=Advanced&amp;amp;product=Threat" target="_blank" rel="noopener"&gt;Threat Emulation ATRG&lt;/A&gt; for monitoring the MTA queue:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#!/bin/bash
# Extract Postfix queue size value
MAILQ=$(/opt/postfix/usr/sbin/postqueue -c /opt/postfix/etc/postfix/ -p | egrep '^--.*Request|^Mail.*empty')
if [[ $MAILQ =~ "empty" ]] ; then
	RESPONSE=0
	echo $RESPONSE
elif [[ $MAILQ =~ "Request" ]] ; then
	RESPONSE=$(echo $MAILQ|awk '{print $5}')
	echo $RESPONSE
else
	RESPONSE=error
fi&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the trailing slash left in the script, I would get that warning, which would introduce additional output. Taking out the trailing switch left me with just the number I wanted.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 01:59:13 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/How-to-remove-postfix-warning/m-p/103803#M19943</guid>
      <dc:creator>Steve_Spohn</dc:creator>
      <dc:date>2020-12-01T01:59:13Z</dc:date>
    </item>
  </channel>
</rss>

