Hello,
I send you a patch that solves your first problem. Apply it and you
will be able to enter a hostname or a domain name as smarthost.
Cheers,
Javier
El jue, 14-02-2008 a las 00:38 +0100, shacky escribió:
> I installed ebox-mail which uses Postfix as MTA.
> I configured a smarthost, but I have two problems.
> I cannot configure an hostname as smarthost, but only its IP address.
> Most users don't know the IP address of the smarthost but only its
> hostname. Will this change in the stable version?
> The other problem is that if a smarthost is enabled, Postfix send to
> it the internal mail messages too, which the smarthost cannot relay of
> course.
> I don't know Postfix (I am more expert with Qmail). Can this behavior
> be changed?
>
> Thank you very much!
> Bye.
> _______________________________________________
> Ebox-user mailing list
> [email protected]
> https://lists.warp.es/mailman/listinfo/ebox-user
Index: Mail.pm
===================================================================
--- Mail.pm (revisión: 9534)
+++ Mail.pm (revisión: 9535)
@@ -35,6 +35,8 @@
use EBox::MailLogHelper;
use EBox::MailFirewall;
+use EBox::Exceptions::InvalidData;
+
use Proc::ProcessTable;
use Perl6::Junction qw(all);
@@ -486,7 +488,8 @@
# Method: setRelay
#
-# This method sets the ip address of the smarthost
+# This method sets the ip address of the smarthost
+# The address may be a domain name, hostname or a host address
#
# Parameters:
#
@@ -496,7 +499,20 @@
my ($self, $relay) = @_;
unless ($relay eq "") {
- checkIP($relay, __('smarthost ip'));
+ my $relayOk = 0;
+
+ $relayOk = checkHost($relay);
+ unless ($relayOk) {
+ $relayOk = checkDomainName($relay);
+ }
+
+ if (not $relayOk) {
+ throw EBox::Exceptions::InvalidData(
+ data => __('Smarthost'),
+ value => $relay,
+ advice => __('The smart host must be a domain name, a host name or an host address'),
+ )
+ }
}
$self->set_string('relay', $relay);
_______________________________________________
Ebox-user mailing list
[email protected]
https://lists.warp.es/mailman/listinfo/ebox-user