On 09/11/11 11:18, johnny Strom wrote: > > On 11/09/2011 10:34 AM, Tom Hendrikx wrote: >> On 09/11/11 09:02, johnny Strom wrote: >>> Hello >>> >>> I have stetup dspam with postfix using this configuration described here: >>> >>> http://www.kirya.net/articles/setting-up-dspam-as-a-filter-for-postfix-on-debian/ >>> >>> >>> I use virtual_alias_maps = hash:/etc/postfix/virtual for virtual users. >>> >>> Now I have an problem when I specify an user in the virtual file that >>> dose not have an local account then >>> emails get duplicated to all recipients. >>> >>> Ex. >>> >>> # example.com virtual domain mail users. >>> example.com anything >>> us...@example.com user1 >>> i...@example.com user1, some-u...@gmail.com, >>> some-other-u...@gmail.com >>> >>> So what happens if someone form out side sends an email to >>> i...@example.com then all recipients will get six emails of the same email. >>> >>> If I put the some-u...@gmail.com, some-other-u...@gmail.com in an >>> .forward file then it works ok. >>> Dose it has something to do with how postfix expands the virtual users >>> when they are not local? >> This sure does look like a postfix configuration issue, not directly >> related to dspam. Could you show complete postfix logging for a message >> sent to i...@example.com in the above configuration? Also, output from >> postconf -n is way better than c/p from main.cf >> >> Also: do all six messages that are received in the end contain DSPAM >> headers? >> >>> The dspam specific configuration looks like this. >> <snipping what looks like a correct configuration> >> >>> smtpd_recipient_restrictions = >>> reject_invalid_hostname, >>> reject_non_fqdn_sender, >>> reject_non_fqdn_recipient, >>> reject_unknown_sender_domain, >>> reject_unknown_recipient_domain, >>> reject_unauth_pipelining, >>> permit_mynetworks, >>> permit_sasl_authenticated, >>> reject_unauth_destination, >>> reject_rbl_client blackholes.easynet.nl, >>> reject_rbl_client cbl.abuseat.org, >>> reject_rbl_client proxies.blackholes.wirehub.net, >>> reject_rbl_client bl.spamcop.net, >>> reject_rbl_client zen.spamhaus.org, >>> reject_rbl_client dnsbl.njabl.org, >>> reject_rbl_client dnsbl.dronebl.org, >>> check_policy_service inet:127.0.0.1:10023, >>> check_recipient_access pcre:/etc/postfix/dspam_check_aliases, >>> check_sender_access pcre:/etc/postfix/dspam_check_aliases, >>> check_client_access pcre:/etc/postfix/dspam_filter_access, >>> permit >> The dspam_check_aliases here does not occur in the howto you linked. >> What is it supposed to do, and what is in the dspam_check_aliases file? > > > It's at the end of the howto and it contains. > > /^.*(spam|ham)@.*$/ REJECT > > > It seems that the problem is that I used {original_recipient} instead of > {recipient} > > > dspam unix - n n - - pipe > flags=Ru user=dspam argv=/usr/bin/dspam --client --deliver=innocent > --user ${original_recipient} --mail-from=${sender} > > > When I tried to get it working so that all virtual users would be able > to train thier spam profile so did I need to add {original_recipient} > now that causes it to duplicate all emails instead if they are listed in > the virtual file. > > Now I have the retrain line like this: > > dspam-retrain unix - n n - - pipe > flags=Rhq user=dspam argv=/usr/bin/dspam --client --mode=teft > --class=$nexthop --source=error --user ${sender} > > Is there some other way to match the original_recipient (original email > adress) and the sender when training? > > > > > So If I use only recipient in the master.ch file then I get this when I try > to train > dsapm. > > loading preferences for user us...@somedomaim.com > _mysql_drv_getpwnam: returning NULL for query on name: us...@somedomaim.com > _ds_pref_load: unable to _mysql_drv_getpwnam(us...@somedomaim.com) > > > So I solved it by using "-user ${original_recipient}" but then I get > duplicate emails instead. >
i...@example.com is effectively only an alias for other accounts. I would like my users to set their own preferences, so DSPAM would be setup for us...@example.com, and not for i...@example.com. This means that the original setup with ${recipient} is correct, but your dspam accounts aren't (since there are no prefs for us...@example.com). -- Regards, Tom ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Dspam-user mailing list Dspam-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspam-user