Greylisting on 2012.6

Problems/questions regarding the MailCleaner configuration

Moderators: FlorianB, Pascal, bourgeois, mentor

Posts: 13
Joined: Fri Apr 13, 2012 8:02 am
How did you hear about Mailcleaner: Discussion Forum

Greylisting on 2012.6

Postby martin » Fri Jun 14, 2013 10:03 am

I recently upgraded to 2012.6, and the greylist command appears to be broken.

With 2011.9, I used to run the command

Code: Select all

/opt/greylistd/bin/greylist /usr/mailcleaner/etc/greylistd/greylistd.conf <action>

However, if I try and run the command, it consistently fails.

For example, if I run

Code: Select all

greylist <conf file> <action>
it errors

Code: Select all

greylist: Invalid action: '<conf file>
', and then proceeds to display usage.

if I run (in same directory as conf file)

Code: Select all

greylist <action>
, it fails with

Code: Select all

/var/run/greylistd/socket: No such file or directory
which is not the path defined in the config file.

Now, I'm not a python programmer, but looking at the code, it would seem that it always wants the configuration file as the first argument, otherwise it will default to a socket path which doesn't exist - the conf file points the socket path to

Code: Select all


Code: Select all

### File paths
### check for configuration file passed as argument
### Olivier Diserens
if len(argv) > 1:
 conffile = argv[1]
 conffile   = "/etc/greylistd.conf"
sockfile = "/var/run/greylistd/socket"

Looking at other parts of the code, it checks to see if length of argument is < 2

Code: Select all

if len(argv) < 2:
    usage(progname, "No action specified.")

But as we can see from my test above, only listing one argument, it doesn't display the usage, so this bit of code doesn't appear to do what I think it should.

We also see, the following

Code: Select all

action = argv[1].lower()
if action in ("-h", "-help", "--help", "help"):

elif not action in commands:
    usage(progname, "Invalid action: '%s'"%action)

So, to me, I would expect the action to be the first argument, but if that truly was the case, then there is no room for the config file on the command line, in which case it will default to an invalid socket path.

I did think about opening this thread in Bugs, but due to my limited python knowledge wanted to seek peoples feedback first.

Ultimately, I just want to be able to list my greylisting, both white / grey and black lists, but can no longer do so.

Any thoughts / suggestions ?

Return to “Configuration”

Who is online

Users browsing this forum: No registered users and 1 guest