Tuesday, February 11, 2014

Sendmail with DKIM on Fedora 19


http://www.ipsure.com/blog/2010/domainkeys-identified-mail-dkim-with-postfix-smtp-only/
http://www.techsneeze.com/deploy-dkim-milter-multiple-domains-centos-5-sendmail
http://www.cesafaci.ro/tutoriale/sendmail-cu-dkim-pe-centos-fedora-19.html

yum install dkim-milter


cd /etc/mail/dkim-milter/keys
dkim-genkey -r -d your-domain.com
= > 2 files : public key (default.txt) and private key (default.private)

At this point you should have a "default.private" and "default.txt" file in your current working directory (which is /etc/mail/dkim-milter/keys). 
default.txt contains the DNS TXT record you must add to your DNS entries. 

cat default.txt >> /var/named/chroot/var/named/yourdomain.zone
mv default.private /etc/mail/dkim-milter/domeniultau_default.key.pem
chown dkim-milter:dkim-milter /etc/mail/dkim-milter/domeniultau_default.key.pem



/etc/mail/dkim-milter/dkim-filter.conf


Domaindomeniu.ro
KeyFile/etc/mail/dkim-milter/domeniultau_default.key.pem
MTAMSA
Selectordefault
SignatureAlgorithmrsa-sha1
Socketlocal:/var/run/dkim-milter/dkim-milter.sock
SyslogYes
X-HeaderYes












