masqmail

diff src/smtp_in.c @ 305:794071925a22

refactored complex conditions
author meillo@marmaro.de
date Sun, 24 Apr 2011 15:10:11 +0200
parents 3708b655a371
children 53cf6be5843a
line diff
     1.1 --- a/src/smtp_in.c	Thu Dec 09 18:28:11 2010 -0300
     1.2 +++ b/src/smtp_in.c	Sun Apr 24 15:10:11 2011 +0200
     1.3 @@ -286,17 +286,11 @@
     1.4  					break;
     1.5  				}
     1.6  				if (!addr->domain) {
     1.7 +					/* TODO: ``postmaster'' may be unqualified */
     1.8  					smtp_printf(out, "501 recipient address must be qualified.\r\n", buf);
     1.9  					break;
    1.10  				}
    1.11 -				gboolean do_relay = conf.do_relay;
    1.12 -				if (!do_relay) {
    1.13 -					do_relay = addr_is_local(msg->return_path);
    1.14 -					if (!do_relay) {
    1.15 -						do_relay = addr_is_local(addr);
    1.16 -					}
    1.17 -				}
    1.18 -				if (!do_relay) {
    1.19 +				if (!(conf.do_relay || addr_is_local(msg->return_path) || addr_is_local(addr))) {
    1.20  					smtp_printf(out, "550 relaying to %s denied.\r\n", addr_string(addr));
    1.21  					break;
    1.22  				}