Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 10th February 2009, 13:08
ladduro ladduro is offline
Junior Member
 
Join Date: Feb 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default dk-milter with postfix and virtual domains not working

Hello,

I just followed the howto from HowtoForge about installing the dk-milter with postfix. Here is my configuration:

Code:
 cat /etc/sysconfig/dk-milter
# Default values
#
USER="dk-milt"
PORT="local:/var/run/dk-milter/dk.sock"
#PORT="inet:127.0.01:10034"
SIGNING_DOMAIN="nights.ro,djsuperstore.ro"
SELECTOR_NAME="default"
KEYFILE="/etc/mail/domainkeys/dk_key.pem"
SIGNER=yes
VERIFIER=yes
CANON=simple
REJECTION="bad=r,dns=t,int=t,no=a,miss=r"
EXTRA_ARGS="-h -l -D"
MILTER_GROUP="mail"
Code:
 cat default.txt
default._domainkey IN TXT "g=; k=rsa; t=y; p=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMDAVuWTyhxGFfNA1AKYx79467stva1WPS9T85JwMVV7cgYHaLHUagW6W4itUn/Vz2yCxF7jnRgav//T1+Bxl/kCAwEAAQ==" ; ----- DomainKey default for nights.ro


and in zone:

cat /var/named/chroot/var/named/data/djsuperstore.ro.db
.............................................................
default._domainkey IN TXT "g=; k=rsa; t=y; p=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMDAVuWTyhxGFfNA1AKYx79467stva1WPS9T85JwMVV7cgYHaLHUagW6W4itUn/Vz2yCxF7jnRgav//T1+Bxl/kCAwEAAQ=="
_domainkey IN TXT "t=y; o=~"
.............................................................
Posting only the relevant part.

In main.cf i have:
Code:
smtpd_milters = unix:/var/run/dk-milter/dk.sock
non_smtpd_milters = unix:/var/run/dk-milter/dk.sock
And i maillog i receive the following error:

Code:
Feb 10 12:04:30 ns1 postfix/smtpd[15689]: warning: connect to Milter service unix:/var/run/dk-milter/dk.sock: No such file or directory
Feb 10 12:04:30 ns1 postfix/smtpd[15689]: NOQUEUE: milter-reject: CONNECT from unknown[127.0.0.1]: 451 4.7.1 Service unavailable - try again later; proto=SMTP
Feb 10 12:04:30 ns1 postfix/smtpd[15689]: NOQUEUE: milter-reject: EHLO from unknown[127.0.0.1]: 451 4.7.1 Service unavailable - try again later; proto=SMTP
Feb 10 12:04:30 ns1 postfix/smtpd[15689]: NOQUEUE: milter-reject: MAIL from unknown[127.0.0.1]: 451 4.7.1 Service unavailable - try again later; proto=ESMTP helo=<admin.ns1.nights.ro>
As you can see the file exists:
Code:
ls -la /var/run/dk-milter/
total 20
drwxrwx---  2 dk-milt mail 4096 Feb 10 13:07 .
drwxr-xr-x 29 root    root 4096 Feb 10 13:10 ..
srwxrwx---  1 dk-milt mail    0 Feb 10 13:07 dk.sock
And also txt dig for djsuperstore.ro domain is correct:
Code:
 dig default._domainkey.djsuperstore.ro TXT

; <<>> DiG 9.3.4-P1 <<>> default._domainkey.djsuperstore.ro TXT
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53014
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;default._domainkey.djsuperstore.ro. IN TXT

;; ANSWER SECTION:
default._domainkey.djsuperstore.ro. 39615 IN TXT "g=\; k=rsa\; t=y\; p=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMDAVuWTyhxGFfNA1AKYx79467stva1WPS9T85JwMVV7cgYHaLHUagW6W4itUn/Vz2yCxF7jnRgav//T1+Bxl/kCAwEAAQ=="

