[Dspam-user] Dspam storage profile by domains

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Dspam-user] Dspam storage profile by domains

Marco
Hello,

  I would like to ask a little help about storage profiles.
I would like to use Dspam Storage Profiles, but I can't understand how  
to pass the profile from Postfix to Dspam.

I have the following setup. A Postfix MX server receive mails for many  
domains. Because I have thousands of accounts I would like to separe  
recipients domains by storage profile. For instance:
a.example.com --profile=a.example.com
b.example.com --profile=b.example.com
...

My master.cf contains:

smtpd     pass  -       -       n       -       200     smtpd
         -o content_filter=lmtp-dspam:[127.0.0.1]:20024
         -o receive_override_options=no_address_mappings

lmtp-dspam unix -      -       n     -       40   lmtp
     -o lmtp_data_done_timeout=1200
     -o lmtp_send_xforward_command=yes
     -o disable_dns_lookups=yes
     -o max_use=20



Let suppose I have unique dspam.conf and LMTP listener, using profile  
to separate dbs. With Postfix I can create more filters based on  
recipient domains. But how can I tell to dspam what profile apply?
Is there a way to specify profile in LMTP session?

Could I set profile using something as
ServerParameters        "--deliver=innocent,spam -d %u --profile=%domain"
where %domain shoud be the recipient domain?

Thank you very much
Best Regards
Marco


------------------------------------------------------------------------------
_______________________________________________
Dspam-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspam-user
Reply | Threaded
Open this post in threaded view
|

Re: [Dspam-user] dspamc or lmtp listener?

Marco
> Could I set profile using something as
> ServerParameters        "--deliver=innocent,spam -d %u --profile=%domain"
> where %domain shoud be the recipient domain?

I try to partially answer myself.
With dspamc (DLMTP) I could set "--profile". Using Postfix "pipe" I  
can associate profiles to domains:

dspam unix - n n - - pipe flags=
user=dspam:dspam argv=/usr/local/bin/dspamc --client --deliver=innocent,spam
--user ${recipient} --profile ${domain}

It should work... But I have to call dspamc instead of LMTPD directly.

I change the question. Do you know if there are performance  
differences between dspamc through "pipe" and LMTP socket?

Thanks again
Marco


------------------------------------------------------------------------------
_______________________________________________
Dspam-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspam-user
Reply | Threaded
Open this post in threaded view
|

Re: [Dspam-user] dspamc or lmtp listener?

Marco
> I change the question. Do you know if there are performance
> differences between dspamc through "pipe" and LMTP socket?

Oh no! If I use dspamc with DLMTP and daemon die, mails are bounced  
(not deferred)!
I have no choice.

Bye
Marco


------------------------------------------------------------------------------
_______________________________________________
Dspam-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspam-user
Reply | Threaded
Open this post in threaded view
|

Re: [Dspam-user] dspamc or lmtp listener?

Benny Pedersen-2
On October 1, 2015 4:13:44 PM Marco <[hidden email]> wrote:

>> I change the question. Do you know if there are performance
>> differences between dspamc through "pipe" and LMTP socket?
>
> Oh no! If I use dspamc with DLMTP and daemon die, mails are bounced
> (not deferred)!
> I have no choice.

logs ?

i bet you forgot to make alias expansion before calling dspam

postconf -Mf
postconf -nf

in case of old postfix show postconf with postfinger, google postfinger in
that case

------------------------------------------------------------------------------
_______________________________________________
Dspam-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspam-user
Reply | Threaded
Open this post in threaded view
|

Re: [Dspam-user] dspamc or lmtp listener?

Marco
In reply to this post by Marco

>> Oh no! If I use dspamc with DLMTP and daemon die, mails are bounced
>> (not deferred)!
>> I have no choice.
>
> logs ?

Hello Benny,

  this is the log:

