From ea83c5d01a7e075dc5cd7ddf808e2a275f2dd68b Mon Sep 17 00:00:00 2001 From: John Denker Date: Tue, 31 Jul 2012 18:24:32 -0700 Subject: fix a cosmetic bug : no user@ in authorizer --- tools/sepofra.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/sepofra.c b/tools/sepofra.c index 5072b36..a0b9294 100644 --- a/tools/sepofra.c +++ b/tools/sepofra.c @@ -26,8 +26,13 @@ string subdomain(const string ema){ return ema; } -SPF_result_t sepofra::check1(const string host, - const string msg, const int debug){ +SPF_result_t sepofra::check1(const string _host, + const string msg, const int debug){ + string host(_host); + size_t where = host.find("@"); + if (where != string::npos){ + host = host.substr(1+where); + } if (!host.length()) return SPF_RESULT_INVALID; authorities.push_back(host); @@ -55,7 +60,6 @@ void sepofra::check( ip = opt_ip; mailfrom = opt_mailfrom; string mailfrom_domain = domain_part(opt_mailfrom); - string auth; do { spf_server = SPF_server_new(SPF_DNS_CACHE, opt_debug); -- cgit v1.2.3