/etc/mail/sendmail.mc
dnl # dkim - yahoo domainkeys implementation
INPUT_MAIL_FILTER(`dkim-filter', `S=local:/var/run/dkim-milter/dkim-milter.sock')

cd /etc/mail
make
service named reload
service dkim-milter start
service sendmail restart
chkconfig dkim-milter on






 The config file (/etc/mail/dkim-milter/dkim-filter.conf) is fully self-documented and easy to understand. 
I made the following changes from the default config:
AutoRestart  Yes
AutoRestartRate 10/1h
Canonicalization simple/simple
Domain  techsneeze.com
ExternalIgnoreList /etc/mail/dkim-milter/trusted-hosts
InternalHosts /etc/mail/dkim-milter/InternalHosts.txt
LogWhy  yes
On-Default accept
On-BadSignature accept
On-DNSError accept
On-InternalError accept
On-NoSignature accept
On-Security accept
SignatureAlgorithm rsa-sha256
Socket  local:/var/run/dkim-milter/dkim-milter.sock
Syslog  yes
SyslogSuccess yes
UserID  dkim-milter:dkim-milter
X-Header  yes



PROBLEM : 
if in the logs appear something like : "no signature data" 
       [ cat /var/log/maillog | grep "no signature data" ] or 
   "external host [192.168.101.54] attempted to send as yourdomain.com
  and this host  [192.168.101.54] is on your internal network ...
SOLUTION: 
#cd /etc/mail/dkim-milter/ 
#touch InternalHosts.txt 
# chmod 444 InternalHosts.txt
 # vi InternalHosts.txt 
         192.168.101.0/24
   
          yourdomain.com     
          smtp.yourdomain.com

~ ~ ~ 

We may enhance DKIM TXT entries like: 
 _domainkey.(yourdomain.com). IN TXT "t=y; o=~; r=postmaster@(yourdomain.com)" 
 where 
 t=y means “this domain is currently testing DKIM, verifier side mustn’t treat the messages differently from unsigned e-mails even if the signature fails to be verified”

 

 o=~ means “some e-mails from this domain are signed, some are not”

  

o=- means “all e-mails from this domain are signed”

 

 r=postmaster@(yourdomain.com) designates responsible e-mail address



When we implemented DomainKeys Identified Mail (DKIM) with Postfix on FreeBSD, we had used dkim-milter plugin. However, it seems that dkim-milter has expired and recently it has been removed from the ports tree. Consequently, we’ll also move to OpenDKIM which is in fact claimed to be bug free compared to dkim-milter. - See more at: http://www.ipsure.com/blog/2012/dkim-milter-is-no-longer-available-how-to-use-opendkim-instead/#sthash.UraBfaka.dpuf





Open



DKIM includes a cryptographic hash in the e-mail header which is calculated with the private key (on the server) and verified with the public key (in the DNS record).
DKIM-Signature: v=1; a=rsa-sha256; d=example.net; s=brisbane;
     c=relaxed/simple; q=dns/txt; l=1234; t=1117574938; x=1118006938;
     h=from:to:subject:date:keywords:keywords;
     bh=MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI=;
     b=dzdVyOfAKCdLXdJOc9G2q8LoXSlEniSbav+yuU4zGeeruD00lszZ
              VoG4ZHRNiYzR


First, install opendkim.
yum install opendkim

/etc/opendkim.conf.
AutoRestart             Yes
UMask                   002
Syslog                  yes
AutoRestartRate         10/1h
Canonicalization        relaxed/simple
ExternalIgnoreList      refile:/etc/opendkim/TrustedHosts
InternalHosts           refile:/etc/opendkim/TrustedHosts
KeyTable                refile:/etc/opendkim/KeyTable
LogWhy                  Yes
Mode                    sv
PidFile                 /var/run/opendkim/opendkim.pid
SignatureAlgorithm      rsa-sha256
SigningTable            refile:/etc/opendkim/SigningTable
Socket                  inet:8891@localhost
SyslogSuccess           Yes
TemporaryDirectory      /var/tmp
UserID                  opendkim:opendkim
As you can see, there are three more files to be added, TrustedHosts (whitelisted IPs that can sign e-mails), KeyTable (multiple domain configuration for public and private keys) and SigningTable (whitelisted users that can sign e-mail).

/etc/opendkim/TrustedHosts:
127.0.0.1
example.com
192.168.0.1/24


/etc/opendkim/SigningTable:
*@example.com default._domainkey.example.com
All users from @example.com can sign. You can specifiy usernames and domains, instead of the wildcard, for additional security.

/etc/opendkim/KeyTable:
default._domainkey.example.com example.com:default:/etc/opendkim/keys/example.com.pvt
Location of the private key and name of the DNS record for each domain. The "default" before _domainkey.example.com and :default: is a selector. This can be changed to something else.

Next, we need to generate the public and private key for each domain.
If some folders don't exist, just create them.
# opendkim-genkey -D /etc/opendkim/keys/example.com -d example.com -s default
Again -s flag is for the selector. If you changed it, you need to enter it here.
The command generates a private key (default) and public key (default.txt). You will probably rename them, to match the configuration.
An important note here is that the files are owned by user opendkim, or you will get permission denied errors in /var/log/mail.err. Default permissions on those files are -rw------.

Move the private key to where you specified it should be in the KeyTable.
Insert the public key in your DNS as a TXT record.

Next up, telling sendmail to talk to opendkim.
Edit /etc/mail/sendmail.mc and add this line at the end. 
INPUT_MAIL_FILTER(`opendkim', `S=inet:8891@localhost')

Rebuild sendmail configuration and restart, start opendkim if it's not running yet
service sendmail restart; service opendkim start

Friday, February 7, 2014

2013 Android 51% US smartphones


comScore: Apple ends 2013 with 41.8% US smartphone share, Samsung hits 26.1%; Android back to losing share

The latest data comes from comScore,
which regularly surveys mobile subscribers in the US. 
While Samsung has managed to gain more share than Apple in
May, June, July, September, October, and November,
the two tied for the holiday month.
Apple’s gains are based on the arrival of the 
iPhone 5s and iPhone 5c
and the lack of the 
Samsung Galaxy S5 ... 


Top Smartphone OEMs
3 Month Avg. Ending Dec. 2013 vs. 3 Month Avg. Ending Sep. 2013
Total U.S. Smartphone Subscribers Age 13+
Source: comScore MobiLens
Share (%) of Smartphone Subscribers
Sep-13Dec-13Point Change
Total Mobile Subscribers100.0%100.0%N/A
Apple40.6%41.8%1.2
Samsung24.9%26.1%1.2
Motorola6.8%6.7%-0.1
LG6.6%6.6%0.0
HTC7.1%5.7%-1.4

Top Smartphone Platforms
3 Month Avg. Ending Dec. 2013 vs. 3 Month Avg. Ending Sep. 2013
Total U.S. Smartphone Subscribers Age 13+
Source: comScore MobiLens
Share (%) of Smartphone Subscribers
Sep-13Dec-13Point Change
Total Smartphone Subscribers100.0%100.0%N/A
Android51.8%51.5%-0.3
Apple40.6%41.8%1.2
BlackBerry3.8%3.4%-0.4
Microsoft3.3%3.1%-0.2
Symbian0.3%0.2%-0.1

Google is still dominating, even with Apple’s steady gains.
Android lost share most months in 2013,
though in October and November it regained some share.
December was, however, back in the red ... 

Thursday, February 6, 2014

Android 80% smartphones worldwide 2013


http://www.canalys.com/newsroom/android-80-smart-phones-shipped-2013



Canalys: Android on 79% of the 998 million smartphones shipped in 2013, Windows Phone fastest growing platform




Android on 80% of smart phones shipped in 2013

- Windows Phone’s 69% year-on-year increase in Q4 2013 made it the fastest growing platform

Palo Alto, Shanghai, Singapore and Reading – Thursday, 30 January 2014






http://blogs.strategyanalytics.com/WSS/post/2014/01/29/Android-Captured-79-Share-of-Global-Smartphone-Shipments-in-2013.aspx



Strategy Analytics: Android smartphone shipments up to 78.9% in 2013, iOS down to 15.5%, Windows Phone at 3.6%




Global Smartphone OS Shipments and Market Share in Q4 2013 [1]

Global Smartphone Operating System Shipments (Millions of Units)

Q4 '12

2012

Q4 '13

2013

Android

152.5

481.5

227.7

781.2

Apple iOS

47.8

135.8

51.0

153.4

Microsoft

5.9

18.8

9.4

35.7

Others

10.8

64.0

2.2

19.8

Total

217.0

700.1

290.2

990.0











Global Smartphone Operating System Marketshare  %

Q4 '12

2012

Q4 '13

2013

Android

70.3%

68.8%

78.4%

78.9%

Apple iOS

22.0%

19.4%

17.6%

15.5%

Microsoft

2.7%

2.7%

3.2%

3.6%

Others

5.0%

9.1%

0.7%

2.0%

Total

100.0%

100.0%

100.0%

100.0%

Smartphone platforms in 2013: Android, iOS, and irrelevant







Top Five Smartphone Operating Systems, Shipments, and Market Share, 4Q 2013 (Units in Millions) 
Operating System
4Q13 Shipment Volumes
4Q13 Market Share
4Q12 Shipment Volumes
4Q12 Market Share
Year-Over-Year Change
Android
226.1
78.1%
161.1
70.3%
40.3%
iOS
51.0
17.6%
47.8
20.9%
6.7%
Windows Phone
8.8
3.0%
6.0
2.6%
46.7%
BlackBerry
1.7
0.6%
7.4
3.2%
-77.0%
Others
2.0
0.7%
6.7
2.9%
-70.1%
Total
289.6
100.0%
229.0
100.0%
26.5%


Source: IDC Worldwide Mobile Phone Tracker, February 12, 2014


Top Five Smartphone Operating Systems, Shipments, and Market Share, 2013 (Units in Millions) 
Operating System
2013 Shipment Volumes
2013 Market Share
2012 Shipment Volumes
2012 Market Share
Year-Over-Year Change
Android
793.6
78.6%
500.1
69.0%
58.7%
iOS
153.4
15.2%
135.9
18.7%
12.9%
Windows Phone
33.4
3.3%
17.5
2.4%
90.9%
BlackBerry
19.2
1.9%
32.5
4.5%
-40.9%
Others
10.0
1.0%
39.3
5.4%
-74.6%
Total
1009.6
100.0%
725.3
100.0%
39.2%

Source: IDC Worldwide Mobile Phone Tracker, February 12, 2014


Worldwide Smartphone Shipments Top One Billion Units for the First Time



Top Five Smartphone Vendors, Shipments, and Market Share, 2013 (Units in Millions) 

Vendor
2013 Shipment Volumes
2013 Market Share
2012 Shipment Volumes
2012 Market Share
Year-over-Year Change
Samsung
313.9
31.3%
219.7
30.3%
42.9%
Apple
153.4
15.3%
135.9
18.7%
12.9%
Huawei
48.8
4.9%
29.1
4.0%
67.5%
LG
47.7
4.8%
26.3
3.6%
81.1%
Lenovo
45.5
4.5%
23.7
3.3%
91.7%
Others
394.9
39.3%
290.5
40.1%
35.9%
Total
1,004.2
100.0%
725.3
100.0%
38.4%


Source: IDC Worldwide Mobile Phone Tracker, January 27, 2014



  Top Five Smartphone Vendors, Shipments, and Market Share, 2013 Q4 (Units in Millions) 

Vendor
4Q13 Shipment Volumes
4Q13 Market Share
4Q12 Shipment Volumes
4Q12 Market Share
Year-over-Year Change
Samsung
82.0
28.8%
66.7
29.1%
22.9%
Apple
51.0
17.9%
47.8
20.9%
6.7%
Huawei
16.4
5.8%
10.5
4.6%
56.5%
Lenovo
13.9
4.9%
9.4
4.1%
47.3%
LG
13.2
4.6%
8.6
3.8%
53.2%
Others
107.9
37.9%
85.9
37.5%
25.6%
Total
284.4
100.0%
229.0
100.0%
24.2%



Source: IDC Worldwide Mobile Phone Tracker, January 27, 2014




Top Five Mobile Phone Vendors, Shipments, and Market Share, 2013 (Units in Millions) 
Vendor
2013 Shipment Volumes
2013 Market Share
2012 Shipment Volumes
2012 Market Share
Year-over-Year Change
Samsung
446.7
24.5%
409.4
23.6%
9.1%
Nokia
251.0
13.8%
335.6
19.3%
-25.2%
Apple
153.4
8.4%
135.9
7.8%
12.9%
LG
70.0
3.8%
56.6
3.3%
23.6%
Huawei
55.5
3.0%
47.5
2.7%
16.7%
Others
845.2
46.4%
753.1
43.3%
12.2%
Total
1,821.8
100.0%
1738.1
100.0%
4.8%

Source: IDC Worldwide Mobile Phone Tracker, January 27, 2014