SYSTEM WARNING: 'file_get_contents(https://www.clearos.com/?rendertype=json&get=header): failed to open stream: Connection refused' in '/var/www/virtual/newwrapper/cf_topmenu.inc' line 5

ClearOS Bug Tracker


View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002232ClearOSapp-greylisting - Mail Greylistingpublic2015-03-04 02:022019-05-10 03:20
ReporterNickH 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version6.6.0 
Target VersionFixed in Version 
Summary0002232: Starting app-greylisting breaks postfix main.cf
DescriptionAt the end of my main.cf I have:
smtpd_recipient_restrictions = permit_mynetworks,
     permit_sasl_authenticated,
     reject_unknown_recipient_domain,
     reject_unauth_pipelining,
     reject_invalid_hostname,
     reject_non_fqdn_hostname,
     reject_non_fqdn_sender,
     reject_non_fqdn_recipient,
     reject_unauth_destination,
     reject_rbl_client zen.spamhaus.org,
     reject_rbl_client bl.spamcop.net,
     reject_rbl_client 2.0.0.127.b.barracudacentral.org,
     permit

# reject_unknown_sender_domain,

If I start app-greylisting it changes this to:
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unknown_recipient_domain, reject_unauth_pipelining, reject_invalid_hostname, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unauth_destination, reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net, reject_rbl_client 2.0.0.127.b.barracudacentral.org, permit, check_policy_service unix:/var/spool/postfix/postgrey/socket

# reject_unknown_sender_domain,

Note it is all over a single line. Of course this does not work and postfix complains about having check_policy_service after permit. Stopping app-postgrey works in removing the additional line.

The check_policy_service line should be added on a separate line.
Steps To ReproduceEdit main.cf to be similar to mine then start app-postgrey.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0001383)
user2
2015-03-04 07:42

We can certainly add a check to make sure "permit" is handled correctly.

As for trying to format the configuration with each entry on a new line -- that's tricky. The "postconf" tool is used to avoid re-implementing the Postfix parsing rules and to manage configuration changes. The SMTP API doesn't change main.cf directly.
(0001385)
NickH (developer)
2015-03-04 11:36

I would say it is a bug and potentially with the postconf command. The question is why is it adding a "," after "permit". Putting it all into one line is irritating but does not otherwise affect the operation it is just the comma makes the next parameter part of the same line which is wrong.

What command is being issued by ClearOS? If it is nothing fancy, should the bug be pushed up to postfix?
(0001397)
NickH (developer)
2015-03-22 11:46

FWIW this issue can be circumvented by removing the "permit" at the end of the smtpd_recipient_restrictions statement as it is the default final action and therefore unnecessary.
(0011961)
NickH (developer)
2019-05-10 03:20

Fixed in 7.x by removing "permit" from the end of the offending line.

- Issue History
Date Modified Username Field Change
2015-03-04 02:02 NickH New Issue
2015-03-04 07:34 user2 Status new => confirmed
2015-03-04 07:42 user2 Note Added: 0001383
2015-03-04 11:36 NickH Note Added: 0001385
2015-03-22 11:46 NickH Note Added: 0001397
2019-05-10 03:20 NickH Note Added: 0011961
2019-05-10 03:20 NickH Status confirmed => closed
2019-05-10 03:20 NickH Resolution open => fixed

SYSTEM WARNING: 'file_get_contents(https://www.clearos.com/?rendertype=json&get=footer): failed to open stream: Connection refused' in '/var/www/virtual/newwrapper/cf_footer.inc' line 7