Имейте в виду, ребята: если вы в конце своей spf записи в DNS написали "~all", то вреда от неё будет большем чем пользы. Механизм SPF записей был создан для того чтобы сократить возможность фальсификации почты от имени Вашего домена. Если Вы пишете в конце записи содержащей информацию о том откуда может прийти Ваша почта "и ещё моя почта может приходить хрен знает откуда", в чём тогда польза этой записи? Всё валящееся "хрен знает откуда" (не прописанное в строгой части записи) будет на принимающем сервере определено антиспам защитой как softfail spf и, с большой долей вероятности, пойдёт в мусор. Лучше сразу пишите "всё что приходит не с этих адресов - в мусор" (-all). И, конечно, не забывайте поддерживать актуальность spf записи. В случае -all потерявшуюся актуальность, кстати, будет намного проще обнаружить.
vb.net, active directory, администрирование, автоматизация рутинных задач администрирования, быдлокодинг, волнующее железо. Блог завёл чтобы самому не забывать часто используемые конструкции.
20 мар. 2014 г.
19 мар. 2014 г.
Из-за того что кое-кто (не будем показывать пальцем, но это была компания Майкрософт) не озаботился созданием удобств для работы кухарок с exif свойствами фотографий в .NET, доставать GPS координаты из них приходится вот таким способом:
Dim theImage As Image = New Bitmap("C:\Users\a.scherbakov\Documents\WP_000336.JPG")
Dim LatDegrees = BitConverter.ToUInt32(theImage.GetPropertyItem(2).Value(), 0) / CSng(BitConverter.ToUInt32(theImage.GetPropertyItem(2).Value(), 4))
Dim LatMinutes = BitConverter.ToUInt32(theImage.GetPropertyItem(2).Value(), 8) / CSng(BitConverter.ToUInt32(theImage.GetPropertyItem(2).Value(), 12))
Dim LatSeconds
If Not BitConverter.ToUInt32(theImage.GetPropertyItem(2).Value(), 16) / CSng(BitConverter.ToUInt32(theImage.GetPropertyItem(2).Value(), 20)) = 0 Then
LatSeconds = BitConverter.ToUInt32(theImage.GetPropertyItem(2).Value(), 16) / CSng(BitConverter.ToUInt32(theImage.GetPropertyItem(2).Value(), 20))
Else
LatSeconds = (LatMinutes - Int(LatMinutes)) * 60
End If
Dim Latitude = LatDegrees & "° " & Int(LatMinutes) & "' " & LatSeconds
Dim LongDegrees = BitConverter.ToUInt32(theImage.GetPropertyItem(4).Value(), 0) / CSng(BitConverter.ToUInt32(theImage.GetPropertyItem(4).Value(), 4))
Dim LongMinutes = BitConverter.ToUInt32(theImage.GetPropertyItem(4).Value(), 8) / CSng(BitConverter.ToUInt32(theImage.GetPropertyItem(4).Value(), 12))
Dim LongSeconds
If Not BitConverter.ToUInt32(theImage.GetPropertyItem(4).Value(), 16) / CSng(BitConverter.ToUInt32(theImage.GetPropertyItem(4).Value(), 20)) = 0 Then
LongSeconds = BitConverter.ToUInt32(theImage.GetPropertyItem(4).Value(), 16) / CSng(BitConverter.ToUInt32(theImage.GetPropertyItem(4).Value(), 20))
Else
LongSeconds = (LongMinutes - Int(LongMinutes)) * 60
End If
Dim Longtitude = LongDegrees & "° " & Int(LongMinutes) & "' " & LongSeconds
Dim theImage As Image = New Bitmap("C:\Users\a.scherbakov\Documents\WP_000336.JPG")
Dim LatDegrees = BitConverter.ToUInt32(theImage.GetPropertyItem(2).Value(), 0) / CSng(BitConverter.ToUInt32(theImage.GetPropertyItem(2).Value(), 4))
Dim LatMinutes = BitConverter.ToUInt32(theImage.GetPropertyItem(2).Value(), 8) / CSng(BitConverter.ToUInt32(theImage.GetPropertyItem(2).Value(), 12))
Dim LatSeconds
If Not BitConverter.ToUInt32(theImage.GetPropertyItem(2).Value(), 16) / CSng(BitConverter.ToUInt32(theImage.GetPropertyItem(2).Value(), 20)) = 0 Then
LatSeconds = BitConverter.ToUInt32(theImage.GetPropertyItem(2).Value(), 16) / CSng(BitConverter.ToUInt32(theImage.GetPropertyItem(2).Value(), 20))
Else
LatSeconds = (LatMinutes - Int(LatMinutes)) * 60
End If
Dim Latitude = LatDegrees & "° " & Int(LatMinutes) & "' " & LatSeconds
Dim LongDegrees = BitConverter.ToUInt32(theImage.GetPropertyItem(4).Value(), 0) / CSng(BitConverter.ToUInt32(theImage.GetPropertyItem(4).Value(), 4))
Dim LongMinutes = BitConverter.ToUInt32(theImage.GetPropertyItem(4).Value(), 8) / CSng(BitConverter.ToUInt32(theImage.GetPropertyItem(4).Value(), 12))
Dim LongSeconds
If Not BitConverter.ToUInt32(theImage.GetPropertyItem(4).Value(), 16) / CSng(BitConverter.ToUInt32(theImage.GetPropertyItem(4).Value(), 20)) = 0 Then
LongSeconds = BitConverter.ToUInt32(theImage.GetPropertyItem(4).Value(), 16) / CSng(BitConverter.ToUInt32(theImage.GetPropertyItem(4).Value(), 20))
Else
LongSeconds = (LongMinutes - Int(LongMinutes)) * 60
End If
Dim Longtitude = LongDegrees & "° " & Int(LongMinutes) & "' " & LongSeconds
Подписаться на:
Сообщения (Atom)