diff options
author | John Denker <jsd@av8n.com> | 2012-07-31 18:24:32 -0700 |
---|---|---|
committer | John Denker <jsd@av8n.com> | 2012-07-31 18:24:32 -0700 |
commit | ea83c5d01a7e075dc5cd7ddf808e2a275f2dd68b (patch) | |
tree | 32937dd84fd01a81c15f49161ccd6ca143a2edf4 | |
parent | 159a3f448ad2caf9468921a4387c2dbafe09c3a3 (diff) |
fix a cosmetic bug : no user@ in authorizer
-rw-r--r-- | tools/sepofra.c | 10 |
1 files 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); |