• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

qmail-spp and spf plugin

N

nars

Guest
To avoid patching and recompiling qmail I was trying to put qmail-spp spf plugin working on my FC2 - Plesk 7.5.4 server as it seems default psa qmail is compiled with qmail-spp and even comes with a plugin (chkrcptto), I thought it would be easy, however I'm having some throuble...

I have installed libspf and libspf-devel (needed to compile spf.c plugin) packages from:
http://libspf.org/files/rpm/libspf-1.0.0.RC4-1.fc2.i386.rpm
http://libspf.org/files/rpm/libspf-devel-1.0.0.RC4-1.fc2.i386.rpm

tested with spfquery, and all seems ok.

then got spf plugin from:
http://qmail-spp.sourceforge.net/downloads/spf.c

As I don't knew where to set SPF env. var. to enable it, before compiling spf.c I have done a small change to it to behave like if SPF env. var. was set to 1, changed:
if (getenv("RELAYCLIENT") || /* known user */
!(spf_env = getenv("SPF"))) return 0; /* plugin disabled */
to
if (getenv("RELAYCLIENT")) return 0; /* known user - plugin disabled */
and
spf = atoi(spf_env);
to
spf = 1;

compiled it with:
gcc -o spf ./spf.c -lspf
then moved the compiled binary to /var/qmail/plugins/
and edited /var/qmail/control/smtpplugins to look like:
[rcpt]
plugins/chkrcptto
[mail]
plugins/spf
(added last 2 lines)

sent a few mails for testing... results: it seems to be working well, for eg. sending from another email service to my server... all ok, except one thing... it is even blocking me and other users of my server from using smtp to send emails, it refuses it as it see that the mails come from different ip's (our home internet connection ip's) that do not match spf record... and we are using SMTP authentication...

I think the purpose of
if (getenv("RELAYCLIENT")) return 0; /* known user - plugin disabled */
is exactly to avoid this, but then it is not working...
I even tried to change it to:
if (getenv("RELAYCLIENT") || getenv("SMTPAUTHMETHOD") || getenv("SMTPAUTHUSER")) return 0; /* known user - plugin disabled */
expecting it would "abort" the plugin when there was an authenticated user but no luck...

Any ideas?
 
After looking at psa_smtp file in xinetd.d folder I think maybe psa qmail isn't using default auth method... and using some special auth method using a DB... and maybe why RELAYCLIENT is not set... but still no idea how to fix it :(
 
Another thing I have found is that when one of my clients using dynamic ip's from their isp's get an ip that is listed in a MAPS list they cannot use server to send emails :( since they are authenticated to smtp I think this is also not correct... :rolleyes: any idea how to fix it?
 
Back
Top