ClearFoundation Tracker - ClearOS
View Issue Details
0002232ClearOSapp-greylisting - Mail Greylistingpublic2015-03-04 02:022019-05-10 03:20
NickH 
 
normalminoralways
closedfixed 
6.6.0 
 
0002232: Starting app-greylisting breaks postfix main.cf
At 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.
Edit main.cf to be similar to mine then start app-postgrey.
No tags attached.
Issue History
2015-03-04 02:02NickHNew Issue
2015-03-04 07:34user2Statusnew => confirmed
2015-03-04 07:42user2Note Added: 0001383
2015-03-04 11:36NickHNote Added: 0001385
2015-03-22 11:46NickHNote Added: 0001397
2019-05-10 03:20NickHNote Added: 0011961
2019-05-10 03:20NickHStatusconfirmed => closed
2019-05-10 03:20NickHResolutionopen => fixed

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   
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   
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   
2019-05-10 03:20   
Fixed in 7.x by removing "permit" from the end of the offending line.