diff options
author | Jesse Vincent <jesse@bestpractical.com> | 2001-08-23 19:49:18 +0400 |
---|---|---|
committer | Jesse Vincent <jesse@bestpractical.com> | 2001-08-23 19:49:18 +0400 |
commit | ac5ef752be04fba2ced0d24a2da71d02e2aeaa8d (patch) | |
tree | 9b22bd0106f40033e146f7b9cd048ee0e98bd408 | |
parent | 0d7d69c4db5de53b9350dc7e55331b1418db808b (diff) |
fixed initdb to not append a port= to the db connect string unless it needs one.rt-2.0.6.pre5
added support for $SenderMustExistInExternalDatabase to mailgate.
-rwxr-xr-x | bin/rt-mailgate | 25 | ||||
-rw-r--r-- | tools/initdb | 5 |
2 files changed, 26 insertions, 4 deletions
diff --git a/bin/rt-mailgate b/bin/rt-mailgate index ed8dba716f..6d5b68ecfd 100755 --- a/bin/rt-mailgate +++ b/bin/rt-mailgate @@ -180,11 +180,30 @@ if ($SquelchReplies) { # }}} -# {{{ If we don't have a ticket Id, we're creating a new ticket -if (!defined($TicketId)) { +# {{{ If we require that the sender be found in an external DB and they're not +# forward this message to RTOwner + + + +if ($RT::LookupSenderInExternalDatabase && + $RT::SenderMustExistInExternalDatabase ) { + + MailError(To => $RT::OwnerEmail, + Subject => "RT Bounce: $Subject", + Explanation => "RT couldn't find requestor via its external database lookup", + MIMEObj => $entity); - #If the message doesn't reference a ticket #, create a new ticket +} + +# }}} + + +# {{{ elsif we don't have a ticket Id, we're creating a new ticket + + + +elsif (!defined($TicketId)) { # {{{ Create a new ticket if ($Action =~ /correspond/) { diff --git a/tools/initdb b/tools/initdb index 920b10b699..832de7366c 100644 --- a/tools/initdb +++ b/tools/initdb @@ -26,7 +26,10 @@ if ($DEBUG) { my $dsn = "dbi:$DB_TYPE:"; if (($DB_TYPE eq 'Pg') or ($DB_TYPE eq 'mysql')) { - $dsn .= "dbname=$DB_DATABASE;host=$DB_HOST;port=$DB_PORT"; + $dsn .= "dbname=$DB_DATABASE;host=$DB_HOST"; + if ($DB_PORT) { + $dsn .= ";port=$DB_PORT"; + } } elsif ($DB_TYPE eq 'Oracle') { $dsn .= "$DB_DATABASE"; |