summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/sepofra.c10
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);