2015-10-01T15:49:05.990363+02:00 server postfix/smtpd[21654]:  
3nRbQn72BDzFpVZ: client=sedna.example.com[10.10.10.10]
2015-10-01T15:49:09.617588+02:00 server postfix/cleanup[21740]:  
3nRbQn72BDzFpVZ: message-id=<>
2015-10-01T15:49:09.618820+02:00 server postfix/qmgr[20473]:  
3nRbQn72BDzFpVZ: from=<[hidden email]>, size=194, nrcpt=1 (queue  
active)
2015-10-01T15:49:09.675484+02:00 server postfix/pipe[21741]:  
3nRbQn72BDzFpVZ: to=<[hidden email]>, relay=dspam, delay=10,  
delays=10/0.01/0/0.05, dsn=5.3.0, status=bounced (Command died with  
status 251: "/usr/bin/dspam")
2015-10-01T15:49:09.738964+02:00 server postfix/bounce[21743]:  
3nRbQn72BDzFpVZ: sender non-delivery notification: 3nRbQs4ntbzFpVd
2015-10-01T15:49:09.743448+02:00 server postfix/qmgr[20473]:  
3nRbQn72BDzFpVZ: removed

Really, Postfix documentation says that filter with pipe can bounce  
instead to defer mails.
This bounce occurs if dspam daemon die and dspam is configured in  
DLMTP client/server mode.
I have not tried with "dspamc" in place of "dspam --client", but I  
think there are no differences.


> i bet you forgot to make alias expansion before calling dspam
>
> postconf -Mf
> postconf -nf

Here are postconf configs:

http://pastebin.com/s8u2Z0wk

I made no address mapping before filter, because I don't want apply  
filter to each expansed address. This is a common practice also for  
Amavis...

Thank you very much
Marco


------------------------------------------------------------------------------
_______________________________________________
Dspam-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspam-user
Reply | Threaded
Open this post in threaded view
|

Re: [Dspam-user] dspamc or lmtp listener?

Benny Pedersen-2
Marco skrev den 2015-10-02 09:12:

> Here are postconf configs:
> http://pastebin.com/s8u2Z0wk

smtpd      pass  -       -       n       -       200     smtpd
     -o content_filter=dspam:dummy
     -o receive_override_options=no_address_mappings

your fault is here

this wworks global

move the last line to dspam in master.cf

if you wanted lmtp setup dspam to listen as a lmtpd, and configure
postfix as a lmtp client, and make sure postfix dont send multirecipient
in one go

postfix and dspam must know all mailboxes in sync, if mailbox does not
exists you get bounce treverseing

------------------------------------------------------------------------------
_______________________________________________
Dspam-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspam-user
Reply | Threaded
Open this post in threaded view
|

Re: [Dspam-user] dspamc or lmtp listener?

Benny Pedersen-2
In reply to this post by Marco
Marco skrev den 2015-10-02 09:12:

> 2015-10-01T15:49:05.990363+02:00 server postfix/smtpd[21654]:
> 3nRbQn72BDzFpVZ: client=sedna.example.com[10.10.10.10]
> 2015-10-01T15:49:09.617588+02:00 server postfix/cleanup[21740]:
> 3nRbQn72BDzFpVZ: message-id=<>
> 2015-10-01T15:49:09.618820+02:00 server postfix/qmgr[20473]:
> 3nRbQn72BDzFpVZ: from=<[hidden email]>, size=194, nrcpt=1 (queue
> active)
> 2015-10-01T15:49:09.675484+02:00 server postfix/pipe[21741]:
> 3nRbQn72BDzFpVZ: to=<[hidden email]>, relay=dspam, delay=10,
> delays=10/0.01/0/0.05, dsn=5.3.0, status=bounced (Command died with
> status 251: "/usr/bin/dspam")
> 2015-10-01T15:49:09.738964+02:00 server postfix/bounce[21743]:
> 3nRbQn72BDzFpVZ: sender non-delivery notification: 3nRbQs4ntbzFpVd
> 2015-10-01T15:49:09.743448+02:00 server postfix/qmgr[20473]:
> 3nRbQn72BDzFpVZ: removed
>
> Really, Postfix documentation says that filter with pipe can bounce
> instead to defer mails.
> This bounce occurs if dspam daemon die and dspam is configured in
> DLMTP client/server mode.
> I have not tried with "dspamc" in place of "dspam --client", but I
> think there are no differences.

possible is "loose end" here http://gentoo-en.vfose.ru/wiki/Dspam_relay

------------------------------------------------------------------------------
_______________________________________________
Dspam-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dspam-user