addrcheck: Take the domain as following the last `@', not the first.
[qmail] / addrcheck.c
index 0b189a7..63281a3 100644 (file)
@@ -264,7 +264,7 @@ int addrcheck(int cdb, const char *addr, const char *sender, int *rc)
   static stralloc l = STRALLOC_INIT;
 
   len = str_len(addr);
-  at = str_chr(addr, '@');
+  at = str_rchr(addr, '@');
   if (!addr[at])
     return (local(cdb, addr, len, sender, rc));