;; AUTHORITY SECTION:
djsuperstore.ro.        38839   IN      NS      ns1.djsuperstore.ro.
djsuperstore.ro.        38839   IN      NS      ns2.djsuperstore.ro.

;; ADDITIONAL SECTION:
ns1.djsuperstore.ro.    40475   IN      A       85.9.22.129
ns2.djsuperstore.ro.    40475   IN      A       85.9.22.129

;; Query time: 1 msec
;; SERVER: 193.226.128.1#53(193.226.128.1)
;; WHEN: Tue Feb 10 14:06:17 2009
;; MSG SIZE  rcvd: 279
dig on nights.ro domain has diff txt cause is not updated yet. (and it is a key previously created). Let's refer to djsuperstore.ro only.

I am doing something wrong ? Why is this not working ?
Reply With Quote
Sponsored Links
  #2  
Old 10th February 2009, 14:56
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
Default

You need to use the same key for all the domains. As for the error in the log, the milter is not running that is why postfix cannot connect to it. You need to check and see why the milter is not running.
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
  #3  
Old 10th February 2009, 15:31
ladduro ladduro is offline
Junior Member
 
Join Date: Feb 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The milter is running:

Code:
service dk-milter status
dk-filter (pid 11515) is running...

and

 ps aux|grep milter
dk-milt  11515  0.0  0.0  15488   856 ?        Ssl  13:07   0:00 /usr/sbin/dk-filter -u dk-milt -p local:/var/run/dk-milter/dk.sock -d nights.ro,djsuperstore.ro -s /etc/mail/domainkeys/dk_key.pem -S default -b sv -c simple -C bad=r,dns=t,int=t,no=a,miss=r -h -l -D -P /var/run/dk-filter0.pid
As you can see the process is up and running. The problem is not here i'm afraid.
Reply With Quote
  #4  
Old 10th February 2009, 19:03
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
Default

have u checked selinux ?
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
  #5  
Old 10th February 2009, 22:55
ladduro ladduro is offline
Junior Member
 
Join Date: Feb 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

selinux is disabled.

I have to mention that postfix running under user and group postfix. it is correct to leave this like that :

MILTER_GROUP="mail"
Reply With Quote
  #6  
Old 11th February 2009, 07:47
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
Default

No in that case you need to change the MILTER_GROUP to postifx
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
  #7  
Old 11th February 2009, 09:49
ladduro ladduro is offline
Junior Member
 
Join Date: Feb 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thnk you very much for you support. I manage to resolve it my using inet socket. Changing MILTER_GROUP does not work

Regards.
Reply With Quote
  #8  
Old 18th February 2009, 00:29
codechump codechump is offline
Junior Member
 
Join Date: Feb 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

could you please explain how you managed to 'resolve it my using inet socket'? I think I'm having the same problem, but don't follow what you did to resolve it.

thanks...
Reply With Quote
  #9  
Old 18th February 2009, 08:18
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
Default

he means you need to run it using tcp not via a unix socket.

Code:
inet:localhost:2020
for postfix

and

Code:
inet:2020@localhost
for the milter
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
  #10  
Old 18th February 2009, 09:42
ladduro ladduro is offline
Junior Member
 
Join Date: Feb 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

in /etc/sysconfig/dk-milter

Code:
PORT="inet:10035@public_ip"
in /etc/postfix/main.cf
Code:
smtpd_milters = inet:public_ip:10035
non_smtpd_milters = inet:public_ip:10035
Is not working with localhost nor 127.0.0.1

Regards
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Undelivered Mail Returned to Sender Error202 General 5 7th May 2009 11:14
localhost postfix/master: fatal: bind 127.0.0.1 port 125: Permission denied g18c Installation/Configuration 4 24th March 2009 17:39
CentoS doesn't send the emails vaio1 Installation/Configuration 18 5th November 2008 17:51
Mail System Error - Returned Mail tristanlee85 General 16 16th March 2008 09:40
Verify email setup meekish Installation/Configuration 28 27th October 2006 15:36


All times are GMT +2. The time now is 05:48.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.