1 |
diff -Nur -x '*.orig' -x '*.rej' smeserver-qpsmtpd-1.2.1/root/usr/share/qpsmtpd/plugins/disclaimer mezzanine_patched_smeserver-qpsmtpd-1.2.1/root/usr/share/qpsmtpd/plugins/disclaimer |
diff -Nur -x '*.orig' -x '*.rej' smeserver-qpsmtpd-1.2.1/root/usr/share/qpsmtpd/plugins/disclaimer mezzanine_patched_smeserver-qpsmtpd-1.2.1/root/usr/share/qpsmtpd/plugins/disclaimer |
2 |
--- smeserver-qpsmtpd-1.2.1/root/usr/share/qpsmtpd/plugins/disclaimer 2007-06-17 08:52:46.000000000 -0600 |
--- smeserver-qpsmtpd-1.2.1/root/usr/share/qpsmtpd/plugins/disclaimer 2007-06-17 09:21:13.000000000 -0600 |
3 |
+++ mezzanine_patched_smeserver-qpsmtpd-1.2.1/root/usr/share/qpsmtpd/plugins/disclaimer 2007-06-17 08:51:55.000000000 -0600 |
+++ mezzanine_patched_smeserver-qpsmtpd-1.2.1/root/usr/share/qpsmtpd/plugins/disclaimer 2007-06-17 09:19:45.000000000 -0600 |
4 |
@@ -1,83 +1,101 @@ |
@@ -1,83 +1,98 @@ |
5 |
use MIME::Parser; |
use MIME::Parser; |
6 |
use MIME::Entity; |
use MIME::Entity; |
7 |
|
|
26 |
return DECLINED; |
return DECLINED; |
27 |
} |
} |
28 |
|
|
29 |
- $self->qp->version =~ m/([\.\d]+).*/; |
$self->qp->version =~ m/([\.\d]+).*/; |
30 |
- my $versionnum = $1; |
my $versionnum = $1; |
31 |
my @rcpt_hosts = ($self->qp->config("me"), $self->qp->config("rcpthosts")); |
- my @rcpt_hosts = ($self->qp->config("me"), $self->qp->config("rcpthosts")); |
|
+ my $fromhost; |
|
|
+ if ( $self->{_args}->{tag_all} ) { |
|
|
+ $fromhost = $rcpt_hosts[0]; |
|
|
+ } else { |
|
|
+ $self->qp->version =~ m/([\.\d]+).*/; |
|
|
+ my $versionnum = $1; |
|
32 |
|
|
33 |
- my $fromhost = $transaction->sender->host; |
+ my @rcpt_hosts = ($self->qp->config("me"), $self->qp->config("rcpthosts")); |
34 |
|
my $fromhost = $transaction->sender->host; |
35 |
- my $fromlocal = 0; |
- my $fromlocal = 0; |
36 |
- |
- |
37 |
- for my $allowed (@rcpt_hosts) { |
- for my $allowed (@rcpt_hosts) { |
54 |
- foreach my $rcpt ( $transaction->recipients ) { |
- foreach my $rcpt ( $transaction->recipients ) { |
55 |
- my $local = 0; |
- my $local = 0; |
56 |
- my $host = $rcpt->host; |
- my $host = $rcpt->host; |
57 |
+ $fromhost = $transaction->sender->host; |
+ unless ( $self->{_args}->{tag_all} ) { |
58 |
+ my $fromlocal = 0; |
+ my $fromlocal = 0; |
59 |
|
|
60 |
for my $allowed (@rcpt_hosts) { |
for my $allowed (@rcpt_hosts) { |
125 |
+ } |
+ } |
126 |
+ |
+ |
127 |
+ unless ($toexternal) { |
+ unless ($toexternal) { |
128 |
+ $self->log(LOGDEBUG, "Not from local domain"); |
+ $self->log(LOGDEBUG, "Not to any external domain"); |
129 |
+ return DECLINED; |
+ return DECLINED; |
130 |
+ } |
+ } |
131 |
+ } |
+ } |