[CalendarServer-users] iCal problem in mailgateway

Morgen Sagen sagen at apple.com
Thu Mar 21 09:59:36 PDT 2013


What does this output if you run it on the same machine as your calendar server:

python -c "import socket; print socket.gethostbyaddr('127.0.0.1')"


On Mar 15, 2013, at 8:28 AM, Fabrizio Regalli <fabreg at gmail.com> wrote:

> Hi Morgen,
> 
> this was my first check, but it solve 127.0.0.1 to localhost (and viceversa) correctly
> My /etc/hosts looks like:
> 
> 127.0.0.1	localhost
> 255.255.255.255	broadcasthost
> ::1             localhost 
> fe80::1%lo0	localhost
> 
> # nslookup 127.0.0.1
> Server:		127.0.0.1
> Address:	127.0.0.1#53
> 
> 1.0.0.127.in-addr.arpa	name = localhost.
> 
> # nslookup localhost
> Server:		127.0.0.1
> Address:	127.0.0.1#53
> 
> Name:	localhost
> Address: 127.0.0.1
> 
> Thank you.
> 
> 
> 2013/3/15 Morgen Sagen <sagen at apple.com>
> Here's the related server code…
> 
>     def securityChecks(self):
>         """
>         Check that the connection is from the mail gateway
>         """
>         allowed = config.Scheduling['iMIP']['MailGatewayServer']
>         # Get the request IP and map to hostname.
>         clientip = self.request.remoteAddr.host
>         host, aliases, _ignore_ips = socket.gethostbyaddr(clientip)
>         for host in itertools.chain((host, clientip), aliases):
>             if host == allowed:
>                 break
>         else:
>             log.err("Only %s is allowed to submit internal scheduling requests, not %s" % (allowed, host))
>             # TODO: verify this is the right response:
>             raise HTTPError(ErrorResponse(
>                 responsecode.FORBIDDEN,
>                 (caldav_namespace, "originator-allowed"),
>                 "Originator server not allowed to send to this server",
>             ))
> 
> The message you're seeing means your gethostbyaddr(clientip) call is not returning "localhost".  Does your /etc/hosts have a "127.0.0.1  localhost" entry?
> 
> 
> On Mar 15, 2013, at 1:58 AM, Fabrizio Regalli <fabreg at gmail.com> wrote:
> 
>> Hello, 
>> 
>> I have a problem in my iCal: if I schedule a meeting and the recipient accept it, I can't receive the answer. 
>> The log says: 
>> 
>> 2013-03-14 22:54:57+0100 [-] [caldav-8009]  [PooledMemCacheProtocol,client] [twistedcaldav.scheduling.scheduler#error] Only localhost is allowed to submit internal scheduling requests, not 127.0.0.1 
>> 2013-03-14 22:54:57+0100 [-] [mailgateway] 2013-03-14 22:54:57+0100 [AuthorizedHTTPGetter,client] [twistedcaldav.mail#error] Mail gateway failed to inject message <f46d043748df241b7304d7e99270 at google.com> (Reason: 403 Forbidden) 
>> 
>> Could someone help me? 
>> 
>> Thanks in advance.
>> _______________________________________________
>> calendarserver-users mailing list
>> calendarserver-users at lists.macosforge.org
>> https://lists.macosforge.org/mailman/listinfo/calendarserver-users
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-users/attachments/20130321/69cd6e8a/attachment-0001.html>


More information about the calendarserver-users mailing list