mpaperno / spampd

SpamPD - Spam Proxy Daemon. A spam-filtering SMTP/LMTP proxy server using SpamAssassin in Perl. Since 2002.
GNU General Public License v3.0
34 stars 9 forks source link

fix pyzor start issue when homedir option is missing #5

Closed stoecker closed 10 years ago

stoecker commented 10 years ago

Another issue I found. Pyzor und thus spampd wont start, when new option --homedir isn't passed. Make the option optional again.

Seems to work now as expected on my system.

stoecker commented 10 years ago

Is something wrong with this? I'd like to have that included in official repo, before I finally update the openSUSE package.

mpaperno commented 10 years ago

Hi, sorry, I didn't see this request and for some reason only got notified about your first.

Anyway, so what does this do... allow one to pass a blank --homedir parameter?

Thanks, -Max

stoecker commented 10 years ago

Probably. But mainly it allows to pass no homedir option at all, the default for older installations.

mpaperno commented 10 years ago

But homedir isn't required, is it?

$sa_home_dir = '/var/spool/spamassassin/spampd'; .... if ( $options{'homedir'} ) { $sa_home_dir = $options{'homedir'}; }

stoecker commented 10 years ago

Well, something strange here. You're right. The fix should not work, but it does. So I overlooked something. Will check it.

stoecker commented 10 years ago

Had time again to look into this: Fix is wrong, reason for the problem is the default path does not exist.

mpaperno commented 10 years ago

Thanks for the update! Is there anything that could be done to make the problem/solution more obvious to future users? Like a message saying the path doesn't exist... :)

-Max

stoecker commented 10 years ago

Problem now is that pyzor silently fails, whereas other non-executable filters work. If the dir does not exist and cannot be opened and the tool fails completely, then it would be obvious and easy to fix. So probably an abort with error message would be a good idea.